/* penmark.hu, /approach in the cover's design: the night palette, the photograph and the map in
   the opening, a crop of the same landscape for each sector, and the arrival from the cover.
   Loaded after site.css and map.css. Everything is scoped to body.night, so /legal, /privacy and
   the other light pages are untouched. */

.night {
  --paper: #0B1526;
  --surface: #101D33;
  --surface-hover: #14253F;
  --ink: var(--cover-ink);
  --ink-2: rgba(246, 243, 238, 0.78);
  --meta: rgba(246, 243, 238, 0.58);
  --hairline: rgba(246, 243, 238, 0.14);
  --hairline-2: rgba(246, 243, 238, 0.08);
  --link-rule: rgba(246, 243, 238, 0.32);
  --navy-tint: #101D33;
  --tint-rule: rgba(246, 243, 238, 0.14);
  --rule-strong: rgba(246, 243, 238, 0.26);
  --accent: var(--glow);
}

/* Navy was the light page's accent; on night ground it becomes the golden-hour light. */
.night a { color: var(--accent); }
.night a:hover { color: var(--glow-hot); }
.night :focus-visible { outline-color: var(--accent); }
.night ::selection { background: var(--accent); color: var(--night); }
.night .skip,
.night .skip:focus { background: var(--accent); color: var(--night); }

/* ── header ────────────────────────────────────────────────────────────── */

.night .site-header.is-solid { background: rgba(7, 13, 24, 0.84); border-bottom-color: var(--hairline); }
.night .wordmark,
.night .wordmark:hover { color: #fff; }
.night .wordmark span { color: var(--highlight); }
.night .site-header .wordmark { view-transition-name: pm-wordmark; }

/* The section being read: its link turns white and a light-blue bar, the wordmark dot's colour,
   slides under it (site.js places .nav-indicator). On phones the header names the section
   beside the menu button (.nav-now), and the open menu marks it with the same dot. */
.night .nav-desktop { position: relative; }
.night .nav-desktop a:not(.btn) { color: var(--cover-dim); border-bottom-color: transparent; transition: color .3s ease; }
.night .nav-desktop a:not(.btn):hover,
.night .nav-desktop a[aria-current] { color: #fff; border-bottom-color: transparent; }
.nav-indicator {
  position: absolute;
  top: var(--y, 0);
  left: 0;
  width: var(--w, 0);
  height: 2px;
  background: var(--highlight);
  box-shadow: 0 0 8px 1px rgba(159, 192, 238, 0.7), 0 0 18px 3px rgba(159, 192, 238, 0.22);
  transform: translateX(var(--x, 0));
  opacity: 0;
  pointer-events: none;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1), width .5s cubic-bezier(.2, .7, .2, 1), opacity .3s ease;
}
.nav-indicator.is-on { opacity: 1; }
/* A section receives focus when a menu link glides to it (site.js); it needs no ring of its own. */
.night section[tabindex="-1"]:focus { outline: none; }

.nav-now { display: none; }
@media (max-width: 899px) {
  .night .nav-now {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-left: auto;
    min-width: 0;
    white-space: nowrap;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cover-dim);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .3s ease, transform .3s ease;
  }
  .night .nav-now.is-on { opacity: 1; transform: none; }
}
/* Below 360px the label has no room beside the wordmark and the menu button. */
@media (max-width: 359px) {
  .night .nav-now { display: none; }
}
.night .nav-now::before,
.night .nav-mobile a[aria-current]::after {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--highlight);
  box-shadow: 0 0 8px 2px rgba(159, 192, 238, 0.6);
}
.night .nav-mobile a[aria-current] { color: #fff; }
/* On phones a thin gold line along the header's foot fills as the reader goes down the page
   (site.js sets --progress, from 0 at the top to 1 at the bottom). Hidden while the menu is
   open, when the header's foot is the menu's. */
.nav-progress { display: none; }
@media (max-width: 899px) {
  .night .nav-progress {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--glow);
    box-shadow: 0 0 6px rgba(242, 194, 123, 0.55);
    transform: scaleX(var(--progress, 0));
    transform-origin: left center;
    pointer-events: none;
  }
  .night .site-header:has(.menu-btn[aria-expanded="true"]) .nav-progress { opacity: 0; }
}
.night .nav-mobile a[aria-current]::after { display: inline-block; margin-left: 12px; vertical-align: middle; }

