/* =========================================================================
   Pulvio — "Dusk Ember" design system
   Dark theme only. Mobile-first. Single breakpoint at 720px.
   ========================================================================= */

:root {
  /* Color tokens */
  --bg:          #1a1118;
  --bg-top:      #2a1a21;
  --bg-deep:     #120a10;
  --card:        #251a22;
  --card-soft:   #31222c;
  --stroke:      rgba(242, 180, 140, 0.14);
  --text:        #f6ede9;
  --muted:       #b49c99;
  --faint:       #85716f;
  --accent:      #f2b48c;
  --button:      #d97e52;
  --button-lift: #e58f61;
  --button-text: #2b130a;
  --glow:        rgba(230, 140, 90, 0.26);
  --glow-soft:   rgba(230, 140, 90, 0.12);
  --moon:        #ffe9d6;
  --star:        #f4d4bc;
  --notice:      #e0a86a;
  --danger:      #e0655c;

  /* Layout */
  --w-text: 640px;
  --w-wide: 1040px;
  --pad:    20px;

  /* Type */
  --font-ui: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-accent: "Lora", Georgia, serif;
}

/* -------------------------------------------------------------------------
   Reset
   ------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image: linear-gradient(180deg,
    var(--bg-top) 0%,
    var(--bg) 44%,
    var(--bg-deep) 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }

ul, ol { padding: 0; list-style: none; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }

button { font: inherit; color: inherit; }

/* -------------------------------------------------------------------------
   Accessibility helpers
   ------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 12px 18px;
  background: var(--card-soft);
  color: var(--text);
  border: 1px solid var(--stroke);
  border-radius: 0 0 14px 0;
}
.skip-link:focus {
  left: 0;
  text-decoration: none;
}

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

/* -------------------------------------------------------------------------
   Background wash — layered radial gradients, fixed behind content
   ------------------------------------------------------------------------- */
.wash {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -8%,
      rgba(230, 140, 90, 0.42) 0%,
      rgba(230, 140, 90, 0.30) 9%,
      rgba(230, 140, 90, 0.18) 19%,
      rgba(230, 140, 90, 0.10) 30%,
      rgba(230, 140, 90, 0.04) 40%,
      transparent 48%);
}

/* Lighter wash on the legal pages */
body.page-legal .wash {
  background:
    radial-gradient(circle at 50% -10%,
      rgba(230, 140, 90, 0.24) 0%,
      rgba(230, 140, 90, 0.16) 10%,
      rgba(230, 140, 90, 0.09) 22%,
      rgba(230, 140, 90, 0.04) 34%,
      transparent 46%);
}

/* -------------------------------------------------------------------------
   Layout wrappers
   ------------------------------------------------------------------------- */
.wrap-wide,
.wrap-text {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--pad);
}
.wrap-wide { max-width: var(--w-wide); }
.wrap-text { max-width: var(--w-text); }

.section { padding-block: 52px; }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  max-width: var(--w-text);
}

/* -------------------------------------------------------------------------
   Typography
   ------------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: normal;
  color: var(--accent);
}

h1, h2, h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text);
}

h1 {
  font-size: 24px;
  line-height: 1.25;
}

h2 {
  font-size: 20px;
  line-height: 1.3;
}

h3 {
  font-size: 17px;
  line-height: 1.35;
}

.lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.fineprint {
  font-size: 13px;
  color: var(--faint);
}

/* -------------------------------------------------------------------------
   Top bar
   ------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(26, 17, 24, 0.92);
  border-bottom: 1px solid var(--stroke);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.2px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: auto; display: block; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle:hover { border-color: var(--accent); }

.nav {
  display: none;
}
.nav.is-open {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 2px;
  padding: 10px var(--pad) 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--stroke);
}
.nav a {
  padding: 12px 8px;
  color: var(--text);
  font-weight: 500;
  border-radius: 10px;
}
.nav a:hover { text-decoration: none; background: var(--card-soft); }

/* -------------------------------------------------------------------------
   Language switcher (native <details> disclosure)
   ------------------------------------------------------------------------- */
.lang { position: relative; }
.lang > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary::marker { content: ""; }
.lang > summary:hover { border-color: var(--accent); }
.lang > summary svg { width: 16px; height: 16px; color: var(--muted); }

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  min-width: 168px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  margin: 0;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 14px;
}
.lang-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.lang-menu a:hover { background: var(--card-soft); color: var(--text); text-decoration: none; }
.lang-menu a[aria-current="true"] { color: var(--accent); }

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 22px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  border-radius: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.btn:hover { text-decoration: none; }

.btn--primary {
  background: var(--button);
  color: var(--button-text);
  border-color: var(--button);
}
.btn--primary:hover { background: var(--button-lift); border-color: var(--button-lift); }

