/* Wild Moon — one page. Tokens first; everything below references them. */

/* Bricolage Grotesque, served from the site itself so no visitor data goes to a font service (SIL OFL 1.1, see
   assets/fonts/OFL.txt). Variable: optical size 12–96, weight 400–700. */
@font-face {
  font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 400 700; font-stretch: 100%; font-display: swap;
  src: url(assets/fonts/bricolage-grotesque-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 400 700; font-stretch: 100%; font-display: swap;
  src: url(assets/fonts/bricolage-grotesque-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* brand */
  --cream: #FCF6EE;
  --green: #153820;
  /* the night, darkest to dawn: steps of the brand green */
  --deep: #081A0D;
  --night: #0D2415;
  --predawn: #173C24;
  --dawn: #25563A;
  --paper: #F3EBDE;
  --sage: #C7D3B4;
  --moss: #3F6343;

  --bg: var(--green);
  --ink: var(--cream);
  --soft: #BFC9B8;
  --accent: var(--cream);
  --accent-ink: var(--green);

  /* type: five steps */
  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.05rem + 0.75vw, 1.75rem);
  --step-head: clamp(1.375rem, 0.45rem + 3.95vw, 3.75rem);
  --step-display: clamp(1.75rem, 0.4rem + 5.6vw, 6.5rem);

  /* space */
  --m: clamp(16px, 2.2vw, 32px);
  --gutter: clamp(16px, 1.7vw, 24px);
  --section: clamp(120px, 12vw, 200px);
  --dusk: #112F1B;    /* the night chooser's field: between the hero green and the night */

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --stagger-item: 80ms;

  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-optical-sizing: auto;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
/* scroll-padding keeps anchor targets and focused controls clear of the fixed bar (WCAG 2.4.11) */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--step-body);
  line-height: 1.5;
  font-weight: 400;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
p, h1, h2, h3, figure, dl, dd, ol { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
::selection { background: var(--cream); color: var(--green); }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: absolute; left: var(--m); top: 12px; z-index: 50; background: var(--cream); color: var(--green); padding: 12px 18px; }

/* type roles */
.display {
  font-size: var(--step-display);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.92;
}
.head {
  font-size: var(--step-head);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}
.lead, .statement { font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.01em; }
.statement { font-weight: 500; max-width: 30ch; text-wrap: balance; }
.small { font-size: var(--step-small); line-height: 1.45; }
.soft { color: var(--soft); }
.nowrap { white-space: nowrap; }

.wrap { padding-inline: var(--m); max-width: 1680px; margin-inline: auto; }

/* fields: one ground per chapter, hard cuts */
.field-night { --bg: var(--night); background: var(--night); }
.field-deep { --bg: var(--deep); background: var(--deep); }
.field-green { --bg: var(--green); background: var(--green); }
.field-predawn { --bg: var(--predawn); background: var(--predawn); }
.field-dawn { --bg: var(--dawn); background: var(--dawn); }
.field-cream, .field-paper {
  --ink: var(--green); --soft: #4E6150; --accent: var(--green); --accent-ink: var(--cream);
  color: var(--ink); color-scheme: light;
}
.field-cream { --bg: var(--cream); background: var(--cream); }
.field-paper { --bg: var(--paper); background: var(--paper); }

/* buttons: one shape, fully round */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 1.4em;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-size: var(--step-body); font-weight: 500; letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.button:active { transform: scale(0.97); }
.button--moon { background: var(--accent); color: var(--accent-ink); }
.button--moon:hover { background: var(--accent-ink); color: var(--accent); border-color: var(--accent); }
.button--line { background: transparent; color: var(--ink); border-color: currentColor; }
.button--line:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* frames for pictures */
.frame { position: relative; overflow: clip; background: #22362a; }
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; }
.frame--45 { aspect-ratio: 4 / 5; }
.frame--1610 { aspect-ratio: 16 / 10; }
.frame--11 { aspect-ratio: 1 / 1; }
figcaption { margin-top: 10px; color: var(--soft); }

/* ---------------------------------------------------------------- bar */
/* Fixed bar: transparent over the hero, a solid green strip once the page moves,
   tucked away while reading down, back as soon as the visitor scrolls up. */
.bar {
  position: fixed; z-index: 20; inset: 0 0 auto 0;
  display: flex; align-items: center; gap: clamp(16px, 3vw, 48px);
  padding: 20px var(--m);
  color: var(--cream);
  transition: transform 320ms var(--ease-out), background-color 240ms ease, padding 240ms var(--ease-out);
}
.bar.is-solid { background: var(--green); padding-block: 12px; }
.bar.is-hidden { transform: translateY(-110%); }
/* the logo file is trimmed to its drawing, so these heights are the mark itself */
.bar__logo img { height: clamp(48px, 4.2vw, 62px); width: auto; transition: height 240ms var(--ease-out); }
.bar.is-solid .bar__logo img { height: clamp(40px, 3.2vw, 48px); }
.bar__menu {
  display: none; margin-left: auto; min-height: 44px; padding: 0 1.1em;
  font: inherit; font-weight: 500; color: inherit; background: transparent;
  border: 2px solid currentColor; border-radius: 999px; cursor: pointer;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.bar__menu:hover, .bar__menu[aria-expanded="true"] { background: var(--cream); color: var(--green); border-color: var(--cream); }
.bar__nav { display: flex; gap: clamp(16px, 2.2vw, 36px); margin-left: auto; }
.bar__nav a { text-decoration: none; position: relative; padding-block: 6px; white-space: nowrap; }
.bar__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform var(--t-ui) var(--ease-out);
}
.bar__nav a:hover::after, .bar__nav a:focus-visible::after { transform: scaleX(1); }
.bar__action { min-height: 44px; }
/* the language switch. Wide screens: the current language, opening a short list of the others */
.lang-pick { position: relative; }
.lang-pick__button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px;
  font: inherit; font-size: var(--step-small); font-weight: 600; letter-spacing: 0.06em;
  color: inherit; background: transparent; border: 0; cursor: pointer;
}
.lang-pick__button svg { width: 11px; height: 8px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform var(--t-ui) var(--ease-out); }
.lang-pick__button[aria-expanded="true"] svg { transform: rotate(180deg); }
.lang-pick__list {
  position: absolute; top: calc(100% + 6px); right: -10px; min-width: 150px;
  display: grid; padding: 6px; border-radius: 14px; background: var(--deep);
}
.lang-pick__list[hidden] { display: none; }
.lang-pick__list a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; text-decoration: none; font-weight: 500; }
.lang-pick__list a:hover, .lang-pick__list a:focus-visible { background: var(--green); }
/* phones and tablets: ES CA EN in a row inside the menu, the current one underlined */
.lang { display: flex; gap: 2px; }
.lang a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 7px;
  font-size: var(--step-small); font-weight: 600; letter-spacing: 0.06em; text-decoration: none; opacity: 0.62;
  transition: opacity var(--t-hover) ease;
}
.lang a:hover, .lang a:focus-visible { opacity: 1; }
.lang a[aria-current="page"] { opacity: 1; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.lang--menu { display: none; }
/* without JavaScript the dropdown cannot open, so the plain ES CA EN row stands in the bar instead */
html:not(.js) .lang-pick { display: none; }
html:not(.js) .lang--menu { display: flex; }
html:not(.js) .loop-toggle { display: none; }

/* --------------------------------------------------------------- hero */
.hero {
  position: relative; height: 100svh; max-height: 1100px; min-height: 640px;
  background: var(--green); overflow: clip;
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter);
  padding: 0 var(--m);
}
.hero__picture {
  position: absolute; top: 0; right: 0; bottom: 0; width: 38%;
  overflow: clip; background: #0b1622;
}
.hero__picture img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero__title { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.hero__title [data-line] { pointer-events: auto; } /* the words themselves stay selectable and on top */
.hero__a { position: absolute; left: var(--m); top: clamp(108px, 15svh, 150px); }
.hero__b { position: absolute; right: var(--m); bottom: clamp(24px, 4svh, 40px); text-align: right; }
.hero__title .line { white-space: nowrap; }
.hero__intro {
  position: absolute; left: var(--m); top: 46%; width: min(34ch, 30vw); z-index: 3;
  display: grid; gap: 28px; justify-items: start;
}
.hero__moon {
  position: absolute; z-index: 2;
  --d: min(31vw, 54svh);
  width: var(--d); height: var(--d);
  left: calc(62% - var(--d) / 2); top: calc(52% - var(--d) / 2);
}
.moon { position: relative; aspect-ratio: 1; border-radius: 50%; }
.moon > img { width: 100%; height: 100%; border-radius: 50%; }
.moon__shadow { position: absolute; inset: -0.5%; width: 101%; height: 101%; overflow: visible; }
.moon__shadow path { fill: #08150c; fill-opacity: 0.9; }
.hero__moon .moon { width: 100%; }
.moon__shadow path { transition: d 500ms var(--ease-out); }
/* the copy that carries the moon from the hero down into the night chooser: under the words, over the pictures */
.moon--carry { position: fixed; left: 0; top: 0; z-index: 2; pointer-events: none; transform-origin: 0 0; visibility: hidden; }
.star { position: absolute; fill: var(--cream); }

/* ------------------------------------------------------------ tonight */
/* the night chooser: its own moon beside the readings, as it first was */
.tonight { background: var(--dusk); padding-block: clamp(80px, 9vw, 140px); }
.tonight__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 40px; align-items: center; }
.tonight__intro { grid-column: 1 / span 4; display: grid; gap: 1em; align-content: center; position: relative; z-index: 3; }
.tonight__intro .head { max-width: 9ch; }
.sky {
  grid-column: 6 / span 7; background: var(--green); color: var(--cream);
  padding: clamp(24px, 3vw, 48px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 44px);
  align-items: center;
}
.sky__moon { width: 100%; max-width: 340px; }
.sky__read { display: grid; gap: 14px; }
.sky__date { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.sky__phase { color: var(--soft); }
.sky__times { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin-top: 8px; }
.sky__times dt { font-size: var(--step-small); color: var(--soft); }
.sky__times dd { font-size: var(--step-lead); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.sky__controls { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; gap: 12px 20px; align-items: center; }
.sky__label { font-weight: 500; }
.sky__out { min-width: 9ch; text-align: right; color: var(--soft); font-variant-numeric: tabular-nums; }
.sky__jumps { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; }
html:not(.js) .sky__controls { display: none; }

/* the slider, its thumb a small full moon */
.sky__range { width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; appearance: none; -webkit-appearance: none; }
.sky__range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: #2B5134; }
.sky__range::-moz-range-track { height: 6px; border-radius: 999px; background: #2B5134; }
.sky__range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--cream); transition: transform var(--t-press) var(--ease-out); }
.sky__range::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--cream); }
.sky__range:active::-webkit-slider-thumb { transform: scale(1.15); }
.sky__range:focus-visible { outline: 3px solid var(--cream); outline-offset: 4px; border-radius: 4px; }
.star--1 { width: 26px; left: -14%; top: -4%; }
.star--2 { width: 18px; left: -26%; top: 14%; }
.star--3 { width: 16px; left: -6%; top: 22%; }