.night .btn { background: var(--cover-ink); color: var(--navy-700); }
.night .btn:hover { background: #fff; color: var(--navy); }
.night .nav-desktop .btn-sm {
  background: transparent;
  color: var(--cover-ink);
  border: 1px solid rgba(246, 243, 238, 0.42);
  padding: 10px 16px;
}
.night .nav-desktop .btn-sm:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.85); color: #fff; }

/* ── the opening: the cover's photograph, darker, with the map beside the title ── */

.night .hero { position: relative; isolation: isolate; overflow: hidden; }
.night-hero-bg { position: absolute; inset: 0; z-index: -2; }
.night-hero-bg picture,
.night-hero-bg img { display: block; width: 100%; height: 100%; }
.night-hero-bg img { object-fit: cover; object-position: 50% 60%; transition: opacity .9s ease; }
/* site.js holds a photograph that is still on its way, so it fades in instead of popping in.
   Hiding is instant; only the reveal is a transition. */
.photo-pending .night-hero-bg img { opacity: 0; transition: none; }
.night .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 13, 24, 0.62) 0%, rgba(7, 13, 24, 0.12) 26%, rgba(11, 21, 38, 0.4) 64%, var(--paper) 100%),
    linear-gradient(90deg, rgba(7, 13, 24, 0.9) 0%, rgba(7, 13, 24, 0.72) 42%, rgba(7, 13, 24, 0.3) 72%, rgba(7, 13, 24, 0.5) 100%);
}
.night .hero h1,
.night .hero .lead { text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35); }
.night .glance { border-top: 1px solid var(--rule-strong); }

/* The partners under the opening's button: who a visitor would work with, before the detail.
   Their full backgrounds are in Team. Three side by side; on phones one under the other. */
.hero-partners { display: flex; flex-direction: column; gap: 16px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.partners-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; }
.partners-list li { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.partners-list img { flex: none; width: 44px; height: 44px; object-fit: cover; filter: grayscale(1) contrast(1.02); background: var(--surface); }
.partners-list li > span { display: flex; flex-direction: column; gap: 3px; font-size: 13px; line-height: 1.4; color: var(--meta); }
.partner-cred { text-wrap: balance; }
.partners-list b { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.night .partners-more {
  align-self: flex-start;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--link-rule);
  padding-bottom: 2px;
  transition: border-color .15s;
}
.night .partners-more:hover { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 699px) {
  .partners-list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .partners-list li { flex-direction: row; align-items: center; gap: 14px; }
}

/* The map shares the cover's drawing (share/cover_map.py) without its arcs; it travels here
   from the cover in the page transition. It shows beside the title on wide screens only. */
.night-hero-map { display: none; }
.night-hero-map .hu-arc,
.night-hero-map .hu-arc-flow,
.night-hero-map .hu-comet { display: none; }

@media (min-width: 1024px) {
  .night .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-areas: "head map" "body map" "glance glance";
    align-items: center;
    column-gap: clamp(32px, 4vw, 64px);
  }
  .night .hero-head { grid-area: head; container-type: inline-size; }
  /* The headline follows its column, so "Your local partner for / entering Hungary." stays on
     two lines beside the map at every width (its longer line is about 9.3 times the size). */
  .night .hero h1 { font-size: clamp(40px, 10cqi, 64px); }
  .night .hero-body { grid-area: body; }
  .night .glance {
    grid-area: glance;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 0 32px;
    margin-top: 12px;
  }
  .night .glance > div { display: flex; flex-direction: column; gap: 10px; padding: 22px 0 0; border-bottom: 0; }
  .night-hero-map { display: block; grid-area: map; position: relative; align-self: stretch; min-height: 340px; }
  .night-hero-map .hu-map { position: absolute; top: 50%; left: 50%; width: 150%; height: auto; transform: translate(-50%, -50%); }
}

/* ── sections: gold numbers and rules, night panels ────────────────────── */

.night .ruled .rail-head,
.night .person-head { border-top-color: var(--rule-strong); }
.night .rail-num,
.night .dark .rail-num,
.night .kicker,
.night .qa-n,
.night .stage-n,
.night .label.navy,
.night .role { color: var(--accent); }
.night .kicker::before,
.night .bullets li::before { background: var(--accent); }
.night .stage-card,
.night .sector-lead,
.night .sector-card { border-top-color: var(--accent); }
.night .focus { border-left-color: var(--accent); }

