/* ===========================================================================
   nurseryOS public marketing site — "El Herbario" editorial system.

   A self-contained stylesheet (no Tailwind build dependency) that mirrors the
   storefront's botanical-archive aesthetic: cream paper surfaces, ink-on-cream
   type, Fraunces serif display, JetBrains Mono labels, hairline rules, and
   botanic-green / sepia accents. Used by the landing, blog and register pages.
   Palette + primitives mirror frontend/tailwind.config.js + globals.css.
   =========================================================================== */

:root {
  --paper: #f0e9d8;
  --paper-2: #ebe4d2;
  --paper-3: #e2d9c2;
  --surface: #faf5e8;
  --surface-2: #ffffff;
  --ink: #1a1814;
  --ink-2: #4a4338;
  --ink-3: #7a7060;
  --ink-4: #a89e8a;
  --hair: #d8cfb8;
  --hair-strong: #beb39a;
  --hair-soft: #e8dfc8;
  --botanic: #2f4f38;
  --botanic-2: #4a7c59;
  --sepia: #7a3a22;
  --stamp: #872d22;
  --gold: #997a3a;

  --font-disp: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --wrap: 1200px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* --- type primitives ----------------------------------------------------- */
.disp {
  font-family: var(--font-disp);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.98;
  font-feature-settings: 'ss01';
}
.mono { font-family: var(--font-mono); letter-spacing: 0; }
.smallcap {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-3);
}
.italic { font-style: italic; }
.botanic { color: var(--botanic); }
.ink-2 { color: var(--ink-2); }
.ink-3 { color: var(--ink-3); }

/* --- layout -------------------------------------------------------------- */
.eh-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .eh-wrap { padding: 0 56px; } }
.eh-rule { border-top: 1px solid var(--hair); }

/* --- buttons / tags ------------------------------------------------------ */
.eh-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 500;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background .16s, border-color .16s, color .16s;
}
.eh-btn:hover { background: var(--botanic); border-color: var(--botanic); color: var(--surface); }
.eh-btn .arr { font-family: var(--font-mono); }
.eh-btn-secondary { background: transparent; color: var(--ink); }
.eh-btn-secondary:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.eh-btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); padding-left: 6px; }
.eh-btn-ghost:hover { background: transparent; border-color: transparent; color: var(--ink); }

.eh-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-2);
  border: 1px solid var(--hair);
  color: var(--ink-2);
}
.eh-tag-botanic { color: var(--botanic); border-color: var(--botanic); }
.eh-tag-sepia { color: var(--sepia); border-color: var(--sepia); }
.eh-stamp {
  display: inline-block;
  transform: rotate(-2deg);
  border: 1px dashed var(--stamp);
  color: var(--stamp);
  border-radius: 2px;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* --- topbar -------------------------------------------------------------- */
.eh-topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(240, 233, 216, 0.88);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--hair);
}
.eh-topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 60px;
}
.eh-brand { display: flex; flex-direction: column; line-height: 1; }
.eh-brand .name { font-family: var(--font-disp); font-style: italic; font-size: 23px; color: var(--ink); }
.eh-brand .sub { margin-top: 4px; font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); }
.eh-nav { display: flex; align-items: center; gap: 22px; }
.eh-nav a { font-size: 12.5px; font-weight: 500; color: var(--ink-2); transition: color .15s; }
.eh-nav a:hover { color: var(--ink); }
.eh-nav .cta { padding: 9px 16px; background: var(--ink); color: var(--paper); border-radius: 2px; }
.eh-nav .cta:hover { background: var(--botanic); color: var(--surface); }
.eh-lang { display: inline-flex; gap: 2px; }
.eh-lang button {
  background: none; border: none; cursor: pointer; padding: 4px 6px;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-4);
}
.eh-lang button.active { color: var(--botanic); font-weight: 600; }
@media (max-width: 720px) { .eh-nav .nav-link { display: none; } }

/* --- hero ---------------------------------------------------------------- */
.eh-hero { padding-top: 40px; padding-bottom: 32px; }
.eh-hero-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-top: 1px solid var(--hair-strong); padding-top: 14px;
}
.eh-hero h1 {
  margin: 26px 0 0;
  font-family: var(--font-disp); font-weight: 400;
  font-size: clamp(46px, 8.5vw, 116px); line-height: 0.92; letter-spacing: -0.035em;
  color: var(--ink);
}
.eh-hero h1 em { display: block; font-style: italic; color: var(--botanic); }
.eh-hero .sub { margin: 26px 0 0; max-width: 30rem; font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }
.eh-hero .actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px; }
.eh-hero .stats { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.eh-hero .stats b { color: var(--ink-2); font-weight: 600; }

/* --- section header ------------------------------------------------------ */
.eh-sechead {
  display: grid; grid-template-columns: 1fr; gap: 12px; align-items: end;
  border-bottom: 1px solid var(--hair); padding: 48px 0 20px;
}
@media (min-width: 768px) { .eh-sechead { grid-template-columns: 84px 1fr auto; gap: 32px; } }
.eh-sechead .num { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--ink-3); }
.eh-sechead h2 { margin: 0; font-family: var(--font-disp); font-weight: 400; font-size: clamp(28px, 4.2vw, 44px); line-height: 1; letter-spacing: -0.025em; }
.eh-sechead h2 em { font-style: italic; color: var(--botanic); }
.eh-sechead .note { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
@media (min-width: 768px) { .eh-sechead .note { text-align: right; } }

/* --- editorial entries (features / roadmap) ------------------------------ */
.eh-entries { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--hair); border: 1px solid var(--hair); margin-top: 28px; }
@media (min-width: 768px) { .eh-entries.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.eh-entry { background: var(--surface); padding: 28px 26px; }
.eh-entry .idx { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-4); }
.eh-entry h3 { margin: 14px 0 0; font-family: var(--font-disp); font-weight: 400; font-size: 22px; line-height: 1.05; }
.eh-entry .phase { margin-bottom: 12px; }
.eh-entry p { margin: 10px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }

/* --- gallery grid + cards (blog index) ----------------------------------- */
.eh-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); margin-top: 28px; }
@media (min-width: 640px) { .eh-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .eh-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.eh-card { display: flex; flex-direction: column; gap: 10px; background: var(--surface); padding: 14px; transition: background .15s; }
.eh-card:hover { background: var(--surface-2); }
.eh-card-img { position: relative; aspect-ratio: 4 / 5; width: 100%; overflow: hidden; border-radius: 1px; background: var(--paper-3); display: flex; align-items: center; justify-content: center; }
.eh-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.eh-card:hover .eh-card-img img { transform: scale(1.04); }
.eh-card-img .ph { font-family: var(--font-disp); font-style: italic; font-size: 26px; color: var(--ink-4); }
.eh-card .meta { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); }
.eh-card .meta .grade { color: var(--botanic); }
.eh-card .title { font-family: var(--font-disp); font-size: 16px; line-height: 1.1; }
.eh-card .sci { font-size: 12.5px; font-style: italic; color: var(--ink-3); }
.eh-card .more { margin-top: auto; padding-top: 4px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-2); }
.eh-card:hover .more { color: var(--ink); }

/* --- article (blog detail) ----------------------------------------------- */
.eh-article { max-width: 880px; margin: 0 auto; padding: 28px 24px 0; }
.eh-back { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.eh-back:hover { color: var(--ink); }
.eh-article .tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 14px; }
.eh-article h1 { margin: 0; font-family: var(--font-disp); font-weight: 400; font-size: clamp(34px, 5.5vw, 60px); line-height: 0.98; letter-spacing: -0.03em; }
.eh-article .sci { margin-top: 10px; font-family: var(--font-disp); font-style: italic; font-size: clamp(17px, 2.4vw, 22px); color: var(--ink-3); }
.eh-fig { margin: 28px 0 14px; border: 1px solid var(--hair); background: var(--surface); border-radius: 1px; overflow: hidden; }
.eh-fig img { width: 100%; object-fit: cover; }
.eh-fig figcaption { padding: 12px 16px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); border-top: 1px solid var(--hair); }
.eh-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); margin: 0 0 32px; }
@media (min-width: 640px) { .eh-gallery { grid-template-columns: repeat(3, 1fr); } }
.eh-gallery img { aspect-ratio: 1 / 1; width: 100%; height: 100%; object-fit: cover; background: var(--paper-3); }
.eh-prose h2 { margin: 40px 0 12px; font-family: var(--font-disp); font-weight: 400; font-size: 24px; }
.eh-prose p { margin: 0; font-size: 16px; line-height: 1.75; color: var(--ink-2); white-space: pre-line; }
.eh-prose .drop { font-size: 17px; }

/* --- big bottom CTA ------------------------------------------------------ */
.eh-cta { text-align: center; padding: 80px 24px; }
.eh-cta h2 { margin: 0 auto; max-width: 18ch; font-family: var(--font-disp); font-weight: 400; font-size: clamp(30px, 5vw, 52px); line-height: 1.02; letter-spacing: -0.025em; }
.eh-cta p { margin: 18px auto 0; max-width: 36rem; color: var(--ink-2); font-size: 15px; }
.eh-cta .actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* --- empty state --------------------------------------------------------- */
.eh-empty { text-align: center; padding: 90px 24px; }
.eh-empty .mk { font-family: var(--font-disp); font-style: italic; font-size: 40px; color: var(--ink-4); }
.eh-empty h2 { margin: 14px 0 0; font-family: var(--font-disp); font-weight: 400; font-size: 26px; }
.eh-empty p { margin: 10px auto 0; max-width: 30rem; color: var(--ink-3); font-size: 14px; }

/* --- footer -------------------------------------------------------------- */
.eh-footer { margin-top: 16px; border-top: 1px solid var(--hair); background: var(--paper-2); }
.eh-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 40px 0; }
.eh-footer .name { font-family: var(--font-disp); font-style: italic; font-size: 20px; }
.eh-footer .tag { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.eh-footer .copy { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-4); }

/* --- a11y ---------------------------------------------------------------- */
:focus-visible { outline: 2px solid var(--botanic); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
