/* ==========================================================================
   Decode Nation — Direction 1 · Calm Editorial
   ========================================================================== */

:root {
  /* colour */
  --bg: #EFECE7;
  --bg-alt: #E6E2DB;
  --placeholder: #DCD8D1;
  --ink: #1E1216;
  --ink-body: rgba(30, 18, 22, .78);
  --ink-body-80: rgba(30, 18, 22, .8);
  --ink-nav: rgba(30, 18, 22, .7);
  --ink-note: rgba(30, 18, 22, .66);
  --ink-muted: rgba(30, 18, 22, .55);
  --hairline: rgba(30, 18, 22, .16);
  --crimson: #991930;
  --paper: #F5F3F0;
  --paper-86: rgba(245, 243, 240, .86);
  --paper-80: rgba(245, 243, 240, .8);
  --paper-70: rgba(245, 243, 240, .7);
  --paper-line: rgba(245, 243, 240, .3);
  --paper-hairline: rgba(245, 243, 240, .18);
  --accent-dark: #D4C8A6;
  --error-dark: #F2A7B3;
  --header-bg: rgba(239, 236, 231, .9);

  /* type */
  --font-serif: 'Newsreader', Georgia, serif;
  --font-sans: 'Jost', system-ui, sans-serif;
  --font-mark: 'Bodoni Moda', 'Didot', serif;

  /* layout */
  --pad-x: clamp(20px, 6vw, 80px);
  --pad-y: clamp(80px, 13vh, 160px);
  --gap-grid: clamp(40px, 7vw, 120px);
  --max: 1240px;

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

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

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--crimson); color: var(--paper); }

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

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

:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--crimson);
  color: var(--paper);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  transform: translateY(-160%);
}
.skip-link:focus,
.skip-link:focus-visible { transform: none; color: var(--paper); outline-color: var(--ink); }

main:focus { outline: none; }

@keyframes dnLine { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes dnFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.page {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
  overflow-x: clip;
}

:where(.page) p { margin: 0; }

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 72px);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}
.logo:hover { color: var(--ink); }

.logo__mark {
  font-family: var(--font-mark);
  font-size: 22px;
  line-height: 1;
}
.logo__mark .logo__slash { padding: 0 1px; }
.logo__slash { color: var(--crimson); }

.logo__word {
  font-size: 10px;
  letter-spacing: .34em;
  text-transform: uppercase;
  line-height: 1.5;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 36px);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav__link {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-nav);
}
.site-nav__link:hover { color: var(--crimson); }

.site-nav__cta {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1px solid var(--crimson);
  border-radius: 999px;
  color: var(--crimson);
}
.site-nav__cta:hover { background: var(--crimson); color: var(--paper); }

@media (max-width: 639px) {
  .site-nav__link { display: none; }
}

/* ---------------------------------------------------------- shared type */

.label {
  margin: 0 0 28px;
  font-size: 10px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--crimson);
}
.label--muted { color: var(--ink-muted); }
.label--light { color: var(--accent-dark); }
.label__sep { padding: 0 4px; }

.h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
}
.h2--m {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.16;
  text-wrap: pretty;
}
.h2--l {
  font-size: clamp(30px, 3.6vw, 54px);
  text-wrap: balance;
}

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

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

.arrow {
  font-family: var(--font-serif);
  font-size: 15px;
}

/* ------------------------------------------------------------- layout */

.section { padding: var(--pad-y) var(--pad-x); }
.section--alt { background: var(--bg-alt); }

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

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: var(--gap-grid);
}

.cell { min-width: 0; }

/* image frames (replaces <image-slot>) */
.frame {
  position: relative;
  width: 100%;
  background: var(--placeholder);
}
.frame--portrait { aspect-ratio: 4 / 5; }
.frame--square { aspect-ratio: 1 / 1; }
.frame--clip { overflow: hidden; }

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

.is-bw { filter: var(--bw); }
.frame--hover .frame__img { transition: filter .6s ease; }

@media (hover: hover) {
  .frame--hover:hover .frame__img { filter: grayscale(0) contrast(1); }
}

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

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px var(--pad-x) 18vh;
  position: relative;
}

.hero__line {
  width: 1px;
  height: clamp(48px, 9vh, 96px);
  background: var(--crimson);
  transform-origin: top;
  animation: dnLine 1.4s var(--ease-out) both;
}