/* The focus's typical work: the square bullets charge like a battery. They wait faint, in charger
   green, light up one after another from the bottom, and when the top one is lit, all turn gold
   together with a glow: charged. It plays once, when the list first comes into view; site.js arms
   the list and starts it. Without JavaScript, or with reduced motion, the bullets are simply their
   usual gold. */
.night .charge { --charge: #4CD964; --charge-glow: rgba(76, 217, 100, 0.8); --charge-glow-soft: rgba(76, 217, 100, 0.45); }
.night .charge-armed li::before { background: var(--charge); opacity: 0.2; transform: scale(0.8); }
.night .charge-armed.is-charging li::before {
  animation: charge-step .5s cubic-bezier(.3, .7, .3, 1) both, charge-full 1s ease-in-out 1.75s forwards;
}
.night .charge-armed.is-charging li:nth-last-child(2)::before { animation-delay: .3s, 1.75s; }
.night .charge-armed.is-charging li:nth-last-child(3)::before { animation-delay: .6s, 1.75s; }
.night .charge-armed.is-charging li:nth-last-child(4)::before { animation-delay: .9s, 1.75s; }
.night .charge-armed.is-charging li:nth-last-child(5)::before { animation-delay: 1.2s, 1.75s; }
@keyframes charge-step {
  0% { opacity: 0.2; transform: scale(0.8); background: var(--charge); box-shadow: 0 0 0 transparent; }
  55% { opacity: 1; transform: scale(1.4); background: var(--charge); box-shadow: 0 0 10px 3px var(--charge-glow); }
  100% { opacity: 1; transform: scale(1); background: var(--charge); box-shadow: 0 0 4px var(--charge-glow-soft); }
}
@keyframes charge-full {
  0% { transform: scale(1); background: var(--charge); box-shadow: 0 0 4px var(--charge-glow-soft); }
  45% { transform: scale(1.25); background: var(--accent); box-shadow: 0 0 12px 4px rgba(242, 194, 123, 0.85); }
  100% { transform: scale(1); background: var(--accent); box-shadow: 0 0 3px rgba(242, 194, 123, 0.3); }
}

/* The open stage breathes, so it reads as the one in play: its gold top line brightens into the
   light blue of the wordmark's dot, with a wide glow, and its number turns blue in step, then
   both settle back to gold. It follows the selection. */
.night .stage-card { position: relative; }
.night .stage-card[aria-expanded="true"]::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  right: 0;
  height: 3px;
  background: #CFE0F7;
  box-shadow: 0 0 8px 1px rgba(159, 192, 238, 0.75), 0 0 26px 6px rgba(159, 192, 238, 0.32), 0 0 52px 10px rgba(159, 192, 238, 0.12);
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .night .stage-card[aria-expanded="true"]::before { animation: stage-breathe 5.6s ease-in-out infinite; }
  .night .stage-card[aria-expanded="true"] .stage-n { animation: stage-number-glow 5.6s ease-in-out infinite; }
}
@keyframes stage-breathe { 0%, 100% { opacity: 0; } 45%, 55% { opacity: 1; } }
@keyframes stage-number-glow {
  0%, 100% { color: var(--accent); text-shadow: 0 0 0 rgba(159, 192, 238, 0); }
  45%, 55% { color: var(--highlight); text-shadow: 0 0 14px rgba(159, 192, 238, 0.6), 0 0 28px rgba(159, 192, 238, 0.22); }
}

/* Each stage carries a photograph, one day from first light (01) to night (06). On wide screens
   it fills the open panel behind the text, under a navy veil that is densest behind the scope
   list; on narrower screens it is a strip across the top of the panel. It fades in when a stage
   opens, and loads only once its panel is shown. Sources: share/stages/, share/stage_images.sh. */