.btn--secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--stroke);
}
.btn--secondary:hover { border-color: var(--accent); background: rgba(242, 180, 140, 0.06); }

.btn svg { width: 18px; height: 18px; }

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 8%,
      rgba(230, 140, 90, 0.30) 0%,
      rgba(230, 140, 90, 0.18) 12%,
      rgba(230, 140, 90, 0.10) 24%,
      rgba(230, 140, 90, 0.04) 36%,
      transparent 50%);
}

.stars {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.star {
  position: absolute;
  border-radius: 999px;
  background: var(--star);
}
.star--twinkle { animation: twinkle 6s ease-in-out infinite; }

@keyframes twinkle {
  0%, 100% { opacity: 0.15; }
  50%      { opacity: 0.42; }
}

.hero-inner {
  display: grid;
  gap: 34px;
  padding-block: 44px 60px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: var(--w-text);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

/* Phone mockup */
.phone {
  justify-self: center;
  width: min(258px, 72vw);
  aspect-ratio: 9 / 19;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 28px;
  display: grid;
  place-items: center;
}
.moon-ring {
  position: relative;
  width: 74%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.moon-ring::before,
.moon-ring::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  border: 1px solid var(--stroke);
}
.moon-ring::before {
  inset: 0;
  background: radial-gradient(circle at 50% 44%,
    var(--glow) 0%,
    var(--glow-soft) 46%,
    transparent 72%);
}
.moon-ring::after { inset: 15%; }
.moon-ring-mark {
  position: relative;
  width: 62%;
  height: auto;
}

/* -------------------------------------------------------------------------
   Cards / grid
   ------------------------------------------------------------------------- */
.grid-3 {
  display: grid;
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 22px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

.card--soft { background: var(--card-soft); }

/* -------------------------------------------------------------------------
   How it works — numbered steps
   ------------------------------------------------------------------------- */
.steps {
  display: grid;
  gap: 16px;
  counter-reset: step;
}
.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 20px 22px;
}
.step-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  color: var(--moon);
  font-weight: 700;
  font-size: 17px;
  background: radial-gradient(circle at 50% 40%, var(--glow-soft) 0%, transparent 70%);
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 15px; }

/* -------------------------------------------------------------------------
   Free to start
   ------------------------------------------------------------------------- */
.pitch {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  padding: 26px 24px;
}
.pitch p { color: var(--muted); max-width: 46ch; }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.footer {
  margin-top: 40px;
  border-top: 1px solid var(--stroke);
  padding-block: 40px 48px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-tag { font-size: 13px; color: var(--faint); }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a { color: var(--muted); font-weight: 500; }
.footer-links a:hover { color: var(--text); }

.footer-legal {
  margin-top: 26px;
}
.footer-legal p {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--faint);
}

/* -------------------------------------------------------------------------
   Legal / prose pages
   ------------------------------------------------------------------------- */
.legal {
  padding-block: 40px 24px;
}
.legal-head {
  margin-bottom: 32px;
}
.legal-head .eyebrow { margin-bottom: 10px; }
.legal-head h1 { font-size: 26px; }
.legal-head .updated {
  margin-top: 8px;
  font-size: 14px;
  color: var(--faint);
}

.prose {
  font-size: 16px;
  line-height: 1.7;
}
.prose h2 {
  font-size: 20px;
  margin-top: 40px;
  margin-bottom: 12px;
}
.prose h3 {
  font-size: 17px;
  margin-top: 26px;
  margin-bottom: 8px;
}
.prose p { margin-bottom: 16px; color: var(--text); }
.prose p.muted { color: var(--muted); }
.prose ul {
  margin: 0 0 18px;
  padding-left: 22px;
  list-style: disc;
}
.prose li { margin-bottom: 8px; }
.prose a { text-decoration: underline; }

.callout {
  margin: 28px 0;
  padding: 18px 20px;
  background: var(--card-soft);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  color: var(--text);
}
.callout strong { color: var(--accent); }

/* -------------------------------------------------------------------------
   Breakpoint — 720px and up
   ------------------------------------------------------------------------- */
@media (min-width: 720px) {
  h1 { font-size: 32px; }
  h2 { font-size: 22px; }

  .legal-head h1 { font-size: 32px; }

  .section { padding-block: 72px; }

  .nav-toggle { display: none; }
  .nav {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .nav a {
    padding: 8px 12px;
    color: var(--muted);
    font-size: 15px;
  }
  .nav a:hover { color: var(--text); background: transparent; }

  .hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    padding-block: 88px 100px;
  }

  .grid-3 { grid-template-columns: repeat(3, 1fr); }

  .step { grid-template-columns: 48px 1fr; }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
  .footer-links {
    flex-direction: row;
    gap: 24px;
  }
}

/* -------------------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .star--twinkle { animation: none !important; }
}
