/*
 * SwiftQuest storefront (accounts-paywall AP02). The app's own colours and type
 * (apps/web/src/styles/tokens.css), so the site and the product read as one thing.
 * No web fonts, no scripts, nothing loaded from anywhere but this site.
 */

:root {
  --ink: #f4f5f7;
  --ink-dim: #aeb4bf;
  --ink-faint: #9098a6;
  --bark-900: #17191d;
  --bark-800: #202329;
  --bark-700: #292d34;
  --bark-600: #333842;
  --bay: #14161a;
  --torch: #f05138;
  --torch-text: #f67056;
  --ember: #ff7a59;
  --moss: #22c55e;
  --moss-text: #4ade80;
  --sky: #60a5fa;
  --violet: #a78bfa;
  --ocean: #071f2d;
  --font-lettering: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 10px;
  --wide: 1120px;
  --read: 68ch;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bark-900);
  color: var(--ink);
  font: 17px/1.6 var(--font-body);
  font-variant-ligatures: none;
}

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

a { color: var(--torch-text); text-underline-offset: 3px; }
a:hover { color: var(--ember); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 4px; }

code, kbd { font-family: var(--font-lettering); font-size: 0.9em; background: var(--bark-600); border: 1px solid #6b7280; border-radius: 5px; padding: 0.05em 0.35em; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bark-900); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
/* Reading width for prose, keeping the page's left edge. */
.read > * { max-width: var(--read); }

/* Header */
.site-head { border-bottom: 1px solid var(--bark-700); background: var(--bark-800); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--torch-text); font: 700 21px/1 var(--font-lettering); }
.brand img { width: 36px; height: 36px; }
.site-nav { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.site-nav a { color: var(--ink-dim); text-decoration: none; padding: 10px 12px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: var(--bark-700); }

/* Type */
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 0; }
h3 { font-size: 1.15rem; }
.lead { font-size: 1.2rem; color: var(--ink-dim); max-width: 60ch; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font: 600 0.9rem/1 var(--font-body); color: var(--torch-text); border: 1px solid var(--torch); border-radius: 999px; padding: 7px 12px; margin-bottom: 18px; }
.muted { color: var(--ink-dim); }
.small { font-size: 0.92rem; }

/* Sections */
section { padding: 64px 0; }
section + section { border-top: 1px solid var(--bark-700); }
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero-shot { border: 1px solid var(--bark-600); border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); }

.actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 8px; font-weight: 700; text-decoration: none; border: 2px solid transparent; }
.button.primary { background: var(--torch); color: var(--bark-900); }
.button.primary:hover { background: var(--ember); color: var(--bark-900); }
.button.quiet { border-color: #6b7280; color: var(--ink); }
.button.quiet:hover { background: var(--bark-700); color: var(--ink); }
.badge { display: inline-block; font: 600 0.8rem/1 var(--font-body); padding: 5px 8px; border-radius: 6px; border: 1px solid; }
.badge.free { color: var(--moss-text); border-color: var(--moss); background: rgba(34, 197, 94, 0.12); }
.badge.pro { color: var(--torch-text); border-color: var(--torch); background: rgba(240, 81, 56, 0.12); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; margin: 32px 0 0; padding: 0; list-style: none; }
.steps li { background: var(--bark-800); border: 1px solid var(--bark-700); border-radius: var(--radius); padding: 22px; counter-increment: step; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--torch); color: var(--bark-900); font: 700 1rem/1 var(--font-lettering); margin-bottom: 12px; }
.steps p { margin: 0; color: var(--ink-dim); }

.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 36px; align-items: start; }
.shots figure { margin: 0; }
.shots img { border: 1px solid var(--bark-600); border-radius: var(--radius); }
.shots figcaption { color: var(--ink-dim); font-size: 0.95rem; margin-top: 10px; }

