/* Green Restoration Society — public landing page */

:root {
  --hero: #1b4a24;
  --hero-deep: #143a1b;
  --paper: #f5f9f3;
  --paper-2: #e9f2e6;
  --ink: #15201a;
  --ink-soft: #4a5a4e;
  --forest: #2e7d32;
  --forest-mid: #3c8c43;
  --sage: #8fbf8a;
  --sage-soft: #cfe6c9;
  --gold: #e3b872;
  --line: rgba(21, 32, 26, 0.12);
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
section { scroll-margin-top: 80px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.1rem;
  color: var(--forest-mid);
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.on-dark .eyebrow { color: var(--sage); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.4s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.4s var(--ease);
}
.btn i { width: 18px; height: 18px; transition: transform 0.4s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover i { transform: translateX(4px); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn-solid { background: var(--paper); color: var(--hero-deep); }
.btn-solid:hover { box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.45); }
.btn-line { border: 1px solid rgba(245, 249, 243, 0.35); color: var(--paper); }
.btn-line:hover { border-color: var(--gold); color: var(--gold); }
.btn-green { background: var(--forest); color: #fff; }
.btn-green:hover { background: var(--forest-mid); box-shadow: 0 14px 30px -14px rgba(46, 125, 50, 0.6); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  color: var(--paper);
  transition: color 0.5s var(--ease), padding 0.5s var(--ease);
  padding-block: 1.2rem;
}
/* backdrop-filter lives on ::before, not .site-header itself — putting it on
   the header would make the header's own (short) box the containing block
   for every position:fixed descendant, including the full-screen mobile nav
   panel, collapsing it down to header-height once the page was scrolled. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: transparent;
  transition: background 0.5s var(--ease), backdrop-filter 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.site-header.is-scrolled {
  color: var(--ink);
  padding-block: 0.8rem;
}
.site-header.is-scrolled::before {
  background: rgba(245, 249, 243, 0.94);
  backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner { display: flex; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; margin-right: auto; }
.brand svg { width: 38px; height: 38px; color: currentColor; }
.brand .circ-accent { color: var(--sage); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-main { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.brand-sub { font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.75; }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.3rem 0;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.login-btn {
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.login-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--hero-deep); }
.site-header.is-scrolled .login-btn:hover { color: #fff; background: var(--forest); border-color: var(--forest); }

.login-btn-m { display: none; }

.nav-backdrop { display: none; }

.nav-toggle { display: none; position: relative; z-index: 70; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; color: currentColor; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px auto; transition: transform 0.35s var(--ease), opacity 0.3s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  background:
    radial-gradient(70% 60% at 80% 30%, rgba(143, 191, 138, 0.16), transparent 70%),
    linear-gradient(160deg, var(--hero) 0%, var(--hero-deep) 100%);
  color: var(--paper);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 6.5rem 0 4rem;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.35; }
.orb-1 { width: 420px; height: 420px; background: var(--sage); top: -120px; left: -120px; }
.orb-2 { width: 300px; height: 300px; background: var(--gold); bottom: -100px; right: 10%; opacity: 0.18; }

.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
.hero-title { font-size: clamp(2.2rem, 3.9vw, 3.4rem); line-height: 1.07; letter-spacing: -0.02em; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero-title .line > span { display: inline-block; }
.hero-title em { color: var(--gold); font-style: italic; }
.hero-lede { margin-top: 1.25rem; font-size: 1rem; line-height: 1.65; color: rgba(245, 249, 243, 0.82); max-width: 44ch; }
.hero-cta { margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-art { position: relative; display: flex; justify-content: center; }
.tree-svg { width: min(100%, 360px); height: auto; overflow: visible; }

.halo { fill: none; stroke: rgba(207, 230, 201, 0.18); stroke-width: 1; }
.trunk, .branch { fill: none; stroke: var(--sage-soft); stroke-linecap: round; }
.trunk { stroke-width: 14; }
.branch { stroke-width: 7; }
.roots { fill: none; stroke: var(--sage-soft); stroke-width: 5; stroke-linecap: round; opacity: 0.6; }
.leaf { fill: var(--sage); }
.leaf.alt { fill: var(--forest-mid); }
.leaf.gold { fill: var(--gold); }
.leaf.pale { fill: var(--sage-soft); }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 249, 243, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.scroll-cue::after { content: ""; width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(-6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Why greenery ---------- */
.why { padding: 7rem 0; background: var(--paper); }
.sec-title { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.08; max-width: 18ch; }
.why-grid { margin-top: 3.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.stat-card {
  background: var(--hero);
  color: var(--paper);
  border-radius: 28px;
  padding: clamp(2rem, 4vw, 3.2rem);
  position: relative;
  overflow: hidden;
}
.stat-card::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(143, 191, 138, 0.35), transparent 70%); }
.stat-label { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sage); }
.stat-num { font-family: var(--display); font-size: clamp(4.5rem, 10vw, 7.5rem); line-height: 1; margin: 0.6rem 0 0.4rem; color: var(--gold); display: flex; align-items: baseline; gap: 0.6rem; }
.stat-num small { font-family: var(--body); font-size: 1.2rem; color: var(--paper); letter-spacing: 0.02em; }
.stat-card p { font-size: 1.05rem; color: rgba(245, 249, 243, 0.85); }

.quote {
  margin: 0;
  background: var(--paper-2);
  border-radius: 28px;
  padding: clamp(2rem, 4vw, 3.2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}
.quote p { font-family: var(--display); font-style: italic; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.35; color: var(--hero-deep); }
.quote footer { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--forest); font-weight: 600; }

/* ---------- Activities ---------- */
.activities { padding: 7rem 0; background: var(--paper-2); }
.act-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: 3rem; }
.act-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.act-card {
  background: #fff;
  border-radius: 22px;
  padding: 2rem;
  border: 1px solid var(--line);
  position: relative;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease), border-color 0.4s;
}
.act-card:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -30px rgba(21, 32, 26, 0.35); border-color: var(--sage); }
.act-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--hero);
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.4rem;
}
.act-icon i { width: 24px; height: 24px; }
.act-card h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.act-card p { color: var(--ink-soft); font-size: 0.97rem; }
.act-num { position: absolute; top: 1.6rem; right: 1.8rem; font-family: var(--display); font-size: 1.1rem; color: var(--sage); }