.night .stage-panel { position: relative; isolation: isolate; overflow: hidden; text-shadow: 0 1px 14px rgba(7, 13, 24, 0.45); }
.night .stage-panel .label { color: rgba(246, 243, 238, 0.72); }
.night .stage-panel .label.navy { color: var(--accent); }
.stage-photo { display: block; position: relative; height: clamp(150px, 40vw, 240px); margin: -24px -20px 4px; }
.stage-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% var(--stage-y, 60%); }
.stage-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 29, 51, 0.05) 40%, var(--surface) 100%);
}
#stage-panel-0 { --stage-y: 80%; }
#stage-panel-1 { --stage-y: 60%; }
#stage-panel-2 { --stage-y: 70%; }
#stage-panel-3 { --stage-y: 72%; }
#stage-panel-4 { --stage-y: 66%; }
#stage-panel-5 { --stage-y: 68%; }
@media (min-width: 1100px) {
  .stage-photo { position: absolute; inset: 0; z-index: -1; height: auto; margin: 0; }
  .stage-photo::after {
    background: linear-gradient(90deg, rgba(16, 29, 51, 0.95) 0%, rgba(16, 29, 51, 0.9) 45%,
                                rgba(16, 29, 51, 0.78) 62%, rgba(16, 29, 51, 0.66) 100%);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .night .stage-panel.is-open .stage-photo img { animation: stage-photo-in 1s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes stage-photo-in { from { opacity: 0; transform: scale(1.04); } }

/* "How we work" opens on a road dividing at a junction (the section's decision points), behind
   the heading and the four steps, under a veil that thickens downwards; it is gone before the
   map of where to start. Source: share/stages/, share/approach_images.sh. */
.night #how-we-work { position: relative; isolation: isolate; overflow: hidden; }
.night #how-we-work .rail-head,
.night #how-we-work .rhythm { text-shadow: 0 1px 14px rgba(7, 13, 24, 0.45); }
.section-photo { position: absolute; top: 0; left: 0; right: 0; z-index: -1; height: min(840px, 100%); }
.section-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 55% 60%; }
.section-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 29, 51, 0.72) 0%, rgba(16, 29, 51, 0.8) 45%, rgba(16, 29, 51, 0.93) 75%, var(--surface) 100%),
    linear-gradient(90deg, rgba(16, 29, 51, 0.35) 0%, rgba(16, 29, 51, 0) 60%);
}
.night .li-link { color: var(--ink); }
.night .li-link:hover { color: var(--ink); border-bottom-color: var(--accent); }
.night .portrait { background: var(--surface); }

/* The focus opens with a wide crop of the cover's landscape, the sun and the turbines; then wind,
   storage and hybrid each show their own part of it: the turbines on the left, the battery yard
   in the foreground (closer in), the solar park and its batteries on the right. */
.night .sector-lead { --pad: clamp(32px, 5vw, 64px); background: var(--surface); padding: var(--pad); }
.night .sector-card { --pad: clamp(28px, 4vw, 48px); padding: var(--pad); }
.sector-shot {
  position: relative;
  height: clamp(170px, 20vw, 260px);
  margin: calc(var(--pad) * -1) calc(var(--pad) * -1) 8px;
  background-color: var(--surface);
  background-image: url("/assets/img/cover/cover-landscape-1600.jpg");
  background-image: image-set(url("/assets/img/cover/cover-landscape-1600.avif") type("image/avif"),
                              url("/assets/img/cover/cover-landscape-1600.jpg") type("image/jpeg"));
  background-repeat: no-repeat;
  background-size: 300% auto;
}
.sector-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 29, 51, 0) 35%, var(--surface) 100%);
}
.sector-lead .sector-shot { grid-column: 1 / -1; background-size: 230% auto; }
.sector-shot-renewables { background-position: 12% 36%; }
.sector-shot-wind { background-position: 0% 20%; }
.sector-shot-storage { background-size: 400% auto; background-position: 46% 96%; }
.sector-shot-hybrid { background-position: 100% 72%; }

/* The map of the focus, at the head of section 03: the opening's map of Hungary, cropped to
   the border (share/sector_map.py), with one tab's sites lit at a time (wind, storage, hybrid),
   and beside it a few facts about it, each with its source. site.js makes the three tabs;
   without it every tab's facts are listed and the map shows every site. */
