/* Outstation holding page. Colour chapters: each section is one flat field from the brand palette.
   Night Dash and Instrument White do the work; Backlight (#3FD79B) only ever means "on". */

@font-face {
  font-family: "Overpass";
  src: url("fonts/overpass-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #0C0E0F;
  --white: #F3F5F4;
  --trim: #6F797E;
  --graphite: #1B2023;
  --chip: #E4E9E8;
  --steel: #2A3033;
  --on: #3FD79B;
  --on-deep: #0E8F5E;
  --soft-dark: #3E474B;
  --soft-light: #B7C0C3;

  --ui: "Overpass", "Helvetica Neue", Arial, sans-serif;
  --s-display: clamp(52px, 7.6vw, 124px);
  --s-head: clamp(34px, 4vw, 60px);
  --s-say: clamp(22px, 2.1vw, 30px);
  --s-lead: 20px;
  --s-body: 17px;

  --m: clamp(16px, 2.4vw, 36px);
  --gap: 10px;
  --radius: 0px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--night); font-family: var(--ui); font-size: var(--s-body); line-height: 1.55; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--on-deep); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--m); top: -60px; background: var(--night); color: var(--white); padding: 10px 16px; z-index: 10; }
.skip:focus { top: 10px; }

.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px;
  background: var(--night); color: var(--white); text-decoration: none; font-weight: 700; font-size: var(--s-body);
  border-radius: var(--radius); transition: transform 160ms var(--ease), background-color 160ms;
}
.btn:hover { background: var(--steel); }
.btn:active { transform: translateY(2px); }

/* ---------- Hero: mosaic masthead, title on the 42% axis ---------- */
.hero { position: relative; background: var(--white); padding-bottom: clamp(56px, 8vw, 120px); }
.bar { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: stretch; }
.bar-mark { background: var(--night); display: flex; align-items: center; padding: 0 var(--m); min-height: 64px; }
.bar-mark svg { width: clamp(150px, 15vw, 210px); height: auto; }
.bar-tab { background: var(--white); display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); padding: 0 var(--m); width: calc(42% - 1px); min-width: max-content; }
.bar-tab a { text-decoration: none; font-weight: 600; padding: 10px 0; }
.bar-tab a:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.bar-act { margin-left: auto; min-height: 64px; padding: 0 var(--m); }

