/* Divvy landing — hand-rolled CSS, no frameworks, no external fonts.
   Palette is the Divvy brand theme (Teal anchor, Mint accent, off-white
   #F8FAFC light surface and #042F2E dark slate). */

:root {
  /* Divvy brand palette (brand/ "Settle Ring", concept 02). */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-variant: #e7efee;
  --text: #0b1f1d;
  --muted: #5b6b76;
  --primary: #0f766e;
  --primary-strong: #115e59;
  --primary-soft: #ccfbf1;
  --on-primary: #ffffff;
  --accent: #2dd4bf;
  --coral: #f97316;
  --border: #e2e8f0;
  --error: #b3261e;
  --shadow: 0 1px 2px rgb(4 47 46 / 0.06), 0 8px 24px -12px rgb(4 47 46 / 0.18);
  --radius: 10px;
  --maxw: 1080px;

  /* Logo lockup (symbol + outlined wordmark) — theme-aware. */
  --logo-symbol-fg: #0f766e;
  --logo-symbol-accent: #2dd4bf;
  --logo-word: #0f766e;
  --logo-dot: #2dd4bf;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #042f2e;
    --surface: #063a38;
    --surface-variant: #0a4644;
    --text: #e6f4f1;
    --muted: #9cc7c3;
    --primary: #2dd4bf;
    --primary-strong: #5eead4;
    --primary-soft: #0e4f4a;
    --on-primary: #042f2e;
    --accent: #2dd4bf;
    --coral: #fb923c;
    --border: #14504b;
    --error: #f2b8b5;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -12px rgb(0 0 0 / 0.6);

    --logo-symbol-fg: #2dd4bf;
    --logo-symbol-accent: #f8fafc;
    --logo-word: #f8fafc;
    --logo-dot: #2dd4bf;
  }
}

:root[data-theme="dark"] {
  --bg: #042f2e;
  --surface: #063a38;
  --surface-variant: #0a4644;
  --text: #e6f4f1;
  --muted: #9cc7c3;
  --primary: #2dd4bf;
  --primary-strong: #5eead4;
  --primary-soft: #0e4f4a;
  --on-primary: #042f2e;
  --accent: #2dd4bf;
  --coral: #fb923c;
  --border: #14504b;
  --error: #f2b8b5;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -12px rgb(0 0 0 / 0.6);

  --logo-symbol-fg: #2dd4bf;
  --logo-symbol-accent: #f8fafc;
  --logo-word: #f8fafc;
  --logo-dot: #2dd4bf;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  background: var(--surface);
  padding: 8px 16px;
  z-index: 100;
}
.skip:focus { inset-inline-start: 8px; top: 8px; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.logo:hover { text-decoration: none; }
/* Settle Ring symbol (inline SVG, theme-aware via CSS variables). */
.logo .mark {
  width: 30px;
  height: 30px;
  flex: none;
  display: block;
  overflow: visible;
}
.logo .mark .arc { stroke: var(--logo-symbol-fg); }
.logo .mark .arc-accent { stroke: var(--logo-symbol-accent); }
/* Outlined "Divvy" wordmark (Manrope 800), mint i-dot. */
.logo .word {
  height: 22px;
  width: auto;
  display: block;
}
.logo .word .glyph { fill: var(--logo-word); }
.logo .word .dot { fill: var(--logo-dot); }

nav.main {
  margin-inline-start: auto;
  display: flex;
  gap: 4px;
  align-items: center;
}

nav.main a {
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
}
nav.main a:hover {
  color: var(--text);
  background: var(--surface-variant);
  text-decoration: none;
}

.theme-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.theme-btn:hover { background: var(--surface-variant); }

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  margin-left: auto;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  nav.main {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px;
  }
  nav.main.open { display: flex; }
}

/* ---------- hero ---------- */

.hero {
  padding: 72px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
}

.pill {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
  line-height: 1.08;
  margin: 16px 0 12px;
  letter-spacing: -0.02em;
}

.tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--primary);
  font-weight: 600;
  margin: 0 0 14px;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 54ch;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-strong); text-decoration: none; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-variant); text-decoration: none; }

.platforms {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.platforms span {
  font-size: 0.82rem;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 12px;
}

/* hero mock card (pure HTML/CSS, no images) */

.mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 20px;
  transform: rotate(1.2deg);
}
@media (max-width: 860px) { .mock { transform: none; } }

.mock-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.mock-head strong { font-size: 1rem; }
.mock-head small { color: var(--muted); }

.mock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-variant);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.92rem;
}
.mock-row .amt { font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.mock-row .sub { color: var(--muted); font-size: 0.78rem; }

.mock-split {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  border: 1px dashed var(--primary);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-strong);
}

/* ---------- sections ---------- */

section { padding: 56px 0; }
section.alt { background: var(--surface); border-block: 1px solid var(--border); }

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.section-sub { color: var(--muted); margin: 0 0 36px; max-width: 62ch; }

/* steps */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  counter-reset: step;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
}
section.alt .step { background: var(--bg); }
.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.step h3 { margin: 0 0 6px; font-size: 1.02rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* features */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
section.alt .feature { background: var(--bg); }
.feature .ic {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.feature .ic svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 6px; font-size: 1.02rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* split demo */

.demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--shadow);
}
@media (max-width: 760px) { .demo { grid-template-columns: 1fr; } }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent);
}

.result {
  background: var(--primary-soft);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.result .per {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--primary-strong);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.result .meta { color: var(--muted); font-size: 0.9rem; }
.result .note { color: var(--muted); font-size: 0.8rem; margin-top: 8px; }

/* footer */

footer.site {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* privacy article */

article.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}
article.doc h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
article.doc h2 {
  font-size: 1.25rem;
  margin: 34px 0 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
article.doc p, article.doc li { color: var(--muted); font-size: 0.97rem; }
article.doc strong { color: var(--text); }
article.doc ul { padding-inline-start: 20px; }
article.doc .meta { color: var(--muted); font-size: 0.85rem; }

/* reveal on scroll */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* privacy teaser band */
.teaser { text-align: center; max-width: 640px; margin: 0 auto; }
.teaser .section-sub { margin-inline: auto; }


/* ---------- language selector (header) ---------- */

.lang-select {
  height: 38px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 0 6px;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
}
.lang-select:hover { background: var(--surface-variant); }
.lang-select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
