/* Same palette as the app (static/app.css). */
:root {
  --paper: #efe6d4;
  --sheet: #fbf7ee;
  --ink: #1c1915;
  --muted: #5e574c;
  --line: #ddcfb4;
  --spruce: #234237;
  --spruce-deep: #163028;
  --brass: #8a5e2a;
  --cream: #f3ecdf;
  --plan-blue: #1565c0;
  --done-red: #c62828;
  --serif: "Liberation Serif", "Nimbus Roman", "DejaVu Serif", Palatino, Georgia, serif;
  --sans: "Liberation Sans", "Nimbus Sans", "DejaVu Sans", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

.wrap {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 .6rem;
  color: var(--brass);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.4rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
.btn-primary { background: var(--spruce); color: var(--sheet); box-shadow: 0 6px 18px rgba(22, 48, 40, .25); }
.btn-primary:hover { background: var(--spruce-deep); }
.btn-light { background: var(--sheet); color: var(--spruce-deep); }
.btn-ghost { border-color: var(--line); color: var(--spruce-deep); background: transparent; }
.btn-ghost:hover { background: var(--sheet); }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--spruce-deep);
  color: var(--sheet);
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
}
.brand img { width: 36px; height: 36px; }
.brand strong { font-family: var(--serif); font-size: 1.3rem; }
.top nav { display: flex; align-items: center; gap: 1.4rem; }
.top nav a.link { text-decoration: none; opacity: .85; }
.top nav a.link:hover { opacity: 1; }
.top .btn { padding: .55rem 1rem; }