/* ---------- Closing ---------- */
.closing { padding: 8rem 0; background: var(--hero); color: var(--paper); position: relative; overflow: hidden; text-align: center; }
.closing::before { content: ""; position: absolute; width: 640px; height: 640px; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(143, 191, 138, 0.2), transparent 65%); }
.closing-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2.2rem; }
.closing h2 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); line-height: 1.05; max-width: 16ch; }
.closing h2 em { color: var(--gold); font-style: italic; }

/* ---------- Typewriter link ---------- */
.type-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  font-style: italic;
  color: var(--gold);
  min-height: 56px;
  padding: 0.3rem 0.2rem;
  transition: color 0.3s var(--ease);
}
.type-link:hover { color: var(--paper); }
.type-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; border-radius: 4px; }
.type-caret {
  display: inline-block;
  width: 3px;
  height: 1.05em;
  margin-left: 0.12em;
  background: currentColor;
  animation: caret 0.9s steps(1) infinite;
}
@keyframes caret { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

/* ---------- Footer ---------- */
.foot { background: var(--hero-deep); color: rgba(245, 249, 243, 0.7); padding: 2.2rem 0; font-size: 0.88rem; }
.foot-inner { display: flex; justify-content: center; align-items: center; gap: 1.2rem; flex-wrap: wrap; text-align: center; }
.foot a { color: var(--sage); font-weight: 600; }
.foot a:hover { color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .hero-art { order: -1; }
  .tree-svg { width: min(78%, 340px); }
  .act-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav, .login-btn { display: none; }
  .header-inner { gap: 1rem; }
  .nav-open .site-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(78vw, 320px);
    background: var(--paper);
    color: var(--ink);
    padding: 6rem 2rem 2rem;
    gap: 1.6rem;
    box-shadow: -20px 0 60px -20px rgba(0, 0, 0, 0.3);
    z-index: 60;
  }
  .nav-open .site-nav a:not(.login-btn-m) { font-size: 1.1rem; padding: 0.4rem 0; }
  .nav-open .site-nav .login-btn-m {
    display: inline-flex;
    margin-top: 0.6rem;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    color: var(--forest);
    border-color: var(--forest);
  }
  .nav-open .nav-toggle { color: var(--ink); }
  .nav-open .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 12, 0.5);
    z-index: 55;
  }
  .nav-open { overflow: hidden; }
  .why-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero-cta { flex-direction: column; align-items: stretch; gap: 0.9rem; margin-top: 1.6rem; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .act-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 6.5rem; }
  .scroll-cue { display: none; }
  .type-link { font-size: 1.05rem; min-height: 40px; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}

