/* ==========================================================================
   Xtant Creatives — site styles
   One stylesheet for every page. Tokens first, then base, layout, components,
   page sections, motion. Dark is the default theme; light follows the OS.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark light;

  /* Brand */
  --gold: #C9A055;            /* brand accent — fills, rules, focus */
  --gold-ink: #D2AD68;        /* gold used as text on the current background */
  --gold-wash: oklch(0.74 0.095 80 / 0.12);

  /* Neutrals (tinted a hair toward the gold hue) */
  --bg: oklch(0.145 0.004 85);
  --bg-raised: oklch(0.185 0.005 85);
  --bg-sunk: oklch(0.115 0.004 85);
  --ink: oklch(0.97 0.003 85);
  --ink-2: oklch(0.79 0.006 85);
  --ink-3: oklch(0.66 0.007 85);
  --line: oklch(0.97 0.003 85 / 0.1);
  --line-strong: oklch(0.97 0.003 85 / 0.2);
  --nav-bg: oklch(0.145 0.004 85 / 0.72);
  --btn-bg: var(--ink);
  --btn-ink: var(--bg);
  --bezel: oklch(0.08 0.003 85);

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --t-display: clamp(2.875rem, 1.2rem + 7.2vw, 6rem);
  --t-h1: clamp(2.5rem, 1.4rem + 4.8vw, 5rem);
  --t-h2: clamp(2rem, 1.2rem + 3.4vw, 3.75rem);
  --t-h3: clamp(1.375rem, 1.15rem + 0.8vw, 1.75rem);
  --t-lead: clamp(1.125rem, 1rem + 0.55vw, 1.4375rem);
  --t-body: 1.0625rem;
  --t-small: 0.9375rem;
  --t-micro: 0.8125rem;

  /* Space */
  --gutter: clamp(1rem, 4vw, 2.75rem);
  --section: clamp(5.5rem, 3rem + 10vw, 11rem);
  --wrap: 75rem;
  --wrap-wide: 90rem;
  --radius: 1.25rem;
  --radius-lg: 1.75rem;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);   /* expo-ish */
  --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);

  /* Layers */
  --z-sticky: 100;
  --z-menu: 200;
  --z-modal: 300;
}

@media (prefers-color-scheme: light) {
  :root {
    --gold-ink: #7C5E21;
    --gold-wash: oklch(0.74 0.095 80 / 0.14);
    --bg: oklch(0.985 0.002 85);
    --bg-raised: oklch(0.955 0.004 85);
    --bg-sunk: oklch(0.93 0.005 85);
    --ink: oklch(0.19 0.006 85);
    --ink-2: oklch(0.39 0.008 85);
    --ink-3: oklch(0.48 0.008 85);
    --line: oklch(0.19 0.006 85 / 0.1);
    --line-strong: oklch(0.19 0.006 85 / 0.2);
    --nav-bg: oklch(0.985 0.002 85 / 0.76);
    --bezel: oklch(0.16 0.004 85);
  }
}

/* A section that stays dark in both themes (film/photo showcases). */
.theme-dark {
  color-scheme: dark;
  --gold-ink: #D2AD68;
  --bg: oklch(0.12 0.004 85);
  --bg-raised: oklch(0.17 0.005 85);
  --bg-sunk: oklch(0.09 0.004 85);
  --ink: oklch(0.97 0.003 85);
  --ink-2: oklch(0.79 0.006 85);
  --ink-3: oklch(0.66 0.007 85);
  --line: oklch(0.97 0.003 85 / 0.1);
  --line-strong: oklch(0.97 0.003 85 / 0.2);
  --btn-bg: var(--ink);
  --btn-ink: var(--bg);
  background: var(--bg);
  color: var(--ink);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.6;
  font-optical-sizing: auto;
  font-feature-settings: 'cv11', 'ss01';
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, video, iframe, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--gold); color: oklch(0.15 0.01 85); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 0.375rem;
}

h1, h2, h3 { text-wrap: balance; font-weight: 700; }
p { text-wrap: pretty; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -4rem; z-index: var(--z-modal);
  background: var(--ink); color: var(--bg); padding: 0.75rem 1rem; border-radius: 0.75rem;
  font-weight: 600; text-decoration: none; transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 0.75rem; }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap-wide { width: min(100% - 2 * var(--gutter), var(--wrap-wide)); margin-inline: auto; }
.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }
.section.theme-dark, .theme-dark + .section { padding-top: var(--section); }
.section--flush-top { padding-top: 0; }
.center { text-align: center; }
.center .lead, .center .measure { margin-inline: auto; }
.measure { max-width: 38rem; }

