/* ==========================================================================
   Decode Nation — Direction 4 · Hand Cards
   Strict three-colour palette (white / burgundy / black). Gloved hands rise
   into frame holding cards with the key manifesto lines.
   ========================================================================== */

:root {
  /* colour */
  --white: #FFFFFF;
  --ink: #0E0E0E;
  --body: #3A3A3A;
  --muted: #5A5A5A;
  --muted-2: #6A6A6A;
  --burgundy: #7A1620;
  --slash-on-dark: #C9434E;   /* D/N slash on dark only */
  --frame: #48110A;           /* matches the hand photo backdrop */
  --station-bg: #1C1C1C;
  --portrait-bg: #EDEDED;
  --header-bg: rgba(255, 255, 255, .94);
  --rule-header: rgba(14, 14, 14, .08);
  --rule-section: rgba(14, 14, 14, .1);
  --rule: rgba(14, 14, 14, .14);
  --rule-dark: rgba(255, 255, 255, .2);
  --rule-next: rgba(255, 255, 255, .24);
  --on-dark-body: rgba(255, 255, 255, .86);
  --on-dark-next: rgba(255, 255, 255, .88);
  --on-dark-link: rgba(255, 255, 255, .82);
  --on-dark-label: rgba(255, 255, 255, .72);
  --input-line: rgba(255, 255, 255, .4);

  /* type */
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, sans-serif;
  --caps-track: .2em;
  --btn-track: .14em;

  /* layout */
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(80px, 13vh, 150px);
  --wrap: 1200px;
  --col-gap: clamp(36px, 6vw, 96px);

  /* motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

a { color: var(--burgundy); text-decoration: none; }
a:hover { color: var(--ink); }

::selection { background: var(--burgundy); color: var(--white); }

input, textarea, button { font: inherit; color: inherit; }

img { display: block; max-width: 100%; }

p { margin: 0; }

/* focus — burgundy outline on white, white outline on black / burgundy */
:focus { outline: none; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 3px;
}
main:focus { outline: none; }

.section--dark a:focus-visible,
.section--dark button:focus-visible,
.next a:focus-visible {
  outline-color: var(--white);
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  letter-spacing: var(--btn-track);
  text-transform: uppercase;
  transform: translateY(-160%);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
  color: var(--white);
  outline: 2px solid var(--burgundy);
  outline-offset: 2px;
}

.page {
  overflow-x: hidden;   /* fallback */
  overflow-x: clip;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px var(--gutter);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-header);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.logo:hover { color: var(--ink); }
.logo__mark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1;
}
.logo__slash { padding: 0 1px; color: var(--burgundy); }
.logo__word {
  font-size: 10px;
  letter-spacing: .3em;
  line-height: 1.45;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 36px);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav__link {
  font-size: 12px;
  letter-spacing: var(--btn-track);
  text-transform: uppercase;
  color: var(--ink);
}
.site-nav__link:hover { color: var(--burgundy); }
.site-nav__cta {
  padding: 10px 18px;
  background: var(--ink);
  font-size: 12px;
  letter-spacing: var(--btn-track);
  text-transform: uppercase;
  color: var(--white);
}
.site-nav__cta:hover { background: var(--burgundy); color: var(--white); }

/* no hamburger: below ~640px only logo + Contact stay */
@media (max-width: 639.98px) {
  .site-nav__link { display: none; }
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: var(--btn-track);
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
.btn--solid {
  padding: 17px 28px;
  background: var(--burgundy);
  color: var(--white);
}
.btn--solid:hover { background: var(--ink); color: var(--white); }

.btn--outline {
  padding: 16px 26px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
}
.btn--outline:hover { background: var(--ink); color: var(--white); }

/* very narrow phones: long labels may wrap rather than overflow */
@media (max-width: 419.98px) {
  .btn { white-space: normal; }
}

/* ------------------------------------------------------------ typography */

.label {
  margin: 0 0 24px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: var(--caps-track);
  text-transform: uppercase;
  color: var(--burgundy);
}
.label--pull { margin-top: -.4em; }
.label--light { color: var(--white); }

.slash { padding: 0 6px; color: var(--slash-on-dark); }

.h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.14;
  text-wrap: balance;
}
.h2--lg    { font-size: clamp(32px, 3.8vw, 56px); line-height: 1.1; }
.h2--about { font-size: clamp(30px, 3.4vw, 50px); line-height: 1.12; }
.h2--16ch  { max-width: 16ch; }
.h2--18ch  { max-width: 18ch; }
.h2--20ch  { max-width: 20ch; }