/* ------------------------------------------------------------ opening */
.opening { padding-top: var(--section); }
.opening__title span { display: block; }
.opening__run {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter);
  margin-top: clamp(56px, 7vw, 112px); padding-bottom: var(--section);
}
.held { grid-column: 1 / span 5; position: sticky; top: 9svh; height: min(82svh, 52vw); align-self: start; }
.held__item { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto; opacity: 0; transition: opacity 700ms var(--ease-out); }
.held__item.is-on { opacity: 1; }
.held__item .frame { height: 100%; }
.opening__steps { grid-column: 7 / span 6; }
.step { min-height: 82svh; display: grid; align-content: center; gap: 1.1em; max-width: 42rem; }
.step p:not(.statement) { max-width: 34rem; }
.step .statement { font-size: clamp(1.375rem, 1rem + 1.2vw, 2.25rem); max-width: 38ch; line-height: 1.2; }
html:not(.js) .held__item { position: static; opacity: 1; visibility: visible; margin-bottom: 24px; }
html:not(.js) .held { position: static; height: auto; }

/* ------------------------------------------------------------ mission */
.mission { padding-bottom: var(--section); }
.mission__head {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 32px;
  align-items: end;
}
.mission__head .head { grid-column: 1 / span 8; }
.mission__head p { grid-column: 9 / span 4; }
.mission__walk {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter);
  margin-top: clamp(64px, 8vw, 120px); align-items: start;
}
.walk--1 { grid-column: 1 / span 4; }
.walk--2 { grid-column: 5 / span 4; margin-top: 10vw; }
.walk--3 { grid-column: 9 / span 4; margin-top: 3vw; }
.walk figcaption { display: grid; gap: 4px; margin-top: 16px; }
.walk__word { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); line-height: 1.15; }
.mission__close { grid-column: 9 / span 4; margin-top: clamp(40px, 5vw, 72px); align-self: start; }