/* ---------- Type ---------- */
.display {
  font-size: var(--t-display);
  line-height: 1.02;
  letter-spacing: -0.038em;
  font-weight: 700;
}
.h1 { font-size: var(--t-h1); line-height: 1.04; letter-spacing: -0.035em; }
.h2 { font-size: var(--t-h2); line-height: 1.07; letter-spacing: -0.03em; }
.h3 { font-size: var(--t-h3); line-height: 1.2; letter-spacing: -0.018em; font-weight: 650; }
.lead {
  font-size: var(--t-lead);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 36em;
  letter-spacing: -0.008em;
}
.body { color: var(--ink-2); max-width: 34em; }
.muted { color: var(--ink-3); }
.dim { color: var(--ink-3); } /* second half of a two-tone headline */

/* Product wordmark above a teaser: the name set as a name, not a label. */
.product-name {
  display: block; margin-bottom: 1.25rem;
  font-size: clamp(1.25rem, 1rem + 0.8vw, 1.625rem); font-weight: 700; letter-spacing: -0.028em; line-height: 1.1;
  color: var(--gold-ink);
}

/* Systems index: the three products introduced together, as a set */
.systems { padding-bottom: var(--section); }
.systems__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem 3rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.systems__head .h2 { max-width: 14ch; }
.systems__head .body { max-width: 30ch; }
.systems__grid li { display: grid; }
.systems__grid {
  list-style: none; padding: 0; display: grid;
  grid-template-columns: 1fr; border-top: 1px solid var(--line-strong);
}
@media (min-width: 56rem) { .systems__grid { grid-template-columns: repeat(3, 1fr); } }
.system {
  display: grid; grid-template-rows: auto auto 1fr auto; gap: 0.75rem;
  padding: clamp(1.75rem, 3vw, 2.5rem) clamp(0rem, 2.5vw, 2.25rem) clamp(1.75rem, 3vw, 2.5rem) 0;
  border-bottom: 1px solid var(--line); text-decoration: none; position: relative;
}
@media (min-width: 56rem) {
  .systems__grid li + li .system { padding-left: clamp(1.5rem, 2.5vw, 2.25rem); box-shadow: inset 1px 0 0 var(--line); }
  .system { border-bottom: 0; min-height: 19rem; }
}
.system__for { font-size: var(--t-micro); font-weight: 600; color: var(--ink-3); }
.system__name { font-size: clamp(1.875rem, 1.3rem + 1.8vw, 2.625rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; transition: color 0.3s; }
.system__desc { color: var(--ink-2); font-size: var(--t-small); max-width: 30ch; }
.system__go {
  justify-self: start; width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--gold-ink); margin-top: 1rem;
  transition: background 0.3s, color 0.3s, transform 0.5s var(--ease-out);
}
.system__go svg { width: 1.0625rem; height: 1.0625rem; }
.system:hover .system__name { color: var(--gold-ink); }
.system:hover .system__go { background: var(--gold); color: oklch(0.15 0.01 85); transform: translateX(0.375rem); }