.body-text { color: var(--body); }

.accent { color: var(--burgundy); }

/* --------------------------------------------------------------- sections */

.section { padding: var(--section-y) var(--gutter); }
.section--rule { border-top: 1px solid var(--rule-section); }
.section--dark { background: var(--ink); color: var(--white); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: var(--col-gap);
}
.two-col--top { align-items: start; }

.col { min-width: 0; }

/* ------------------------------------------------------------ hand cards */
/* A frame with overflow hidden + inline-size container; inside, an absolute
   layer = photo + text overlay positioned in % over the blank card. */

.hand {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  container-type: inline-size;
}
.hand--hero { background: var(--frame); }

.hand__inner {
  position: absolute;
  inset: 0;
}
.hand__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hand__card {
  position: absolute;
  left: 21.4%;
  top: 9.7%;
  width: 55.4%;
  height: 30.9%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3cqw 4cqw;
}
.hand__text {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  text-align: center;
  text-wrap: balance;
  color: var(--ink);
}
.hand__text--hero {
  font-size: 4.6cqw;
  line-height: 1.16;
  letter-spacing: -.01em;
}
.hand__text--next {
  font-size: 4cqw;
  line-height: 1.18;
}

/* Rise once and stay. The hidden start state only exists when JS runs
   (html.js), so without JS the hands are simply in place. The transition is
   attached with .is-up only, so the hand can never animate back down. */
html.js [data-hand-inner] { transform: translateY(105%); }
html.js [data-hand-inner].is-up {
  transform: translateY(0);
  transition: transform 1.5s var(--ease-out) .1s;
}
html.js [data-hand-inner].hand__inner--hero.is-up { transition-delay: .35s; }

/* ------------------------------------------------------------------ hero */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
  padding: clamp(100px, 13vh, 130px) var(--gutter) clamp(48px, 8vh, 80px);
}
.hero__text { min-width: 0; }
.hero__title {
  margin: 0;
  max-width: 16ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.6vw, 68px);
  line-height: 1.08;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.hero__cta { margin-top: clamp(32px, 5vh, 48px); }
.hero__hand {
  min-width: 0;
  justify-self: center;
  width: 100%;
  max-width: min(600px, 72vh);
}

/* ------------------------------------------------------------------- why */

.why__text {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.why__text .body-text { max-width: 54ch; }

/* ------------------------------------------------------- two-hands band */

.band {
  position: relative;
  width: 100%;
  aspect-ratio: 1672 / 941;
  overflow: hidden;
  background: var(--white);
  container-type: inline-size;
}
.band__card {
  position: absolute;
  left: 23.3%;
  top: 11.7%;
  width: 53.4%;
  height: 34%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2cqw 5cqw;
  pointer-events: none;
}
.band__text {
  margin: 0;
  max-width: 24ch;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(15px, 2.9cqw, 50px);
  line-height: 1.16;
  text-align: center;
  text-wrap: balance;
  color: var(--white);
}
/* Phones: the 15px floor no longer fits the overlay rect (the band is only
   ~210px tall at 375px). Below 520px the text keeps scaling with the frame
   (12px floor) and the rect grows downwards from 34% to 40% — still on the
   black card (which ends at ~56%) and between the thumbs; left / top / width
   are unchanged. */
@media (max-width: 519.98px) {
  .band__card { height: 40%; }
  .band__text { font-size: max(12px, 2.9cqw); }
}

/* -------------------------------------------------------------- stations */

.stations__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: var(--col-gap);
  margin-top: clamp(40px, 7vh, 72px);
}
.station-frame {
  position: relative;
  min-width: 0;
  width: 100%;
  aspect-ratio: 716 / 791;
  background: var(--station-bg);
}
.station-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
}
.stations__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: -.4em;
  color: var(--on-dark-body);
}
.inventory {
  padding: 22px 0;
  border-top: 1px solid var(--rule-dark);
  border-bottom: 1px solid var(--rule-dark);
}
.inventory__label { margin: 0 0 12px; }
.inventory__list {
  font-family: var(--serif);
  font-size: clamp(19px, 1.6vw, 23px);
  line-height: 1.5;
  color: var(--white);
}

