/* ============================================================
   dragonfin — shared stylesheet
   Owner: any dragonfin.org page. Heike can rework any layer:
     1. tokens  — recolour by editing :root
     2. type    — swap font-family + letter-spacing
     3. atoms   — .brand-mark, .hero-scene, .section-icon are inline SVGs
     4. layout  — .hero, .section-band, grid rules live here
   Everything downstream inherits — a single-token change ripples.
   ============================================================ */

/* ---- 1. design tokens ---- */
:root {
  /* Water + office palette */
  --bg:          #f7fafc;   /* cool paper */
  --bg-card:     #ffffff;   /* pure white lift */
  --bg-alt:      #eef7fa;   /* section wash — pale water */
  --bg-deep:     #e0f2f7;   /* deeper wash */
  --text:        #0f2138;   /* deep midnight body */
  --heading:     #164e63;   /* deep water for h2/h3 */
  --heading-hi:  #0e3a4d;   /* h1 heavier */
  --muted:       #5b6b7c;
  --dim:         #90a0b0;
  --accent:      #0891b2;   /* teal — cutting through water */
  --accent-hover:#0e7490;
  --accent-soft: #cffafe;
  --accent-deep: #164e63;
  --border:      #e2e8f0;
  --ok:          #059669;
  --shadow-sm:   0 1px 2px rgba(15,33,56,0.04);
  --shadow:      0 1px 2px rgba(15,33,56,0.04),
                 0 4px 12px rgba(15,33,56,0.05);
  --shadow-hover:0 2px 4px rgba(15,33,56,0.06),
                 0 8px 24px rgba(15,33,56,0.08);
  --shadow-hero: 0 10px 40px rgba(8,145,178,0.12);
  --radius:      10px;
  --radius-lg:   14px;
  --radius-xl:   20px;
}

/* ---- 2. reset + base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'InterVariable', 'Inter', system-ui, -apple-system,
               BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI',
               Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: 'ss01', 'cv11', 'kern';
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
strong { color: var(--text); font-weight: 600; }

/* <main> wrapper — used by legal pages (Terms/Privacy/Support/Contact).
   Homepage uses full-bleed .hero + .section-band directly on body, no <main>. */
main {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}

/* ---- 3. typography ---- */
h1 {
  font-family: 'New York', 'Palatino', 'Palatino Linotype', Georgia, ui-serif, serif;
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -0.022em;
  color: var(--heading-hi);
  line-height: 1.02;
  font-style: normal;
}
h2 {
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 12px;
}
h2 .section-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex-shrink: 0;
}
h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
p { margin-bottom: 14px; color: var(--text); }
p.lede { font-size: 1.12rem; color: var(--text); line-height: 1.7; }
p.small { font-size: 0.85rem; color: var(--muted); }
ul, ol { padding-left: 22px; margin-bottom: 14px; }
li { margin-bottom: 6px; color: var(--text); }

/* ---- 4. hero — full-bleed with SVG scene ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 24px 48px;
  background: linear-gradient(180deg, #ffffff 0%, var(--accent-soft) 55%, var(--bg-deep) 100%);
  isolation: isolate;
}
.hero-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.brand-mark {
  width: 52px;
  height: 52px;
  color: var(--accent);
  flex-shrink: 0;
  filter: drop-shadow(0 3px 8px rgba(8,145,178,0.25));
}
.tagline {
  font-size: 1.2rem;
  color: var(--heading);
  max-width: 620px;
  margin: 24px auto 0;
  line-height: 1.55;
  letter-spacing: -0.005em;
  font-weight: 400;
}
.status {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.75rem;
  margin-top: 26px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(8,145,178,0.25);
}
.hero-cta {
  display: inline-block;
  margin-top: 14px;
  margin-left: 8px;
  padding: 8px 20px;
  background: white;
  color: var(--accent-hover);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s;
  text-decoration: none;
}
.hero-cta:hover {
  background: var(--accent);
  color: white;
  text-decoration: none;
}

/* ---- 5. section bands (full-bleed backgrounds) ---- */
.section-band {
  padding: 56px 24px;
  position: relative;
}
.section-band.wash { background: var(--bg-alt); }
.section-band.wash-deep { background: var(--bg-deep); }
.section-band.hero-cta-band {
  background: linear-gradient(135deg, var(--accent-deep) 0%, var(--accent) 100%);
  color: white;
  padding: 64px 24px;
}
.section-band.hero-cta-band h2 { color: white; border-color: rgba(255,255,255,0.2); }
.section-band.hero-cta-band h2 .section-icon { color: white; }
.section-band.hero-cta-band p { color: rgba(255,255,255,0.9); }
.section-band.hero-cta-band .cta {
  background: rgba(255,255,255,0.95);
  border-color: rgba(255,255,255,0.3);
}
.section-band.hero-cta-band .cta h3 { color: var(--heading); }
.section-band.hero-cta-band .cta p { color: var(--muted); }

.section-inner {
  max-width: 820px;
  margin: 0 auto;
}

/* wave dividers between bands */
.wave-between {
  display: block;
  width: 100%;
  height: 40px;
  margin: 0;
  color: var(--bg-alt);
}

/* ---- 6. freemium callout ---- */
.freemium {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  margin: 32px auto 0;
  max-width: 720px;
  text-align: center;
  box-shadow: var(--shadow-hero);
  position: relative;
  z-index: 2;
}
.freemium .headline {
  font-family: 'New York', 'Palatino', 'Palatino Linotype', Georgia, ui-serif, serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--heading-hi);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.15;
}
.freemium .headline .accent { color: var(--accent); font-style: italic; }
.freemium .sub {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.6;
}
.freemium .sub strong { color: var(--text); font-weight: 600; }

