/* Jhome Calendar funnel — see DESIGN.md for the direction this implements. */

@font-face {
  font-family: 'Instrument Sans';
  src: url('fonts/instrument-sans.woff2') format('woff2');
  font-weight: 400 700;           /* a real variable axis, not synthesised weights */
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/instrument-serif.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/instrument-serif-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}

:root {
  --ground: #14120f;
  --raised: #1c1914;
  --ink: #f5f0e6;
  --ink-dim: rgba(245, 240, 230, .68);
  --ink-faint: rgba(245, 240, 230, .54);
  --accent: #c9a55c;
  --accent-light: #e8d9b8;
  --on-accent: #14120f;
  --hairline: rgba(245, 240, 230, .11);
  --hairline-strong: rgba(245, 240, 230, .2);

  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 12px;
  --shell: 1180px;

  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --t-micro: 160ms;
  --t-enter: 480ms;

  --z-header: 10;
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

a { color: var(--accent-light); }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- type ---------- */

h1, h2, h3 { font-family: var(--serif); font-weight: 400; text-wrap: balance; margin: 0; }

h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -.02em;
}
h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.015em;
}
h3 { font-size: 1.375rem; line-height: 1.25; }

p { margin: 0; text-wrap: pretty; }

.lead { font-size: 21px; line-height: 1.55; color: var(--ink-dim); }
.dim  { color: var(--ink-dim); }
.gold { color: var(--accent); }

.kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-micro) var(--ease-out),
              border-color var(--t-micro) var(--ease-out),
              color var(--t-micro) var(--ease-out);
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-light); }
.btn-primary:active { background: #b8924a; }

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline-strong);
}
.btn-quiet:hover { border-color: var(--accent); color: var(--accent-light); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(20, 18, 15, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: .01em;
  white-space: nowrap;
}
.wordmark em { font-style: italic; color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .btn { padding: 11px 20px; font-size: 15px; }
.header-signin {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 11px 8px;
  transition: color var(--t-micro) var(--ease-out);
}
.header-signin:hover { color: var(--ink); }

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

section { padding-block: clamp(72px, 10vw, 132px); }
section + section { border-top: 1px solid var(--hairline); }

/* 1. hero — asymmetric split, copy narrower than the image */
.hero { padding-top: clamp(56px, 8vw, 92px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}
.hero p.lead { margin-top: 22px; max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-proof {
  margin-top: 26px;
  font-size: 16px;
  color: var(--ink-faint);
  max-width: 40ch;
}
.hero-shot {
  max-width: 560px;
  margin-left: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--raised);
}

/* 2. the gap — single wide statement, no columns */
.statement { text-align: center; }
.statement h2 { max-width: 20ch; margin-inline: auto; }
.statement p { max-width: 56ch; margin: 26px auto 0; font-size: 19px; color: var(--ink-dim); }

/* 3. included — offset text against the product detail */
.included-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}
.detail-shot {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--raised);
  padding: 22px 20px;
}
.detail-shot img { border-radius: 6px; }
.detail-caption {
  margin-top: 18px;
  font-size: 16px;
  color: var(--ink-faint);
  line-height: 1.5;
}
.included-grid h2 + p { margin-top: 22px; }
.included-grid p + p { margin-top: 16px; }

/* 4. capabilities — hairline list, deliberately not a card grid */
.spec-list { margin-top: clamp(34px, 4vw, 52px); border-top: 1px solid var(--hairline); }
.spec {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(16px, 4vw, 56px);
  padding-block: 30px;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}
.spec h3 { color: var(--ink); }
.spec p { color: var(--ink-dim); max-width: 62ch; }

/* 5. steps — a genuinely ordered sequence, so the numerals carry meaning */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(24px, 3vw, 44px);
  margin-top: clamp(34px, 4vw, 52px);
  counter-reset: step;
}
.step { counter-increment: step; }
.step::before {
  content: counter(step);
  display: block;
  font-family: var(--serif);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 14px;
}
.step h3 { margin-bottom: 10px; }
.step p { color: var(--ink-dim); }

/* 6. truth — wide band on the raised surface */
.band { background: var(--raised); }
.band-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 72px);
}
.band-grid h2 { max-width: 16ch; }
.band-grid p { color: var(--ink-dim); }
.band-grid p + p { margin-top: 18px; }

/* 7. faq — two columns of question blocks */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(30px, 3vw, 52px) clamp(32px, 5vw, 72px);
  margin-top: clamp(34px, 4vw, 52px);
}
.faq h3 { font-family: var(--sans); font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.faq p { color: var(--ink-dim); font-size: 16px; }

/* 8. close */
.close { text-align: center; }
.close h2 { max-width: 18ch; margin-inline: auto; }
.close p { margin: 22px auto 0; max-width: 46ch; color: var(--ink-dim); font-size: 19px; }
.close .hero-cta { justify-content: center; margin-top: 32px; }
.close-note { margin-top: 20px; font-size: 16px; color: var(--ink-faint); }

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

.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 30px;
  padding-bottom: calc(30px + env(safe-area-inset-bottom));
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 26px;
  font-size: 14px;
  color: var(--ink-faint);
}
.footer-row a { color: var(--ink-faint); text-decoration: none; }
.footer-row a:hover { color: var(--ink-dim); }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.brand-credit { text-align: center; }

/* ---------- motion ----------
   `.reveal` on its own does nothing: every element is visible at rest. The
   hiding class is attached by script one element at a time, immediately before
   that element is handed to the observer, and a failsafe clears the whole lot
   if anything goes wrong. Marking the page as scripted up front and hiding
   everything before the observer runs is what leaves a page blank when the
   observer never fires. */
@media (prefers-reduced-motion: no-preference) {
  .will-reveal { opacity: 0; transform: translateY(12px); }
  .will-reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity var(--t-enter) var(--ease-out),
                transform var(--t-enter) var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
  }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero-grid, .included-grid, .band-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 40px; }
  .spec { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hero p.lead { max-width: none; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .header-row { height: 60px; }
  .wordmark { font-size: 22px; }
  .header-signin { display: none; }   /* the primary action stays; the duplicate route goes */
  .hero-cta .btn { width: 100%; }
  .footer-row { justify-content: center; text-align: center; }
}
