/* Ghost Biographer — Home (landing/dashboard) page styles
   Page-specific layout and overrides only.
   Shared tokens and components live in design.css. */

/* ── Hero (logged-out) ──────────────────────────────────────── */
.home-hero {
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
  padding: 88px var(--shell-pad) 80px;
}
.home-hero-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.home-hero-label { margin-bottom: 24px; }

.home-hero-headline {
  font-family: var(--font-editorial);
  font-size: 58px; font-weight: 400;
  line-height: 1.05; letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 28px;
}
.home-hero-headline em { font-style: normal; color: var(--plum); }

.home-hero-desc {
  font-size: 19px; color: var(--ink-2);
  line-height: 1.65;
  margin: 0 auto 44px;
  max-width: 600px;
}
.home-hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Dashboard welcome (logged-in) ──────────────────────────── */
.home-dash-inner { padding-top: 40px; padding-bottom: 8px; }

.home-welcome-card {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.home-welcome-text { min-width: 0; }
.home-welcome-text .mono-label { margin-bottom: 6px; }
.home-welcome-sub {
  margin: 8px 0 0;
  font-size: 16px; color: var(--ink-3);
}

/* ── Phase journey ──────────────────────────────────────────── */
.home-journey { padding: 56px 0 80px; }

.home-journey-label {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--ink-4);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 24px;
}

.phase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 860px) { .phase-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .phase-grid { grid-template-columns: 1fr; } }

.phase-card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  transition: border-color 150ms, box-shadow 150ms;
}
.phase-num {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--ink-4);
  letter-spacing: 0.08em;
}
.phase-card.clickable { cursor: pointer; }
.phase-card.clickable:hover {
  border-color: var(--plum-3);
  box-shadow: var(--shadow);
}
.phase-card.current {
  border-color: var(--plum);
  box-shadow: 0 0 0 1px var(--plum), var(--shadow);
}
.phase-card-icon { font-size: 30px; line-height: 1; }
.phase-card-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.phase-card-desc { font-size: 13px; color: var(--ink-3); line-height: 1.55; margin: 0; }
.phase-card-pill { position: absolute; top: 18px; right: 18px; }
.phase-card.soon { opacity: 0.58; }

/* ── Sign-in modal ──────────────────────────────────────────── */
.signin-form { display: flex; flex-direction: column; gap: 16px; }
.signin-error { font-size: 13px; color: var(--rose); min-height: 18px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 72px; }
.pw-toggle {
  position: absolute; right: 40px; top: 50%; transform: translateY(-50%);
  font-size: 16px; color: var(--ink-3); line-height: 1;
  padding: 4px; border-radius: 6px; transition: color 120ms;
}
.pw-toggle:hover { color: var(--ink); }
.pw-forgot { font-size: 13px; color: var(--plum); text-align: right; }
.pw-forgot:hover { text-decoration: underline; }

/* ── Footer ─────────────────────────────────────────────────── */
.home-footer {
  border-top: 1px solid var(--hairline);
  padding: 24px var(--shell-pad);
  font-size: 13px; color: var(--ink-4);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  margin-top: auto;
}
.home-footer a { color: var(--ink-3); }
.home-footer a:hover { color: var(--ink); }

/* ── Closed-beta ribbon ────────────────────────────────────────────────────
   Shown sitewide on the entry page until general availability. Honest
   framing — sets visitor expectation that signups are invitation-only.
   See /contact for the request-access link. */
.beta-ribbon {
  background: linear-gradient(90deg, #fef3c7 0%, #fde68a 100%);
  color: #78350f;
  border-bottom: 1px solid #f59e0b;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  text-align: center;
  padding: 9px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  line-height: 1.4;
}
.beta-ribbon-pill {
  background: #b45309;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.beta-ribbon-text { font-weight: 500; }
.beta-ribbon-text a {
  color: #78350f;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.beta-ribbon-text a:hover { color: #451a03; }

@media (max-width: 540px) {
  .beta-ribbon { font-size: 12.5px; padding: 7px 12px; }
}

/* ── TOTP grace-period banner (Phase 3.2) ─────────────────────────────────
   Shown on the dashboard when the user is in their 7-day window without
   2FA enrolled. Non-blocking — friendly nudge, single CTA to Settings. */
.totp-grace-banner {
  display: flex; align-items: center; gap: 14px;
  margin: 16px auto 0;
  max-width: 1100px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.10), rgba(99, 102, 241, 0.10));
  border: 1px solid rgba(139, 92, 246, 0.30);
  border-radius: 12px;
  color: #4c1d95;
  font-size: 14px;
  line-height: 1.5;
}
.totp-grace-banner[hidden] { display: none !important; }
.totp-grace-banner .tgb-icon { font-size: 22px; flex-shrink: 0; }
.totp-grace-banner .tgb-body { flex: 1; min-width: 0; }
.totp-grace-banner .tgb-title { font-weight: 600; color: #2e1065; }
.totp-grace-banner .tgb-sub   { color: #6d28d9; font-size: 13px; margin-top: 2px; }
.totp-grace-banner .tgb-cta {
  flex-shrink: 0;
  background: #6d28d9;
  color: white;
  padding: 9px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}
.totp-grace-banner .tgb-cta:hover { background: #5b21b6; }

/* Hard-mode escalation: when grace has expired and TOTP_ENFORCE='hard'
   the same banner gets a red border + "required now" copy. The
   blocking modal is rendered separately — this just changes tone. */
.totp-grace-banner.tgb-blocking {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.10), rgba(239, 68, 68, 0.10));
  border-color: rgba(248, 113, 113, 0.40);
}
.totp-grace-banner.tgb-blocking .tgb-title { color: #7f1d1d; }
.totp-grace-banner.tgb-blocking .tgb-sub   { color: #b91c1c; }

@media (max-width: 720px) {
  .totp-grace-banner { flex-direction: column; align-items: flex-start; }
  .totp-grace-banner .tgb-cta { align-self: stretch; text-align: center; }
}
