/* ==========================================================================
   supportswhat.com — v3 cinematic
   Tokens per DESIGN_SPEC.md §1–3. No cool hues, no gradients (hero scrim +
   banner darkening excepted), no glows.
   ========================================================================== */

/* ---------- Fonts (self-hosted, subset latin) ---------- */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/fraunces-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/fraunces-500-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-400.woff2') format('woff2');
}
/* Size-adjusted fallbacks — prevent CLS while webfonts load */
@font-face {
  font-family: 'Fraunces-fallback';
  src: local('Georgia');
  size-adjust: 98%;
  ascent-override: 96%;
  descent-override: 25%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Inter-fallback';
  src: local('Arial');
  size-adjust: 107.64%;
  ascent-override: 90.2%;
  descent-override: 22.48%;
  line-gap-override: 0%;
}

/* ---------- Tokens ---------- */
:root {
  --bg-0:       #14100B;
  --bg-1:       #1A1512;
  --bg-2:       #221B14;

  --amber:      #E8A452;
  --amber-hot:  #F0B368;
  --amber-deep: #B4771E;
  --amber-soft: #C9A075;

  --text-hi:    #FAF6EF;
  --text-mid:   #A89E90;
  --text-lo:    #8A7A66;

  --line:        rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.14);
  --line-amber:  rgba(232,164,82,0.5);

  --err:        #D9836B;

  --serif: 'Fraunces', 'Fraunces-fallback', Georgia, serif;
  --sans:  'Inter', 'Inter-fallback', system-ui, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, monospace;

  --container: 1140px;
  --gutter: 24px;
  --section-gap: 104px;
}
@media (max-width: 480px) {
  :root { --gutter: 16px; }
}
@media (max-width: 768px) {
  :root { --section-gap: 64px; }
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text-mid);
  font: 400 16px/1.65 var(--sans);
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
img, video { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--text-hi);
}
h1 em, h2 em {
  font-style: italic;
  color: var(--amber);
}

:focus-visible {
  outline: 2px solid var(--amber-soft);
  outline-offset: 2px;
}
::selection { background: var(--amber-deep); color: var(--text-hi); }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: calc(var(--section-gap) / 2); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  top: -48px; left: 16px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--amber);
  color: var(--bg-0);
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  transition: top 150ms ease-out;
}
.skip-link:focus { top: 12px; }

/* ---------- Kicker ---------- */
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--amber);
}
.kicker-dot { font-size: 8px; vertical-align: 2px; margin-right: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 4px;
  font: 500 16px/1.2 var(--sans);
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
.btn-primary {
  background: var(--amber);
  color: var(--bg-0);
}
.btn-primary:hover {
  background: var(--amber-hot);
  transform: translateY(-1px);
}
.btn-primary:active { background: var(--amber-deep); }
.btn-secondary {
  background: transparent;
  border: 1px solid rgba(250, 246, 239, 0.35);
  color: var(--text-hi);
}
.btn-secondary:hover { border-color: #fff; }

/* ---------- Nav ---------- */
.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  padding-block: 18px;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  font: 500 20px/1 var(--sans);
  letter-spacing: -0.01em;
  color: var(--text-hi);
  text-decoration: none;
}
.wordmark .q { color: var(--amber); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links > a:not(.btn) {
  color: rgba(250, 246, 239, 0.85);
  text-decoration: none;
  font-size: 15px;
}
.nav-links > a:not(.btn):hover { color: #fff; }
.nav-links .btn { margin-left: 4px; padding: 9px 18px; font-size: 14px; }

.nav.scrolled {
  position: fixed;
  background: rgba(26, 21, 18, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding-block: 12px;
}
@media (prefers-reduced-motion: no-preference) {
  .nav.scrolled { animation: nav-in 300ms ease-out; }
  @keyframes nav-in {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
  }
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--text-hi);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 767px) {
  .js .nav-toggle { display: block; }
  .js .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 30;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    background: rgba(20, 16, 11, 0.97);
    font-size: 20px;
  }
  .js .nav-links.open { display: flex; }
  .js .nav-toggle[aria-expanded="true"] {
    position: relative;
    z-index: 40;
  }
  body.menu-open { overflow: hidden; }
  /* No-JS mobile: plain wrapped links, no overlay */
  html:not(.js) .nav-links { flex-wrap: wrap; gap: 14px; }
  html:not(.js) .nav-inner { flex-wrap: wrap; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: clamp(560px, 100svh, 960px);
  overflow: hidden;
  display: flex;
  align-items: flex-start;
}
.hero-media {
  position: absolute;
  inset: 0;
  background: url('/media/hero-poster.jpg') center / cover no-repeat var(--bg-0);
}
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg,
      rgba(12, 9, 5, 0.82) 0%,
      rgba(12, 9, 5, 0.55) 34%,
      rgba(12, 9, 5, 0.12) 55%,
      rgba(12, 9, 5, 0) 70%),
    linear-gradient(180deg,
      rgba(12, 9, 5, 0.60) 0%,
      rgba(12, 9, 5, 0) 22%);
}
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: max(13vh, 108px);
}
.hero-content > * { max-width: 560px; }
.hero h1 {
  font-size: clamp(38px, 5.6vw, 72px);
  line-height: 1.1;
  margin-top: 18px;
  max-width: 800px; /* two sentences over ~4 lines at desktop (DESIGN_SPEC §2) */
}
.hero-sub {
  margin-top: 22px;
  font-size: 17px;
  color: rgba(250, 246, 239, 0.85);
  max-width: 480px;
}
.hero-ctas {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Hero load-in: staggered fade/rise, once (JS + motion-ok only) */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-in {
    opacity: 0;
    transform: translateY(14px);
    animation: hero-in 600ms ease-out forwards;
  }
  .js .hero-in.d1 { animation-delay: 120ms; }
  .js .hero-in.d2 { animation-delay: 240ms; }
  .js .hero-in.d3 { animation-delay: 360ms; }
  @keyframes hero-in {
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ---------- Interstitial ---------- */
.interstitial {
  border-block: 1px solid var(--line);
  padding-block: 44px;
  text-align: center;
}
.interstitial p {
  max-width: 720px;
  font-size: 19px;
  line-height: 1.7;
  color: var(--text-lo);
}
.amber-phrase { color: var(--amber); }
@media (prefers-reduced-motion: no-preference) {
  .amber-phrase.pulse { animation: phrase-pulse 600ms ease-in-out; }
  @keyframes phrase-pulse {
    50% { color: var(--amber-hot); filter: brightness(1.35); }
  }
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 899px) {
  .services-grid { grid-template-columns: 1fr; gap: 48px; }
}
.service img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
}
.service-body {
  margin-top: 20px;
  border-top: 1px solid var(--line-amber);
  padding-top: 16px;
}
.service h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.3;
  color: var(--text-hi);
}
.service-lede { margin-top: 8px; }
.service ul {
  margin-top: 14px;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.55;
  display: grid;
  gap: 8px;
}
.service li::marker { color: var(--amber-soft); }