/* Inline note linking to a sibling product */
.crosslink {
  display: grid; gap: 1rem 2.5rem; align-items: center; grid-template-columns: 1fr;
  padding: clamp(1.75rem, 4vw, 2.75rem); border-radius: var(--radius-lg); background: var(--bg-raised);
}
@media (min-width: 48rem) { .crosslink { grid-template-columns: 1fr auto; } }
.crosslink h2 { font-size: var(--t-h3); letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.crosslink p { color: var(--ink-2); max-width: 52ch; }

/* ---------- Links & buttons ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.75rem; margin-top: 2.25rem; }
.center .actions { justify-content: center; }
.hero-login { margin-top: 1.25rem; font-size: var(--t-small); color: var(--ink-2); }
.hero-login a { color: var(--ink); text-underline-offset: 0.2em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.75rem 1.5rem; border-radius: 100vmax;
  background: var(--btn-bg); color: var(--btn-ink);
  font-size: var(--t-small); font-weight: 600; text-decoration: none; letter-spacing: -0.005em;
  border: 0; cursor: pointer;
  transition: transform 0.25s var(--ease-out), opacity 0.2s;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.97); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--ghost:hover { opacity: 1; background: var(--line); }

.more {
  display: inline-flex; align-items: center; gap: 0.35rem;
  color: var(--gold-ink); font-weight: 600; text-decoration: none;
  font-size: var(--t-body); letter-spacing: -0.008em;
}
.more::after {
  content: ''; width: 0.5em; height: 0.5em; margin-left: 0.1em;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor;
  transform: rotate(45deg); transition: transform 0.3s var(--ease-out);
}
.more:hover::after { transform: translateX(0.2em) rotate(45deg); }
.more:hover { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(20px);
  backdrop-filter: saturate(1.6) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-nav[data-scrolled] { border-bottom-color: var(--line); }
.site-nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  height: 3.75rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.625rem; text-decoration: none;
  font-weight: 700; font-size: 1rem; letter-spacing: -0.02em; flex-shrink: 0;
}
.brand__mark { width: 1.875rem; height: 1.875rem; object-fit: contain; }
.brand__mark--on-light { display: none; }
@media (prefers-color-scheme: light) {
  .brand__mark--on-dark { display: none; }
  .brand__mark--on-light { display: block; }
}
.theme-dark .brand__mark--on-dark { display: block; }
.theme-dark .brand__mark--on-light { display: none; }

.nav-links { display: flex; align-items: center; gap: clamp(1.25rem, 2vw, 1.875rem); list-style: none; padding: 0; }
.nav-links a {
  font-size: 0.875rem; font-weight: 550; letter-spacing: -0.01em; color: var(--ink-2); text-decoration: none;
  padding-block: 0.5rem; transition: color 0.15s;
}
/* Products sit together; studio links follow after a hairline */
.nav-links .nav-sep { width: 1px; height: 1rem; background: var(--line-strong); margin-inline: clamp(0rem, 0.5vw, 0.5rem); }
.nav-links .nav-studio a { font-weight: 500; color: var(--ink-3); }
.nav-links .nav-studio a:hover, .nav-links .nav-studio a[aria-current="page"] { color: var(--ink); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -1.5px 0 var(--gold); }
.nav-login {
  font-size: var(--t-micro); font-weight: 600; text-decoration: none;
  padding: 0.5rem 1rem; border-radius: 100vmax; box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: background 0.15s;
}
.nav-login:hover { background: var(--line); }
button.nav-login { display: inline-flex; align-items: center; gap: 0.375rem; border: 0; background: transparent; cursor: pointer; }
.nav-login svg { width: 0.75rem; height: 0.75rem; transition: transform 0.3s var(--ease-out); }
.nav-login[aria-expanded="true"] { background: var(--line); }
.nav-login[aria-expanded="true"] svg { transform: rotate(180deg); }
.login-menu { position: relative; flex-shrink: 0; }
.login-list {
  position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: var(--z-menu);
  list-style: none; margin: 0; padding: 0.375rem; min-width: 15rem;
  background: var(--bg-raised); border-radius: 1rem;
  box-shadow: 0 0 0 1px var(--line), 0 1.25rem 2.5rem -1rem oklch(0 0 0 / 0.45);
  transform-origin: top right;
}
.login-list:not([hidden]) { animation: menu-in 0.22s var(--ease-out); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-0.25rem) scale(0.98); } }
.login-list a {
  display: grid; gap: 0.125rem; padding: 0.625rem 0.875rem; border-radius: 0.625rem; text-decoration: none;
  transition: background 0.15s;
}
.login-list a:hover, .login-list a:focus-visible { background: var(--line); }
.login-list span { font-size: var(--t-small); font-weight: 600; letter-spacing: -0.01em; }
.login-list small { font-size: 0.75rem; color: var(--ink-3); }

