/* ============================================================
   After the Rain — shared stylesheet
   Aesthetic: organic / editorial English-countryside calm.
   Palette pulled from highland loch photo: pine greens, hazy
   mountain blues, warm parchment, low-sun wheat accent.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..600;1,9..144,300..500&family=Hanken+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  /* Greens — foreground to depth */
  --ink:      #14211a;
  --pine:     #1d3a2c;
  --forest:   #2c5740;
  --moss:     #517056;
  --sage:     #87a07c;
  --mist-grn: #b9cabf;

  /* Hazed mountain blues + sky */
  --haze:     #9bb4c4;
  --sky:      #cbdde6;
  --sky-pale: #e4eef2;

  /* Warm neutrals */
  --paper:    #f7f5ec;
  --paper-2:  #f0ede0;
  --paper-3:  #e8e4d4;
  --line:     #d9d4c2;

  /* Low-sun warm accent */
  --wheat:    #c39a5a;
  --wheat-dk: #a87f3f;

  --shadow-sm: 0 1px 2px rgba(20,33,26,.05), 0 2px 8px rgba(20,33,26,.04);
  --shadow-md: 0 6px 24px rgba(20,33,26,.08), 0 2px 6px rgba(20,33,26,.05);
  --shadow-lg: 0 24px 60px rgba(20,33,26,.14), 0 8px 20px rgba(20,33,26,.08);

  --maxw: 1160px;
  --radius: 18px;
  --ease: cubic-bezier(.22,.61,.36,1);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Hanken Grotesk', -apple-system, system-ui, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* faint grain over everything for organic texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- type ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.012em;
  color: var(--pine);
  font-optical-sizing: auto;
}
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--moss);
  display: inline-flex;
  align-items: center;
  gap: .65em;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--wheat);
  display: inline-block;
}
p { color: #33433a; }
.lead { font-size: 1.22rem; line-height: 1.6; color: #3a4b41; font-weight: 350; }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: clamp(64px, 9vw, 128px) 0; }
.muted { color: #5d6b62; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247,245,236,.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  background: rgba(247,245,236,.88);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.28rem;
  letter-spacing: -.01em;
  color: var(--pine);
}
.brand .mark { flex: 0 0 auto; }
.brand b { font-weight: 500; }
.brand span { color: var(--moss); font-style: italic; font-weight: 300; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: .95rem;
  font-weight: 500;
  color: #3d4d44;
  padding: 9px 15px;
  border-radius: 10px;
  transition: background .2s, color .2s;
}
.nav-links a:hover { background: var(--paper-3); color: var(--pine); }
.nav-links a.active { color: var(--forest); }
.nav-links a.btn:hover { background: var(--forest); color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  background: var(--forest);
  color: #fbfcf8 !important;
  padding: 12px 22px !important;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid var(--forest);
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: var(--pine); }
.btn.ghost {
  background: transparent;
  color: var(--forest) !important;
  border-color: var(--line);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--paper-2); border-color: var(--sage); }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 44px; height: 42px;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px;
  background: var(--pine); border-radius: 2px; position: relative;
  transition: .25s;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top: 6px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: clamp(72px, 13vw, 168px) 0 clamp(150px, 22vw, 300px);
  overflow: hidden;
}
.hero-sky {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 75% -10%, var(--sky-pale) 0%, transparent 55%),
    linear-gradient(180deg, #dcebf0 0%, #e9f0ea 38%, var(--paper) 78%);
}
.hero-inner { position: relative; z-index: 2; max-width: 760px; }
.hero h1 {
  font-size: clamp(2.7rem, 6.4vw, 5rem);
  font-weight: 380;
  letter-spacing: -.02em;
  margin: 22px 0 0;
}
.hero h1 em {
  font-style: italic;
  font-weight: 340;
  color: var(--forest);
}
.hero .lead { margin-top: 26px; max-width: 580px; }
.hero-cta { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; }

/* layered ridgeline art */
.ridge {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: -1;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.hero .ridge { bottom: -1px; }

/* ---------- reveal animation (degrades gracefully: visible unless JS active) ---------- */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(22px); }
.js .revealed { animation: rise .9s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .15s; }
.d3 { animation-delay: .25s; } .d4 { animation-delay: .35s; }
.d5 { animation-delay: .45s; }