/* Hero */
.hero {
  padding: 4.5rem 0 3rem;
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(35, 66, 55, .12), transparent 70%),
    var(--paper);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.8rem);
  line-height: 1.05;
}
.hero .eyebrow { margin-bottom: 1.2rem; }
.hero h1 em { font-style: italic; color: var(--spruce); }
.hero .lede {
  max-width: 34rem;
  margin: 1.8rem 0 2.6rem;
  color: var(--muted);
  font-size: 1.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.frame {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem;
  box-shadow: 0 30px 60px -25px rgba(28, 25, 21, .35), 0 2px 0 rgba(255, 255, 255, .6) inset;
}
.crop { aspect-ratio: 1840 / 480; overflow: hidden; }
.frame-bar {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .9rem;
}
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.frame-bar span {
  margin-left: .6rem;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* Odontogram showcase */
.showcase { padding: 4.5rem 0; background: var(--spruce-deep); color: var(--sheet); }
.showcase .eyebrow { color: #d9b07a; }
.showcase h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); max-width: 40rem; margin-bottom: 2.2rem; }
.showcase .frame { padding: 1.4rem; }
.marks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-top: 2.2rem;
}
.mark {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid rgba(251, 247, 238, .14);
  border-radius: 12px;
}
.mark svg { flex: none; width: 42px; height: 42px; background: var(--sheet); border-radius: 4px; }
.mark strong { display: block; }
.mark p { margin: .2rem 0 0; color: #c9d3cd; font-size: .95rem; }

/* Accounts */
.accounts { padding: 4.5rem 0; background: var(--cream); border-bottom: 1px solid var(--line); }
.accounts-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center; }
.accounts h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.accounts .lede { color: var(--muted); font-size: 1.1rem; margin: 1rem 0 1.4rem; }
.pill {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: .9rem;
}
.pill > * {
  padding: .35rem .9rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.pill > * + * { border-left: 1px solid var(--line); }
.pill > [aria-pressed="true"], .pill > .on { background: var(--spruce); color: var(--cream); }
.pill > :focus-visible { outline: 3px solid var(--brass); outline-offset: -3px; }
.pill span { cursor: default; }
.totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: 1rem 0; }
.totals p { margin: 0; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff9; }
.totals span { display: block; color: var(--muted); font-size: .78rem; }
.totals strong { font-family: var(--serif); font-size: clamp(1.05rem, 3.6vw, 1.5rem); white-space: nowrap; }
.ledger { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ledger th, .ledger td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--line); }
.ledger tbody tr:last-child td { border-bottom: 0; }
.ledger thead th { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ledger .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ledger .due { color: var(--done-red); font-weight: 600; }
.sample { margin: .8rem 0 0; color: var(--muted); font-size: .8rem; }

/* Features */
.features { padding: 4.5rem 0; border-top: 1px solid var(--line); }
.section-head { max-width: 42rem; margin-bottom: 2.4rem; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: .8rem 0 0; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
}
.feature {
  padding: 1.5rem;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.feature .icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  border-radius: 10px;
  background: var(--cream);
  color: var(--spruce);
}
.feature h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.feature p { margin: 0; color: var(--muted); }

/* Plans */
.plans { padding: 4.5rem 0 5rem; background: var(--cream); border-bottom: 1px solid var(--line); }
.billing { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.billing .pill { background: var(--sheet); font-size: 1rem; }
.billing .pill > * { padding: .5rem 1.2rem; font-weight: 600; }
.billing .save { color: var(--brass); font-size: .9rem; font-weight: 700; }
.plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  align-items: stretch;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.6rem 1.6rem;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.plan.featured {
  background: var(--spruce-deep);
  color: var(--sheet);
  border-color: var(--spruce-deep);
  box-shadow: 0 30px 60px -30px rgba(22, 48, 40, .7);
}
.plan .badge {
  position: absolute;
  top: -13px;
  left: 1.6rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  background: var(--brass);
  color: var(--sheet);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.plan-icon { width: 46px; height: 46px; margin-bottom: 1rem; }
.plan h3 { font-size: 1.8rem; }
.plan .tagline { margin: .3rem 0 1.4rem; color: var(--muted); }
.plan.featured .tagline { color: #c9d3cd; }
.launch {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem .6rem;
  margin: 0 0 2.2rem;
  padding: .6rem 1rem;
  border: 1px dashed var(--brass);
  border-radius: 10px;
  background: var(--sheet);
}
.launch strong { color: var(--brass); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .35rem; margin: 0; }
.price s { flex-basis: 100%; color: var(--muted); font-size: 1rem; }
.plan.featured .price s { color: #c9d3cd; }
.price strong { font-family: var(--serif); font-size: 2.6rem; line-height: 1; letter-spacing: -0.02em; }
.price span { color: var(--muted); }
.price-note { margin: .35rem 0 1.4rem; min-height: 1.5em; color: var(--muted); font-size: .9rem; }
.plan.featured .price span, .plan.featured .price-note { color: #c9d3cd; }
.plan ul { list-style: none; margin: 0 0 1.8rem; padding: 0; display: grid; gap: .65rem; }
.plan li { display: flex; gap: .6rem; align-items: flex-start; }
.plan li svg { flex: none; margin-top: .2rem; }
.plan li.off { color: var(--muted); text-decoration: line-through; opacity: .6; }
.plan .btn { margin-top: auto; justify-content: center; }
.plan:not(.featured) .btn { background: var(--spruce); color: var(--sheet); }
.plan:not(.featured) .btn:hover { background: var(--spruce-deep); }

/* Final CTA */
.cta { padding: 5rem 0; text-align: center; }
.cta h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.cta .btn { margin-top: 2rem; }

footer {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1fr 1.15fr; }
  .plan-grid { grid-template-columns: repeat(3, 1fr); }
  .accounts-grid { grid-template-columns: 1fr 1.1fr; }
  .plan.featured { transform: translateY(-12px); }
}

@media (max-width: 640px) {
  .top nav a.link { display: none; }
  .hero { padding-top: 3rem; }
}

@media (max-width: 520px) {
  .ledger .when { display: none; }
  .frame .pill { font-size: .8rem; }
  .frame .pill > * { padding-inline: .6rem; }
}

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