.menu-btn {
  display: none; width: 2.75rem; height: 2.75rem; margin-right: -0.625rem;
  background: none; border: 0; cursor: pointer; position: relative;
}
.menu-btn span {
  position: absolute; left: 0.8125rem; right: 0.8125rem; height: 1.5px; background: currentColor; border-radius: 2px;
  transition: transform 0.35s var(--ease-out), opacity 0.2s;
}
.menu-btn span:nth-child(1) { top: 1.0625rem; }
.menu-btn span:nth-child(2) { top: 1.5625rem; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(0.25rem) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { transform: translateY(-0.25rem) rotate(-45deg); }

.menu-panel { display: none; }

@media (max-width: 52rem) {
  .nav-links, .nav-login--desktop { display: none; }
  .menu-btn { display: block; }
  .menu-panel {
    display: block; position: fixed; inset: 3.75rem 0 0; z-index: var(--z-menu);
    background: var(--bg); padding: 1.5rem var(--gutter) calc(2.5rem + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain;
    opacity: 0; visibility: hidden; transform: translateY(-0.5rem);
    transition: opacity 0.3s var(--ease-out), transform 0.4s var(--ease-out), visibility 0s 0.3s;
  }
  .menu-panel[data-open] {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity 0.3s var(--ease-out), transform 0.4s var(--ease-out), visibility 0s;
  }
  .menu-panel ul { list-style: none; padding: 0; }
  .menu-panel li a {
    display: block; padding: 0.75rem 0; font-size: 1.75rem; font-weight: 650; letter-spacing: -0.025em;
    text-decoration: none; border-bottom: 1px solid var(--line);
  }
  .menu-panel li a[aria-current="page"] { color: var(--gold-ink); }
  .menu-panel .menu-group { font-size: var(--t-micro); font-weight: 600; color: var(--ink-3); margin: 1.5rem 0 0.25rem; }
  .menu-panel .menu-group:first-child { margin-top: 0; }
  .menu-panel li a small { display: block; font-size: var(--t-small); font-weight: 450; letter-spacing: -0.005em; color: var(--ink-3); margin-top: 0.125rem; }
  .menu-logins { display: grid; grid-template-columns: 1fr; gap: 0.5rem; margin-top: 0.5rem; }
  .menu-panel .btn { width: 100%; }
  body[data-menu-open] { overflow: hidden; }
}

/* ---------- Media frames ("shots") ----------
   A frame holds a clearly-labelled placeholder with the real <img>/<video> layered
   on top. When the file exists it covers the placeholder; when it 404s, site.js
   removes the element and the placeholder shows. Drop the file in, done. */
.shot { position: relative; margin: 0; }
.shot__frame {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--bg-raised); aspect-ratio: 16 / 10;
  isolation: isolate;
}
.shot--cinema .shot__frame { aspect-ratio: 21 / 9; }
.shot--video .shot__frame { aspect-ratio: 16 / 9; }
.shot--square .shot__frame { aspect-ratio: 1; }
.shot--portrait .shot__frame { aspect-ratio: 4 / 5; }
.shot--tall .shot__frame { aspect-ratio: 3 / 4; }
.shot__frame > img, .shot__frame > video, .shot__frame > picture, .shot__frame > picture img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1;
}
.shot--contain .shot__frame > img { object-fit: contain; }
.shot figcaption { margin-top: 1rem; font-size: var(--t-small); color: var(--ink-3); }

/* Phone: a quiet bezel, no fake hardware details. */
.shot--phone { width: min(100%, 20rem); margin-inline: auto; }
.shot--phone .shot__frame {
  aspect-ratio: 9 / 19.5; border-radius: 2.75rem;
  background: var(--bezel); padding: 0.6rem;
  box-shadow: 0 0 0 1px var(--line-strong), 0 2.5rem 5rem -2rem oklch(0 0 0 / 0.55);
}
.shot--phone .shot__frame > img, .shot--phone .ph { inset: 0.6rem; width: auto; height: auto; border-radius: 2.2rem; }
.shot--phone .shot__frame > img { width: calc(100% - 1.2rem); height: calc(100% - 1.2rem); }

/* Placeholder */
.ph {
  position: absolute; inset: 0; z-index: 0;
  display: grid; place-content: center; justify-items: center; gap: 0.5rem;
  padding: 1.5rem; text-align: center;
  background:
    radial-gradient(120% 80% at 50% 0%, var(--gold-wash), transparent 60%),
    repeating-linear-gradient(135deg, transparent 0 22px, var(--line) 22px 23px),
    var(--bg-raised);
  color: var(--ink-3);
}
.ph__tag {
  font-size: var(--t-micro); font-weight: 600; color: var(--gold-ink);
  padding: 0.25rem 0.75rem; border-radius: 100vmax; box-shadow: inset 0 0 0 1px currentColor;
}
.ph__what { font-size: var(--t-small); font-weight: 600; color: var(--ink-2); max-width: 26ch; line-height: 1.35; }
.ph__file { font-size: 0.75rem; font-variant-numeric: tabular-nums; max-width: 32ch; overflow-wrap: anywhere; }

/* ---------- Home: hero ---------- */
.hero { padding-top: clamp(4.5rem, 3rem + 7vw, 9rem); padding-bottom: clamp(3rem, 2rem + 4vw, 5.5rem); }
.hero .display { max-width: 19ch; margin-inline: auto; }
.hero .lead { margin-top: 1.75rem; }
.hero-media { padding-bottom: var(--section); }
.hero-media .shot__frame { border-radius: clamp(1rem, 2vw, 2rem); }
/* Phones: the 21:9 shot can't simply shrink (the message would be tiny) or centre-crop (the
   phone sits on the right and gets cut off). Art-direct it: a square frame focused on the
   phone. Set the focal point per image with --focus-x (default centre). */