/* ================== Auth screens (login / admin login / OTP) ================== */
.auth-screen { min-height: 100svh; display: grid; grid-template-columns: 1fr 1.15fr; }

.auth-brand {
  position: relative;
  background:
    radial-gradient(70% 60% at 80% 20%, rgba(143, 191, 138, 0.18), transparent 70%),
    linear-gradient(160deg, var(--hero) 0%, var(--hero-deep) 100%);
  color: var(--paper);
  padding: clamp(2rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.auth-brand .orb-1 { width: 360px; height: 360px; top: -110px; left: -110px; }
.auth-brand .orb-2 { width: 260px; height: 260px; bottom: -90px; right: -50px; opacity: 0.16; }

.auth-brand-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 0.7rem; }
.auth-brand-top svg { width: 36px; height: 36px; }
.auth-brand-top .brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.auth-brand-top .brand-main { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.auth-brand-top .brand-sub { font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.75; }

.auth-brand-mid { position: relative; z-index: 1; max-width: 30ch; }
.auth-brand-mid .eyebrow { color: var(--sage); }
.auth-brand-mid h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.18; margin-bottom: 0.9rem; }
.auth-brand-mid p { color: rgba(245, 249, 243, 0.78); font-size: 0.96rem; line-height: 1.65; }

.auth-brand-foot { position: relative; z-index: 1; font-size: 0.82rem; color: rgba(245, 249, 243, 0.6); }
.auth-brand-foot a { color: var(--sage); font-weight: 600; }
.auth-brand-foot a:hover { color: var(--gold); }

.auth-form-panel {
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem);
}
.auth-form-card { width: 100%; max-width: 380px; }
.auth-form-card .eyebrow { color: var(--forest-mid); }
.auth-form-card h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 0.5rem; }
.auth-form-card .lede { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 1.8rem; line-height: 1.55; }

.auth-form-card .form-row { margin-bottom: 1.1rem; }
.auth-form-card .form-row label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
.auth-form-card .form-row input {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font-family: var(--body);
  font-size: 1rem;
  min-height: 46px;
  color: var(--ink);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.auth-form-card .form-row input:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
}
.auth-form-card .btn { width: 100%; justify-content: center; margin-top: 0.4rem; }

.otp-input {
  text-align: center;
  font-family: var(--display);
  letter-spacing: 0.5em;
  font-size: 1.4rem;
  padding-right: calc(0.9rem + 0.5em) !important;
}

.otp-boxes { display: flex; gap: 0.5rem; }
.otp-box {
  flex: 1;
  min-width: 0;
  aspect-ratio: 1;
  box-sizing: border-box;
  text-align: center;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.otp-box:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
}

.form-status { font-size: 0.85rem; margin: 0 0 1rem; line-height: 1.5; }
.form-status.is-error { color: #b0413e; }
.form-status.is-success { color: var(--forest); }
.form-status a { color: inherit; font-weight: 700; text-decoration: underline; }

.dev-otp-banner {
  font-size: 0.85rem;
  background: rgba(227, 184, 114, 0.18);
  color: #8a5a20;
  border: 1px dashed var(--gold);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  margin: 0 0 1rem;
  line-height: 1.5;
}
.dev-otp-banner .mono { font-family: ui-monospace, monospace; font-weight: 700; letter-spacing: 0.15em; }

.auth-links { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.3rem; }
.auth-links a, .auth-links button {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--forest);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.auth-links a:hover, .auth-links button:hover { color: var(--forest-mid); }

@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; align-content: start; }
  .auth-brand { padding: 1.75rem 1.5rem; gap: 1.5rem; }
  .auth-brand-mid { max-width: none; margin-block: 1.5rem; }
  .auth-brand-mid h2 { font-size: 1.4rem; }
  .auth-brand-mid p { display: none; }
  .auth-form-panel { padding: 2.25rem 1.5rem 3rem; }
}