/* ----------------------------------------------------------------- where */

.where__statement {
  max-width: 34ch;
  font-family: var(--serif);
  font-size: clamp(23px, 2.2vw, 32px);
  line-height: 1.3;
}
.where__side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.where__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.where-card {
  aspect-ratio: 1.5 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.where-card--burgundy { box-shadow: 6px 6px 0 var(--burgundy); }
.where-card__arrow {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--burgundy);
}
.where-card__text {
  font-size: 15.5px;
  line-height: 1.5;
}
.where__note {
  margin-top: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- brands */

.brands__lead {
  margin-top: 28px;
  max-width: 44ch;
}
.brands__cta { margin-top: 34px; }

.list-label {
  margin: 0 0 6px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: var(--caps-track);
  text-transform: uppercase;
  color: var(--muted-2);
}
.rule-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rule-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.brands__note {
  margin-top: 22px;
  font-size: 15px;
  color: var(--muted);
}

/* ------------------------------------------------------------------ next */

.next {
  position: relative;
  overflow: hidden;
  background: var(--frame);
  color: var(--white);
}
.next__grid {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  align-items: end;
  gap: 0 clamp(24px, 4vw, 64px);
  padding: clamp(72px, 12vh, 130px) var(--gutter) 0;
}
.next__text {
  min-width: 0;
  padding-bottom: clamp(56px, 10vh, 110px);
}
.next__lead {
  margin-top: 28px;
  max-width: 50ch;
  color: var(--on-dark-next);
}
.next__ask {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--rule-next);
}
.tell-us {
  color: var(--white);
  border-bottom: 1px solid var(--white);
}
.tell-us:hover { color: var(--white); opacity: .7; }
.next__hand {
  min-width: 0;
  justify-self: center;
  width: 100%;
  max-width: 540px;
}

/* ----------------------------------------------------------------- about */

.about__intro {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(24px, 4vw, 64px);
  margin-top: 28px;
  color: var(--body);
}
.founders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(40px, 5vw, 72px);
  margin-top: clamp(48px, 8vh, 80px);
}
.founder {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
/* B&W only — no colour on hover in this direction (three-colour rule) */
.portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--portrait-bg);
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
}
.portrait__tab {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 12px 18px;
  background: var(--burgundy);
  color: var(--white);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  line-height: 1;
  pointer-events: none;
}
.founder__name {
  margin: 24px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 25px;
  line-height: 1.15;
}
.founder__role {
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: var(--caps-track);
  text-transform: uppercase;
  color: var(--burgundy);
}
.founder__bio {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
  font-size: 16px;
  color: var(--body);
}

.company {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px 28px;
  margin-top: clamp(56px, 9vh, 90px);
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}
.company__mark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 28px;
  line-height: 1;
}
.company__slash { padding: 0 2px; color: var(--burgundy); }
.company__line {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.3;
}

/* --------------------------------------------------------------- contact */

.section--contact { padding-bottom: 40px; }

.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: clamp(40px, 6vw, 96px);
}
.contact__title {
  margin: 0;
  max-width: 22ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(27px, 2.8vw, 40px);
  line-height: 1.18;
  text-wrap: pretty;
}
.contact__lead {
  margin-top: 22px;
  color: var(--on-dark-body);
}
.contact__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-dark);
  font-size: 15px;
}
.contact__link { color: var(--on-dark-link); }
.contact__link:hover { color: var(--white); }
.contact__link--email { color: var(--white); }
.contact__link--email:hover { color: var(--white); opacity: .7; }