/* --------------------------------------------------------- philosophy */
.philosophy { position: relative; min-height: 100svh; display: grid; grid-template-columns: repeat(4, 1fr); column-gap: var(--gutter); padding: clamp(48px, 6vw, 96px) var(--m); align-items: center; overflow: clip; background: #0b1410; }
.philosophy__picture { position: absolute; inset: 0; }
.philosophy__picture img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.philosophy__card {
  position: relative; grid-column: 2 / span 2; width: 100%; max-width: 31rem; min-width: 360px;
  background: var(--green); color: var(--cream);
  padding: clamp(28px, 2.4vw, 40px);
  display: grid; gap: 0.85em;
}
.card-head { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 0.4em; }
.philosophy__card p { font-size: var(--step-body); }
.philosophy__card .philosophy__first { font-weight: 500; }
.philosophy__last { font-weight: 600; margin-top: 0.3em; }
.philosophy__credit { position: absolute; right: var(--m); bottom: 20px; color: var(--cream); }

/* --------------------------------------------------------- difference */
.fan { position: relative; height: 225svh; }
.fan__stage { position: sticky; top: 0; height: 100svh; overflow: clip; padding: clamp(56px, 8svh, 96px) var(--m) 0; }
.fan__head { max-width: 72rem; display: grid; gap: 20px; }
.fan__head .lead { color: var(--soft); max-width: 40ch; }
.fan__table {
  position: absolute; left: 50%; bottom: clamp(24px, 5svh, 56px);
  width: 1110px; height: 380px; margin-left: -555px;
  transform-origin: 50% 100%; /* main.js scales it to the room under the heading */
}
.card {
  position: absolute; top: 0; width: 300px; height: 360px;
  padding: 28px 40px 28px 28px;
  display: grid; grid-template-rows: auto 1fr; align-content: space-between;
  --x: calc(var(--n) * 270px);
  left: var(--x);
  transform: rotate(var(--r));
  transition: transform var(--t-ui) var(--ease-out);
}
.card[data-card="0"] { --n: 0; --r: -3deg; background: var(--green); color: var(--cream); }
.card[data-card="1"] { --n: 1; --r: 2deg; background: var(--moss); color: var(--cream); }
.card[data-card="2"] { --n: 2; --r: -2deg; background: var(--cream); color: var(--green); }
.card[data-card="3"] { --n: 3; --r: 4deg; background: var(--sage); color: var(--green); }
.card p { font-size: clamp(1.125rem, 1rem + 0.35vw, 1.3125rem); line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; align-self: end; max-width: 232px; }
.card__moon { width: 112px; }
.card__moon .moon__shadow path { fill-opacity: 0.86; }
.difference__text { padding-top: clamp(80px, 9vw, 140px); padding-bottom: var(--section); }
.difference__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
.difference__close { margin-top: clamp(64px, 7vw, 112px); font-size: var(--step-head); font-weight: 600; letter-spacing: -0.035em; line-height: 1; max-width: 34ch; }

/* ------------------------------------------------------------ mindset */
.mindset { padding-block: var(--section); }
.mindset__head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 32px; align-items: end; }
.mindset__head .head { grid-column: 1 / span 8; }
.mindset__intro { grid-column: 9 / span 4; display: grid; gap: 1em; }
/* three short paragraphs side by side: who we are, what we value, what we ask */
.traits {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 72px) var(--gutter);
  margin-top: clamp(56px, 7vw, 104px);
}
.trait { margin: 0; font-size: clamp(1.125rem, 1rem + 0.35vw, 1.3125rem); line-height: 1.4; letter-spacing: -0.01em; max-width: 30ch; }
.trait .soft { color: var(--sage); }
.mindset__close { margin-top: clamp(56px, 6vw, 96px); margin-left: auto; max-width: 28ch; }

