/* ============================================================
   Trelice — Stylesheet
   One file. Editorial aesthetic. No framework.
   ============================================================ */

/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  /* Colors — Living Meadow (forest green + sun gold + leaf) */
  --teal-900: #0F3320;   /* deep forest — was teal-900 */
  --teal-800: #1F7A3E;   /* forest green primary */
  --teal-700: #2D9050;   /* lighter forest */
  --teal-500: #5BA774;   /* mid leaf */
  --teal-100: #D4E6D9;   /* mist */

  --cream:   #FBFAF6;    /* off-white page bg */
  --cream-2: #F1F5EE;    /* meadow surface */
  --paper:   #FFFFFF;    /* paper */

  --gold:    #F4B731;    /* sun */
  --gold-dk: #D89B1A;    /* deeper sun */

  --ink:      #162A1F;   /* near-black green */
  --ink-mid:  #4F5C53;
  --ink-soft: #7B8A82;
  --rule:     #DAE0D5;

  /* Type */
  --font-serif: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
  --font-sans:  'Source Sans 3', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Sizing */
  --wrap-max: 1240px;
  --wrap-pad: 32px;

  /* Radii */
  --r-1: 2px;
  --r-2: 3px;
  --r-3: 4px;
  --r-4: 6px;
  --r-5: 8px;

  /* Shadow */
  --shadow-sm: 0 4px 10px -4px rgba(15, 51, 32, 0.08);
  --shadow-md: 0 12px 24px -12px rgba(15, 51, 32, 0.2);
  --shadow-lg: 0 30px 60px -30px rgba(15, 51, 32, 0.15);
  --shadow-xl: 0 30px 80px -30px rgba(15, 51, 32, 0.18);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -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; color: inherit; border: 0; background: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

/* ─── Utilities ──────────────────────────────────────────── */
.wrap { max-width: var(--wrap-max); margin: 0 auto; padding: 0 var(--wrap-pad); }
.serif { font-family: var(--font-serif); font-optical-sizing: auto; }
.mono  { font-family: var(--font-mono); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 28px;
  font-weight: 400;
}
.eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--gold); }
.eyebrow.on-dark { color: var(--gold); }
.eyebrow.on-dark::before { background: var(--gold); }

.em, em { font-family: var(--font-serif); font-style: italic; color: var(--teal-800); font-weight: 400; }
.on-dark em { color: var(--gold); }

.under {
  position: relative; white-space: nowrap;
}
.under::after {
  content: ''; position: absolute; left: 0; right: 0;
  bottom: 0.08em; height: 0.12em;
  background: var(--gold); opacity: 0.55; z-index: -1;
}

/* ─── Nav ────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(251, 250, 246, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: var(--rule); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo {
  display: inline-flex; align-items: center;
  line-height: 0;
  transition: opacity 0.2s;
}
.logo:hover { opacity: 0.82; }
.logo img { height: 58px; width: auto; display: block; }

.foot-logo {
  display: inline-flex; align-items: center;
  line-height: 0;
  border-radius: 10px;
  overflow: hidden;
}
.foot-logo img { height: 64px; width: auto; display: block; }

.nav-links {
  display: flex; gap: 36px; align-items: center;
  font-size: 14.5px; font-weight: 400;
}
.nav-links a { color: var(--ink-mid); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }

.nav-dropdown { position: relative; }
.nav-dropdown > button {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--ink-mid); font-size: 14.5px;
}
.nav-dropdown > button::after {
  content: ''; width: 6px; height: 6px; border-right: 1.2px solid currentColor;
  border-bottom: 1.2px solid currentColor; transform: rotate(45deg) translateY(-2px);
  display: inline-block; margin-left: 2px;
}
.nav-dropdown-panel {
  position: absolute; top: calc(100% + 6px); left: -20px;
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--r-4); padding: 14px;
  box-shadow: var(--shadow-md);
  min-width: 280px;
  opacity: 0; pointer-events: none; transform: translateY(-4px);
  transition: all 0.18s var(--ease-out);
}
/* Invisible bridge across the gap so the panel stays open while the
   cursor travels from the button down to the links. */
.nav-dropdown-panel::before {
  content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px;
}
.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.nav-dropdown-panel a {
  display: block; padding: 10px 12px; border-radius: var(--r-2);
  color: var(--ink);
}
.nav-dropdown-panel a:hover { background: var(--cream-2); }
.nav-dropdown-panel a strong { display: block; font-weight: 500; font-size: 14px; }
.nav-dropdown-panel a span { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

.nav-links a.nav-cta {
  background: var(--gold);
  color: var(--teal-900);
  padding: 10px 20px;
  border-radius: var(--r-1);
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--gold);
  transition: all 0.2s;
  box-shadow: 0 1px 0 rgba(15, 51, 32, 0.04);
}
.nav-links a.nav-cta:hover {
  background: var(--gold-dk);
  border-color: var(--gold-dk);
  color: var(--teal-900);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -4px rgba(216, 155, 26, 0.4);
}

.nav-toggle {
  display: none;
  width: 40px; height: 40px; align-items: center; justify-content: center;
  color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav-links > *:not(.nav-cta) { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.mobile-open { display: flex; }
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--teal-900); color: var(--cream);
  padding: 15px 26px; border-radius: var(--r-1);
  font-weight: 500; font-size: 15px;
  transition: all 0.2s;
  border: 1px solid var(--teal-900);
}
.btn-primary:hover {
  background: var(--teal-800);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--cream);
}
.btn-primary .arr { transition: transform 0.2s; }
.btn-primary:hover .arr { transform: translateX(3px); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-mid); font-size: 15px;
  padding: 15px 8px;
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
}
.btn-ghost:hover { color: var(--ink); border-bottom-color: var(--gold); }