/* ---------- generic blocks ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 90px);
  align-items: center;
}
.section-head { max-width: 640px; }
.section-head h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); margin-top: 16px; }
.section-head p { margin-top: 18px; }

/* feature cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 52px;
}
.card {
  background: linear-gradient(180deg, #fffefa, var(--paper));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px 32px;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
  position: relative;
  overflow: hidden;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--sage); }
.card .ic {
  width: 48px; height: 48px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: var(--paper-3);
  color: var(--forest);
  margin-bottom: 22px;
}
.card h3 { font-size: 1.4rem; margin-bottom: 10px; }
.card p { font-size: .98rem; }
.card .tag {
  margin-top: 18px;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--wheat-dk);
}

/* bands */
.band {
  background: var(--pine);
  color: var(--sky-pale);
  position: relative;
  overflow: hidden;
}
.band::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(80% 120% at 15% 0%, rgba(135,160,124,.22), transparent 60%),
    radial-gradient(70% 100% at 95% 100%, rgba(155,180,196,.18), transparent 55%);
}
.band .wrap { position: relative; z-index: 1; }
.band h2 { color: #f3f6ee; }
.band p { color: #c3d2c5; }
.band .eyebrow { color: #9bbfa0; }
.band .eyebrow::before { background: var(--wheat); }

/* stat / steps */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; margin-top: 50px; }
.step .num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--sage);
  line-height: 1;
}
.step h3 { color: #eef3ea; font-size: 1.28rem; margin: 14px 0 8px; }
.step p { font-size: .98rem; }

/* CTA */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(2rem,4.4vw,3.4rem); max-width: 14ch; margin: 16px auto 0; }
.cta-band p { max-width: 50ch; margin: 18px auto 0; }
.cta-band .hero-cta { justify-content: center; margin-top: 34px; }

/* ---------- prose (about / privacy) ---------- */
.page-head {
  position: relative;
  padding: clamp(96px, 14vw, 150px) 0 clamp(40px,7vw,72px);
  overflow: hidden;
}
.page-head .hero-sky { background: linear-gradient(180deg,#e3eeec 0%, var(--paper) 90%); }
.page-head h1 { font-size: clamp(2.4rem,5.4vw,4rem); font-weight: 370; margin-top: 18px; }
.page-head p { margin-top: 20px; max-width: 58ch; }

.prose { max-width: 720px; }
.prose h2 { font-size: 1.7rem; margin: 48px 0 14px; }
.prose h3 { font-size: 1.22rem; margin: 32px 0 8px; color: var(--forest); }
.prose p { margin-bottom: 16px; }
.prose ul { margin: 0 0 18px 1.1em; }
.prose li { margin-bottom: 8px; color: #33433a; }
.prose a { color: var(--wheat-dk); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--forest); }
.prose strong { color: var(--pine); font-weight: 600; }
.note {
  background: var(--paper-2);
  border: 1px dashed var(--sage);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: .9rem;
  color: #5d6b62;
  margin: 24px 0;
}

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px,6vw,72px); align-items: start; }
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: .82rem; font-weight: 600;
  letter-spacing: .04em; color: var(--moss); margin-bottom: 7px;
}
.field input, .field textarea, .field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: #fffefb;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(81,112,86,.15);
}
.contact-aside { background: var(--paper-2); border:1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.contact-aside dl { margin-top: 18px; }
.contact-aside dt { font-size: .76rem; letter-spacing:.14em; text-transform: uppercase; color: var(--moss); font-weight:600; margin-top: 18px; }
.contact-aside dd { font-size: 1.05rem; color: var(--pine); margin-top: 4px; }
.contact-aside dd a:hover { color: var(--wheat-dk); }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  background: var(--ink);
  color: #b9c7bc;
  padding-top: 0;
  overflow: hidden;
}
.footer-ridge { width: 100%; display:block; }
.footer-main {
  padding: 56px 0 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.footer-main .brand { color: #eef3ea; }
.footer-main .brand span { color: var(--sage); }
.footer-blurb { margin-top: 16px; font-size: .95rem; color: #9aab9f; max-width: 34ch; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: .76rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--sage); font-weight: 600; margin-bottom: 14px;
}
.footer-col a { display: block; font-size: .95rem; color: #b9c7bc; padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 22px 0 36px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .85rem; color: #7f9085;
}

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(247,245,236,.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 14px 20px 22px;
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-links a.btn { justify-content: center; margin-top: 6px; }
  .cards, .steps { grid-template-columns: 1fr; }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-main .brand-block { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 20px; }
  .footer-main { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