.hero__dot {
  width: 5px;
  height: 5px;
  margin-bottom: clamp(28px, 4.5vh, 48px);
  border-radius: 50%;
  background: var(--crimson);
  animation: dnFade 1s .6s both;
}

.hero__title {
  margin: 0;
  max-width: 19ch;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 1.1;
  letter-spacing: -.01em;
  text-wrap: balance;
  animation: dnFade 1.4s .3s both;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(32px, 5vh, 52px);
  padding: 16px clamp(20px, 3vw, 30px);
  border: 1px solid var(--crimson);
  border-radius: 999px;
  color: var(--crimson);
  font-size: 11px;
  letter-spacing: clamp(.12em, 1.2vw, .24em);
  white-space: nowrap;
  text-transform: uppercase;
  animation: dnFade 1.4s .6s both;
}
.hero__cta:hover {
  background: var(--crimson);
  border-color: var(--crimson);
  color: var(--paper);
}

/* The designed nowrap pill is wider than a 375px viewport; allow it to
   wrap and tighten tracking so nothing is clipped on small phones. */
@media (max-width: 440px) {
  .hero__cta {
    letter-spacing: .12em;
    white-space: normal;
    line-height: 1.5;
    text-align: center;
  }
}

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

.label--why { margin: -.5em 0 28px; }
.why__lead { margin-top: 32px; max-width: 52ch; }
.why__close { margin-top: 22px; max-width: 52ch; color: var(--ink); }

#why .grid-2 { align-items: start; }

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

.stations__title {
  max-width: 20ch;
  line-height: 1.1;
}

.stations__grid { margin-top: clamp(40px, 7vh, 72px); }

.stations__copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: -.45em;
  color: var(--ink-body);
}

.inventory {
  margin: 14px 0 6px;
  padding: 26px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.inventory__label { margin: 0 0 14px; }
.inventory__list {
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.6;
  color: var(--ink);
}

.bleed {
  position: relative;
  width: 100vw;
  margin: clamp(72px, 12vh, 140px) 0 0 calc(50% - 50vw);
  height: clamp(320px, 62vh, 720px);
  background: var(--placeholder);
}

.where {
  gap: clamp(32px, 7vw, 120px);
  margin-top: clamp(56px, 9vh, 96px);
}
.where__label { margin: 0 0 22px; }
.where__statement {
  max-width: 40ch;
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.34;
}

.where__list {
  display: flex;
  flex-direction: column;
  color: var(--ink-body-80);
}
.where__row {
  display: flex;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
}
.where__row--last { border-bottom: 1px solid var(--hairline); }

.bullet {
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 11px;
  border-radius: 50%;
  background: var(--crimson);
}

.where__note {
  margin-top: 28px;
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
}

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

.brands__title { max-width: 18ch; }
.brands__lead { margin-top: 32px; max-width: 46ch; }

.btn-fill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding: 16px 28px;
  background: var(--crimson);
  border-radius: 999px;
  color: var(--paper);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.btn-fill:hover { background: var(--ink); color: var(--paper); }

.brands__label { margin: 0 0 8px; }
.brands__list {
  display: flex;
  flex-direction: column;
  color: var(--ink-body-80);
}
.brands__list p {
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}
.brands__note {
  margin-top: 26px;
  font-size: 15.5px;
  color: var(--ink-note);
}

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

.next { text-align: center; }
.next__inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.next__title { line-height: 1.12; }
.next__lead { margin-top: 34px; max-width: 58ch; }
.next__goal {
  margin-top: 22px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(19px, 1.6vw, 24px);
  color: var(--ink);
}
.next__line {
  width: 1px;
  height: 56px;
  margin: 44px 0 0;
  background: var(--crimson);
}
.next__ask { margin-top: 22px; color: var(--ink); }

.link-underline { border-bottom: 1px solid var(--crimson); }

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

.about__title {
  max-width: 22ch;
  font-size: clamp(28px, 3.2vw, 48px);
  line-height: 1.14;
  text-wrap: balance;
}

.about__intro,
.founders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}
.about__intro {
  gap: clamp(28px, 5vw, 80px);
  margin-top: 32px;
  color: var(--ink-body);
}
.founders {
  gap: clamp(40px, 5vw, 80px);
  margin-top: clamp(56px, 9vh, 96px);
}