/* --------------------------------------------------------- technology */
.tech { padding-block: var(--section); }
.tech__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 56px; align-items: start; }
.tech__title { grid-column: 1 / -1; max-width: 26ch; }
.tech__text { grid-column: 1 / span 5; display: grid; gap: 1em; }
.tech__picture { grid-column: 7 / span 6; }
.tech__picture .frame { aspect-ratio: 4 / 3; }
.tech__close { margin-top: clamp(72px, 8vw, 120px); font-size: clamp(1.375rem, 1rem + 1.2vw, 2.25rem); line-height: 1.2; max-width: 34ch; margin-left: auto; }

/* ------------------------------------------------------------- vision */
.vision { padding-block: var(--section); }
.vision__head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 40px; }
.vision__head .head { grid-column: 1 / -1; font-size: var(--step-display); letter-spacing: -0.04em; line-height: 0.95; max-width: 13em; }
.vision__body { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.places { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); margin-top: clamp(72px, 9vw, 144px); align-items: start; }
.place figcaption { display: grid; gap: 4px; margin-top: 16px; }
.place__word { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); line-height: 1.15; }
.place--1 { grid-column: 1 / span 6; }
.place--1 .frame { aspect-ratio: 3 / 2; }
.place--2 { grid-column: 7 / span 3; margin-top: 7vw; }
.place--2 .frame { aspect-ratio: 4 / 5; }
.place--3 { grid-column: 10 / span 3; margin-top: 4vw; }
.place--3 .frame { aspect-ratio: 4 / 5; }