@media (max-width: 40rem) {
  .hero-media .shot--cinema .shot__frame { aspect-ratio: 1 / 1; }
  .hero-media .shot--cinema img { object-position: var(--focus-x, 50%) 50%; }
}

.line { display: block; }

/* Split hero: copy left, the hand-and-phone photograph right */
.hero--split { padding-top: clamp(3rem, 2rem + 4vw, 6rem); padding-bottom: var(--section); }
.hero__grid { display: grid; gap: clamp(2.5rem, 5vw, 5rem); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 60rem) { .hero__grid { grid-template-columns: 1.05fr 1fr; } }
.hero--split .display { font-size: clamp(2.875rem, 1.2rem + 5.2vw, 5.25rem); max-width: 11ch; }
.hero--split .lead { margin-top: 1.75rem; max-width: 30em; }
.hero-shot { margin: 0; border-radius: clamp(1.25rem, 2.5vw, 2rem); overflow: hidden; background: oklch(0.2 0.004 60); aspect-ratio: 4 / 5; }
.hero-shot img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 59.99rem) { .hero-shot { max-width: 34rem; } }

/* ---------- Split feature (text + media) ---------- */
.split {
  display: grid; gap: clamp(3rem, 6vw, 6rem); align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 60rem) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-media { grid-template-columns: 5fr 7fr; }
  .split--reverse > :first-child { order: 2; }
}
.split .h2 + .lead, .split .h2 + .body { margin-top: 1.5rem; }

/* Phone on a tinted stage so a small screen still holds a viewport. */
.stage {
  border-radius: var(--radius-lg); background: var(--bg-raised);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem) 0;
  overflow: hidden; display: flex; justify-content: center;
  background-image: radial-gradient(90% 60% at 50% 100%, var(--gold-wash), transparent 70%);
}
.stage .shot--phone { margin-bottom: -6rem; }

/* Stacked intro over a wide screenshot */
.stack-head { margin-bottom: clamp(3rem, 6vw, 5rem); }
.stack-head .lead { margin-top: 1.5rem; }

/* ---------- Home: media teaser mosaic ---------- */
.mosaic {
  display: grid; gap: clamp(0.75rem, 1.5vw, 1.25rem);
  grid-template-columns: 1fr;
  margin-top: clamp(3rem, 6vw, 5rem);
}
@media (min-width: 40rem) {
  .mosaic { grid-template-columns: 1fr 1fr; row-gap: clamp(1.5rem, 3vw, 2.5rem); }
  .mosaic > :first-child { grid-column: 1 / -1; }
}
.mosaic .shot .shot__frame { aspect-ratio: 3 / 2; border-radius: var(--radius); }
.mosaic .film__title { font-size: var(--t-h3); }