.mosaic {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr));
  height: 40svh; min-height: 280px;
}
.mosaic figure { overflow: hidden; background: var(--steel); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.m-a { grid-column: 1 / span 2; grid-row: 1; }
.m-a img { animation: drift 24s var(--ease) both; }
.m-face { grid-column: 3; grid-row: 1 / span 2; background: var(--night); display: grid; place-items: center; }
.m-face .face { width: 58%; max-width: 150px; }
.m-b { grid-column: 4; grid-row: 1; }
.m-t1 { grid-column: 5; grid-row: 1; background: var(--trim); }
.m-t2 { grid-column: 6; grid-row: 1; background: var(--chip); }
.m-t3 { grid-column: 1; grid-row: 2; background: var(--graphite); }
.m-c { grid-column: 2; grid-row: 2; }
.m-t4 { grid-column: 4; grid-row: 2; background: var(--chip); }
.m-d { grid-column: 5 / span 2; grid-row: 2; }
.m-d img { transform: scale(1.1); transform-origin: 40% 60%; }

.hero-text { display: grid; grid-template-columns: 42% 1fr; gap: 0 var(--m); padding: clamp(32px, 4vw, 56px) var(--m) 0; }
.hero-note { font-size: var(--s-body); max-width: 30ch; padding-top: 0.6em; }
.hero-main { display: flex; flex-direction: column; align-items: flex-start; }
h1 { font-size: var(--s-display); font-weight: 800; line-height: 0.92; letter-spacing: -0.045em; }
h1 .ln { display: block; overflow: hidden; padding-bottom: 0.06em; }
h1 .ln > span { display: block; animation: lineUp 900ms var(--ease) both; }
h1 .ln:nth-child(2) > span { animation-delay: 110ms; }
.hero-sub { font-size: var(--s-lead); max-width: 40ch; margin-top: 32px; animation: fadeUp 700ms var(--ease) 420ms both; }
.btn-big { margin-top: 28px; min-height: 56px; padding: 0 28px; font-size: var(--s-lead); animation: fadeUp 700ms var(--ease) 480ms both; }

/* ---------- How it goes in: tiles that grow ---------- */
.how { background: var(--night); color: var(--white); padding: clamp(96px, 12vw, 200px) var(--m); min-height: 90svh; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-content: center; }
.how h2 { grid-column: 1 / span 7; grid-row: 1; align-self: start; font-size: var(--s-display); font-weight: 800; line-height: 0.95; letter-spacing: -0.04em; max-width: 9ch; }
.stages { list-style: none; padding: 0; grid-column: 1 / -1; grid-row: 1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
.stage { display: flex; flex-direction: column; gap: 10px; }
.stage .tile { display: grid; place-items: center; padding: 8%; }
.stage .draw { width: 100%; max-height: 100%; }
.s1 { grid-column: 1 / span 3; }
.s1 .tile { height: 30vh; min-height: 190px; background: var(--graphite); }
.s2 { grid-column: 4 / span 4; }
.s2 .tile { height: 44vh; min-height: 250px; background: var(--trim); }
.s3 { grid-column: 8 / span 5; }
.s3 .tile { height: 60vh; min-height: 320px; background: var(--white); }
.stage h3 { font-size: var(--s-lead); font-weight: 700; margin-top: 8px; }
.stage p { color: var(--soft-light); max-width: 42ch; }
.tl { font-family: var(--ui); font-size: 7px; font-weight: 700; fill: var(--night); }
.tl.light { fill: var(--white); }

/* ---------- What it does: mosaic of unlike tiles ---------- */
.what { background: var(--chip); padding: clamp(96px, 12vw, 200px) var(--m); }
.mos { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 96px; gap: 8px; }
.mos > * { padding: 24px; min-width: 0; }
.t-head { grid-column: 1 / span 6; grid-row: 1 / span 3; background: var(--white); display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.t-head h2 { font-size: var(--s-head); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.t-head p { font-size: var(--s-lead); max-width: 34ch; }
.t-live { grid-column: 7 / span 6; grid-row: 1 / span 5; background: var(--night); color: var(--white); display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.dash { background: var(--graphite); padding: clamp(14px, 2vw, 26px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1.4vw, 18px); }
.sw { appearance: none; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 4px; transition: transform 120ms var(--ease); }
.sw:hover .face rect:first-child { fill: #232A2D; }
.sw:active { transform: translateY(2px) scale(0.98); }
.sw .face { width: 100%; height: auto; }
.face .led { fill: var(--steel); transition: fill 160ms; }
.face.is-on .led { fill: var(--on); }
.sw.is-picked { outline: 3px solid var(--trim); outline-offset: 3px; }
.live-state { font-size: var(--s-lead); min-height: 3.1em; }
.pick { display: flex; flex-direction: column; gap: 8px; font-weight: 600; }
.pick select { font: inherit; font-weight: 400; min-height: 48px; padding: 0 12px; background: var(--white); color: var(--night); border: 0; border-radius: var(--radius); max-width: 320px; }
.t-s1 { grid-column: 1 / span 3; grid-row: 4 / span 2; }
.t-s2 { grid-column: 4 / span 3; grid-row: 4 / span 2; }
.t-s1, .t-s2 { background: var(--white); font-size: var(--s-say); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.t-photo { grid-column: 1 / span 6; grid-row: 6 / span 3; padding: 0; position: relative; overflow: hidden; background: var(--steel); }
.t-photo img { width: 100%; height: 100%; object-fit: cover; }
.t-photo figcaption { position: absolute; left: 0; bottom: 0; right: 0; padding: 14px 24px; background: rgba(12, 14, 15, 0.72); color: var(--white); font-size: var(--s-body); }
.t-fig { grid-column: 7 / span 3; grid-row: 6 / span 3; background: var(--graphite); color: var(--white); display: flex; flex-direction: column; justify-content: space-between; }
.t-fig .fig { font-size: var(--s-head); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.t-list { grid-column: 10 / span 3; grid-row: 6 / span 3; background: var(--white); display: flex; flex-direction: column; gap: 14px; }
.t-list h3 { font-size: var(--s-lead); font-weight: 800; }
.t-list ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }

/* ---------- Chapters: portrait on its own ground ---------- */
.chapter { position: relative; min-height: 100svh; padding: 32px var(--m); display: grid; grid-template-columns: 1fr minmax(0, 506px) 1fr; grid-template-rows: auto 1fr auto; gap: 24px var(--m); clip-path: inset(0); transition: clip-path 700ms var(--ease); }
.chapter.pre { clip-path: inset(20px); }
.ch-name { background: var(--graphite); color: var(--white); }
.ch-prado { background: var(--white); color: var(--night); }
.chapter h2 { grid-column: 1 / -1; grid-row: 1; font-size: var(--s-say); font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; max-width: 16ch; }
.portrait { grid-column: 2; grid-row: 2; align-self: center; aspect-ratio: 3 / 4; width: 100%; max-height: 75svh; overflow: hidden; transition: transform 800ms var(--ease); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.chapter.pre .portrait { transform: scale(0.92); }
.letter { display: grid; place-items: center; background: var(--chip); }
.letter svg { width: 78%; height: auto; }
.ch-text { grid-column: 1; grid-row: 3; align-self: end; max-width: 32ch; font-size: var(--s-body); }
.ch-link { grid-column: 3; grid-row: 3; justify-self: end; align-self: end; font-weight: 700; text-underline-offset: 5px; text-decoration-thickness: 2px; padding: 10px 0; }
.ch-link:hover { text-decoration-thickness: 4px; }

/* ---------- Register: one word is the button ---------- */
.cta { position: relative; display: block; min-height: 60svh; background: var(--night); color: var(--white); text-decoration: none; padding: 28px var(--m) 24px; overflow: hidden; transition: background-color 0ms, color 0ms; }
.cta:hover, .cta:focus-visible { background: var(--white); color: var(--night); outline-offset: -6px; }
.cta-note { display: block; font-size: var(--s-lead); max-width: 36ch; }
.cta-arrow { position: absolute; top: 28px; right: var(--m); width: 48px; height: 48px; transition: transform 240ms var(--ease); }
.cta:hover .cta-arrow { transform: translate(6px, -6px); }
.cta-word { position: absolute; left: var(--m); bottom: 0.04em; font-size: clamp(80px, 19vw, 300px); font-weight: 800; line-height: 1; letter-spacing: -0.055em; }

/* ---------- Footer: contact as the headline ---------- */
.foot { background: var(--white); color: var(--night); min-height: 72svh; padding: 40px var(--m) 28px; display: flex; flex-direction: column; }
.foot-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px var(--m); align-items: start; }
.foot-mark { grid-column: 1 / span 3; }
.foot-mark svg { width: 180px; height: auto; }
.foot-top p { grid-column: span 3; max-width: 32ch; }
.foot-top a { grid-column: 12; justify-self: end; font-weight: 700; text-underline-offset: 5px; white-space: nowrap; }
.foot-mail { margin-top: auto; padding-top: 10vh; display: block; font-size: clamp(40px, 8.4vw, 150px); font-weight: 800; line-height: 0.95; letter-spacing: -0.045em; text-decoration: none; overflow-wrap: anywhere; }
.foot-mail span { display: block; }
.foot-mail:hover { color: var(--on-deep); }
.foot-meta { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 16px var(--m); margin-top: 40px; align-items: start; font-size: var(--s-body); }
.foot-meta > :last-child { justify-self: end; }
.credits summary { cursor: pointer; font-weight: 600; }
.credits ul { padding-left: 1.1em; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- Motion ---------- */
@keyframes lineUp { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: scale(1.12); } to { transform: scale(1); } }
.js .rise { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: var(--d, 0ms); }
.js .rise.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rise { opacity: 1; transform: none; }
  .chapter.pre { clip-path: inset(0); }
  .chapter.pre .portrait { transform: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .bar-tab { width: auto; }
  .mos { grid-auto-rows: 88px; }
  .t-live { grid-row: 1 / span 6; }
  .t-s1, .t-s2 { grid-row: 4 / span 3; }
  .t-photo { grid-row: 7 / span 3; }
  .t-fig, .t-list { grid-row: 7 / span 3; }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  :root { --s-display: 13vw; --s-head: 34px; --s-say: 22px; --s-lead: 18px; --s-body: 16px; }
  .bar-tab { display: none; }
  .bar-mark { min-height: 56px; }
  .bar-act { min-height: 56px; padding: 0 16px; }
  .mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); height: 38svh; min-height: 240px; }
  .m-a { grid-column: 1 / span 2; grid-row: 1; }
  .m-face { grid-column: 3; grid-row: 1 / span 2; }
  .m-d { grid-column: 1; grid-row: 2; }
  .m-t3 { grid-column: 2; grid-row: 2; }
  .m-b, .m-c, .m-t1, .m-t2, .m-t4 { display: none; }
  .hero-text { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-note { order: 2; margin-top: 28px; padding-top: 0; color: var(--soft-dark); }
  .hero-sub { margin-top: 24px; }

  .how { display: flex; flex-direction: column; gap: 32px; }
  .stages { display: flex; flex-direction: column; gap: 32px; }
  .s1 .tile { height: auto; min-height: 0; aspect-ratio: 16 / 10; }
  .s2 .tile { height: auto; min-height: 0; aspect-ratio: 16 / 11; }
  .s3 .tile { height: auto; min-height: 0; aspect-ratio: 16 / 12; }

  .mos { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; gap: 6px; }
  .mos > * { grid-column: 1 / -1 !important; grid-row: auto !important; padding: 20px; }
  .t-head { min-height: 260px; }
  .t-photo { aspect-ratio: 4 / 3; padding: 0; }
  .t-fig { grid-column: 1 / span 1 !important; aspect-ratio: 1; }
  .t-list { grid-column: 2 / span 1 !important; aspect-ratio: 1; padding: 16px; }

  .chapter { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; min-height: 100svh; padding: 24px 16px; }
  .portrait { grid-column: 1; grid-row: 2; width: 80%; justify-self: center; max-height: none; }
  .ch-text { grid-column: 1; grid-row: 3; }
  .ch-link { grid-column: 1; grid-row: 4; justify-self: start; }

  .cta { min-height: 46svh; }
  .cta-note { max-width: 28ch; }
  .cta-arrow { width: 32px; height: 32px; }
  .cta-word { font-size: 22.5vw; }

  .foot-top { grid-template-columns: 1fr; }
  .foot-top > * { grid-column: 1 !important; justify-self: start !important; }
  .foot-mail { font-size: 7.4vw; }
  .foot-meta { grid-template-columns: 1fr; }
  .foot-meta > :last-child { justify-self: start; }
}
