/* Thenly Landing Page — Almanac Design System (DESIGN.md)
   Palette: Spruce #123B33, Sage Paper #EEF1EA, Print White #FFFFFF, Sun #F3C53A, Ink #12211D
   Rules: Flat material (no card shadows), Never Cream, One Cover, One Sun, Tabular Numerals. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque_500Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque_700Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque_800ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #eef1ea;
  --print: #ffffff;
  --ink: #12211d;
  --ink-2: #4f5e59;
  --ink-3: #86938e;
  --separator: #d5dcd6;
  --fill: #e1e7e1;
  --spruce: #123b33;
  --cover-raised: #1c4a40;
  --on-cover: #f4f7f3;
  --on-cover-2: #a9c2b9;
  --sun: #f3c53a;
  --on-sun: #12211d;
  --chin: #a8741a;
  --skin: #8a4f7d;
  --part: #3a6fb5;
  --display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Cover (Spruce Hero + Nav) ---------- */
.cover {
  background: var(--spruce);
  color: var(--on-cover);
  padding-bottom: 56px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--on-cover);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.4px;
}

.brand-sun {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sun);
  display: inline-block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a:not(.btn) {
  color: var(--on-cover-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.nav-links a:not(.btn):hover {
  color: var(--on-cover);
}

.hero {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 40px;
  align-items: center;
  padding-top: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-cover-2);
}

.hero h1 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.06;
  letter-spacing: -1px;
  color: var(--on-cover);
}

.hero-sub {
  margin: 0 0 26px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--on-cover-2);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.hero-note {
  margin: 0;
  font-size: 13px;
  color: var(--on-cover-2);
}

/* ---------- Buttons (Capsule, Flat) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.2px;
  transition: opacity 0.15s ease;
}

.btn:hover { opacity: 0.86; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-light { background: var(--print); color: var(--ink); }
.btn-outline-cover {
  border: 1px solid rgba(244, 247, 243, 0.35);
  color: var(--on-cover);
  background: transparent;
}
.btn-primary { background: var(--spruce); color: var(--print); }
.btn-secondary { background: var(--fill); color: var(--ink); }

/* ---------- Almanac Preview Card (Hero Right) ---------- */
.almanac-card {
  background: var(--cover-raised);
  border: 1px solid rgba(244, 247, 243, 0.12);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.almanac-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.almanac-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.3px;
  color: var(--on-cover);
}

.almanac-aside {
  font-family: var(--display);
  font-weight: 500;
  font-size: 14px;
  color: var(--on-cover-2);
  font-variant-numeric: tabular-nums;
}

.fern-frame {
  background: var(--spruce);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fern-art {
  width: 100%;
  aspect-ratio: 1156 / 684;
  background-color: var(--sun);
  -webkit-mask: url("/assets/fern.png") center / contain no-repeat;
  mask: url("/assets/fern.png") center / contain no-repeat;
}

/* Season Band */
.season-band { display: flex; flex-direction: column; gap: 8px; }
.band-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 22px;
}
.tick {
  width: 4px;
  height: 12px;
  border-radius: 2px;
  background: rgba(244, 247, 243, 0.22);
}
.tick-past { background: var(--on-cover-2); }
.tick-photo { height: 18px; background: var(--on-cover); }
.tick-sun {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sun);
}
.tick-mark {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: var(--sun);
  transform: rotate(45deg);
}
.band-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--on-cover-2);
  font-variant-numeric: tabular-nums;
}
.band-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--on-cover);
}
.diamond {
  width: 7px;
  height: 7px;
  background: var(--sun);
  display: inline-block;
  transform: rotate(45deg);
}