/* ---------- Full feature list (EduAlert) ---------- */
.everything__title { max-width: 14ch; }
.everything {
  display: grid; grid-template-columns: 1fr;
  gap: clamp(2.75rem, 5vw, 4rem) clamp(2rem, 4vw, 3.5rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}
@media (min-width: 52rem) { .everything { grid-template-columns: repeat(3, 1fr); } }
.everything__label {
  font-size: var(--t-small); font-weight: 600; letter-spacing: -0.005em; color: var(--gold-ink);
  padding-bottom: 1rem; border-bottom: 1px solid var(--line-strong);
}
.everything ul { list-style: none; padding: 0; margin-bottom: 0; display: grid; gap: clamp(1.5rem, 2.5vw, 2rem); margin-top: clamp(1.5rem, 2.5vw, 2rem); }
.everything li { display: grid; gap: 0.375rem; }
.everything strong {
  font-size: var(--t-h3); font-weight: 600; line-height: 1.18; letter-spacing: -0.02em;
  color: var(--ink); text-wrap: balance;
}
.everything li span { font-size: var(--t-small); line-height: 1.5; color: var(--ink-3); max-width: 30ch; }

/* ---------- Touch: 44px tap targets ----------
   On touch screens, small text links get a taller hit area. Padding grows the target;
   matching negative margins keep the visual layout where it was. */
@media (pointer: coarse) {
  .brand { padding-block: 0.4375rem; margin-block: -0.4375rem; }
  .more { padding-block: 0.625rem; margin-block: -0.625rem; }
  .mail-link { padding-block: 0.375rem; margin-block: calc(1.5rem - 0.375rem) -0.375rem; }
  .footer-col ul { gap: 0; }
  .footer-col a { display: inline-block; padding-block: 0.75rem; }
  .footer-col h2 { margin-bottom: 0.25rem; }
  .contact-meta a { display: inline-block; padding-block: 0.75rem; margin-block: -0.75rem; }
}

/* ---------- Closing call ---------- */
.closing { padding-block: var(--section); border-top: 1px solid var(--line); }
.closing .display { font-size: clamp(2.5rem, 1.2rem + 5.6vw, 5.25rem); }
.closing__lede { margin: 1.25rem auto 0; max-width: 40ch; font-size: var(--t-lead); line-height: 1.5; color: var(--ink-2); text-wrap: balance; }
.mail-link {
  display: inline-block; margin-top: 1.5rem;
  font-size: clamp(1.25rem, 0.9rem + 1.6vw, 2rem); font-weight: 600; letter-spacing: -0.02em;
  color: var(--gold-ink); text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size 0.5s var(--ease-out);
}
.mail-link:hover { background-size: 100% 1.5px; }

/* ---------- Product page hero ---------- */
.page-hero { padding-top: clamp(4rem, 2.5rem + 6vw, 8rem); padding-bottom: clamp(3rem, 2rem + 4vw, 5rem); }
.page-hero .h1 { max-width: 16ch; }
.center.page-hero .h1 { margin-inline: auto; }
.page-hero .lead { margin-top: 1.5rem; }

/* Feature list — rules, not cards */
.facts {
  display: grid; gap: 0; list-style: none; padding: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  border-top: 1px solid var(--line);
}
.facts li { padding: 2rem clamp(0rem, 2vw, 2rem) 2rem 0; border-bottom: 1px solid var(--line); }
.facts h3 { font-size: 1.125rem; font-weight: 650; letter-spacing: -0.012em; margin-bottom: 0.5rem; }
.facts p { color: var(--ink-2); font-size: var(--t-small); max-width: 32ch; }

/* A real ordered sequence. Numbers carry the order, so they earn their place. */
.steps {
  list-style: none; padding: 0; counter-reset: step;
  display: grid; gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  margin-top: clamp(3rem, 6vw, 4.5rem);
}
.steps li { counter-increment: step; padding-top: 1.5rem; border-top: 1px solid var(--line-strong); }
.steps li::before {
  content: counter(step); display: block; margin-bottom: 1.5rem;
  font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem); font-weight: 300; line-height: 1;
  letter-spacing: -0.04em; color: var(--gold-ink); font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.015em; margin-bottom: 0.5rem; }
.steps p { color: var(--ink-2); max-width: 30ch; }

/* Institutional email tiers: escalating sensitivity, shown as a scale */
.tiers { list-style: none; padding: 0; margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; gap: 0; }
.tiers li {
  display: grid; gap: 0.5rem 2rem; padding-block: 1.75rem; border-top: 1px solid var(--line);
  grid-template-columns: 1fr;
}
.tiers li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 48rem) { .tiers li { grid-template-columns: 12rem 1fr; align-items: baseline; } }
.tier-label { display: flex; align-items: center; gap: 0.75rem; font-weight: 650; }
.tier-meter { display: inline-flex; gap: 3px; }
.tier-meter i { width: 0.5rem; height: 1rem; border-radius: 2px; background: var(--line-strong); }
.tier-meter i.on { background: var(--gold); }
.tiers p { color: var(--ink-2); max-width: 46ch; }