/* ---- 7. steps ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.step:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.step .num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(8,145,178,0.25);
}
.step h3 { color: var(--heading); font-size: 1.1rem; margin-bottom: 10px; }
.step p { font-size: 0.94rem; color: var(--muted); margin-bottom: 0; line-height: 1.6; }

/* ---- 8. tiers ---- */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}
@media (max-width: 720px) { .tiers { grid-template-columns: 1fr; } }
.tier {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  position: relative;
}
.tier:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.tier.featured { border-color: var(--accent); border-width: 2px; }
.tier.featured::before {
  content: "Most chosen";
  position: absolute;
  top: -12px;
  right: 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: white;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(8,145,178,0.3);
}
.tier h3 { color: var(--heading); font-size: 1.2rem; margin-bottom: 4px; font-weight: 600; }
.tier .price {
  font-family: 'New York', 'Palatino', 'Palatino Linotype', Georgia, ui-serif, serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}
.tier .price small { font-size: 0.7rem; color: var(--muted); font-weight: 400; margin-left: 2px; font-family: inherit; }
.tier .who { color: var(--muted); font-size: 0.88rem; margin: 10px 0 16px; font-style: italic; }
.tier ul { list-style: none; font-size: 0.93rem; padding-left: 0; margin-bottom: 0; }
.tier ul li {
  padding-left: 22px;
  position: relative;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.5;
}
.tier ul li:before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 9px; height: 9px;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  border-radius: 50%;
}
.pricing-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 24px;
  text-align: center;
}

/* ---- 9. principles — always 2×2 ---- */
.principles {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
  padding-left: 0;
  margin-bottom: 0;
}
@media (max-width: 620px) { .principles { grid-template-columns: 1fr; } }
.principles li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  font-size: 0.94rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
  box-shadow: var(--shadow);
  position: relative;
  padding-left: 60px;
  transition: box-shadow 0.15s ease;
}
.principles li:hover { box-shadow: var(--shadow-hover); }
.principles li .prin-icon {
  position: absolute;
  left: 20px;
  top: 20px;
  width: 26px;
  height: 26px;
  color: var(--accent);
}
.principles li strong {
  color: var(--heading);
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 1rem;
}

/* ---- 10. deadline table ---- */
.deadline-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 24px;
  margin-top: 20px;
  box-shadow: var(--shadow);
}
.deadline-box table { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
.deadline-box td { padding: 14px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.deadline-box tr:last-child td { border-bottom: none; }
.deadline-box td:first-child {
  color: var(--accent-hover);
  font-weight: 600;
  white-space: nowrap;
  width: 140px;
}
.deadline-box td:last-child { color: var(--text); }
.deadline-box strong { color: var(--heading); font-weight: 700; }

/* ---- 11. CTA ---- */
.cta {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  text-align: center;
  margin-top: 24px;
  box-shadow: var(--shadow-hero);
}
.cta h3 { color: var(--heading); margin-bottom: 12px; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.005em; }
.cta p { color: var(--muted); font-size: 0.98rem; margin-bottom: 0; }
.cta a { font-weight: 600; }
.cta code {
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 6px;
  color: var(--accent-hover);
  font-size: 0.9rem;
  border: 1px solid var(--border);
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  font-weight: 500;
}

/* ---- 12. legal-page shared components ---- */
/* (main wrapper is styled globally above — no dedicated wrap class needed) */
.doc-title {
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}
.last-updated {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-hover);
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  margin-top: 14px;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 18px 22px;
  border-radius: var(--radius);
  margin: 20px 0;
  color: var(--text);
  box-shadow: var(--shadow);
}
.callout strong { color: var(--accent-hover); }
.contact-block, .company, .card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 22px 26px;
  border-radius: var(--radius-lg);
  margin: 20px 0;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}
.card h3 {
  color: var(--heading);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 10px;
}
.company { border-left: 4px solid var(--accent); }
.legal-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.legal-header a.brand {
  color: var(--heading-hi);
  text-decoration: none;
  font-family: 'New York', 'Palatino', 'Palatino Linotype', Georgia, ui-serif, serif;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.legal-header a.brand:hover { text-decoration: none; }
.legal-header .brand-mark { width: 36px; height: 36px; color: var(--accent); }
.legal-body h2:first-of-type { margin-top: 32px; }

/* ---- 13. footer ---- */
/* Legal pages: <footer> sits inside <main> which already max-widths + pads
   → footer just needs top-border rule + centering, NOT max-width or padding.
   Homepage: <footer> sits inside <div class="footer-band"> which handles
   the outer band; footer itself is centered. */
footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.8;
  padding-top: 28px;
  margin-top: 40px;
  border-top: 1px solid var(--border);
}
.footer-band {
  background: var(--bg);
  border-top: 1px solid var(--border);
  margin-top: 0;
}
.footer-band footer {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 24px;
  border-top: none;   /* the band itself already has the top border */
}
footer strong { color: var(--heading); }
footer .legal-links { margin-top: 12px; }
footer .legal-links a { color: var(--muted); }
footer .legal-links a:hover { color: var(--accent); }
footer .meta {
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--dim);
}
footer .meta a { color: var(--dim); }