.scale-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(244, 247, 243, 0.12);
}
.scale-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.scale-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.dot-chin { background: #e0a447; }
.dot-skin { background: #cf8ec2; }
.dot-part { background: #78a4ec; }
.scale-item strong {
  display: block;
  font-size: 13px;
  color: var(--on-cover);
  line-height: 1.25;
}
.scale-item span {
  font-size: 12px;
  color: var(--on-cover-2);
  font-variant-numeric: tabular-nums;
}

/* ---------- Main Sections on Sage Paper ---------- */
.section { padding: 56px 0 0; }
.section-tight { padding: 28px 0 0; }

.section-head {
  max-width: 660px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.6px;
  color: var(--ink);
}

.section-head p {
  margin: 0;
  font-size: 16px;
  color: var(--ink-2);
}

/* Sourced Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.stat-card {
  background: var(--print);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 18px;
}
.stat-num {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--spruce);
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.stat-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-2);
}

/* Feature Cards */
.group-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.group-card {
  background: var(--print);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.step-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  color: var(--spruce);
  font-variant-numeric: tabular-nums;
}
.group-card h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.3px;
}
.group-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}
.card-foot {
  margin-top: auto !important;
  padding-top: 12px;
  border-top: 1px solid var(--separator);
  font-size: 13px !important;
  color: var(--ink-2);
}

/* Interactive Compare Demo */
.demo-panel {
  background: var(--print);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 16px;
}
.wipe-box {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--spruce);
  user-select: none;
}
.wipe-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.wipe-then {
  border-right: 2px solid var(--sun);
}
.wipe-illustration {
  width: 100%;
  min-width: 100%;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--spruce);
  color: var(--on-cover);
}
.wipe-illustration-then {
  background: #1c4a40;
  width: 1000px;
  max-width: calc(100vw - 74px);
}
.wipe-badge {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(18, 33, 29, 0.72);
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
.wipe-metric { display: flex; flex-direction: column; gap: 4px; }
.wipe-big {
  font-family: var(--display);
  font-weight: 800;
  font-size: 32px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.wipe-desc { font-size: 14px; color: var(--on-cover-2); }
.mini-band {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 18px;
}
.mini-band .t { width: 4px; height: 10px; border-radius: 2px; background: rgba(244, 247, 243, 0.25); }
.mini-band .t.d { background: var(--on-cover-2); }
.mini-band .t.p { height: 16px; background: var(--on-cover); }
.mini-band .t.sun { width: 14px; height: 14px; border-radius: 50%; background: var(--sun); }
.mini-band .t.m { width: 7px; height: 7px; transform: rotate(45deg); background: var(--sun); }

.wipe-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--sun);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wipe-knob {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sun);
  color: var(--on-sun);
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}
.wipe-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.demo-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  font-size: 13px;
  color: var(--ink-2);
}
.text-link {
  color: var(--spruce);
  font-weight: 600;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

/* Inset Group (iOS style) */
.inset-group {
  background: var(--print);
  border: 1px solid var(--separator);
  border-radius: 14px;
  overflow: hidden;
}
.inset-row {
  padding: 18px 20px;
}
.inset-row + .inset-row {
  border-top: 1px solid var(--separator);
}
.inset-row strong {
  display: block;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 4px;
}
.inset-row p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
}

/* Web Preview vs iPhone Comparison */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.compare-card {
  background: var(--print);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.compare-card-primary {
  border: 2px solid var(--spruce);
}
.compare-card h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.4px;
}
.compare-card .muted { margin: 0; font-size: 15px; color: var(--ink-2); }
.pill-muted, .pill-spruce {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.pill-muted { background: var(--fill); color: var(--ink-2); }
.pill-spruce { background: var(--spruce); color: var(--print); }
.check-list {
  margin: 4px 0 8px;
  padding-left: 20px;
  color: var(--ink);
  font-size: 15px;
}
.check-list li { margin: 6px 0; }
.compare-card .btn { margin-top: auto; width: 100%; }

/* FAQ */
.faq-item {
  padding: 16px 20px;
}
.faq-item + .faq-item {
  border-top: 1px solid var(--separator);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--display);
  font-size: 20px;
  color: var(--ink-2);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.55;
}

/* Footer */
.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--separator);
  background: var(--print);
  padding: 32px 0 44px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.footer-brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  color: var(--spruce);
  text-decoration: none;
}
.footer-tag {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
}
.footer-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
}
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-disclaimer {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  padding-top: 16px;
  border-top: 1px solid var(--separator);
}

/* Responsive */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .group-list { grid-template-columns: 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nav-links a:not(.btn) { display: none; }
  .scale-strip { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
}