/* ---------- Media page ---------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.5rem;
}
.center .filters { justify-content: center; }
.filter {
  min-height: 2.75rem; padding: 0.5rem 1.125rem; border-radius: 100vmax; border: 0; cursor: pointer;
  background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: var(--t-small); font-weight: 550; color: var(--ink-2);
  transition: background 0.2s, color 0.2s;
}
.filter:hover { color: var(--ink); background: var(--line); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }

.media-block + .media-block { margin-top: clamp(5rem, 10vw, 8rem); }
.media-block__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.media-block__head .h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); }
.count { color: var(--ink-3); font-size: var(--t-small); font-variant-numeric: tabular-nums; }

.films {
  display: grid; gap: clamp(2.5rem, 4vw, 3.5rem) clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
}
.films > .film:first-child { grid-column: 1 / -1; }
.film { margin: 0; }
.film__player {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-sunk);
}
.film__player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.film__play {
  position: absolute; inset: 0; width: 100%; padding: 0; border: 0; cursor: pointer; background: none;
}
.film__play img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out), filter 0.4s; }
.film__play:hover img { transform: scale(1.03); filter: brightness(0.85); }
.film__play .ph { z-index: 0; }
.film__play img { position: relative; z-index: 1; }
.play-glyph {
  position: absolute; z-index: 2; left: 50%; top: 50%; translate: -50% -50%;
  width: clamp(3.5rem, 6vw, 4.75rem); aspect-ratio: 1; border-radius: 50%;
  background: oklch(0.97 0.003 85 / 0.92); display: grid; place-items: center;
  box-shadow: 0 1rem 2.5rem -0.5rem oklch(0 0 0 / 0.5);
  transition: transform 0.4s var(--ease-out);
}
.play-glyph::after {
  content: ''; margin-left: 0.25rem; border-style: solid; border-width: 0.6rem 0 0.6rem 1rem;
  border-color: transparent transparent transparent oklch(0.15 0.004 85);
}
.film__play:hover .play-glyph { transform: scale(1.08); }
.film figcaption { margin-top: 1.125rem; }
.film__meta { font-size: var(--t-micro); font-weight: 600; color: var(--gold-ink); }
.film__title { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.018em; margin-top: 0.25rem; }
.films > .film:first-child:not(:only-child) .film__title,
.films > .film:only-child .film__title { font-size: var(--t-h3); }
.film__caption { color: var(--ink-2); font-size: var(--t-small); margin-top: 0.375rem; max-width: 52ch; }

.photos { display: grid; grid-template-columns: 1fr; gap: clamp(0.75rem, 1.5vw, 1.25rem); }
@media (min-width: 40rem) {
  .photos { grid-template-columns: 1fr 1fr; }
  .photo--feature { grid-column: 1 / -1; }
  .photos .photo--feature img { aspect-ratio: 16 / 9; }
}
.photo {
  display: block; width: 100%; padding: 0; border: 0; background: var(--bg-sunk);
  border-radius: 0.875rem; overflow: hidden; cursor: zoom-in; position: relative; text-align: left;
}
.photo img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.9s var(--ease-out); }
.photo:hover img { transform: scale(1.025); }
.photo__cap {
  position: absolute; inset: auto 0 0; padding: 2.5rem 1rem 0.875rem;
  background: linear-gradient(transparent, oklch(0 0 0 / 0.65));
  color: oklch(0.97 0.003 85); font-size: var(--t-micro); font-weight: 500;
  opacity: 0; translate: 0 0.5rem; transition: opacity 0.3s, translate 0.4s var(--ease-out);
}
.photo:hover .photo__cap, .photo:focus-visible .photo__cap { opacity: 1; translate: 0; }
@media (hover: none) { .photo__cap { opacity: 1; translate: 0; } }

.empty {
  border-radius: var(--radius-lg); padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter);
  text-align: center; color: var(--ink-3);
  background:
    repeating-linear-gradient(135deg, transparent 0 22px, var(--line) 22px 23px),
    var(--bg-raised);
}
.empty strong { display: block; color: var(--ink); font-size: 1.125rem; margin: 0.75rem 0 0.375rem; }
.empty code { font-size: 0.875em; color: var(--ink-2); }
[hidden] { display: none !important; }

/* Lightbox */
.lightbox {
  border: 0; padding: 0; margin: 0; max-width: none; max-height: none; width: 100%; height: 100%;
  background: oklch(0.08 0.003 85 / 0.96); color: oklch(0.97 0.003 85);
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; animation: lb-in 0.35s var(--ease-out); }
.lightbox__stage { display: grid; place-items: center; padding: 4.5rem var(--gutter) 1rem; min-height: 0; }
.lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 0.5rem; }
.lightbox__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem var(--gutter) max(1.25rem, env(safe-area-inset-bottom));
}
.lightbox__cap { font-size: var(--t-small); color: oklch(0.8 0.006 85); }
.lightbox__cap b { color: oklch(0.97 0.003 85); font-weight: 600; display: block; }
.lb-btn {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; cursor: pointer;
  background: oklch(0.97 0.003 85 / 0.1); color: inherit; display: grid; place-items: center;
  transition: background 0.2s;
}
.lb-btn:hover { background: oklch(0.97 0.003 85 / 0.2); }
.lb-btn svg { width: 1.125rem; height: 1.125rem; }
.lb-close { position: absolute; top: 1rem; right: var(--gutter); }
.lb-nav { display: flex; gap: 0.5rem; flex-shrink: 0; }
@keyframes lb-in { from { opacity: 0; } }