/* ------------------------------------------------------------ contact */
.contact { padding-block: var(--section) clamp(80px, 8vw, 120px); }
.contact__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 56px; align-items: start; }
.contact__title { grid-column: 1 / -1; max-width: 24ch; }
.contact__text { grid-column: 1 / span 5; display: grid; gap: 1em; }
.contact__address { font-style: normal; display: grid; gap: 4px; margin-top: 1em; font-size: var(--step-body); line-height: 1.4; }
.contact__address span:first-child { font-weight: 600; }
.contact__address a { text-decoration-thickness: 2px; }
.contact__address a:hover { text-decoration: none; }
.contact__side { grid-column: 7 / span 6; position: relative; display: grid; grid-template-columns: repeat(6, 1fr); column-gap: var(--gutter); }
.contact__map { grid-column: 2 / span 5; grid-row: 1; }
.contact__map .frame { aspect-ratio: 1920 / 1669; }
.form {
  grid-column: 1 / span 4; grid-row: 1; margin-top: 46%; position: relative; z-index: 1;
  background: var(--green); color: var(--cream); --ink: var(--cream); --soft: #BFC9B8; --accent: var(--cream); --accent-ink: var(--green); --bg: var(--green);
  padding: clamp(24px, 2.6vw, 40px); display: grid; gap: 18px;
}
.form__lead { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 4px; }
.field { display: grid; gap: 6px; }
.field span { font-size: var(--step-small); color: var(--soft); }
.field input, .field textarea {
  font: inherit; color: var(--cream); background: #1C4428; border: 0; border-bottom: 2px solid #7A9A82; /* 3:1+ against the form and the field (WCAG 1.4.11) */
  padding: 12px 14px; border-radius: 0; min-height: 48px; resize: vertical;
  transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease;
}
.field input:hover, .field textarea:hover { background: #21502F; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--cream); background: #21502F; }
.form__send { justify-self: start; margin-top: 6px; }
.form__send:disabled { opacity: 0.7; cursor: progress; }
.form__note { color: var(--soft); }
.form__note[data-state="sent"] { color: var(--cream); font-weight: 600; }
.form__note[data-state="error"] { color: #F2C9A8; font-weight: 600; }
.form__trap { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
/* consent: the whole line is the target, the box itself unticked and required */
.form__consent { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; font-size: var(--step-small); line-height: 1.45; color: var(--soft); cursor: pointer; }
.form__consent input { width: 22px; height: 22px; margin: 0; accent-color: var(--cream); cursor: pointer; }
.form__consent a { color: var(--cream); }

/* ------------------------------------------------------------- footer */
.foot { padding-top: clamp(80px, 10vw, 160px); padding-bottom: 28px; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); padding-inline: var(--m); }
.foot > .wrap { padding-inline: 0; max-width: none; margin: 0; }
.foot__logo { grid-column: 1 / span 4; }
.foot__logo img { width: 100%; max-width: 440px; height: auto; }
.foot__credits { grid-column: 6 / span 7; color: var(--ink); }
.foot__line { grid-column: 1 / -1; }
.foot__credits-title { font-weight: 600; margin-bottom: 12px; }
.foot__credits ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 10px var(--gutter); }
.held__cap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.loop-toggle {
  min-height: 32px; min-width: 64px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: var(--step-small); color: var(--ink); background: transparent; border: 2px solid currentColor;
}
.loop-toggle:hover { background: var(--ink); color: var(--bg); }
.held__item:not(.is-on) { visibility: hidden; transition: opacity 700ms var(--ease-out), visibility 0s 700ms; }
.foot__credits a { text-decoration-thickness: 1px; }
.foot__line { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: baseline; margin-top: 40px; font-size: var(--step-small); }
.foot__line > :last-child { justify-self: end; }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ---------------------------------------------------------- 404 page */
.lost { min-height: 100svh; display: grid; grid-template-columns: 1fr 38%; }
.lost__text { display: grid; align-content: center; justify-items: start; gap: 28px; padding: 32px var(--m); }
.lost__text img { width: clamp(160px, 18vw, 240px); height: auto; }
.lost .display { max-width: 12ch; }
.lost p { max-width: 36ch; }
.lost__also { display: grid; gap: 4px; }
.lost__picture { margin: 0; order: 2; }
.lost__picture img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
@media (max-width: 760px) { .lost { grid-template-columns: 1fr; } .lost__picture { height: 40svh; } }

/* -------------------------------------------------------- legal pages */
/* aviso legal and privacy policy: one readable column on cream, the green bar carrying the logo home */
.legal-page { --bg: var(--cream); --ink: var(--green); --soft: #4E6150; color-scheme: light; background: var(--cream); color: var(--ink); }
.legal__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px var(--m); background: var(--green); color: var(--cream); }
.legal__logo img { height: 48px; width: auto; }
.legal { padding: clamp(48px, 7vw, 104px) var(--m) clamp(64px, 8vw, 120px); }
.legal__body { max-width: 68ch; margin-inline: auto; }
.legal__body h1 { font-size: clamp(2.25rem, 1.4rem + 3.2vw, 3.75rem); line-height: 1; margin-bottom: 14px; }
.legal__updated { color: var(--soft); font-size: var(--step-small); margin-bottom: clamp(32px, 4vw, 56px); }
.legal__body h2 { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin: 2.2em 0 0.6em; }
.legal__body p + p, .legal__body ul + p, .legal__body p + ul { margin-top: 0.8em; }
.legal__body ul { margin: 0; padding-left: 1.2em; display: grid; gap: 0.5em; }
.legal__facts { display: grid; gap: 10px; margin-top: 18px; }
.legal__facts div { display: grid; grid-template-columns: minmax(9rem, 13rem) 1fr; gap: 2px 24px; }
.legal__facts dt { color: var(--soft); }
.legal__foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 28px; padding: 24px var(--m) 32px; font-size: var(--step-small); background: var(--paper); }
.legal__foot span { margin-left: auto; color: var(--soft); }
/* a company detail not given yet */
mark.todo { background: #F2C9A8; color: var(--green); padding: 0 5px; border-radius: 3px; font-weight: 600; }
@media (max-width: 760px) {
  .legal__facts div { grid-template-columns: 1fr; }
  .legal__logo img { height: 40px; }
  .legal__foot span { margin-left: 0; }
}

/* ========================================================= motion layer */
@media (prefers-reduced-motion: no-preference) {
  .js .lines .line { overflow: clip; padding-bottom: 0.1em; margin-bottom: -0.1em; }
  .js .lines [data-line] { display: inline-block; transform: translateY(108%); animation: line-up 900ms var(--ease-expo) forwards; animation-delay: calc(140ms + var(--i) * 110ms); }
  .js [data-load] { opacity: 0; transform: translateY(14px); animation: load-rise 600ms var(--ease-out) forwards; animation-delay: var(--d); }
  .js .bar[data-load] { transform: none; animation-duration: 500ms; }
  .js [data-open] { clip-path: inset(0 0 100% 0); animation: load-open 1100ms var(--ease-in-out) 120ms forwards; }
  .js [data-open] img { transform: scale(1.1); animation: load-settle 1600ms var(--ease-expo) 100ms forwards; }
  .js .hero__moon .moon { opacity: 0; transform: translateY(60px) scale(0.92); animation: moon-rise 1500ms var(--ease-expo) 260ms forwards; }
  /* the stars twinkle twice as the page opens, then rest: nothing blinks for longer than five seconds */
  .star { animation: twinkle 2.2s ease-in-out 600ms 2; }
  .star--2 { animation-delay: 900ms; }
  .star--3 { animation-delay: 1200ms; }

  .js [data-reveal] { opacity: 0.4; transform: translateY(28px); transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-expo); transition-delay: calc(var(--i, 0) * var(--stagger-item)); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js [data-shutter] { clip-path: inset(100% 0 0 0); transition: clip-path 1100ms var(--ease-in-out); }
  .js [data-shutter] img { transform: scale(1.12); transition: transform 1600ms var(--ease-expo); }
  .js .is-in [data-shutter] { clip-path: inset(0); }
  .js .is-in [data-shutter] img { transform: scale(1.02); }
  .frame img { will-change: transform; }

  .js .card { transition: transform var(--t-ui) var(--ease-out); }
  .js .fan.is-live .card { transition: none; }
}
@keyframes line-up { to { transform: none; } }
@keyframes load-rise { to { opacity: 1; transform: none; } }
@keyframes load-open { to { clip-path: inset(0); } }
@keyframes load-settle { to { transform: none; } }
@keyframes moon-rise { to { opacity: 1; transform: none; } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .held__item { transition: none; }
  .fan { height: auto; }
  .fan__stage { position: static; height: auto; padding-bottom: 64px; }
  .fan__table { position: relative; left: auto; bottom: auto; margin: 64px auto 0; }
}

/* ============================================================ tablet */
@media (max-width: 1100px) {
  .fan__table { transform: scale(0.8); transform-origin: 50% 100%; }
  .mission__head .head, .mindset__head .head { grid-column: 1 / -1; }
  .mission__head p, .mindset__intro { grid-column: 1 / span 8; }
  .difference__cols { grid-template-columns: 1fr 1fr; }
  .philosophy { grid-template-columns: repeat(2, 1fr); }
  .philosophy__card { grid-column: 1 / span 1; }
  .tech__text { grid-column: 1 / span 8; }
  .tech__picture { grid-column: 1 / span 10; }
  .tonight__intro { grid-column: 1 / -1; }
  .tonight__intro .head { max-width: none; }
  .tonight__intro p { max-width: 40ch; }
  .sky { grid-column: 1 / -1; }
  .traits { grid-template-columns: 1fr 1fr; }
}

/* ============================================================== phone */
/* the sections fold into the Menu panel before the Spanish and Catalan links run out of room */
@media (max-width: 1120px) {
  .bar__menu { display: inline-flex; align-items: center; }
  .bar__nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 0; background: var(--green); padding: 4px var(--m) 24px;
  }
  .bar__nav.is-open { display: flex; }
  .bar__nav a { padding-block: 12px; font-size: var(--step-lead); font-weight: 500; }
  .bar__nav a::after { display: none; }
  .lang-pick { display: none; }
  .lang--menu { display: flex; margin-top: 10px; margin-left: -7px; }
  .lang--menu a { font-size: var(--step-body); }
  html:not(.js) .bar__menu { display: none; }
  html:not(.js) .bar__nav { display: flex; position: static; flex-direction: row; background: none; padding: 0; margin-left: auto; }
  html:not(.js) .bar__nav > a { display: none; }
  html:not(.js) .lang--menu { margin: 0; }
  html:not(.js) .lang--menu a { font-size: var(--step-small); }
}