/* form */
.contact-form {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field__label {
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: var(--caps-track);
  text-transform: uppercase;
  color: var(--on-dark-label);
}
.field__input {
  width: 100%;
  padding: 10px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--input-line);
  border-radius: 0;
  color: var(--white);
  font-size: 16px;   /* ≥16px: no iOS zoom on focus */
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.field__input--area { resize: vertical; }
.field__input:focus { border-bottom-color: var(--white); }
/* keyboard focus: the underline thickens to a 2px white rule */
.field__input:focus-visible {
  border-bottom-color: var(--white);
  box-shadow: 0 1px 0 0 var(--white);
}
.field__input[aria-invalid="true"] { border-bottom-color: var(--slash-on-dark); }

.field__error {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--white);
}
.field__error::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 8px 1px 0;
  background: var(--slash-on-dark);
}
.field__error:empty { display: none; }

/* intent: real radio inputs shown as the designed square buttons */
.intent {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.intent__legend {
  display: block;
  padding: 0;
  margin-bottom: 10px;
}
.intent__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.intent__opt {
  position: relative;
  display: inline-flex;
}
.intent__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.intent__btn {
  display: inline-block;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--input-line);
  color: var(--white);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: var(--btn-track);
  text-transform: uppercase;
  cursor: pointer;
}
.intent__input:checked + .intent__btn {
  background: var(--white);
  border-color: var(--white);
  color: var(--ink);
}
.intent__input:focus-visible + .intent__btn {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.btn--submit {
  align-self: flex-start;
  display: flex;
  padding: 16px 28px;
  background: var(--burgundy);
  border: 0;
  color: var(--white);
}
.btn--submit:hover { background: var(--white); color: var(--ink); }
.btn--submit:disabled { cursor: default; }
.btn--submit:disabled:hover { background: var(--burgundy); color: var(--white); }
.btn--submit[aria-busy="true"] { opacity: .75; }

.form-status {
  font-size: 13px;
  line-height: 1.5;
  color: var(--on-dark-body);
}
.form-status:empty { display: none; }
.form-status.is-error { color: var(--white); }
.form-status.is-error::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 8px 1px 0;
  background: var(--slash-on-dark);
}

/* honeypot */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* footer row */
.site-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(64px, 10vh, 100px);
  padding-top: 22px;
  border-top: 1px solid var(--rule-dark);
  font-size: 11px;
  letter-spacing: var(--caps-track);
  text-transform: uppercase;
  color: var(--on-dark-label);
}
.site-foot__mark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--white);
}
.site-foot__slash { color: var(--slash-on-dark); }

/* --------------------------------------------------------- scroll reveal */
/* Only when JS is running (html.js) — without JS everything is visible. */

html.js [data-reveal] {
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
html.js [data-reveal]:not(.is-shown) {
  opacity: 0;
  transform: translateY(18px);
}

/* ------------------------------------------------ review-only switcher */

.variant-switch {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 9999;
  display: flex;
  background: rgba(14, 14, 14, .92);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.variant-switch a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  color: var(--white);
  opacity: .72;
  white-space: nowrap;
}
.variant-switch a:hover { color: var(--white); opacity: 1; }
.variant-switch a[aria-current="page"] { opacity: 1; }
.variant-switch a[aria-current="page"]::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--burgundy);
}
.variant-switch a:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: -2px;
}

/* phones: four links must fit, and the switcher must not sit over the
   last content (form submit, footer row) */
@media (max-width: 759.98px) {
  .section--contact { padding-bottom: 76px; }
}
@media (max-width: 419.98px) {
  .variant-switch { letter-spacing: .06em; }
  .variant-switch a { gap: 5px; padding: 10px 8px; }
}

/* -------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  html.js [data-hand-inner],
  html.js [data-hand-inner].is-up {
    transform: none;
    transition: none;
  }

  html.js [data-reveal],
  html.js [data-reveal]:not(.is-shown) {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