/* ---------- Contact ---------- */
.routes { display: grid; gap: 0; margin-top: 0; border-top: 1px solid var(--line); }
.route {
  display: grid; gap: 0.5rem 2rem; padding-block: 2rem; border-bottom: 1px solid var(--line);
  text-decoration: none; grid-template-columns: 1fr auto; align-items: center;
}
.route > div { transition: transform 0.5s var(--ease-out); }
.route h2 { font-size: var(--t-h3); letter-spacing: -0.02em; }
.route p { color: var(--ink-2); font-size: var(--t-small); margin-top: 0.375rem; max-width: 46ch; }
.route__go {
  width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--gold-ink);
  transition: background 0.3s, color 0.3s, transform 0.4s var(--ease-out);
}
.route__go svg { width: 1.125rem; height: 1.125rem; }
.route:hover .route__go { background: var(--gold); color: oklch(0.15 0.01 85); transform: translateX(0.25rem); }
@media (hover: hover) { .route:hover > div { transform: translateX(0.75rem); } }

.contact-meta {
  display: grid; gap: 2rem; margin-top: clamp(4rem, 8vw, 6rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}
.contact-meta h3 { font-size: var(--t-small); font-weight: 600; color: var(--ink-3); margin-bottom: 0.5rem; }
.contact-meta a { text-decoration: none; }
.contact-meta a:hover { color: var(--gold-ink); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(3.5rem, 6vw, 5rem) 2.5rem; font-size: var(--t-small); }
.footer-grid {
  display: grid; gap: 2.5rem 2rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 52rem) { .footer-grid { grid-template-columns: 2fr repeat(3, 1fr); } }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 52rem) { .footer-brand { grid-column: auto; } }
.footer-brand p { color: var(--ink-3); margin-top: 1rem; max-width: 28ch; }
.footer-col h2 { font-size: var(--t-micro); font-weight: 600; color: var(--ink-3); margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 0.625rem; }
.footer-col a { color: var(--ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--ink); }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: 1.5rem; border-top: 1px solid var(--line);
  color: var(--ink-3); font-size: var(--t-micro);
}
.socials { display: flex; gap: 0.5rem; }
.socials a {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center;
  color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); transition: color 0.15s, box-shadow 0.15s;
}
.socials a:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.socials svg { width: 1rem; height: 1rem; }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; place-content: center; text-align: center; padding-block: var(--section); }

/* ==========================================================================
   Motion
   Everything is visible by default. Animations only run where supported and
   when the visitor hasn't asked for reduced motion.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) { .login-list:not([hidden]) { animation: none; } }

@media (prefers-reduced-motion: no-preference) {
  /* Page-load: hero lines rise out of a soft blur, staggered by --i */
  .intro > * {
    animation: intro 1.1s var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 90ms + 80ms);
  }
  .hero-shot img { animation: hero-in 1.6s var(--ease-out) both 0.15s; }
  @keyframes hero-in { from { opacity: 0; scale: 1.06; filter: blur(6px); } }
  @keyframes intro {
    from { opacity: 0; translate: 0 1.25rem; filter: blur(8px); }
  }

  /* Scroll-driven reveals (Chrome, Edge, Safari 26+). Firefox simply shows content. */
  @supports (animation-timeline: view()) {
    /* Headings and copy: rise into place as they enter */
    [data-reveal="text"] > * {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 70%;
    }
    [data-reveal="text"] > :nth-child(2) { animation-range: entry 12% entry 80%; }
    [data-reveal="text"] > :nth-child(n+3) { animation-range: entry 18% entry 90%; }
    @keyframes rise { from { opacity: 0.15; translate: 0 2.5rem; } }

    /* Wide media: settles from a slight zoom while the frame un-masks from the edges */
    [data-reveal="media"] .shot__frame {
      animation: frame-open linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 40%;
    }
    [data-reveal="media"] .shot__frame > img,
    [data-reveal="media"] .shot__frame > video,
    [data-reveal="media"] .shot__frame > .ph {
      animation: settle linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 55%;
    }
    @keyframes frame-open { from { clip-path: inset(6% 4% 0 4% round 2.5rem); } to { clip-path: inset(0 0 0 0 round 0); } }
    @keyframes settle { from { scale: 1.1; } }

    /* Phones: lift up into the stage */
    [data-reveal="phone"] {
      animation: lift linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }
    @keyframes lift { from { translate: 0 18%; } }

    /* Lists and grids: children follow each other */
    [data-reveal="list"] > * {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 85%;
    }

    /* Nav hairline appears once content scrolls under it */
    .site-nav { animation: nav-line linear both; animation-timeline: scroll(); animation-range: 0 4rem; }
    @keyframes nav-line { to { border-bottom-color: var(--line); } }
  }
}