.atlas {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--rule-strong);
}
.atlas-side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.atlas-side > .label { color: var(--accent); }
.atlas-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.atlas-tabs[hidden] { display: none; }
.atlas-tab {
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.atlas-tab:hover { color: #fff; border-color: var(--rule-strong); }
.atlas-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--night); }
.atlas-panels { display: flex; flex-direction: column; gap: 22px; }
.atlas-panel { display: flex; flex-direction: column; gap: 18px; }
.atlas-panel[hidden] { display: none; }
/* Each sector's first fact stays in view; the other two and the list of sites are .atlas-more,
   which folds behind a tap on phones (data-fold, site.js). Wider, it simply continues the list. */
.atlas-more { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 700px) {
  .atlas-more { margin-top: -18px; }
}
/* Beside the map, the three sectors share one cell: the hidden ones keep their room, so the
   column is always as tall as the longest sector and the map, centred beside it, stays still
   when the tab changes. */
@media (min-width: 900px) {
  .atlas.is-tabbed .atlas-panels { display: grid; }
  .atlas.is-tabbed .atlas-panel { grid-area: 1 / 1; }
  .atlas.is-tabbed .atlas-panel[hidden] { display: flex; visibility: hidden; }
}
.atlas.is-tabbed .atlas-panel-h { display: none; }
.atlas-panel-h { font-size: 20px; letter-spacing: -0.01em; font-weight: 700; }
.atlas-facts li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
}
.atlas-num { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; color: var(--ink); }
.atlas-fact { font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.night .atlas-src { font-size: 12px; line-height: 1.4; color: var(--meta); text-decoration: none; border-bottom: 1px solid transparent; justify-self: start; }
.night .atlas-src:hover { color: var(--ink-2); border-bottom-color: var(--link-rule); }
.atlas-sites-block { display: flex; flex-direction: column; gap: 8px; }
.atlas-sites { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; line-height: 1.4; color: var(--meta); }
.atlas-sites li { display: inline-flex; align-items: center; gap: 7px; cursor: default; transition: color .2s ease; }
.atlas-sites li::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--glow-hot); }
/* a region, not a site: the soft oval of the map */
.atlas-sites li.is-region::before { width: 10px; height: 6px; background: rgba(242, 194, 123, 0.45); }
.atlas-sites li.is-hot { color: var(--ink); }
.atlas-note { font-size: 12px; line-height: 1.5; color: var(--meta); }

.atlas-map { min-width: 0; }
.atlas-svg { display: block; width: 100%; height: auto; overflow: visible; }
.atlas-bp { fill: rgba(255, 225, 176, 0.55); }
.atlas-bp-label { font: 500 19px var(--font); fill: var(--cover-dim); paint-order: stroke; stroke: rgba(4, 9, 18, 0.6); stroke-width: 4px; }
.atlas-dot { fill: var(--glow-hot); }
.atlas-halo { fill: rgba(242, 194, 123, 0.2); transform-box: fill-box; transform-origin: center; transition: fill .25s ease, transform .25s ease; }
.atlas-pt text { font: 600 19px var(--font); fill: #fff; paint-order: stroke; stroke: rgba(4, 9, 18, 0.7); stroke-width: 4px; }
.atlas-pt.is-hot .atlas-halo { fill: rgba(242, 194, 123, 0.55); transform: scale(1.5); }
.atlas-region { fill: rgba(242, 194, 123, 0.16); }
.atlas-region-label { font: 700 16px var(--font); letter-spacing: 0.16em; text-transform: uppercase; fill: rgba(255, 225, 176, 0.72); }
/* A region can carry a second line (share/sector_map.py); no tab draws regions now. */
.atlas-crops { font: 600 18px var(--font); letter-spacing: 0.01em; text-transform: none; fill: rgba(255, 236, 206, 0.92); paint-order: stroke; stroke: rgba(4, 9, 18, 0.6); stroke-width: 4px; }
/* One sector at a time: the others' sites fade out, the chosen one's come in one after another
   (site.js numbers them, --i). */
.atlas-pt,
.atlas-region,
.atlas-region-label { transition: opacity .45s ease calc(var(--i, 0) * 70ms); }
.atlas[data-active] .atlas-layer:not(.is-on) :is(.atlas-pt, .atlas-region, .atlas-region-label) { opacity: 0; transition-delay: 0s; }
/* Without site.js every sector's sites are on the map at once, too many to label: the dots
   stay, and the lists beside the map name them. */
.atlas:not([data-active]) .atlas-svg text:not(.atlas-bp-label) { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .atlas-layer.is-on .atlas-halo { animation: atlas-pulse 3.2s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -0.4s); }
}
@keyframes atlas-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: 0.55; } }

