/* Thread of Truth — noir landing (matches app brand: charcoal, midnight, brass amber) */
:root {
  --ink: #0b0e14;
  --charcoal: #141a24;
  --navy: #1a2740;
  --slate: #1c2433;
  --paper: #e8e4dc;
  --muted: #a8b0c0;
  --amber: #c4a35a;
  --amber-bright: #e0c078;
  --amber-muted: #8b7340;
  --thread: #9e3b3b;
  --font-display: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --max: 68rem;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--paper);
  background:
    radial-gradient(ellipse 80% 50% at 80% 0%, rgba(26, 39, 64, 0.55), transparent 55%),
    radial-gradient(ellipse 60% 40% at 10% 90%, rgba(158, 59, 59, 0.08), transparent 50%),
    var(--ink);
  line-height: 1.55;
}

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

a {
  color: var(--amber);
}

a:hover {
  color: var(--amber-bright);
}

/* ——— Header ——— */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem var(--pad);
  max-width: var(--max);
  margin: 0 auto;
}

body:has(.hero) .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--amber);
  text-decoration: none;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.25rem;
  font-size: 0.95rem;
}

nav a:hover {
  color: var(--amber-bright);
}

/* ——— Hero (full-bleed composition) ——— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 40%;
  animation: kenburns 22s ease-in-out infinite alternate;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      105deg,
      rgba(11, 14, 20, 0.92) 0%,
      rgba(11, 14, 20, 0.72) 42%,
      rgba(11, 14, 20, 0.35) 70%,
      rgba(11, 14, 20, 0.55) 100%
    ),
    linear-gradient(to top, rgba(11, 14, 20, 0.9) 0%, transparent 45%);
}

@keyframes kenburns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.06);
  }
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 7rem var(--pad) 4.5rem;
  animation: rise 1.15s ease-out both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.4rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 9vw, 4.5rem);
  font-weight: 600;
  line-height: 1.02;
  color: var(--amber);
  margin: 0 0 1.1rem;
  letter-spacing: 0.02em;
  max-width: 14ch;
  animation: glow 4.5s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow: 0 0 0 transparent;
  }
  to {
    text-shadow: 0 0 28px rgba(196, 163, 90, 0.22);
  }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  line-height: 1.25;
  color: var(--paper);
  margin: 0 0 1rem;
  max-width: 22ch;
}

.lede {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 34rem;
  margin: 0 0 2rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cta {
  display: inline-block;
  padding: 0.75rem 1.35rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.cta:hover {
  transform: translateY(-1px);
}

.cta.primary {
  background: var(--amber);
  color: var(--ink);
}

.cta.primary:hover {
  background: var(--amber-bright);
  color: var(--ink);
}

.cta.ghost {
  border-color: var(--amber-muted);
  color: var(--amber);
  background: rgba(11, 14, 20, 0.35);
}

.cta.ghost:hover {
  border-color: var(--amber-bright);
  color: var(--amber-bright);
}

/* ——— Sections ——— */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem var(--pad) 1rem;
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber-muted);
  margin: 0 0 0.75rem;
}

.section h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  line-height: 1.15;
  color: var(--paper);
  margin: 0 0 1rem;
  max-width: 22ch;
}

.section-lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 38rem;
  margin: 0 0 2.5rem;
}

/* ——— How it works ——— */
.how {
  border-top: 1px solid rgba(58, 70, 92, 0.45);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1.25rem;
  align-items: baseline;
  counter-increment: step;
  padding-left: 0;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  grid-row: 1 / span 2;
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--thread);
  line-height: 1;
  padding-top: 0.15rem;
}

.step-label {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--amber);
}

.step-text {
  color: var(--muted);
  max-width: 36rem;
}

/* ——— Cases ——— */
.cases {
  padding-bottom: 2rem;
}

.case-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  margin: 0 0 4rem;
}

.case-row.reverse {
  direction: rtl;
}

.case-row.reverse > * {
  direction: ltr;
}

.case-figure {
  margin: 0;
  overflow: hidden;
}

.case-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.92);
  transition: transform 0.7s ease;
}

.case-row.is-visible .case-figure img {
  transform: scale(1.02);
}

.case-meta {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-muted);
  margin: 0 0 0.5rem;
}

.case-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 600;
  color: var(--paper);
  margin: 0 0 0.75rem;
}

.case-copy p:last-child {
  color: var(--muted);
  margin: 0;
  max-width: 34rem;
}

.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ——— Close ——— */
.close {
  text-align: center;
  padding: 3rem var(--pad) 5rem;
  border-top: 1px solid rgba(58, 70, 92, 0.45);
}

.close h2 {
  margin-left: auto;
  margin-right: auto;
}

.close .section-lede {
  margin-left: auto;
  margin-right: auto;
}

.close .cta-row {
  justify-content: center;
}

/* ——— Footer / legal docs ——— */
footer {
  border-top: 1px solid rgba(58, 70, 92, 0.6);
  padding: 1.5rem var(--pad) 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--amber-bright);
}

.doc {
  max-width: 40rem;
  margin: 0 auto;
  padding: 6rem var(--pad) 4rem;
}

.doc h1 {
  font-family: var(--font-display);
  color: var(--amber);
}

.doc h2 {
  font-family: var(--font-display);
  font-weight: 600;
  margin-top: 2rem;
}

.doc p,
.doc li {
  color: var(--muted);
}

.banner {
  border: 1px solid rgba(196, 163, 90, 0.35);
  padding: 0.75rem 1rem;
  color: var(--amber-bright);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

@media (max-width: 800px) {
  .case-row,
  .case-row.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .hero-copy {
    padding-bottom: 3.25rem;
  }

  .brand {
    max-width: none;
  }
}

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

  .hero-image,
  .brand,
  .hero-copy,
  .reveal,
  .case-figure img,
  .cta {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
