/* ============================================================
   StoryaLaunch — Homepage (home.css)
   Layered on top of style.css. Brand register: light editorial.
   Sibling of edit.storya.app and write.storya.app.
   ============================================================ */

/* ── Layout reset for the homepage ──────────────────────── */

body.home {
  background: var(--paper);
}

.home-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.home-wrap-narrow {
  max-width: calc(var(--col-main) + var(--page-pad) * 2);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

/* The container class from style.css boxes everything to 560px;
   the homepage wraps wider, so we use .home-wrap instead. */

/* ── Top bar (sticky, scroll-fade) ────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--page-pad);
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-bottom-color 200ms var(--ease);
  max-width: none;
}

.topbar.scrolled {
  border-bottom-color: var(--rule);
}

.topbar > * { max-width: var(--max-width); }

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.topbar-brand .wordmark {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink);
  line-height: 1;
}

.topbar-brand .wordmark em {
  font-style: italic;
  font-weight: 400;
  color: var(--brand);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.topbar a.signin {
  color: var(--ink-soft);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  font-family: var(--font-sans);
}

.topbar a.signin:hover {
  color: var(--brand);
}

.topbar a.signin::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms var(--ease);
}

.topbar a.signin:hover::after {
  transform: scaleX(1);
}

/* ── Section rhythm ──────────────────────────────────────── */

.section {
  padding: 96px 0;
  position: relative;
}

.section.tight { padding: 64px 0; }
.section.first { padding-top: 56px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: var(--rule-mark);
  height: 1px;
  background: var(--brand);
  opacity: 0.7;
}

.section-rule {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 0;
}

.section-rule.brand {
  background: var(--brand);
  opacity: 0.4;
  width: 48px;
  margin: 64px auto;
}

/* ── The 640+240 spread (Tufte-style prose + margin) ─────── */

.spread {
  display: grid;
  grid-template-columns: var(--col-main) var(--col-margin);
  gap: var(--col-gap);
  align-items: start;
}

.spread-main {
  min-width: 0;
}

.spread-aside {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  border-left: 1px solid var(--rule);
  padding-left: 18px;
}

@media (max-width: 900px) {
  .spread {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .spread-aside {
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding-left: 0;
    padding-top: 18px;
  }
}

/* ── Masthead (page-top brand statement) ─────────────────── */

.masthead {
  text-align: center;
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.masthead-wordmark {
  font-family: var(--font-serif);
  font-size: clamp(48px, 11vw, 104px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.022em;
  color: var(--ink);
  display: block;
}

.masthead-wordmark em {
  font-style: italic;
  font-weight: 400;
  color: var(--brand);
}

.masthead-rule {
  display: block;
  width: var(--rule-mark);
  height: 1px;
  background: var(--brand);
  opacity: 0.7;
  margin-top: 18px;
}

@media (max-width: 640px) {
  .masthead { padding: 36px 0 24px; }
  .masthead-rule { margin-top: 14px; }
}

/* ── Hero ────────────────────────────────────────────────── */

.hero {
  padding: 80px 0 96px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 0 28px;
  max-width: 14ch;
}

.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--ink-soft);
}

.hero-sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 28px;
}

.hero-credit {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  border-left: 1px solid var(--rule);
  padding: 4px 0 4px 16px;
  margin: 0 0 40px;
  max-width: 54ch;
}

.hero-credit strong {
  font-style: normal;
  color: var(--ink);
  font-weight: 500;
}

/* ── Waitlist form ───────────────────────────────────────── */

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 480px;
}

.waitlist-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.waitlist-form input[type="email"] {
  flex: 1;
  margin: 0;
  padding: 13px 16px;
  font-size: 15px;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--font-sans);
}

.waitlist-form input[type="email"]:focus {
  border-color: var(--brand);
  background: var(--paper-deep);
  outline: none;
}

.waitlist-form .btn {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
  padding: 13px 22px;
  white-space: nowrap;
}

.waitlist-helper {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  margin: 0;
  letter-spacing: 0.04em;
}

.waitlist-confirm {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  padding: 16px 18px;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  max-width: 480px;
}

.waitlist-confirm strong {
  color: var(--brand);
  font-weight: 500;
  font-style: normal;
}

