/*
 * Herbora marketing site — shared styles.
 * Tokens mirror src/constants/theme.ts (Brand palette) so web and app look like one product.
 */

:root {
  --green-900: #1e3a26;
  --green-700: #2e5e3a;
  --green-500: #4e8c5a;
  --green-100: #e6f0e8;
  --mint: #9be0a8;
  --cream: #fafaf7;
  --sage: #eaf1ea;
  --amber: #fbefd9;
  --amber-fg: #b6791f;

  --text: #1a1a1a;
  --text-dim: #5c6560;
  --bg: var(--cream);
  --surface: #ffffff;
  --border: #e0e0d9;

  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --font-serif: Fraunces, "Iowan Old Style", Georgia, "Times New Roman", serif;

  --wrap: 1080px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 6px 24px rgba(30, 58, 38, 0.09);
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f5f7f4;
    --text-dim: #b0b6ae;
    --bg: #16261c;
    --surface: #22372a;
    --border: #33493b;
    --green-100: #2e4a38;
    --sage: #22372a;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.32);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-serif); font-weight: 700; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: 1.16rem; font-family: var(--font-sans); font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.dim { color: var(--text-dim); }
.small { font-size: 0.9rem; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-head .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; font-size: 1.08rem; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--mint); display: grid; place-items: center; flex: none;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.nav a { text-decoration: none; font-size: 0.95rem; font-weight: 500; color: var(--text-dim); }
.nav a:hover { color: var(--text); }
/* Small screens: never hide destinations — let the row scroll horizontally instead. */
@media (max-width: 820px) {
  .site-head .wrap { gap: 14px; }
  .nav {
    gap: 18px; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; font-size: 0.9rem; }
  .brand { font-size: 1rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px;
  font-weight: 700; font-size: 0.97rem; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-900); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--green-500); }
.btn-mint { background: var(--mint); color: var(--green-900); }

