/* ============================================================
   MORCHEA — marketing site
   Brand: cream + deep forest + sage + gold. Node-network motif.
   ============================================================ */

@import url('https://api.fontshare.com/v2/css?f[]=satoshi@300,400,500,700,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Newsreader:ital,opsz,wght@1,6..72,400..500&display=swap');

:root {
  /* ---- palette (exact brand tokens) ---- */
  --cream:       #F6F1E8;   /* Mycelium Cream — primary background */
  --cream-card:  #FCFAF4;   /* raised cards — a touch lighter than cream */
  --cream-deep:  #E7D8C5;   /* Warm Spore — cards, dividers, layered depth */
  --cream-line:  #E2D4BF;

  --ink:         #17231C;   /* Moss Ink — headlines, nav, body text */
  --ink-2:       #34453A;   /* secondary text */
  --ink-3:       #6B5A46;   /* Root Brown — secondary typography, captions */

  --green:       #45654E;   /* mid forest */
  --sage:        #B8C9B3;   /* Soft Sage — interactive, buttons, accents */
  --sage-deep:   #9DB5A4;   /* deeper sage for logo strokes / contrast */
  --sage-soft:   #CEDAC9;
  --sage-tint:   #E6EBDF;   /* faint sage wash */

  --gold:        #C89B4B;   /* Signal Gold — active states, premium. Never overused */
  --gold-deep:   #A87E2E;
  --gold-soft:   #E7D8B0;

  --taupe:       #6B5A46;   /* Root Brown — editorial muted */

  --line:        rgba(23, 35, 28, 0.13);
  --line-soft:   rgba(23, 35, 28, 0.07);

  /* ---- dark "subterranean layer" ---- */
  --dark:        #12201A;
  --dark-2:      #1A2C22;
  --dark-line:   rgba(184, 201, 179, 0.15);
  --dark-text:   #E9E4D6;
  --dark-muted:  #8DA48E;

  /* ---- type ---- */
  --sans:  'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  --serif: 'Newsreader', Georgia, serif;

  /* ---- layout ---- */
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(21,40,28,.04), 0 2px 8px rgba(21,40,28,.04);
  --shadow:    0 2px 6px rgba(21,40,28,.05), 0 14px 40px rgba(21,40,28,.07);
  --shadow-lg: 0 8px 24px rgba(21,40,28,.08), 0 30px 80px rgba(21,40,28,.12);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ============================================================ reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--gold-soft); color: var(--ink); }

/* ============================================================ type scale */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }

.display {
  font-size: clamp(2.6rem, 6.2vw, 5.1rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; }
.h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); letter-spacing: -0.02em; }
.lead {
  font-size: clamp(1.12rem, 1.6vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-2);
  font-weight: 400;
  text-wrap: pretty;
}
.serif-it { font-family: var(--serif); font-style: italic; font-weight: 400; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.eyebrow.sage { color: var(--green); }
.eyebrow-mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.muted { color: var(--ink-3); }

/* ============================================================ layout */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter); }
section { position: relative; }
.section-pad { padding-block: clamp(72px, 11vw, 140px); }

/* ============================================================ header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line-soft); }
.nav {
  display: flex; align-items: center; gap: 32px;
  height: 72px;
  max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .wordmark {
  font-weight: 600; font-size: 1.18rem; letter-spacing: 0.26em;
  color: var(--ink); padding-left: 4px;
}
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a:not(.btn) {
  padding: 9px 15px; border-radius: 9px; font-size: 0.96rem; color: var(--ink-2); white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-links a:not(.btn):hover { background: var(--sage-tint); color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 500; }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 10px; align-items: center; justify-content: center; }
.nav-toggle:hover { background: var(--sage-tint); }
.nav-toggle svg { width: 22px; height: 22px; }

/* ============================================================ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 500; font-size: 0.98rem; letter-spacing: -0.01em;
  padding: 12px 22px; border-radius: 11px;
  transition: transform .18s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; transition: transform .2s var(--ease); }
.btn-primary { background: var(--ink); color: var(--cream-card); }
.btn-primary:hover { background: #0e1c13; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-gold { background: var(--gold); color: #2a1d02; }
.btn-gold:hover { background: var(--gold-deep); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(178,124,16,.28); }
.btn-gold:hover svg { transform: translateX(3px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--cream-card); border-color: var(--ink); }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; border-radius: 9px; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }

/* on dark */
.on-dark .btn-ghost { color: var(--dark-text); border-color: var(--dark-line); }
.on-dark .btn-ghost:hover { background: rgba(255,255,255,.06); border-color: var(--sage); }

/* ============================================================ pills / chips */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--cream-card); color: var(--ink-2);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.pill .dot.live { background: #6fae7e; box-shadow: 0 0 0 0 rgba(111,174,126,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(111,174,126,.55);} 70%{ box-shadow: 0 0 0 7px rgba(111,174,126,0);} 100%{ box-shadow:0 0 0 0 rgba(111,174,126,0);} }

/* ============================================================ cards */
.card {
  background: var(--cream-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card.hoverable:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line); }

.grid { display: grid; gap: 22px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================================ footer */
.site-footer { background: var(--dark); color: var(--dark-text); padding-block: 72px 40px; }
.site-footer a { color: var(--dark-muted); transition: color .2s var(--ease); }
.site-footer a:hover { color: var(--dark-text); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--dark-line); }
.footer-col h4 { color: var(--sage); font-size: 0.72rem; font-family: var(--mono); letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500; margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 11px; font-size: 0.96rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 28px; flex-wrap: wrap; font-size: 0.85rem; color: var(--dark-muted); }
.footer-phon { font-family: var(--serif); font-style: italic; color: var(--dark-muted); }

/* ---- shared CTA band (used on every page) ---- */
.cta-band { background: var(--cream-deep); padding-block: clamp(104px, 14vw, 188px); border-top: 1px solid var(--cream-line); }
.cta-inner { max-width: 700px; margin-inline: auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta-mark { margin-bottom: 26px; }
.cta-inner h2 { margin-bottom: 16px; }
.cta-inner .lead { margin-bottom: 32px; }

/* ---- shared footer extras ---- */
.footer-brand .wordmark { color: var(--dark-text); font-size: 1.05rem; }
.footer-tag { margin-top: 16px; color: var(--dark-muted); font-size: 0.95rem; max-width: 260px; }
.foot-status { display: inline-flex; align-items: center; gap: 8px; color: var(--sage); }

/* ============================================================ reveal animation */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ============================================================ misc helpers */
.center { text-align: center; }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head.center { margin-inline: auto; }
.section-head .eyebrow { margin-bottom: 16px; display: block; }
.section-head .lead { margin-top: 18px; }
.divider-dot { color: var(--sage); }
.gold-text { color: var(--gold-deep); }
.hr { height: 1px; background: var(--line); border: 0; }

/* faint network background texture */
.netbg { position: absolute; inset: 0; pointer-events: none; opacity: .5; z-index: 0; }
.netbg svg { width: 100%; height: 100%; }

/* ============================================================ responsive */
@media (max-width: 900px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: 72px; left: 0; right: 0; margin: 0;
    background: var(--cream-card); border-bottom: 1px solid var(--line);
    padding: 14px var(--gutter) 22px; box-shadow: var(--shadow);
  }
  .nav-links.open a { padding: 13px 14px; font-size: 1.05rem; }
  .nav-links.open .nav-cta { margin: 8px 0 0; }
  .nav-links.open .btn { width: 100%; }
  .cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .cols-4 { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
