/* ==========================================================================
   Aevum — ADTR  ·  production stylesheet
   Palette + type tokens, base layout, then responsive @media at the bottom.
   ========================================================================== */

:root {
  --bg:        #0b0d0e;
  --bg-deep:   #050607;
  --bg-panel:  #090b0c;

  --ink:       #e8eaea;
  --ink-hi:    #ffffff;
  --ink-dim:   #b5bbbf;
  --ink-soft:  #a9b0b4;
  --ink-mute:  #9aa1a6;
  --ink-faint: #7d848a;

  --line:      #232a2e;
  --line-soft: #2c3337;
  --line-hi:   #3a4145;

  --chip:      #cfd4d6;
  --accent:    #c9713f;

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --mono:  'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sans:  'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --pad-x: clamp(20px, 5vw, 52px);
  --pad-y: clamp(80px, 14vw, 160px);
  --header-h: 84px;

  /* Caps the page at a sane width on big/ultrawide monitors instead of
     stretching edge to edge. Below this width, --edge behaves exactly like
     --pad-x always did; above it, the extra space is split evenly as margin
     so the dark background reads as an intentional frame, not a bug. */
  --page-max: 1600px;
  --edge: max(var(--pad-x), calc((100vw - var(--page-max)) / 2));
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;               /* clip, not hidden — keeps the viewport as the scroll root */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;   /* 300 (Light) body copy reads thin/washed-out on non-Retina
                         displays — headings stay at 300 below, they're large
                         enough that the thinness doesn't hurt legibility. */
  line-height: 1.5;
  overflow-x: clip;
}

/* Everything between the header and footer is capped at --page-max and
   centered — on a normal screen this is a no-op, on a big/ultrawide monitor
   the content stops stretching and the dark background frames it instead. */
main {
  max-width: var(--page-max);
  margin-inline: auto;
}

body.nav-lock { overflow: hidden; }

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

a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }

button { font-family: inherit; }

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

h1, h2 { margin: 0; font-family: var(--serif); font-weight: 300; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.wrap { padding: var(--pad-y) var(--pad-x); }

/* ------------------------------------------------------------------ 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: 22px var(--edge);
  background: linear-gradient(180deg, rgba(5,6,7,0.72) 0%, rgba(5,6,7,0) 100%);
  transition: background .3s ease, padding .3s ease, backdrop-filter .3s ease;
}

.site-header.is-scrolled {
  padding: 14px var(--edge);
  background: rgba(8,10,11,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 20px; }
.brand img { width: auto; }
.brand .brand-mark  { height: 38px; }
.brand .brand-logo  { height: 28px; }
.brand .brand-sep   { width: 1px; height: 28px; background: #2b3236; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.nav-cta {
  color: var(--bg);
  background: var(--chip);
  padding: 9px 16px;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}
.nav-cta:hover { color: var(--bg); background: var(--ink-hi); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  padding: 9px;
  border: 1px solid var(--line-hi);
  background: rgba(5,6,7,0.55);
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block;
  height: 1px;
  background: var(--ink);
  transition: transform .3s ease, opacity .2s ease;
}
.site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

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

.hero {
  position: relative;
  min-height: 100svh;
  background: var(--bg-deep);
  overflow: hidden;
}

.hero-media, .hero-video {
  position: absolute;
  top: 0; bottom: 0; right: 0; left: 22%;
  width: auto; height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-video { opacity: 0; transition: opacity .8s ease; }
.hero-video.is-visible { opacity: 1; }

.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, #050607 0%, rgba(5,6,7,0.92) 12%, rgba(5,6,7,0.70) 30%, rgba(5,6,7,0) 56%);
}
.hero-fade-bottom {
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 240px;
  background: linear-gradient(180deg, rgba(11,13,14,0) 0%, rgba(11,13,14,0.78) 62%, var(--bg) 100%);
}
/* Only needed once --page-max actually boxes the layout (see media query
   below) — on a normal screen the video already runs flush to the edge. */
.hero-fade-right { display: none; }

.hero-copy {
  position: absolute;
  left: var(--pad-x); bottom: 64px;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  z-index: 2;
}
.hero-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #8d9498;
}
.hero h1 {
  font-size: clamp(42px, 9vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}
.hero p {
  margin: 0;
  max-width: 500px;
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink-soft);
}
.hero-more {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--chip);
  border-bottom: 1px solid var(--line-hi);
  padding-bottom: 6px;
}

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

.split {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 56px);
}
.split .col-head { display: flex; flex-direction: column; gap: 18px; }
.split h2 { font-size: clamp(30px, 5vw, 46px); line-height: 1.06; color: var(--ink-hi); }

.prose { display: flex; flex-direction: column; gap: 26px; max-width: 660px; margin-left: auto; }
.prose p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--ink-soft); }
.prose p.lead { font-size: 18px; line-height: 1.62; color: var(--ink-dim); }

/* dial */