.founder {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.founder__badge {
  position: absolute;
  top: 0;
  left: 0;
  padding: 8px 14px;
  background: var(--bg);
  color: var(--crimson);
  font-family: var(--font-mark);
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}

.founder__name,
.founder__role {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.founder__name { margin: 26px 0 0; color: var(--ink); }
.founder__role { margin-top: 6px; color: var(--crimson); }

.founder__bio {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
  font-size: 16px;
  color: var(--ink-body);
}

.company {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 18px 32px;
  margin-top: clamp(56px, 9vh, 96px);
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}
.company__mark {
  font-family: var(--font-mark);
  font-size: 30px;
  line-height: 1;
}
.company__mark .logo__slash { padding: 0 2px; }
.company__line {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.3;
}

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

.contact {
  padding: var(--pad-y) var(--pad-x) 48px;
  background: var(--ink);
  color: var(--paper);
}
.contact :focus-visible { outline-color: var(--accent-dark); }

.contact__title {
  max-width: 22ch;
  font-size: clamp(26px, 2.8vw, 40px);
  line-height: 1.2;
  text-wrap: pretty;
}
.contact__lead { margin-top: 24px; color: var(--paper-86); }

.contact__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--paper-hairline);
  font-size: 15px;
}
.contact__link { color: var(--paper-80); }
.contact__link--primary { color: var(--paper); }
.contact__link:hover { color: var(--accent-dark); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field__label {
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--paper-70);
}

.field__input {
  width: 100%;
  padding: 10px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--paper-line);
  border-radius: 0;
  font-size: 16px;
  outline: none;
}
.field__input:focus { border-bottom-color: var(--accent-dark); }
.field__input:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 4px;
}
.field__input--area { resize: vertical; }
.field__input[aria-invalid="true"] { border-bottom-color: var(--error-dark); }

.field__error {
  font-size: 13px;
  line-height: 1.4;
  color: var(--error-dark);
}
.field__error:empty { display: none; }

/* intent pills — real radio inputs, visually hidden */
.intent { gap: 12px; }
.intent__legend { padding: 0; margin-bottom: 12px; }
.intent__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.intent__pill { position: relative; }
.intent__radio {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}
.intent__pill span {
  display: inline-block;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--paper-line);
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.75;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--paper);
  cursor: pointer;
  transition: all .3s ease;
}
.intent__radio:checked + span {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.intent__radio:focus-visible + span {
  outline: 2px solid var(--accent-dark);
  outline-offset: 3px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-submit {
  align-self: flex-start;
  margin-top: 8px;
  padding: 16px 32px;
  background: var(--crimson);
  border: 0;
  border-radius: 999px;
  color: var(--paper);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  cursor: pointer;
}
.btn-submit:hover { background: var(--paper); color: var(--ink); }
.btn-submit:disabled { cursor: default; }
.btn-submit:disabled:hover { background: var(--crimson); color: var(--paper); }

.form-status {
  font-size: 14px;
  line-height: 1.5;
  color: var(--paper-80);
}
.form-status:empty { display: none; }

.contact__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(64px, 10vh, 110px);
  padding-top: 24px;
  border-top: 1px solid var(--paper-hairline);
  font-size: 10px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--paper-70);
}
.contact__mark {
  font-family: var(--font-mark);
  font-size: 20px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--paper);
}

/* ------------------------------------------------------- scroll reveal */
/* Only hidden once main.js has added html.js, so no-JS shows everything. */

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

/* ------------------------------------------------ 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: 1000;
  display: flex;
  gap: 2px;
  padding: 4px;
  background: rgba(30, 18, 22, .88);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.variant-switch a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #F5F3F0;
  opacity: .75;
}
.variant-switch a:hover { opacity: 1; color: #F5F3F0; }
.variant-switch a[aria-current="page"] {
  background: var(--crimson);
  opacity: 1;
}
.variant-switch a:focus-visible {
  outline: 2px solid #F5F3F0;
  outline-offset: 1px;
}

@media (max-width: 480px) {
  .variant-switch { font-size: 10px; letter-spacing: .1em; }
  .variant-switch a { padding: 7px 9px; }
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html.js [data-reveal]:not(.is-shown) {
    opacity: 1;
    transform: none;
  }
}