@media (max-width: 899px) {
  .atlas { grid-template-columns: minmax(0, 1fr); }
  .atlas-map { order: -1; }
  .atlas-side { display: contents; }
  .atlas-side > .label { order: -3; }
  .atlas-tabs { order: -2; }
}
/* On phones the map is too small for its labels; the list under the facts names the sites,
   folded with the other two facts behind "More facts and sites". The tabs and facts are set
   tighter, so the three tabs fit on one row. */
@media (max-width: 699px) {
  .atlas-tabs { gap: 6px; }
  .atlas-tab { min-height: 38px; padding: 9px 10px; font-size: 11px; letter-spacing: 0.08em; }
  .atlas-facts li { gap: 2px; padding: 11px 0; }
  .atlas-num { font-size: 24px; }
  .atlas-fact { font-size: 14px; }
  .atlas-svg text:not(.atlas-bp-label) { display: none; }
  .atlas-bp-label { font-size: 30px; }
  .atlas-dot { transform-box: fill-box; transform-origin: center; transform: scale(1.5); }
}

/* ── contact and footer ────────────────────────────────────────────────── */

.night .dark { background: var(--night); }
.night .hl { color: var(--glow); }
.night .email-big,
.night .email-big:hover,
.night .map-link,
.night .map-link:hover { color: #fff; }
.night .contact-block,
.night .footer-note { border-top-color: var(--hairline); }
.night .brief { background: rgba(255, 255, 255, 0.035); border: 1px solid var(--hairline-2); }
.night .brief select { background: var(--surface); }
/* Arriving from a "Discuss this" link: the way to start it named, which the brief carries. */
.brief-topic { display: flex; align-items: center; gap: 10px; margin-top: -10px; font-size: 14px; color: var(--ink-2); }
.brief-topic[hidden] { display: none; }
.brief-topic b { font-weight: 600; color: var(--accent); }
.topic-clear {
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.topic-clear:hover { color: #fff; border-color: var(--rule-strong); }
/* site.css sets this button's text in --ink, which is white here: keep it dark on its light ground. */
.night .btn-light,
.night .btn-light:hover { color: var(--navy-700); }
.night .btn-light:hover { background: #fff; }
.night .site-footer { border-top-color: var(--hairline-2); }
.night .footer-bottom a { color: var(--on-dark); }
.night .footer-bottom a:hover { color: #fff; }

/* ── arriving from the cover: it slides up and out, the top of this page slides up into
   view behind it, as if scrolling down one long page ── */

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: pm-slide-out-up .85s cubic-bezier(.76, 0, .24, 1) both; }
  ::view-transition-new(root) { animation: pm-slide-in-up .85s cubic-bezier(.76, 0, .24, 1) both; }
}

/* ── 04 how we work: the four steps as one line ending in your decision, a map of where each way
   to start sits in the six stages, and four promises. On phones the line runs down the left and
   the map's rows stack. site.js grows the map's bars once, when it comes into view. */

.rhythm { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 0.75fr); }
.rhythm li { position: relative; padding: 28px 24px 0 0; }
.rhythm li::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--accent); opacity: 0.55; }
.rhythm li::after { content: ""; position: absolute; top: 0; left: 0; width: 14px; height: 14px; background: var(--accent); }
.rhythm-n { font-size: 13px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.rhythm h3 { margin-top: 6px; font-size: 18px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 700; text-wrap: balance; }
.rhythm p { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.rhythm .rhythm-decide::before { display: none; }
.rhythm .rhythm-decide::after {
  top: 1px;
  left: 1px;
  width: 11px;
  height: 11px;
  background: var(--surface);
  border: 2px solid var(--highlight);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(159, 192, 238, 0.5);
}
.rhythm-decide h3 { margin-top: 25px; color: var(--highlight); }

.entry { display: flex; flex-direction: column; gap: 22px; border-top: 1px solid var(--hairline); padding-top: clamp(32px, 4vw, 48px); }
.entry-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px 32px; }
.entry-head h3 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.1; letter-spacing: -0.025em; font-weight: 700; }
.entry-head p { max-width: 52ch; font-size: 15px; line-height: 1.5; color: var(--meta); }

