/* =============================================================================
   Wayback Download — DIY sister (waybackdownload.com)
   Shared brand kit with the handbook sister and wayback.download.
   Inter + brand blue #045cb4. See BRAND.md. Content stays unique.
   ============================================================================= */

:root {
  /* Canonical tokens — keep identical to the handbook sister. */
  --ink:          #111827;
  --ink-soft:     #1f2937;
  --navy:         #0b1f3a;
  --body:         #374151;
  --muted:        #4b5563;
  --muted-soft:   #6b7280;
  --line:         #e5e7eb;
  --line-strong:  #d1d5db;
  --paper:        #f3f7fc;
  --paper-deep:   #e8f1fb;
  --paper-code:   #f3f4f6;
  --card:         #ffffff;
  --sand:         #f3f4f6;

  --brand:        #045cb4;
  --brand-hover:  #034a91;
  --brand-soft:   #e8f1fb;
  --brand-mist:   #f3f7fc;
  --brand-ring:   rgba(4, 92, 180, 0.22);

  --ok:           #059669;
  --ok-soft:      #ecfdf5;
  --warn:         #92400e;
  --warn-soft:    #fffbeb;
  --danger:       #b42318;
  --danger-soft:  #fef3f2;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04), 0 2px 8px rgba(17, 24, 39, 0.04);
  --shadow:    0 12px 40px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 20px 48px rgba(17, 24, 39, 0.12);

  --font-display: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body:    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;

  --container: 1200px;
  --container-wide: 1320px;

  /* Old accent names. Aliased so existing rules stay on the shared kit. */
  --ember:        var(--brand);
  --ember-hover:  var(--brand-hover);
  --ember-soft:   var(--brand-soft);
  --ember-ring:   var(--brand-ring);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--body);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* ---------- typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: .6rem; }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); margin-bottom: .4rem; font-weight: 700; }
h4 { font-size: .95rem; font-weight: 700; }

p { color: var(--body); }
p.lede {
  font-size: clamp(1.08rem, 1.5vw, 1.3rem);
  color: var(--muted);
  line-height: 1.55;
  max-width: 56ch;
}

a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-hover); text-decoration: underline; text-underline-offset: 3px; }

code {
  font-family: var(--font-mono);
  background: var(--paper-code);
  padding: 0.12em 0.4em;
  border-radius: 5px;
  font-size: 0.86em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* ---------- layout ---------- */
.wrap       { width: min(var(--container),     calc(100% - 2.5rem)); margin: 0 auto; }
.wrap-wide  { width: min(var(--container-wide), calc(100% - 2.5rem)); margin: 0 auto; }
.wrap-narrow{ width: min(760px,               calc(100% - 2.5rem)); margin: 0 auto; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- topbar ---------- */
.topbar {
  background: var(--navy);
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  padding: 0.55rem 1rem;
  letter-spacing: 0.005em;
}
.topbar .dot {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: #34d399;
  margin-right: 0.45rem;
  vertical-align: middle;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
.topbar a { color: #fff; font-weight: 700; }
.topbar a:hover { color: #dbeafe; text-decoration: underline; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(34,197,94,0.18); } 50% { box-shadow: 0 0 0 8px rgba(34,197,94,0.08); } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 0;
}
.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: inherit; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; }
.brand-mark svg { width: 36px; height: 36px; display: block; }
.brand-text strong {
  display: block; font-family: var(--font-display); font-weight: 700;
  color: var(--ink); font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1;
}
.brand-text small {
  display: block; color: var(--muted); font-size: 0.76rem; margin-top: 2px;
}
.primary-nav {
  display: flex; align-items: center; gap: 0.1rem;
}
.nav-link {
  color: var(--ink-soft); font-weight: 600; font-size: 0.94rem;
  padding: 0.55rem 0.95rem; border-radius: 7px;
}
.nav-link:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.nav-link.is-active { color: var(--brand); }
.nav-cta {
  margin-left: 0.5rem;
  background: var(--brand);
  color: #fff !important;
  padding: 0.6rem 1.05rem; border-radius: 8px;
  font-weight: 700; font-size: 0.9rem;
  display: inline-flex; align-items: center; gap: 0.35rem;
  transition: background .15s;
}
.nav-cta:hover { background: var(--brand-hover); text-decoration: none; color: #fff !important; }

.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--line-strong);
  width: 42px; height: 42px; border-radius: 8px;
  padding: 10px;
  flex-direction: column; justify-content: space-between; align-items: stretch;
  cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch;
    padding: 0.5rem 1.25rem 1rem;
    gap: 0;
    transform: translateY(-10px);
    opacity: 0; pointer-events: none;
    transition: opacity .18s, transform .18s;
  }
  .primary-nav .nav-link { padding: 0.9rem 0.3rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .primary-nav .nav-cta { margin: 0.75rem 0 0; width: 100%; justify-content: center; }
  .primary-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: clamp(3.25rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem);
  overflow: hidden;
}
.hero::before, .hero::after {
  content: ""; position: absolute; pointer-events: none;
}
.hero::before {
  inset: auto -10% 0 -10%;
  height: 56%;
  background:
    radial-gradient(60% 70% at 25% 60%, rgba(4, 92, 180, 0.12), transparent 65%),
    radial-gradient(50% 60% at 75% 40%, rgba(11, 31, 58, 0.06), transparent 70%);
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid #c9def5;
  padding: 0.35rem 0.85rem; border-radius: 999px;
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand); display: inline-block;
}

.hero h1 {
  max-width: 20ch;
  margin-bottom: 1.1rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand);
  font-weight: 700;
}
.hero .lede { margin-bottom: 1.85rem; max-width: 56ch; }

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center;
  margin-bottom: 2rem;
}