/* ---------- How it works ---------- */
.how h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; }
.how-steps {
  list-style: none;
  padding: 0;
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 899px) {
  .how-steps { grid-template-columns: 1fr; gap: 40px; }
}
.how-num {
  display: block;
  font-family: var(--serif);
  font-size: 28px;
  color: var(--amber-soft);
}
.how-steps h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  color: var(--text-hi);
  margin-top: 10px;
}
.how-steps p { margin-top: 8px; font-size: 15px; }

/* ---------- Logo strip ---------- */
.logos { text-align: center; }
.logos-label { margin-bottom: 24px; }
.logo-badges {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.logo-badges li {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text-mid);
}

/* ---------- CTA banner ---------- */
.cta-banner {
  position: relative;
  margin-block: calc(var(--section-gap) / 2);
  padding-block: clamp(96px, 14vw, 160px);
  background: url('/img/banner-manhattan.jpg') center 35% / cover no-repeat var(--bg-1);
  text-align: center;
  overflow: hidden;
}
.cta-banner-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(12, 9, 5, 0.68),
    rgba(12, 9, 5, 0.38) 45%,
    rgba(12, 9, 5, 0.65));
}
.cta-banner-content { position: relative; z-index: 1; }
.cta-banner h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}
.cta-banner p {
  margin-top: 14px;
  color: rgba(250, 246, 239, 0.85);
  font-size: 17px;
}
.cta-banner .btn { margin-top: 28px; }

/* ---------- Contact ---------- */
.contact-inner { max-width: 720px; }
.contact h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; }
.contact-sub { margin-top: 12px; }
.contact-form { margin-top: 40px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 599px) {
  .form-row { grid-template-columns: 1fr; }
}
.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-hi);
  margin-bottom: 8px;
}
.form-field .optional { color: var(--text-lo); font-weight: 400; }
.form-field input,
.form-field textarea {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text-hi);
  font: 400 16px/1.5 var(--sans);
  padding: 12px 14px;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--amber-soft);
  box-shadow: 0 0 0 2px rgba(201, 160, 117, 0.25);
}
.form-field textarea { resize: vertical; }

/* Honeypot — hidden from everyone; bots fill it anyway */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-msg { display: none; margin-top: 20px; font-size: 15px; }
.form-msg-success { color: var(--amber-soft); }
.form-msg-error { color: var(--err); }
.form-msg.visible,
.form-msg:target { display: block; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 40px;
  font-size: 14px;
  color: var(--text-lo);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
}
.footer-wordmark .q { color: var(--amber-soft); }
.footer a { color: var(--text-lo); }
.footer a:hover { color: var(--text-mid); }

/* ---------- Simple pages (404, privacy) ---------- */
.page-simple {
  padding-block: 180px 120px;
}
.page-simple h1 { font-size: clamp(32px, 4.5vw, 52px); line-height: 1.1; }
.page-simple .lede { margin-top: 16px; font-size: 17px; }
.page-simple .btn { margin-top: 16px; }

.prose { padding-block: 140px 80px; max-width: 720px; }
.prose h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; }
.prose h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  color: var(--text-hi);
  margin-top: 40px;
}
.prose p { margin-top: 14px; }
.prose a { color: var(--amber-soft); }

.footer-meta { display: flex; gap: 16px; }

/* ---------- Scroll reveal (JS + motion-ok only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
  }
  .js .reveal.in {
    opacity: 1;
    transform: translateY(0);
  }
}