.dial {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.dial-text {
  padding: clamp(56px, 10vw, 104px) clamp(24px, 5vw, 60px) clamp(56px, 10vw, 104px) var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.dial-text h2 { font-size: clamp(30px, 5vw, 46px); line-height: 1.06; color: var(--ink-hi); }
.dial-text p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--ink-soft); }

/* image plates (were <image-slot> in the design source) */

.plate {
  position: relative;
  overflow: hidden;
  background: var(--bg-panel) center / cover no-repeat;
  display: flex;
  align-items: flex-end;
  padding: 18px;
}
.plate::after {
  content: "";
  position: absolute; inset: 0;
  border: 1px solid rgba(255,255,255,0.06);
  pointer-events: none;
}
.plate span {
  position: relative;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #5b6266;
}
.plate--dial { height: clamp(340px, 46vw, 560px); }
/* feather the dial photo into the page, the way the hero video fades */
.plate--dial::before {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg,  var(--bg) 0%, rgba(11,13,14,0) 30%),
    linear-gradient(180deg, rgba(11,13,14,0) 60%, var(--bg) 100%),
    linear-gradient(0deg,   rgba(11,13,14,0) 80%, var(--bg) 100%);
}
.plate--dial span { z-index: 2; }

/* material spec table */

.spec {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  max-width: 720px;
}
.spec div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.spec div:last-child { border-bottom: none; }
.spec dt, .spec dd { margin: 0; font: inherit; color: inherit; }
.spec dd { text-align: right; color: var(--ink); }

/* --------------------------------------------------------- four faces / hand */

.hand { display: flex; flex-direction: column; gap: 44px; }

.hand-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.hand-head .col-head { max-width: 580px; }
.hand-head h2 { font-size: clamp(30px, 5vw, 46px); line-height: 1.06; color: var(--ink-hi); }
.hand-head p {
  margin: 0;
  max-width: 440px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.phase { display: flex; flex-direction: column; gap: 20px; }

.phase-stage {
  position: relative;
  height: clamp(420px, 62vw, 620px);
  overflow: hidden;
  background: var(--bg-panel);
}
.phase-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: var(--bg-deep);
  pointer-events: none;            /* never intercept clicks meant for the controls */
}
.phase-video--rev { z-index: 1; opacity: 0; }
.phase-stage.show-rev .phase-video      { opacity: 0; }
.phase-stage.show-rev .phase-video--rev { opacity: 1; z-index: 2; }
.phase-fade-top {
  position: absolute; left: 0; right: 0; top: -1px;
  height: 180px;
  pointer-events: none;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(11,13,14,0.78) 38%, rgba(11,13,14,0) 100%);
}
.phase-fade-bottom {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 200px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5,6,7,0) 0%, rgba(5,6,7,0.82) 100%);
}
/* Only needed once --page-max actually boxes the layout (see media query below). */
.phase-fade-left, .phase-fade-right { display: none; }

.phase-hud {
  position: absolute;
  z-index: 3;
  left: 32px; right: 32px; bottom: 32px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.phase-meta { display: flex; flex-direction: column; gap: 10px; }
.phase-title {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1;
  color: #f2f4f4;
}
.phase-hint {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  line-height: 1.6;
  color: #b7bec2;
}

.phase-switch {
  flex: 0 0 auto;
  display: flex;
  border: 1px solid var(--line-hi);
  padding: 3px;
  background: rgba(5,6,7,0.55);
}
.phase-btn {
  border: none;
  cursor: pointer;
  white-space: nowrap;
  padding: 13px 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: transparent;
  color: var(--ink-mute);
  transition: background .34s ease, color .34s ease;
}
.phase-btn:hover { color: var(--ink); }
.phase-btn.is-active { background: var(--chip); color: var(--bg); }

.phase-progress {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 3;
  height: 2px;
  background: #1d2225;
  pointer-events: none;
}
.phase-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--chip);
  transition: width 220ms linear;
}

.phase-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
}
.phase-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  transition: border-color .34s ease;
}
.phase-card .k, .phase-card .v { margin: 0; }
.phase-card .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color .34s ease;
}
.phase-card .v { font-size: 14px; line-height: 1.5; color: #8e959a; }
.phase-card.is-active { border-top-color: var(--chip); }
.phase-card.is-active .k { color: var(--ink); }

/* ------------------------------------------------------------------ gallery */

.gallery { display: flex; flex-direction: column; gap: 28px; }
.gallery h2 { font-size: clamp(28px, 4vw, 40px); color: var(--ink-hi); }

.gallery-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 4px;
}
.gallery-side { display: grid; grid-template-rows: 1fr 1fr; gap: 4px; }
.gallery-main { height: clamp(320px, 44vw, 420px); }
.gallery-side .plate { height: clamp(180px, 22vw, 208px); }

/* -------------------------------------------------------------------- order */

