/* The Laddering — marketing page. Mobile first: the base rules are the phone
   layout, and the media queries at the bottom widen it. */

:root {
  --bg: #100d0c;            /* = BACKGROUND in scripts/site/build_images.rb */
  --surface: #1b1614;
  --surface-2: #241d1a;
  --line: rgba(232, 181, 74, 0.16);
  --text: #eee7de;
  --muted: #b3a89c;
  --gold: #e8b54a;
  --gold-hi: #f7d98a;
  --gold-lo: #a8741f;
  --crimson: #b41e1e;
  --radius: 14px;
  --gutter: 16px;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold-hi); }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.2; margin: 0; }
h2 { font-size: clamp(1.6rem, 6vw, 2.4rem); color: var(--gold-hi); letter-spacing: 0.01em; }
h3 { font-size: 1.12rem; color: var(--gold-hi); letter-spacing: 0.02em; }
p  { margin: 0; }

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

/* ---- Buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px;
  font: 600 1rem/1 var(--body);
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:active { transform: translateY(1px); }

.btn-gold {
  color: #2a1704;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 6px 24px rgba(180, 30, 30, 0.35);
}
.btn-gold:hover { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 8px 32px rgba(180, 30, 30, 0.55); }

.btn-ghost {
  color: var(--gold-hi);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover { border-color: rgba(232, 181, 74, 0.45); }

a:focus-visible, .btn:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

/* ---- Top bar ---------------------------------------------------------- */

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px))
           calc(var(--gutter) + env(safe-area-inset-right, 0px))
           10px
           calc(var(--gutter) + env(safe-area-inset-left, 0px));
  max-width: 1180px; margin: 0 auto;
}
.topbar-brand {
  display: flex; align-items: center; gap: 8px;
  color: var(--gold-hi); text-decoration: none;
  font: 700 1.05rem/1 var(--display); letter-spacing: 0.04em;
}
.topbar .btn { min-height: 40px; padding: 0 18px; font-size: 0.95rem; }

/* ---- Hero ------------------------------------------------------------- */

.hero { text-align: center; padding-bottom: 56px; }
.hero-art { width: 100%; max-width: 1100px; margin: 0 auto; }
.hero-copy { padding: 0 var(--gutter); max-width: 640px; margin: -4px auto 0; }

.tagline {
  font: 700 clamp(1.5rem, 6.4vw, 2.6rem)/1.15 var(--display);
  color: var(--gold-hi);
  text-shadow: 0 2px 18px rgba(180, 30, 30, 0.45);
}
.lede { margin-top: 14px; color: var(--muted); font-size: 1.05rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }
.note { margin-top: 14px; color: var(--muted); font-size: 0.9rem; }
.note-center, .cta-center { text-align: center; justify-content: center; }

/* ---- Showcase rows ---------------------------------------------------- */

.showcase {
  display: grid; gap: 36px;
  padding: 56px var(--gutter);
  max-width: 1100px; margin: 0 auto;
  border-top: 1px solid var(--line);
}
.showcase-copy p { color: var(--muted); margin-top: 14px; }
.showcase-copy h2 { margin-top: 6px; }

.showcase-copy .eyebrow {
  margin-top: 0;
  font: 600 0.78rem/1 var(--body);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: #e8604f;
}

/* A screenshot in a phone frame. */
.phone {
  justify-self: center;
  width: min(300px, 82vw);
  margin: 0;
  padding: 9px;
  border-radius: 38px;
  background: linear-gradient(160deg, #3a302b, #16110f);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 80px rgba(180, 30, 30, 0.28);
}
.phone img { width: 100%; border-radius: 30px; background: #212529; }

/* ---- Feature grid ----------------------------------------------------- */

.features {
  padding: 56px var(--gutter);
  max-width: 1100px; margin: 0 auto;
  border-top: 1px solid var(--line);
}
.features > h2 { text-align: center; max-width: 720px; margin: 0 auto; }
.feature-grid {
  list-style: none; margin: 32px 0 0; padding: 0;
  display: grid; gap: 14px;
}
.feature-grid li {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.feature-grid p { color: var(--muted); margin-top: 8px; font-size: 0.97rem; }

/* ---- Steps ------------------------------------------------------------ */

.steps {
  padding: 56px var(--gutter) 64px;
  max-width: 1100px; margin: 0 auto;
  border-top: 1px solid var(--line);
  scroll-margin-top: 12px;
}
.steps > h2 { text-align: center; }
.step-list { list-style: none; margin: 32px auto 0; padding: 0; display: grid; gap: 22px; max-width: 900px; }
.step-list li { display: flex; gap: 16px; align-items: flex-start; }
.step-list p { color: var(--muted); margin-top: 4px; }
.step-num {
  flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 1.1rem/1 var(--display); color: #2a1704;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo));
}
.steps .cta-row { margin-top: 36px; }

/* ---- Footer ----------------------------------------------------------- */

.footer {
  padding: 32px var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer p + p { margin-top: 10px; }
.footer a { color: var(--gold-hi); text-decoration: none; }
.footer span { margin: 0 8px; }
.fine { font-size: 0.78rem; max-width: 560px; margin-left: auto; margin-right: auto; opacity: 0.8; }

/* ---- Wider screens ---------------------------------------------------- */

@media (min-width: 640px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 880px) {
  :root { --gutter: 32px; }
  .showcase { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 64px; padding: 88px var(--gutter); }
  .showcase-flip .showcase-copy { order: 2; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .step-list { grid-template-columns: repeat(3, 1fr); }
  .features, .steps { padding-top: 88px; padding-bottom: 88px; }
}

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