.entry-stages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-left: 190px; }
.entry-stages li { padding: 0 0 10px 10px; border-left: 1px solid var(--hairline); font-size: 12px; letter-spacing: 0.04em; color: var(--meta); }
.entry-stages b { margin-right: 4px; color: var(--accent); }
.entry-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: start; padding: 12px 0 14px; }
.entry-kind { padding-top: 2px; color: var(--accent); }
.entry-kind span { display: block; margin-top: 4px; color: var(--meta); letter-spacing: 0.08em; }
.entry-track {
  position: relative;
  padding-top: 24px;
  /* the six stage lines, only in the band around the bar, so they never run behind the text */
  background: repeating-linear-gradient(90deg, var(--hairline) 0 1px, transparent 1px calc(100% / 6)) 0 0 / 100% 18px no-repeat;
}
.entry-bar {
  position: absolute;
  top: 4px;
  left: var(--from);
  width: var(--span);
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--accent), rgba(242, 194, 123, 0.55));
  box-shadow: 0 0 14px rgba(242, 194, 123, 0.3);
  transform-origin: 0 50%;
}
/* The ongoing mandate's bar is gold like the others. A soft band of light runs along it from
   left to right, slowly, then rests, to say that the work carries on. Hidden with reduced motion. */
.entry-flow { overflow: hidden; }
.entry-flow::after {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: -22%;
  width: 22%;
  background: linear-gradient(90deg, transparent, rgba(255, 246, 228, 0.9) 50%, transparent);
  filter: blur(1.5px);
  opacity: 0;
}
.entry-text { margin-left: var(--from); padding-right: 8px; }
.entry-text h4 { display: inline; font-size: 16px; letter-spacing: -0.01em; font-weight: 700; }
.entry-text p { display: inline; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
/* Each way to start leads to the brief form, which then carries it (site.js). */
.entry-ask {
  margin-left: 4px;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.entry-ask:hover { border-bottom-color: currentColor; }
.span-01 { --from: 0%; --span: calc(100% / 6); }
.span-03 { --from: calc(200% / 6); --span: calc(100% / 6); }
.span-0406 { --from: 50%; --span: 50%; }
.span-0206 { --from: calc(100% / 6); --span: calc(500% / 6); }
/* The transaction mandate sits in stage 03 and can carry on after closing: a dashed, fainter
   line from the end of its bar to the end of stage 06. It grows with the bar. */
.entry-onward .entry-bar::after {
  content: "";
  position: absolute;
  top: 3px;
  left: calc(100% + 6px);
  width: calc(300% - 6px);
  height: 4px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, rgba(242, 194, 123, 0.55) 0 12px, transparent 12px 20px);
  -webkit-mask-image: linear-gradient(90deg, #000 40%, rgba(0, 0, 0, 0.35));
  mask-image: linear-gradient(90deg, #000 40%, rgba(0, 0, 0, 0.35));
}

.promises { display: flex; flex-wrap: wrap; gap: 12px 30px; font-size: 15px; color: var(--ink-2); }
.promises li { display: flex; align-items: center; gap: 10px; }
.promises li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--highlight);
  box-shadow: 0 0 8px 2px rgba(159, 192, 238, 0.45);
}

.entry-armed .entry-bar { transform: scaleX(0); }
@media (prefers-reduced-motion: no-preference) {
  .rhythm .rhythm-decide::after { animation: decide-breathe 5.6s ease-in-out infinite; }
  .entry-flow::after { opacity: 1; animation: entry-sweep 7.5s cubic-bezier(.45, .05, .35, 1) infinite; }
  .entry-armed.is-shown .entry-bar { animation: entry-grow 1s cubic-bezier(.2, .7, .2, 1) both; }
  .entry-armed.is-shown .entry-row:nth-child(2) .entry-bar { animation-delay: .15s; }
  .entry-armed.is-shown .entry-row:nth-child(3) .entry-bar { animation-delay: .3s; }
  .entry-armed.is-shown .entry-row:nth-child(4) .entry-bar { animation-delay: .45s; }
}
@keyframes decide-breathe {
  0%, 100% { box-shadow: 0 0 6px rgba(159, 192, 238, 0.35); }
  50% { box-shadow: 0 0 16px 3px rgba(159, 192, 238, 0.8); }
}
@keyframes entry-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* the band crosses in about five seconds (70% of the cycle), then rests */
@keyframes entry-sweep { 0% { transform: translateX(0); } 70%, 100% { transform: translateX(560%); } }

@media (max-width: 899px) {
  .rhythm { grid-template-columns: minmax(0, 1fr); }
  .rhythm li { padding: 0 0 26px 34px; }
  .rhythm li::before { top: 14px; bottom: 0; left: 6px; right: auto; width: 2px; height: auto; }
  .rhythm .rhythm-decide { padding-bottom: 0; }
  .rhythm-n { line-height: 14px; }
  .rhythm-decide h3 { margin-top: 0; }
  .entry-stages { margin-left: 0; }
  .entry-stages span { display: none; }
  .entry-row { grid-template-columns: minmax(0, 1fr); padding: 16px 0; }
  .entry-kind { padding-top: 0; margin-bottom: 8px; }
  .entry-text { margin-left: 0; }
}


/* ── phones, below 700px: the long parts fold away behind a tap. site.js adds the buttons
   and marks each closed part .is-folded; wider screens show everything, buttons hidden. ── */

.fold-btn { display: none; }
@media (max-width: 699px) {
  .night .is-folded { display: none !important; }
  .night .has-fold > .label { display: none; }

  /* The opening: the sections below say what "at a glance" says. */
  .night .glance { display: none; }
  /* About a quarter less space around and within the sections. */
  .night .section { padding-top: 54px; padding-bottom: 54px; }
  .night .section.ruled { padding-top: 0; }
  .night .section-inner { gap: 30px; }
  /* Sectors: shorter photograph strips. */
  .night .sector-shot { height: 110px; }
  .night .sector-shot-wind { background-position: 0% 30%; }
  .night .sector-shot-storage { background-position: 46% 85%; }
  .night .sector-shot-hybrid { background-position: 100% 60%; }
  /* Team: a small portrait beside the name and role, the "At Penmark" line before the
     background. */
  .night .person {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 14px 16px;
    padding-top: 20px;
    border-top: 1px solid var(--rule-strong);
  }
  .night .portrait { grid-area: 1 / 1; }
  .night .person-head { grid-area: 1 / 2; padding-top: 0; border-top: 0; }
  .night .focus { grid-area: 2 / 1 / 3 / -1; }
  .night .bio { grid-area: 3 / 1 / 4 / -1; }
  .night .li-link { grid-area: 4 / 1 / 5 / -1; justify-self: start; }

  .night .fold-btn:not(.qa-toggle) {
    display: flex;
    align-items: baseline;
    width: 100%;
    padding: 13px 0 11px;
    border: 0;
    border-top: 1px solid var(--hairline);
    background: none;
    color: var(--accent);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
  }
  .night .fold-count { color: var(--meta); }
  .night .fold-btn:not(.qa-toggle)::after {
    content: "+";
    margin-left: auto;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
  }
  .night .fold-btn[aria-expanded="true"]:not(.qa-toggle)::after { content: "\2013"; }

  /* The need: the question is the tap target, with its + at the end. */
  .night .qa-head { display: none; }
  .night .qa-row { padding: 18px 0; }
  .night .qa-q { position: relative; }
  .night .qa-toggle {
    display: block;
    flex: none;
    margin-left: auto;
    padding: 0 0 0 14px;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
  }
  .night .qa-toggle::before { content: "+"; }
  .night .qa-toggle[aria-expanded="true"]::before { content: "\2013"; }
  .night .qa-toggle::after { content: ""; position: absolute; inset: 0; }
  .night .qa-toggle:focus-visible { outline: none; }
  .night .qa-toggle:focus-visible::after { outline: 2px solid var(--focus-on-dark); outline-offset: 6px; }

  /* Services: the stages start closed on phones (site.js), so each says it opens, like the
     folds. The open card's ::before is its breathing glow. */
  .night .stage-card::after {
    content: "+";
    position: absolute;
    top: 26px;
    right: 20px;
    color: var(--accent);
    font-size: 20px;
    line-height: 1;
  }
  .night .stage-card[aria-expanded="true"]::after { content: "\2013"; }
}