.order {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 48px);
}
.order-intro { display: flex; flex-direction: column; gap: 22px; }
.order-intro h2 { font-size: clamp(30px, 5vw, 46px); line-height: 1.06; color: var(--ink-hi); }
.order-price {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.order-price .eyebrow { letter-spacing: 0.2em; }
.order-price .value {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.order-price .value-note {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.order-price .price-lead {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: var(--ink-mute);
}
.order-intro p { margin: 0; font-size: 15px; line-height: 1.6; color: #90979c; }

.order-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 26px;
}
.order-form label { display: flex; flex-direction: column; gap: 9px; }
.order-form .hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}
.order-form .field-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.order-form input,
.order-form select {
  min-width: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  padding: 10px 0;
  border-radius: 0;
}
.order-form input:focus,
.order-form select:focus { outline: none; border-bottom-color: var(--chip); }
.order-form option { background: var(--bg); }
.order-form .span-2 { grid-column: span 2; }

.order-actions {
  grid-column: span 2;
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.btn-submit {
  border: none;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
  background: var(--chip);
  color: var(--bg);
  padding: 16px 34px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background .2s ease;
}
.btn-submit:hover { background: var(--ink); }
.order-note { flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 1.5; color: var(--ink-faint); }

/* ------------------------------------------------------------------- footer */

.site-footer {
  padding: 44px var(--edge) 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6f767a;
}
.site-footer .foot-brand { display: flex; align-items: center; gap: 16px; }
.site-footer img { height: 32px; width: auto; }
.site-footer a { color: #b9c0c4; white-space: nowrap; }

/* ================================================================= boxed page
   Once the viewport is wide enough that --page-max actually boxes the layout
   (see --edge above), the videos/photos that used to run flush to the true
   screen edge now end at the box edge instead — feather that edge into the
   page background so it reads as an intentional frame, not a crop.
   NOTE: keep this width in sync with --page-max. */
@media (min-width: 1600px) {
  .hero-fade-right {
    display: block;
    position: absolute; top: 0; bottom: 0; right: -1px;
    width: clamp(48px, 8vw, 160px);
    background: linear-gradient(270deg, var(--bg) 0%, rgba(11,13,14,0) 100%);
  }
  .phase-fade-left {
    display: block;
    position: absolute; top: 0; bottom: 0; left: -1px;
    width: clamp(40px, 6vw, 140px);
    pointer-events: none;
    background: linear-gradient(90deg, var(--bg) 0%, rgba(11,13,14,0) 100%);
  }
  .phase-fade-right {
    display: block;
    position: absolute; top: 0; bottom: 0; right: -1px;
    width: clamp(40px, 6vw, 140px);
    pointer-events: none;
    background: linear-gradient(270deg, var(--bg) 0%, rgba(11,13,14,0) 100%);
  }
  .plate--dial::before {
    background:
      linear-gradient(90deg,  var(--bg) 0%, rgba(11,13,14,0) 30%),
      linear-gradient(270deg, var(--bg) 0%, rgba(11,13,14,0) 30%),
      linear-gradient(180deg, rgba(11,13,14,0) 60%, var(--bg) 100%),
      linear-gradient(0deg,   rgba(11,13,14,0) 80%, var(--bg) 100%);
  }
}

/* ================================================================ responsive */

@media (max-width: 1024px) {
  .split { grid-template-columns: 1fr; }
  .prose { margin-left: 0; max-width: 720px; }
  .order { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .dial { grid-template-columns: 1fr; }
  .dial-text { padding: var(--pad-y) var(--pad-x); }
  .plate--dial { height: clamp(300px, 70vw, 460px); }

  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .gallery-main { height: 56vw; }
  .gallery-side .plate { height: 40vw; }
}

@media (max-width: 760px) {
  :root { --header-h: 68px; }

  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    padding: 96px var(--pad-x) 40px;
    background: rgba(8,10,11,0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 15px;
    letter-spacing: 0.14em;
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform .35s ease, visibility 0s linear .35s;
  }
  .site-header.nav-open .site-nav {
    transform: none;
    visibility: visible;
    transition: transform .35s ease;
  }
  .site-nav a { padding: 12px 0; }
  .nav-cta { padding: 12px 20px; margin-top: 12px; }

  .hero-media, .hero-video { left: 0; }
  .hero-scrim {
    background: linear-gradient(180deg, rgba(5,6,7,0.35) 0%, rgba(5,6,7,0.30) 38%, rgba(5,6,7,0.86) 78%, var(--bg) 100%);
  }
  .hero-copy { left: var(--pad-x); right: var(--pad-x); bottom: 48px; max-width: none; gap: 22px; }
  .hero p { font-size: 15px; }

  .phase-hud {
    left: 16px; right: 16px; bottom: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .phase-switch { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .phase-btn { padding: 12px 10px; text-align: center; letter-spacing: 0.16em; }

  .phase-cards { grid-template-columns: 1fr 1fr; gap: 20px 24px; }

  .order-form { grid-template-columns: 1fr; }
  .order-form .span-2 { grid-column: span 1; }
  .order-actions { grid-column: span 1; }

  .site-footer { justify-content: flex-start; }
}

@media (max-width: 420px) {
  .brand .brand-logo { height: 22px; }
  .brand .brand-mark { height: 32px; }
  .phase-switch { grid-template-columns: 1fr 1fr; }
  .phase-cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