/* ---------- hero ---------- */
.hero {
  background: var(--green-900);
  color: #fff;
  padding: clamp(72px, 12vw, 128px) 0 clamp(88px, 13vw, 140px);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(720px 380px at 78% 12%, rgba(155, 224, 168, 0.16), transparent 68%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; max-width: 880px; }
.hero h1 { color: #fff; }
.hero .lede { font-size: clamp(1.08rem, 2.1vw, 1.3rem); color: #cfe3d4; max-width: 620px; margin: 22px 0 34px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--mint); background: rgba(155, 224, 168, 0.13);
  border: 1px solid rgba(155, 224, 168, 0.3);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 26px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.store-note { color: #9fb3a5; font-size: 0.88rem; margin-top: 20px; }

/* ---------- sections ---------- */
section { padding: clamp(64px, 9vw, 104px) 0; }
/* Sticky header is 68px tall — keep anchor targets clear of it. */
section[id] { scroll-margin-top: 84px; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head p { color: var(--text-dim); font-size: 1.06rem; margin-top: 14px; }
.alt { background: var(--sage); }

/* ---------- feature grid ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.card .ico {
  width: 42px; height: 42px; border-radius: 12px; background: var(--green-100);
  display: grid; place-items: center; margin-bottom: 16px; color: var(--green-700);
}
@media (prefers-color-scheme: dark) { .card .ico { color: var(--mint); } }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 0.97rem; margin: 0; }

/* ---------- evidence strip ---------- */
.tiers { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tier { font-size: 0.82rem; font-weight: 700; padding: 6px 14px; border-radius: 999px; }
.tier-strong { background: var(--green-100); color: var(--green-700); }
.tier-mod { background: var(--amber); color: var(--amber-fg); }
.tier-lim { background: #eee; color: #6b7280; }
.tier-trad { background: var(--sage); color: var(--green-500); }

/* ---------- pricing ---------- */
.plans { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); max-width: 780px; }
.plan { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 30px; }
.plan.featured { border-color: var(--green-500); position: relative; }
.badge {
  position: absolute; top: -13px; left: 30px; background: var(--mint); color: var(--green-900);
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; padding: 4px 11px; border-radius: 999px;
}
.price { font-family: var(--font-serif); font-size: 2.5rem; font-weight: 700; margin: 10px 0 2px; }
.price span { font-family: var(--font-sans); font-size: 0.95rem; font-weight: 500; color: var(--text-dim); }
.plan ul { list-style: none; padding: 0; margin: 20px 0 0; }
.plan li { padding-left: 26px; position: relative; margin-bottom: 10px; font-size: 0.97rem; }
.plan li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--green-500); font-weight: 800;
}

/* ---------- safety callout ---------- */
.callout {
  border-left: 4px solid var(--amber-fg); background: var(--amber);
  color: #4a3413; border-radius: var(--radius-sm);
  padding: 24px 28px; max-width: 780px;
}
.callout h3 { color: #4a3413; margin-bottom: 8px; }
.callout p { margin: 0; font-size: 0.98rem; }

/* ---------- footer ---------- */
.site-foot { background: var(--green-900); color: #cfe3d4; padding: 60px 0 40px; font-size: 0.94rem; }
.foot-grid { display: grid; gap: 34px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.site-foot h4 { color: #fff; font-size: 0.82rem; letter-spacing: 0.09em; text-transform: uppercase; margin: 0 0 14px; }
.site-foot a { color: #cfe3d4; text-decoration: none; display: block; margin-bottom: 9px; }
.site-foot a:hover { color: var(--mint); }
.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  margin-top: 44px; padding-top: 26px; color: #8fa894; font-size: 0.86rem;
}

/* ---------- legal / doc pages ---------- */
.doc { padding: clamp(48px, 7vw, 80px) 0 96px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin-bottom: 10px; }
.doc h2 { font-size: 1.35rem; margin: 44px 0 12px; }
.doc h3 { margin: 26px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc .updated { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 8px; }
.doc table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.94rem; }
.doc th, .doc td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc th { font-weight: 700; }
.doc code {
  background: var(--sage); border: 1px solid var(--border); border-radius: 6px;
  padding: 1px 6px; font-size: 0.9em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--text-dim); text-decoration: none; font-size: 0.93rem; margin-bottom: 26px; }
.back:hover { color: var(--text); }

/* ---------- phone mockups (app page) ---------- */
.shots {
  display: grid; gap: 26px; margin-top: 44px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.phone {
  border-radius: 30px; padding: 8px; background: #12211a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 44px rgba(30, 58, 38, 0.22);
}
.phone img, .phone .placeholder {
  display: block; width: 100%; aspect-ratio: 9 / 19.5;
  border-radius: 23px; object-fit: cover; background: var(--sage);
}
/* Shown when a screenshot has not been dropped in yet. */
.phone .placeholder {
  display: grid; place-items: center; text-align: center; padding: 20px;
  color: var(--text-dim); font-size: 0.84rem; line-height: 1.45;
  border: 1.5px dashed var(--border);
}
.shot-cap { text-align: center; font-size: 0.9rem; color: var(--text-dim); margin-top: 12px; }

/* Alternating feature rows with a screenshot beside the copy */
.split { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.flip .split-media { order: -1; }
}
.split-media { max-width: 300px; margin: 0 auto; width: 100%; }
.split h2 { margin-bottom: 14px; }
.split p { color: var(--text-dim); }
.split + .split { margin-top: clamp(56px, 8vw, 96px); }

/* ---------- blog ---------- */
.posts { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.post-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  text-decoration: none; color: inherit;
}
.post-card:hover { border-color: var(--green-500); }
.post-meta { font-size: 0.82rem; color: var(--text-dim); letter-spacing: 0.03em; text-transform: uppercase; font-weight: 600; }
.post-card h3 { font-family: var(--font-serif); font-size: 1.32rem; margin: 12px 0 10px; line-height: 1.25; }
.post-card p { color: var(--text-dim); font-size: 0.96rem; margin: 0; }
.post-card .more { margin-top: 18px; font-weight: 700; font-size: 0.92rem; color: var(--green-700); }
@media (prefers-color-scheme: dark) { .post-card .more { color: var(--mint); } }

/* Article body */
.article .wrap { max-width: 720px; }
.article h1 { margin-bottom: 14px; }
.article .post-meta { margin-bottom: 30px; display: block; }
.article p, .article li { font-size: 1.05rem; }
.article blockquote {
  margin: 28px 0; padding: 4px 0 4px 22px;
  border-left: 3px solid var(--green-500);
  font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.5;
}
.article hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