/* Islands */
.islands { display: grid; grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); gap: 18px; margin: 32px 0 0; padding: 0; list-style: none; }
.island { background: var(--ocean); border: 1px solid #0a3347; border-radius: var(--radius); padding: 12px 14px 16px; }
/* Protected art: whole-number scale, no filter, no crop (docs/PROTECTED_ISLANDS.md). */
.island img { width: 256px; height: 192px; image-rendering: pixelated; margin: 0 auto; }
.island .num { font: 600 0.8rem/1 var(--font-lettering); color: var(--ink-faint); }
.island h3 { margin: 6px 0 4px; }
.island p { margin: 0; color: var(--ink-dim); font-size: 0.95rem; }
.island .badge { margin-top: 10px; }

.points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 36px; margin-top: 28px; }
.points h3 { color: var(--ink); }
.points p { margin: 0; color: var(--ink-dim); }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 60px; }
.plan { background: var(--bark-800); border: 1px solid var(--bark-700); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid transparent; background: linear-gradient(var(--bark-800), var(--bark-800)) padding-box, conic-gradient(from var(--angle), var(--torch), #ffb39e, var(--torch) 30%, #8a2f1f 55%, var(--torch) 80%, #ffb39e) border-box; animation: orbit 5s linear infinite; box-shadow: 0 0 0 0 rgba(240, 81, 56, 0); }
.plan h2 { font-size: 1.3rem; margin-bottom: 4px; }
.price { font: 700 2.4rem/1.1 var(--font-lettering); margin: 14px 0 2px; }
.price small { font: 500 1rem/1 var(--font-body); color: var(--ink-dim); margin-left: 0.5em; }
.plan ul { padding-left: 1.1em; margin: 18px 0 0; color: var(--ink-dim); }
.plan li { margin: 6px 0; }
.plan .note { margin-top: auto; padding-top: 18px; font-size: 0.92rem; color: var(--ink-faint); }

.panel { background: var(--bark-800); border: 1px solid var(--bark-700); border-radius: var(--radius); padding: 22px 26px; }
.callout { border-left: 4px solid var(--torch); background: rgba(240, 81, 56, 0.08); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; }

/* Legal pages */
.legal { padding: 48px 0 72px; }
.legal h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2.2em; padding-top: 0.2em; }
.legal h3 { font-size: 1.05rem; margin-top: 1.6em; }
.legal p, .legal li { color: #d5d9e0; }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal li { margin: 6px 0; }
.legal table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 0.95rem; }
.legal th, .legal td { border: 1px solid var(--bark-600); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal th { background: var(--bark-800); }
.legal .updated { color: var(--ink-faint); }
.toc { background: var(--bark-800); border: 1px solid var(--bark-700); border-radius: var(--radius); padding: 14px 22px; margin: 24px 0; }
.toc ol { margin: 8px 0 0; }
.form { white-space: pre-wrap; font-family: var(--font-lettering); font-size: 0.9rem; background: var(--bay); border: 1px solid var(--bark-600); border-radius: var(--radius); padding: 16px 18px; }

/* FAQ */
.faq dt { font-weight: 700; margin-top: 22px; }
.faq dd { margin: 6px 0 0; color: var(--ink-dim); }

/* Expandable sections */
.folds { margin-top: 18px; }
details.fold { border: 1px solid var(--bark-700); border-radius: var(--radius); background: var(--bark-800); margin: 10px 0; transition: border-color .2s; }
details.fold[open] { border-color: var(--bark-600); }
details.fold > summary { list-style: none; cursor: pointer; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; border-radius: var(--radius); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary:hover { background: var(--bark-700); }
details.fold > summary h2, details.fold > summary h3, details.fold > summary h4 { margin: 0; font-size: 1.08rem; padding: 0; color: var(--ink); }
.details-title { margin: 44px 0 4px; font-size: 1.2rem; }
details.fold > summary::after { content: ''; flex: none; width: 9px; height: 9px; margin-right: 4px; border-right: 2px solid var(--ink-dim); border-bottom: 2px solid var(--ink-dim); transform: rotate(45deg); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
details.fold[open] > summary::after { transform: rotate(225deg); }
details.fold .fold-body { padding: 2px 20px 16px; }
details.fold .fold-body > :first-child { margin-top: 0; }
details.fold .fold-body > :last-child { margin-bottom: 0; }
.legal details.fold h2 { margin-top: 0; }
.fold-tools { display: flex; gap: 14px; margin: 20px 0 6px; }
.link-button { background: none; border: 0; padding: 8px 0; min-height: 44px; color: var(--torch-text); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { color: var(--ember); }
.lead-legal { font-size: 1.1rem; color: var(--ink); }
@supports (interpolate-size: allow-keywords) {
  details.fold { interpolate-size: allow-keywords; }
  details.fold::details-content { block-size: 0; overflow: clip; transition: block-size .35s cubic-bezier(.2, .8, .2, 1), content-visibility .35s allow-discrete; }
  details.fold[open]::details-content { block-size: auto; }
}

.after-plans { margin-top: 22px; }
.point { padding-top: 6px; }

/* Contact */
.contact-hero { padding: 64px 0 48px; }
.mail-card { margin-top: 32px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; background: linear-gradient(135deg, var(--bark-800), #26292f); border: 1px solid var(--bark-600); border-radius: 16px; padding: 26px 28px; max-width: 760px; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.mail-icon, .topic-icon { display: inline-grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 14px; background: rgba(240, 81, 56, .14); color: var(--torch-text); }
.mail-icon svg, .topic-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mail-text { flex: 1 1 260px; }
.mail-label { margin: 0; color: var(--ink-dim); font-size: .95rem; }
.mail-address { margin: 2px 0 0; font: 700 clamp(1.25rem, 3vw, 1.7rem)/1.2 var(--font-lettering); }
.mail-address a { color: var(--ink); text-decoration: none; }
.mail-address a:hover { color: var(--torch-text); }
.topics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 28px; }
.topic { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 14px; background: var(--bark-800); border: 1px solid var(--bark-700); color: var(--ink); text-decoration: none; transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s, box-shadow .25s; }
.topic:hover { color: var(--ink); transform: translateY(-4px); border-color: var(--bark-600); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.topic-icon { width: 48px; height: 48px; border-radius: 12px; }
.topic-icon svg { width: 24px; height: 24px; }
.topic-title { font-weight: 700; font-size: 1.1rem; margin-top: 6px; }
.topic-text { color: var(--ink-dim); }
.topic-go { margin-top: auto; padding-top: 6px; color: var(--torch-text); font-weight: 600; }
.topic:hover .topic-go { color: var(--ember); }

/* The white swift */
.swift { position: absolute; top: 0; left: 0; z-index: 30; width: 64px; height: 64px; cursor: pointer; transform-origin: 50% 50%; will-change: transform; -webkit-tap-highlight-color: transparent; }
.swift svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* Motion. All of it is decoration, and none of it plays under reduced motion. */
@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes orbit { to { --angle: 360deg; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(240, 81, 56, .55); } 80%, 100% { box-shadow: 0 0 0 9px rgba(240, 81, 56, 0); } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 22px 0 rgba(240, 81, 56, .10); } 50% { box-shadow: 0 0 36px 4px rgba(240, 81, 56, .22); } }

.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--torch); animation: pulse 2.2s ease-out infinite; }
.hero-text > * { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.hero-text > :nth-child(2) { animation-delay: .08s; }
.hero-text > :nth-child(3) { animation-delay: .16s; }
.hero-text > :nth-child(4) { animation-delay: .24s; }
.hero-shot { animation: rise .8s .2s cubic-bezier(.2, .8, .2, 1) both, float 7s 1.2s ease-in-out infinite; }
.contact-hero .wrap > * { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.contact-hero .wrap > :nth-child(2) { animation-delay: .08s; }
.contact-hero .wrap > :nth-child(3) { animation-delay: .16s; }
.contact-hero .wrap > :nth-child(4) { animation-delay: .26s; }

/* A reveal is a one-off animation that lets go when it ends, so hover can still lift a card. */
html.js [data-reveal]:not(.in) { opacity: 0; }
html.js [data-reveal].in { animation: rise .7s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 80ms); }
.section-title::after { content: ''; display: block; width: 56px; height: 3px; margin-top: 12px; border-radius: 2px; background: var(--torch); transform-origin: left; transform: scaleX(0); transition: transform .8s .2s cubic-bezier(.2, .8, .2, 1); }
.section-title.in::after, html:not(.js) .section-title::after { transform: scaleX(1); }

.button { transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s, background .18s; position: relative; overflow: hidden; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button.primary:hover { box-shadow: 0 10px 24px rgba(240, 81, 56, .3); }
.button.primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .38) 50%, transparent 70%); transform: translateX(-120%); }
.button.primary:hover::after { transform: translateX(120%); transition: transform .75s ease; }

.steps li { transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s; }
.steps li:hover { transform: translateY(-4px); border-color: var(--bark-600); }
.steps li.in::before { animation: pop .5s calc(var(--i, 0) * 80ms + .25s) cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

.island { transition: transform .3s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .3s; }
.island:hover { transform: translateY(-5px); border-color: #105068; box-shadow: 0 16px 36px rgba(0, 0, 0, .45); }
.island:hover img { animation: bob 1.8s ease-in-out infinite; }

.plan { transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s; }
.plan:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(0, 0, 0, .4); }
html.js .plan.featured.in { animation: rise .7s cubic-bezier(.2, .8, .2, 1) backwards, orbit 5s linear infinite, glow 3.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 80ms), 0s, 0s; }
.price { transition: color .3s; }
.plan:hover .price { color: #fff; }

.shots figure img { transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; }
.shots figure:hover img { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(0, 0, 0, .45); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js [data-reveal]:not(.in) { opacity: 1; }
  .section-title::after { transform: scaleX(1); }
}

@media (max-width: 700px) {
  .topics { grid-template-columns: 1fr; }
  .mail-card { padding: 22px; }
}

/* Footer */
.site-foot { border-top: 1px solid var(--bark-700); background: var(--bark-800); padding: 36px 0 48px; color: var(--ink-faint); font-size: 0.92rem; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 14px; }
.site-foot nav a { color: var(--ink-dim); min-height: 44px; display: inline-flex; align-items: center; }
.site-foot p { margin: 6px 0; }

@media (max-width: 900px) {
  .hero-grid, .shots, .points, .plans { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-nav { margin-left: 0; }
  section { padding: 44px 0; }
}
