/* ============================================================
   METABOLE — Clinical-calm design system
   ============================================================ */

:root {
  /* Surfaces */
  --paper:     #F4F1EA;
  --paper-2:   #EDE9DF;
  --surface:   #FCFBF7;
  --surface-2: #F7F4ED;

  /* Ink */
  --ink:    #1B201D;
  --ink-2:  #545B54;
  --ink-3:  #8A8F86;

  /* Lines */
  --line:   rgba(27,32,29,0.10);
  --line-2: rgba(27,32,29,0.06);

  /* Brand greens */
  --green:      #2E5A49;
  --green-deep: #1F4537;
  --green-700:  #264F40;
  --sage:       #7FA792;
  --mint:       #DDE7D6;
  --mint-2:     #CBD9C0;
  --mint-soft:  #EAF0E4;

  /* Warm clay accent */
  --clay:      #C2784B;
  --clay-deep: #A8623A;
  --clay-soft: #EDD6C2;

  /* Signal colors (used sparingly in app surfaces) */
  --amber: #C99A3D;
  --rose:  #B86A6A;

  /* Radii */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Shadows — soft, warm-tinted, low */
  --sh-1: 0 1px 2px rgba(31,38,33,0.04), 0 1px 1px rgba(31,38,33,0.03);
  --sh-2: 0 1px 2px rgba(31,38,33,0.04), 0 10px 28px -14px rgba(31,38,33,0.18);
  --sh-3: 0 2px 4px rgba(31,38,33,0.05), 0 24px 50px -20px rgba(31,38,33,0.26);
  --sh-float: 0 2px 6px rgba(31,38,33,0.05), 0 30px 60px -28px rgba(31,38,33,0.30);

  /* Type */
  --sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --serif: 'Instrument Serif', Georgia, serif;

  --maxw: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--mint-2); color: var(--green-deep); }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.04; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { position: relative; }

/* ---------- Type utilities ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--clay);
  display: inline-block;
}
.serif-em { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: 0; }
.mono { font-family: var(--mono); }

.display {
  font-size: clamp(40px, 6.4vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.h2 { font-size: clamp(30px, 4.2vw, 52px); letter-spacing: -0.03em; }
.h3 { font-size: clamp(21px, 2.4vw, 28px); letter-spacing: -0.02em; }
.lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); line-height: 1.5; }
.muted { color: var(--ink-2); }
.tiny { font-size: 13px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 600; font-size: 16px; letter-spacing: -0.01em;
  padding: 14px 22px; border-radius: var(--r-pill);
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .25s, background .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--green); color: #F4F1EA; box-shadow: var(--sh-2); }
.btn-primary:hover { background: var(--green-deep); box-shadow: var(--sh-3); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px rgba(27,32,29,0.22); background: rgba(27,32,29,0.02); }
.btn-light { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.btn-light:hover { box-shadow: var(--sh-2); transform: translateY(-1px); }
.btn-sm { padding: 10px 16px; font-size: 14px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  border: 1px solid var(--line-2);
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Pill / chip ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--surface); box-shadow: var(--sh-1);
  border: 1px solid var(--line-2);
}
.chip-mint { background: var(--mint-soft); color: var(--green-deep); border-color: transparent; }

/* ---------- Dividers / hairlines ---------- */
.hair { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Tag dot legend ---------- */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---------- App surface mini (floating cards) ---------- */
.appcard {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--sh-float);
  border: 1px solid var(--line-2);
  padding: 16px;
}

/* ---------- focus ---------- */
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 4px; }

/* ---------- noise/scrim helpers ---------- */
.glow-mint { background: radial-gradient(60% 60% at 50% 40%, rgba(127,167,146,0.22), transparent 70%); }

/* ---------- float animation for hero cards ---------- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes floaty2 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
.float-a { animation: floaty 7s ease-in-out infinite; }
.float-b { animation: floaty2 8.5s ease-in-out infinite; }
.float-c { animation: floaty 9s ease-in-out infinite 0.5s; }
@media (prefers-reduced-motion: reduce) { .float-a, .float-b, .float-c { animation: none; } }

/* ---------- nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: background .3s, box-shadow .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: color-mix(in oklab, var(--paper) 80%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom-color: var(--line); }
.navlink { font-size: 15px; color: var(--ink-2); font-weight: 500; transition: color .2s; }
.navlink:hover { color: var(--ink); }

/* ---------- marquee ---------- */
.marquee { display: flex; gap: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 44px; padding-right: 44px; white-space: nowrap; animation: scrollx 32s linear infinite; }
@keyframes scrollx { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- feature tab ---------- */
.ftab { text-align: left; padding: 16px 18px; border-radius: 14px; transition: background .2s; display: flex; gap: 13px; align-items: flex-start; width: 100%; }
.ftab:hover { background: var(--surface-2); }
.ftab.on { background: var(--surface); box-shadow: var(--sh-2); }

/* ---------- faq ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 4px; width: 100%; text-align: left; font-size: clamp(17px,2vw,20px); font-weight: 600; letter-spacing: -0.01em; }
.faq-a { overflow: hidden; transition: height .35s cubic-bezier(.3,.8,.3,1); }

/* ---------- pricing ---------- */
.price-card { padding: 30px; border-radius: var(--r-xl); transition: transform .3s, box-shadow .3s; }
.price-card:hover { transform: translateY(-4px); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hide-mobile { display: none !important; }
}

/* ---------- responsive: tablet & mobile layout ---------- */
@media (max-width: 768px) {
  .wrap { padding: 0 20px; }

  /* Collapse two-column section layouts to a single stacked column */
  .m-hero-grid,
  .m-explorer-grid,
  .m-split,
  .m-estimator-body,
  .m-report-body,
  .m-pricing-grid { grid-template-columns: 1fr !important; }

  .m-split { gap: 32px !important; }
  .m-pricing-grid { max-width: 440px !important; }

  /* Multi-column card grids → two-up on small screens */
  .m-feature-grid,
  .m-privacy-grid,
  .m-footer-grid { grid-template-columns: 1fr 1fr !important; }

  /* Footer brand block spans the full row above the link columns */
  .m-footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .m-feature-grid,
  .m-privacy-grid { grid-template-columns: 1fr !important; }
}