.waitlist-error {
  font-size: 13.5px;
  color: var(--bad);
  background: var(--bad-soft);
  border: 1px solid oklch(0.50 0.13 25 / 0.30);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  max-width: 480px;
}

/* ── The Brief artifact ──────────────────────────────────── */

.brief {
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  padding: 44px 48px 40px;
  position: relative;
  border-radius: var(--radius);
}

.brief-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px;
  margin-bottom: 24px;
}

.brief h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brief .brief-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0 0 28px;
}

.brief-section {
  margin-bottom: 24px;
}

.brief-section:last-child { margin-bottom: 0; }

.brief-section h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 4px;
}

.brief-section h3::after {
  content: "";
  display: block;
  width: var(--rule-mark);
  height: 1px;
  background: var(--brand);
  opacity: 0.7;
  margin: 6px 0 12px;
}

.brief-section p {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 0 0 8px;
}

.brief-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 18px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}

.brief-row:last-child { border-bottom: none; }

.brief-row .label { color: var(--ink-soft); }
.brief-row .value {
  font-family: var(--font-mono);
  color: var(--ink);
  font-size: 13px;
  letter-spacing: -0.01em;
}

.brief-row .delta-up    { color: var(--good); }
.brief-row .delta-down  { color: var(--bad); }
.brief-row .delta-flat  { color: var(--ink-muted); }

.brief-action {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 6px;
  padding-left: 24px;
  position: relative;
  letter-spacing: 0.01em;
}

.brief-action::before {
  content: "→";
  position: absolute;
  left: 6px;
  color: var(--brand);
}

.brief-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
}

.brief-review-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 10px 0 0;
  padding: 0;
}

.brief-caveat {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-muted);
  text-align: center;
}

/* ── What it does ────────────────────────────────────────── */

.what-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
}

.what-item .what-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--brand);
  display: block;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.what-item h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.what-item p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
  max-width: 60ch;
}

/* ── Trust rails ─────────────────────────────────────────── */

.trust-q {
  margin-bottom: 32px;
  max-width: 64ch;
}

.trust-q:last-child { margin-bottom: 0; }

.trust-q h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  margin: 0 0 8px;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.trust-q p {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
}

/* ── Pricing ─────────────────────────────────────────────── */

.pricing {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.pricing-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}

.pricing-row:last-child { border-bottom: 1px solid var(--rule); }

.pricing-row .plan-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.pricing-row .plan-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
  max-width: 52ch;
}

.pricing-row .plan-price {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
  font-weight: 500;
}

.pricing-row .plan-price .per {
  font-size: 11.5px;
  color: var(--ink-muted);
  display: block;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.pricing-note {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-muted);
  margin: 24px 0 0;
  max-width: 60ch;
}

/* ── Closing ─────────────────────────────────────────────── */

.closing {
  text-align: left;
  padding: 96px 0 80px;
  border-top: 1px solid var(--rule);
  margin-top: 32px;
}

.closing p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.4;
  color: var(--ink);
  max-width: 32ch;
  margin: 0 0 32px;
  font-weight: 400;
}

/* ── Footer ──────────────────────────────────────────────── */

.site-foot {
  border-top: 1px solid var(--rule);
  padding: 32px 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-muted);
}

.site-foot .foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-foot .foot-brand img {
  width: 22px;
  height: 22px;
}

.site-foot .foot-links {
  display: flex;
  gap: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-foot a {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.site-foot a:hover { color: var(--brand); }

/* ── Inline links inside copy ────────────────────────────── */

.home-wrap a.inline,
.home-wrap-narrow a.inline {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid var(--brand-line);
  transition: border-bottom-color var(--transition);
}

.home-wrap a.inline:hover,
.home-wrap-narrow a.inline:hover { border-bottom-color: var(--brand); }

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 640px) {
  .home-wrap, .home-wrap-narrow { padding: 0 22px; }
  .topbar { padding: 18px 22px; }
  .section { padding: 64px 0; }
  .hero { padding: 48px 0 64px; }
  .brief { padding: 32px 24px; }
  .waitlist-row { flex-direction: column; }
  .waitlist-form .btn { width: 100%; }
  .pricing-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .pricing-row .plan-price { text-align: left; }
  .topbar-actions { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