@media (max-width: 760px) {
  .hide-s { display: none; }
  .bar { padding: 14px var(--m); gap: 10px; }
  .bar.is-solid { padding-block: 10px; }
  .bar__logo img { height: 42px; }
  .bar.is-solid .bar__logo img { height: 36px; }
  .bar__action { padding: 0 1.1em; }

  .hero { height: auto; max-height: none; min-height: 100svh; display: flex; flex-direction: column; padding: 92px var(--m) 0; }
  .hero__title { position: static; display: block; order: 1; }
  .hero__a, .hero__b { position: static; display: block; text-align: left; }
  /* each half keeps to one line, set as large as the phone's width allows */
  .hero__title { font-size: clamp(1.625rem, 7.8vw, 2.75rem); letter-spacing: -0.045em; }
  .hero__title .line { white-space: nowrap; }
  .hero__intro { position: static; width: auto; order: 2; margin-top: 22px; gap: 20px; }
  .hero__picture { position: relative; order: 3; width: calc(100% + 2 * var(--m)); margin: 40px calc(-1 * var(--m)) 0; height: 46svh; flex: 1 0 auto; }
  .hero__moon { --d: 54vw; left: auto; right: var(--m); top: auto; bottom: calc(46svh - var(--d) * 0.45); }
  .tonight__grid { grid-template-columns: 1fr; row-gap: 28px; }
  .sky { grid-template-columns: 1fr; margin-inline: calc(-1 * var(--m)); padding: 28px var(--m); }
  .sky__moon { max-width: 220px; justify-self: center; }
  .sky__controls { grid-template-columns: 1fr auto; }
  .sky__label { grid-column: 1 / -1; }
  .star--1 { left: -20%; }
  .star--2 { left: -34%; }

  .opening__title { font-size: clamp(1.25rem, 5.6vw, 1.75rem); }
  .opening__title .nowrap { white-space: normal; }
  .held { position: static; height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .held__item, .held__item:not(.is-on) { position: static; opacity: 1; visibility: visible; display: block; }
  .held__item:first-child { grid-column: 1 / -1; }
  .held__item .frame { height: auto; aspect-ratio: 1; }
  .held__item:first-child .frame { aspect-ratio: 4 / 3; }
  .step { min-height: 0; margin-top: 40px; }
  .opening__run, .mission__head, .mission__walk, .mindset__head, .tech__grid, .vision__head, .vision__body, .places, .contact__grid { grid-template-columns: 1fr; }
  .opening__run > *, .mission__head > *, .mission__walk > *, .mindset__head > *, .tech__grid > *, .vision__head > *, .places > *, .contact__grid > * { grid-column: 1 / -1 !important; }
  .walk { margin-top: 48px !important; width: 82%; }
  .walk--2 { justify-self: end; }
  .mission__close { margin-top: 48px; }

  .philosophy { display: block; padding: 0; background: var(--green); }
  .philosophy__picture { position: relative; height: 62svh; }
  .philosophy__card { min-width: 0; margin: -80px var(--m) 0; }
  .philosophy__credit { position: static; padding: 12px var(--m) 0; text-align: right; }
  .philosophy { padding-bottom: 64px; }

  .fan { height: auto; }
  .fan__stage { position: static; height: auto; overflow: visible; padding-bottom: 32px; padding-top: var(--section); }
  .fan__table { position: static; transform: none; margin: 40px 0 0; width: auto; height: auto; display: grid; gap: 0; }
  .card { position: relative; left: auto; width: 86%; height: auto; min-height: 0; gap: 28px; padding: 24px; transform: rotate(var(--r)); margin-top: -14px; }
  .card:first-child { margin-top: 0; }
  .card:nth-child(even) { justify-self: end; }
  .card__moon { width: 96px; }
  .difference__cols { grid-template-columns: 1fr; }

  .traits { grid-template-columns: 1fr; }
  .trait { max-width: none; }

  .head { letter-spacing: -0.045em; text-wrap: wrap; }
  .fan__head .head { font-size: var(--step-lead); letter-spacing: -0.03em; line-height: 1.1; }
  .fan__head .lead { font-size: var(--step-body); }
  .vision__head .head { font-size: var(--step-head); letter-spacing: -0.045em; }
  .place { margin-top: 48px !important; }
  .place--2, .place--3 { width: 78%; }
  .place--3 { justify-self: end; }

  .contact__side { grid-template-columns: 1fr; }
  .contact__map, .form { grid-column: 1; }
  .form { grid-row: 2; margin-top: -64px; margin-inline: 12px; }

  .foot__logo, .foot__credits { grid-column: 1 / -1; }
  .foot__logo img { max-width: 260px; }
  .foot__credits { margin-top: 48px; }
  .foot__line { grid-template-columns: 1fr; gap: 8px; }
  .foot__line > :last-child { justify-self: start; }
}
