/* ==========================================================================
   The Last Wish — Design System (custom, no framework dependency)
   ========================================================================== */

:root {
  --bg: #0b0c0f;
  --bg-alt: #131519;
  --surface: #191c21;
  --surface-2: #20242b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f3efe8;
  --text-muted: #aca79f;
  --text-faint: #79766f;
  --accent: #c6a15b;
  --accent-bright: #ddb96f;
  --accent-soft: rgba(198, 161, 91, 0.14);
  --accent-ink: #241b0c;
  --ok: #7fb88a;
  --ok-soft: rgba(127, 184, 138, 0.12);
  --warn: #d99a5b;
  --warn-soft: rgba(217, 154, 91, 0.12);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 64px -24px rgba(0, 0, 0, 0.65);
  --shadow-sm: 0 12px 32px -16px rgba(0, 0, 0, 0.5);
  --container: 1160px;
  --container-narrow: 780px;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-bright); }
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 0.6em; color: var(--text); }
p { margin: 0 0 1em; color: var(--text-muted); }
ul, ol { color: var(--text-muted); padding-left: 1.3em; }
li { margin-bottom: 0.5em; }
strong { color: var(--text); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 1.5rem; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 10px 18px; z-index: 9999; border-radius: 0 0 8px 0; font-weight: 600; }
.skip-link:focus { left: 0; top: 0; }

a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

.btn { display: inline-flex; align-items: center; gap: 0.5em; font-family: var(--font-body); font-weight: 600; letter-spacing: 0.01em; border-radius: 999px; padding: 0.85rem 1.9rem; border: 1px solid transparent; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease; font-size: 0.98rem; }
.btn-sm { padding: 0.55rem 1.3rem; font-size: 0.88rem; }
.btn-lg { padding: 1rem 2.3rem; font-size: 1.05rem; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 28px -10px rgba(198,161,91,0.5); }
.btn-primary:hover { background: var(--accent-bright); border-color: var(--accent-bright); color: var(--accent-ink); transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(198,161,91,0.6); }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Header / nav ------------------------------------------------------ */

.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(11,12,15,0.85); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1rem 1.5rem; }
.brand { font-family: var(--font-display); font-size: 1.35rem; color: var(--text); letter-spacing: 0.01em; }
.brand:hover { color: var(--accent); }
.nav-links { list-style: none; display: flex; gap: 1.8rem; margin: 0; padding: 0; }
.nav-links a { color: var(--text-muted); font-size: 0.95rem; }
.nav-links a:hover { color: var(--accent); }
.nav-cta { display: flex; gap: 0.75rem; align-items: center; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.4rem; cursor: pointer; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta .btn-outline { display: none; }
  .nav-toggle { display: block; }
  .nav-row.is-open .nav-links { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-alt); padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); gap: 1rem; }
}

/* ---- Layout rhythm ------------------------------------------------------ */

section { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); }
.kicker { display: inline-block; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 0.75rem; }
.section-head { max-width: 640px; margin: 0 auto 2.5rem; text-align: center; }
.section-head.align-left { margin-left: 0; text-align: left; }
.lede { font-size: 1.12rem; color: var(--text-muted); }

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

.hero { padding: 4.5rem 0 5rem; background: radial-gradient(ellipse 60% 55% at 20% 15%, var(--accent-soft), transparent 60%), var(--bg); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
.badge-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.25rem; }
.pill { display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; padding: 0.4rem 0.9rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); }
.hero h1 { font-size: clamp(2rem, 3.4vw, 2.9rem); margin-bottom: 1.1rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; }
.hero-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* ---- Grids / cards -------------------------------------------------------- */

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .hero-grid { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.9rem; box-shadow: var(--shadow-sm); }
.card-icon { font-size: 1.6rem; margin-bottom: 0.75rem; }
.card h3, .card h4 { margin-bottom: 0.5em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

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

.steps { display: flex; flex-direction: column; gap: 1.5rem; }
.step { display: flex; gap: 1.25rem; align-items: flex-start; }
.step-num { flex: 0 0 auto; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-bright); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.step h4 { margin-bottom: 0.35em; }
.step p { margin: 0; }

/* ---- Evidence split --------------------------------------------------------- */

.evidence-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.5rem; }
@media (max-width: 900px) { .evidence-split { grid-template-columns: 1fr; } }
.evidence-col { border-radius: var(--radius); padding: 1.75rem; border: 1px solid var(--border); }
.evidence-col.supports { background: var(--ok-soft); border-color: rgba(127,184,138,0.3); }
.evidence-col.limits { background: var(--warn-soft); border-color: rgba(217,154,91,0.3); }
.evidence-col h3 { font-size: 1.05rem; margin-bottom: 0.9rem; }
.evidence-col ul { margin: 0; padding-left: 1.2em; }
.evidence-col li { color: var(--text); font-size: 0.96rem; }