.btn-gold {
  background: var(--gold); color: var(--teal-900);
  padding: 15px 26px; border-radius: var(--r-1);
  font-weight: 500; font-size: 15px;
  display: inline-flex; align-items: center; gap: 10px;
  transition: all 0.2s;
  border: 1px solid var(--gold);
}
.btn-gold:hover { background: var(--gold-dk); border-color: var(--gold-dk); color: var(--cream); }

.cta-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* Larger primary CTA in the homepage hero */
.page-hero .cta-row .btn-primary { padding: 19px 38px; font-size: 17px; gap: 12px; }
.page-hero .cta-row .btn-ghost { padding: 19px 10px; font-size: 17px; }

/* ─── Sections ───────────────────────────────────────────── */
section { padding: 120px 0; position: relative; }
section.tight { padding: 80px 0; }

.section-head { max-width: 780px; margin-bottom: 72px; }
.section-head h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-head .lede {
  margin-top: 24px;
  font-size: 19px;
  color: var(--ink-mid);
  max-width: 620px;
}
/* Section heading used as a feature column (paired with a screenshot) */
.section-head--flush { margin-bottom: 0; max-width: none; }

/* ─── Hero ───────────────────────────────────────────────── */
.page-hero {
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute;
  top: 0; right: -5%;
  width: 55%; height: 100%;
  background: radial-gradient(ellipse at top right, rgba(244, 183, 49, 0.10), transparent 60%);
  pointer-events: none;
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 1080px;
  margin-bottom: 36px;
}
.page-hero .hero-sub {
  max-width: 640px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-mid);
  margin-bottom: 44px;
}

/* Compact hero variant (for interior pages) */
.sub-hero {
  padding: 140px 0 60px;
}
.sub-hero h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.022em;
  color: var(--ink);
  max-width: 900px;
  margin-bottom: 24px;
}
.sub-hero .hero-sub {
  max-width: 640px;
  font-size: 18px;
  color: var(--ink-mid);
  margin-bottom: 0;
}

/* ─── Footer ─────────────────────────────────────────────── */
footer.site-footer {
  background: var(--cream-2);
  color: var(--ink-mid);
  padding: 72px 0 32px;
  font-size: 14px;
  border-top: 1px solid var(--rule);
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 780px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 36px; } }
.foot-hd {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold-dk); margin-bottom: 18px;
}
.foot-grid ul { list-style: none; }
.foot-grid li { margin-bottom: 10px; }
.foot-grid a { color: var(--ink-mid); transition: color 0.2s; }
.foot-grid a:hover { color: var(--ink); }
.foot-about { color: var(--ink-mid); max-width: 320px; line-height: 1.6; margin-top: 12px; }
.foot-logo svg { height: 42px; width: auto; }

/* Second .foot-logo rule above wins; remove this one */
.foot-bot {
  padding-top: 32px;
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 13px; color: var(--ink-soft);
  flex-wrap: wrap;
}
.foot-bot .legal-links { display: flex; gap: 20px; }

/* ─── Reveal on scroll ───────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: all 0.8s var(--ease-out); }
.reveal.on { opacity: 1; transform: translateY(0); }

/* ─── Forms ──────────────────────────────────────────────── */
.field { display: block; margin-bottom: 20px; }
.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.field-label .req { color: var(--gold-dk); margin-left: 4px; }
.field-input,
.field-select,
.field-textarea {
  display: block; width: 100%;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-2);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-textarea { resize: vertical; min-height: 120px; }
.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(244, 183, 49, 0.18);
}
/* honeypot */
.field-hp { position: absolute; left: -10000px; opacity: 0; pointer-events: none; }

.field-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 600px) { .field-grid { grid-template-columns: 1fr; } }

/* ─── Cards & panels ─────────────────────────────────────── */
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-4);
  padding: 32px;
}
.card-top-accent {
  border-top: 4px solid var(--gold);
}

/* ─── Badges / chips / tags ──────────────────────────────── */
.chip-mono {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--teal-800);
  padding: 5px 10px;
  background: rgba(31, 122, 62, 0.08);
  border-radius: var(--r-1);
  letter-spacing: 0.03em;
}
.chip-gold {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gold-dk);
  background: rgba(244, 183, 49, 0.12);
  padding: 3px 8px;
  border-radius: var(--r-1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── Rule / divider ─────────────────────────────────────── */
.rule { height: 1px; background: var(--rule); border: 0; margin: 48px 0; }
.gold-rule { height: 1px; background: linear-gradient(to right, transparent, var(--gold), transparent); opacity: 0.4; border: 0; }

/* ─── Mobile nav overlay ─────────────────────────────────── */
.mobile-menu {
  position: fixed; inset: 68px 0 0 0; z-index: 49;
  background: var(--cream);
  padding: 40px var(--wrap-pad);
  display: none;
  flex-direction: column; gap: 8px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--font-serif); font-size: 28px;
  color: var(--ink); padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.mobile-menu .nav-cta { margin-top: 16px; text-align: center; font-family: var(--font-sans); font-size: 15px; }