.proof-row {
  display: flex; flex-wrap: wrap; gap: 1.1rem 1.75rem;
  color: var(--muted);
  font-size: 0.9rem; font-weight: 500;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}
.proof-row strong { color: var(--ink); font-weight: 700; }
.proof-row span { display: inline-flex; align-items: center; gap: 0.4rem; }
.proof-row span::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok);
  display: inline-block;
}

/* Hero paste widget — thin redirect form into flagship tool */
.paste-widget {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.6rem 1.35rem;
  margin: 2rem 0 0;
  max-width: 640px;
}
.paste-widget::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0;
  height: 4px; border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--brand), #3b82f6, var(--navy));
}
.paste-widget label {
  display: block; font-size: 0.82rem; font-weight: 700;
  color: var(--ink); margin-bottom: 0.45rem;
  letter-spacing: 0.02em;
}
.paste-widget .input-row {
  display: flex; gap: 0.55rem;
}
.paste-widget input[type="url"] {
  flex: 1;
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  border-radius: 9px;
  padding: 0.9rem 1rem;
  font: inherit; font-size: 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.paste-widget input[type="url"]:focus {
  border-color: var(--ember);
  background: #fff;
  box-shadow: 0 0 0 4px var(--ember-ring);
}
.paste-widget .hint {
  display: block; margin-top: 0.7rem;
  font-size: 0.82rem; color: var(--muted);
}
.paste-widget .hint code { background: var(--paper-deep); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  font: inherit; font-weight: 700; font-size: 1rem;
  padding: 0.95rem 1.4rem;
  border: none; cursor: pointer;
  border-radius: 8px;
  text-decoration: none;
  transition: transform .12s, background .15s, color .15s, box-shadow .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: var(--brand);
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(4, 92, 180, 0.22);
}
.btn-primary:hover { background: var(--brand-hover); color: #fff !important; box-shadow: 0 10px 24px rgba(4, 92, 180, 0.28); }
.btn-dark {
  background: var(--ink);
  color: #fff !important;
}
.btn-dark:hover { background: var(--ink-soft); color: #fff !important; }
.btn-ghost {
  background: transparent;
  color: var(--ink) !important;
  border: 1.5px solid var(--line-strong);
}
.btn-ghost:hover { background: rgba(15, 23, 36, 0.04); border-color: var(--ink); color: var(--ink) !important; }
.btn-link {
  background: transparent; color: var(--brand) !important; padding: 0.4rem 0.2rem;
  font-weight: 700;
}
.btn-link:hover { color: var(--brand-hover) !important; text-decoration: underline; }

.btn-lg { padding: 1.1rem 1.6rem; font-size: 1.05rem; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- section scaffolding ---------- */
section { padding: clamp(3.5rem, 6vw, 5rem) 0; }
section.section-paper { background: var(--paper); }
section.section-ink   { background: var(--navy); color: #cbd5e1; }
section.section-ink h1, section.section-ink h2, section.section-ink h3 { color: #fff; }
section.section-ink p { color: #a4adbd; }
section.section-paper-deep { background: var(--paper-deep); }

.section-head { text-align: center; max-width: 60ch; margin: 0 auto 2.5rem; }
.section-head .eyebrow { margin-bottom: 0.8rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- card grids ---------- */
.cards-3 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.cards-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}
.cards-4 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
@media (max-width: 880px) {
  .cards-3, .cards-2, .cards-4 { grid-template-columns: 1fr; }
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.55rem;
  box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card h3 { margin-bottom: 0.45rem; }
.card p { color: var(--muted); font-size: 0.96rem; }

.card--numbered { padding-top: 2.6rem; }
.card--numbered .num {
  position: absolute; top: 1.15rem; left: 1.55rem;
  font-family: var(--font-display); font-weight: 700; font-style: italic;
  font-size: 1.05rem; color: var(--ember-hover);
}

/* ---------- value callouts ---------- */
.split-highlight {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem;
  align-items: center;
}
@media (max-width: 880px) { .split-highlight { grid-template-columns: 1fr; gap: 1.5rem; } }

.quote-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ember);
  border-radius: var(--radius);
  padding: 1.75rem 1.9rem;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--ink);
}
.quote-card footer {
  margin-top: 1rem;
  font-family: var(--font-body); font-style: normal;
  font-size: 0.88rem; color: var(--muted); font-weight: 500;
}

/* ---------- step list ---------- */
.steps-visual {
  display: grid; gap: 1rem;
  counter-reset: step;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem 1.5rem 4.5rem;
  position: relative;
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 1.5rem; top: 1.25rem;
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.6rem;
  color: var(--ember-hover);
}
.step h3 { margin-bottom: 0.3rem; }
.step p { color: var(--muted); font-size: 0.97rem; }
.step, .card, .paste-widget, .prose, .close-band { min-width: 0; overflow-wrap: break-word; }

/* ---------- FAQ accordion ---------- */
.faq-list {
  display: grid; gap: 0.7rem;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.faq-item[open] {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.4rem;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.5rem; color: var(--ember); line-height: 1;
  transition: transform .18s;
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "–"; transform: rotate(0deg); }
.faq-item .faq-answer {
  padding: 0 1.4rem 1.3rem;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.6;
}
.faq-item .faq-answer p + p { margin-top: 0.55rem; }
.faq-item .faq-answer a { color: var(--brand); font-weight: 600; }

/* ---------- CTA band (money close) ---------- */
.close-band {
  background: linear-gradient(180deg, #0b1f3a 0%, #071525 100%);
  color: #e2e8f0;
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
  position: relative; overflow: hidden;
}
.close-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 20% 0%, rgba(4, 92, 180, 0.28), transparent 60%);
  pointer-events: none;
}
.close-band h2 { color: #fff; margin-bottom: 0.65rem; }
.close-band .lede { color: #cbd5e1; margin: 0 auto 1.75rem; }
.close-band .hero-actions { justify-content: center; }
.close-band small { display: block; margin-top: 1.2rem; color: #94a3b8; font-size: 0.85rem; }

/* ---------- content pages (how-it-works, about, legal) ---------- */
.content-head {
  padding: clamp(2.5rem, 5vw, 4rem) 0 2rem;
}
.content-head h1 { max-width: 20ch; margin-bottom: 0.9rem; }
.content-head p.lede { margin-bottom: 0.4rem; }
.content-head .meta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--muted); font-size: 0.85rem;
  padding-top: 1.15rem;
  border-top: 1px dashed var(--line);
  margin-top: 1.5rem;
}

.prose { max-width: 70ch; font-size: 1.02rem; line-height: 1.75; color: var(--body); }
.prose h2 { margin-top: 2.5rem; margin-bottom: 0.7rem; font-size: 1.6rem; }
.prose h3 { margin-top: 1.6rem; margin-bottom: 0.3rem; font-size: 1.15rem; font-family: var(--font-body); font-weight: 700; letter-spacing: 0; }
.prose p  { margin-bottom: 1rem; color: var(--body); }
.prose ul, .prose ol { margin: 0.5rem 0 1.25rem 1.6rem; }
.prose li { margin-bottom: 0.45rem; color: var(--body); }
.prose code { background: var(--paper-deep); }
.prose .callout {
  background: var(--brand-soft);
  border: 1px solid #c9def5;
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin: 1.5rem 0;
  font-size: 0.98rem;
}
.prose .callout strong { color: var(--ink); }
.prose .callout--brand {
  background: var(--brand-soft);
  border-color: #c9def5;
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 4rem;
  background: linear-gradient(180deg, #0b1f3a 0%, #071525 100%);
  color: #94a3b8;
}
.footer-main {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 1.1fr 1fr;
  gap: 2.5rem 2rem;
  padding: 3.5rem 0 2.5rem;
}
@media (max-width: 1000px) {
  .footer-main { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
}
@media (max-width: 560px) {
  .footer-main { grid-template-columns: 1fr; }
}
.footer-brand { display: inline-flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; color: inherit; }
.footer-brand:hover { color: inherit; text-decoration: none; }
.footer-mark { display: inline-flex; }
.footer-mark svg { width: 40px; height: 40px; display: block; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-brand-text strong {
  display: block; font-family: var(--font-display); font-weight: 700;
  color: #fff; font-size: 1.05rem; letter-spacing: -0.01em; line-height: 1;
}
.footer-brand-text span {
  display: block; font-size: 0.72rem; color: #7dd3fc; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; margin-top: 3px;
}
.footer-about { font-size: 0.9rem; line-height: 1.65; color: #94a3b8; margin-bottom: 1rem; max-width: 36ch; }
.footer-addr  { font-size: 0.84rem; line-height: 1.55; color: #cbd5e1; }
.footer-col h4 {
  color: #fff; font-family: var(--font-body); font-weight: 800;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 0.95rem;
}
.footer-col ul { list-style: none; display: grid; gap: 0.55rem; }
.footer-col li a { color: #94a3b8; font-size: 0.9rem; }
.footer-col li a:hover { color: #fff; }
.footer-muted-line { color: #94a3b8; font-size: 0.9rem; line-height: 1.6; margin-bottom: 0.9rem; max-width: 32ch; }
.footer-cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff !important;
  padding: 0.6rem 1rem; border-radius: 8px;
  font-size: 0.88rem; font-weight: 700;
  transition: background .15s;
}
.footer-cta:hover { background: var(--brand-hover); color: #fff !important; text-decoration: none; }

.footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 1.15rem 0;
}
.footer-disclaimer p {
  font-size: 0.82rem; line-height: 1.55; color: #94a3b8;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 1.1rem 0 1.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 1.5rem;
  font-size: 0.82rem; color: #94a3b8;
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.footer-bottom a { color: #cbd5e1; }
.footer-bottom a:hover { color: #fff; }

/* ---------- utility ---------- */
.mt-0  { margin-top: 0 !important; }
.mt-05 { margin-top: 0.5rem !important; }
.mt-1  { margin-top: 1rem !important; }
.mt-2  { margin-top: 2rem !important; }
.mb-05 { margin-bottom: 0.5rem !important; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* ---------- reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