.callout { border-radius: var(--radius-sm); padding: 1.25rem 1.5rem; border: 1px solid var(--border); background: var(--surface); margin: 1.5rem 0; }
.callout-caution { background: var(--warn-soft); border-color: rgba(217,154,91,0.3); }
.callout p, .callout li { color: var(--text); }
.callout p:last-child { margin-bottom: 0; }

.source-list { font-size: 0.9rem; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.5rem; }
.source-list ul { margin: 0.5rem 0 0; padding-left: 1.2em; }
.source-list li { margin-bottom: 0.6em; }

/* ---- Pros / cons ------------------------------------------------------------- */

.pros-cons, .pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 900px) { .pros-cons, .pc-grid { grid-template-columns: 1fr; } }
.card.pros { border-color: rgba(127,184,138,0.3); }
.card.cons { border-color: rgba(217,154,91,0.3); }

/* ---- Table (deliverables etc) ------------------------------------------------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
thead th { text-align: left; background: var(--surface-2); color: var(--text); padding: 0.9rem 1.2rem; font-family: var(--font-display); font-weight: 500; }
tbody td { padding: 0.9rem 1.2rem; border-top: 1px solid var(--border); color: var(--text-muted); }
tbody tr:nth-child(even) { background: var(--surface); }

/* ---- FAQ (native details/summary) --------------------------------------------- */

.faq-list { display: flex; flex-direction: column; gap: 0.9rem; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.faq-q { list-style: none; cursor: pointer; padding: 1.1rem 1.4rem; display: flex; align-items: center; justify-content: space-between; font-weight: 600; color: var(--text); }
.faq-q::-webkit-details-marker { display: none; }
.faq-q .sign { color: var(--accent); transition: transform .2s ease; flex: 0 0 auto; margin-left: 1rem; }
.faq-item[open] .faq-q .sign { transform: rotate(45deg); }
.faq-a { padding: 0 1.4rem 1.3rem; }
.faq-a p { margin: 0; color: var(--text-muted); }

/* ---- Trust strip / band ----------------------------------------------------------- */

.trust-strip { padding: 1.75rem 0; background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust-item { text-align: center; font-size: 0.92rem; color: var(--text-muted); font-weight: 500; }

.band { background: linear-gradient(135deg, var(--surface-2), var(--bg-alt)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---- Related links grid ------------------------------------------------------------- */

.related-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .related-links { grid-template-columns: 1fr; } }
.related-links a { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: border-color .18s ease, transform .18s ease; }
.related-links a:hover { border-color: var(--accent); transform: translateY(-2px); }
.rl-label { display: block; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--accent); margin-bottom: 0.4rem; font-weight: 600; }
.related-links strong { display: block; color: var(--text); margin-bottom: 0.4rem; font-family: var(--font-display); font-weight: 500; }
.related-links .desc { font-size: 0.88rem; color: var(--text-muted); }

/* ---- Final CTA ------------------------------------------------------------------------ */

.final-cta { text-align: center; max-width: 640px; margin: 0 auto; }
.final-cta h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }

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

.site-footer { background: var(--bg); border-top: 1px solid var(--border); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h5 { color: var(--text); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.6rem; }
.footer-grid a { color: var(--text-muted); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--accent); }
.footer-disclaimer { font-size: 0.82rem; color: var(--text-faint); border-top: 1px solid var(--border); padding-top: 1.5rem; margin-bottom: 1rem; }
.footer-disclaimer a { color: var(--text-faint); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; font-size: 0.82rem; color: var(--text-faint); }

/* ---- Misc ------------------------------------------------------------------------------- */

.two-col { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 2.5rem; align-items: center; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.two-col img { border-radius: var(--radius); box-shadow: var(--shadow-sm); }

.scroll-top { position: fixed; right: 1.25rem; bottom: 1.25rem; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); border: none; font-size: 1.1rem; cursor: pointer; box-shadow: var(--shadow-sm); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 900; }
.scroll-top.is-visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { transform: translateY(-3px); }

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

@media (max-width: 640px) {
  section { padding: 3.25rem 0; }
  .footer-grid { grid-template-columns: 1fr; }
}
