/*
Theme Name:        Evergreen
Description:       Evergreen marketing site — classic WordPress theme, no block editor.
Version:           1.0.0
Requires at least: 6.0
Tested up to:      6.6
Requires PHP:      8.0
License:           Proprietary
Text Domain:       evergreen
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

/* ─── DESIGN TOKENS ─────────────────────────────────────────────────────── */
:root {
  /* Colors */
  --surface-primary:      #FAF7F2;
  --surface-inverse:      #1B3A2D;
  --foreground-primary:   #2C2C2C;
  --foreground-secondary: #5E5954;
  --foreground-muted:     #8A8580;
  --foreground-inverse:   #FAF7F2;
  --accent-primary:       #C47A2D;
  --accent-hover:         #D4943A;
  --green-dark:           #1B3A2D;
  --green-mid:            #2D4F3C;
  --border-subtle:        #E0DCD4;

  /* Typography */
  --h1-sans-font:         'Playfair Display';
  --h1-serif-font:        'Inter';
  --h1-sans-font-size:    100px;
  --h2-sans-font-size:    36px;
  --body-sans-lg-size:    22px;
  --body-sans-md-size:    16px;
  --body-sans-sm-size:    13px;

  /* Radii */
  --rounded-sm:           4px;
  --rounded-none:         0px;

  /* Convenience stacks (design vars are font names only) */
  --font-display:         var(--h1-sans-font), Georgia, serif;
  --font-body:            var(--h1-serif-font), system-ui, sans-serif;

  /* Layout */
  --nav-height:           74px;
}

/* ─── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--surface-primary);
  color: var(--foreground-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* ─── NAV ────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 80px;
  background: var(--surface-primary);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-logo img { height: 34px; display: block; }
.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  text-decoration: none;
  color: var(--green-dark);
  font-size: var(--body-sans-md-size);
  font-weight: 500;
  letter-spacing: 0.5px;
}
.nav-links a:hover { opacity: 0.7; }
.nav-links a.btn-primary-sm,
.nav-links .btn-primary-sm > a { color: #fff; }
.nav-links a.btn-primary-sm:hover,
.nav-links .btn-primary-sm > a:hover { opacity: 1; background: var(--accent-hover); }

/* Active nav item — prototype class + WordPress current-menu-item */
.nav-active,
.nav-links .current-menu-item > a {
  opacity: 0.5;
  pointer-events: none;
}

/* ─── HERO ───────────────────────────────────────────────────────────────── */
.hero {
  min-height: 820px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 80px;
  text-align: center;
}
.hero-headline-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.eyebrow {
  color: var(--foreground-muted);
  font-size: var(--body-sans-sm-size);
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}
.ornamental-rule {
  width: 40px;
  height: 1px;
  background: var(--green-dark);
}
.hero-h1 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--foreground-primary);
}
.hero-h1 .line1 { font-size: var(--h1-sans-font-size); display: block; }
.hero-h1 .line2 { font-size: 80px; font-style: italic; display: block; }
.hero-subheading {
  color: var(--foreground-secondary);
  font-size: var(--body-sans-lg-size);
  font-weight: 400;
  line-height: 1.6;
  max-width: 680px;
}
.hero-cta-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.cta-sub {
  color: var(--foreground-muted);
  font-size: 14px;
}

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--accent-primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  padding: 16px 32px;
  border-radius: var(--rounded-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-primary-sm {
  display: inline-block;
  background: var(--accent-primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--body-sans-md-size);
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--rounded-sm);
  text-decoration: none;
}
.btn-primary-sm:hover { background: var(--accent-hover); }

.btn-outline {
  display: inline-block;
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: var(--rounded-sm);
  text-decoration: none;
  align-self: flex-start;
}
.btn-outline:hover { background: var(--accent-primary); color: #fff; }

/* ─── BRAND STRIPE ───────────────────────────────────────────────────────── */
.brand-stripe {
  height: 1px;
  background: var(--border-subtle);
  flex-shrink: 0;
}

/* ─── THREE-COLUMN PAGE LAYOUT ───────────────────────────────────────────── */
.page-layout {
  display: flex;
  align-items: flex-start;
}
.gutter { width: 180px; flex-shrink: 0; }

.sidebar {
  width: 360px;
  flex-shrink: 0;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  padding: 40px 24px 40px 0;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar nav a {
  color: var(--foreground-secondary);
  font-size: var(--body-sans-lg-size);
  line-height: 1.8;
  text-decoration: none;
  transition: color 0.15s;
}
.sidebar nav a:hover { color: var(--foreground-primary); }

.page-content {
  flex: 1;
  border-left: 1px solid var(--border-subtle);
  min-width: 0;
}

/* ─── SECTIONS ───────────────────────────────────────────────────────────── */
.section,
.customers-section,
#how-it-works,
#faqs,
#restore,
#pricing,
#privacy {
  scroll-margin-top: var(--nav-height);
}

.section {
  padding: 56px 48px;
  border-bottom: 1px solid var(--border-subtle);
}
.section-headline {
  font-family: var(--font-display);
  font-size: var(--h2-sans-font-size);
  font-weight: 400;
  line-height: 1.25;
  color: var(--foreground-primary);
  margin-bottom: 16px;
}
.rule-accent {
  width: 103px;
  height: 2px;
  background: var(--accent-primary);
}
.rule-green {
  width: 40px;
  height: 2px;
  background: var(--green-dark);
}
.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 48px 0;
}
.section-body {
  font-size: 18px;
  line-height: 1.7;
  color: var(--foreground-primary);
  margin-top: 24px;
}
.cta-row-sm {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
}
.cta-sub-sm { color: var(--foreground-muted); font-size: var(--body-sans-sm-size); }

/* ─── STATS ──────────────────────────────────────────────────────────────── */
.stat-number {
  font-family: var(--font-body);
  font-size: 180px;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -8px;
  color: var(--green-dark);
}
.stat-number.sm {
  font-size: var(--h1-sans-font-size);
  letter-spacing: -5px;
}
.stat-number.accent { color: var(--accent-primary); }

.stat-desc {
  font-size: var(--body-sans-lg-size);
  line-height: 1.6;
  color: var(--foreground-primary);
  max-width: 367px;
  margin-top: 8px;
}
.stat-desc strong { color: var(--accent-primary); font-weight: 600; }
.stat-attrib {
  color: var(--foreground-muted);
  font-size: var(--body-sans-sm-size);
  margin-top: 8px;
}

.stat-pair {
  display: flex;
  gap: 32px;
}
.stat-pair > div { flex: 1; }
.stat-pair .stat-desc { max-width: 100%; }

.stat-dark {
  background: var(--surface-inverse);
  border-radius: var(--rounded-sm);
  padding: 48px 40px;
  margin: 48px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.stat-dark .stat-number { color: var(--foreground-inverse); }
.stat-dark .stat-desc { color: var(--foreground-inverse); text-align: right; max-width: 100%; }
.stat-dark .stat-desc strong { color: var(--accent-primary); }
.stat-dark .stat-attrib { color: var(--green-mid); text-align: right; }

.stat-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.stat-right .stat-number { color: var(--accent-primary); }
.stat-right .stat-desc { text-align: right; max-width: 100%; }
.stat-right .stat-desc strong { color: var(--accent-primary); }
.stat-right .stat-attrib { text-align: right; }

/* ─── CONTAINED BLOCK ────────────────────────────────────────────────────── */
.contained-block {
  border: 1px solid var(--accent-primary);
  border-radius: var(--rounded-sm);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contained-block .section-headline {
  font-size: 28px;
  margin-bottom: 0;
}
.body-text {
  font-size: var(--body-sans-md-size);
  line-height: 1.7;
  color: var(--foreground-primary);
}
.body-text-muted {
  font-size: var(--body-sans-md-size);
  line-height: 1.7;
  color: var(--foreground-muted);
  font-style: italic;
}

/* ─── WHY EVERGREEN ──────────────────────────────────────────────────────── */
.subsection {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}
.subsection h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--foreground-primary);
}
.subsection p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--foreground-primary);
}
.text-link {
  color: var(--green-dark);
  font-size: var(--body-sans-md-size);
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  margin-top: 24px;
}
.text-link:hover { text-decoration: underline; }

/* ─── CUSTOMERS ──────────────────────────────────────────────────────────── */
.customers-section {
  display: none;
  padding: 48px;
  border-bottom: 1px solid var(--border-subtle);
}
.coming-soon-block {
  border: 1px solid var(--accent-primary);
  border-radius: var(--rounded-sm);
  padding: 40px 36px;
}
.coming-soon-block h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--foreground-primary);
  margin-bottom: 16px;
}
.coming-soon-block p {
  font-size: var(--body-sans-md-size);
  line-height: 1.7;
  color: var(--foreground-muted);
  font-style: italic;
}

/* ─── HOW IT WORKS ───────────────────────────────────────────────────────── */
.hiw-hero { min-height: 360px; }
.hiw-h1 {
  font-size: var(--h1-sans-font-size);
  font-style: normal;
}

.hiw-step {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 48px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.hiw-step:first-child { padding-top: 0; }
.hiw-step:last-child { border-bottom: none; padding-bottom: 0; }
.hiw-step-reverse { justify-content: flex-end; }

.step-num {
  font-family: var(--font-body);
  font-size: 120px;
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -4px;
  color: var(--foreground-muted);
  flex-shrink: 0;
}
.step-content { display: flex; flex-direction: column; gap: 10px; }
.step-content-right { align-items: flex-end; }
.step-title {
  font-family: var(--font-display);
  font-size: var(--h2-sans-font-size);
  font-weight: 400;
  line-height: 1.2;
  color: var(--foreground-primary);
}
.step-body {
  font-size: var(--body-sans-md-size);
  line-height: 1.7;
  color: var(--foreground-secondary);
  max-width: 480px;
}

/* ─── FAQs ───────────────────────────────────────────────────────────────── */
.faq-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.faq-item-last { border-bottom: none; padding-bottom: 0; }
.faq-q {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--foreground-primary);
}
.faq-a {
  font-size: var(--body-sans-md-size);
  line-height: 1.7;
  color: var(--foreground-secondary);
}

/* ─── RESTORE SECTION ────────────────────────────────────────────────────── */
.restore-section {
  align-items: flex-start;
  border-radius: 0;
  margin: 0;
  padding: 64px 48px;
}
.restore-body {
  font-size: var(--body-sans-md-size);
  line-height: 1.7;
  color: #B8C4BD;
}

/* ─── PRIVACY ────────────────────────────────────────────────────────────── */
.privacy-item { display: flex; flex-direction: column; gap: 4px; }
.privacy-label {
  font-size: var(--body-sans-md-size);
  font-weight: 600;
  color: var(--foreground-primary);
}
.privacy-body {
  font-size: var(--body-sans-md-size);
  line-height: 1.7;
  color: var(--foreground-secondary);
}

/* ─── HAMBURGER (hidden on desktop) ─────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--green-dark);
}

/* ─── MOBILE NAV OVERLAY ─────────────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--surface-primary);
  flex-direction: column;
}
.mobile-nav.nav-open { display: flex; }

.mobile-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

/* X close button */
.mobile-nav-close {
  position: relative;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.mobile-nav-close::before,
.mobile-nav-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--green-dark);
  border-radius: 1px;
}
.mobile-nav-close::before { transform: translateY(-50%) rotate(45deg); }
.mobile-nav-close::after  { transform: translateY(-50%) rotate(-45deg); }

/* wp_nav_menu outputs <ul><li> — normalise for mobile overlay */
.mobile-nav-links ul { list-style: none; display: flex; flex-direction: column; flex: 1; }
.mobile-nav-links li { display: block; }

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.mobile-nav-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--foreground-primary);
  font-size: var(--body-sans-lg-size);
  font-weight: 500;
}
.mobile-nav-links a:hover { background: rgba(0,0,0,0.02); }
.mobile-nav-links .btn-primary-sm { display: none; }
/* Arrow via CSS — replaces the prototype's <span class="mobile-nav-arrow"> */
.mobile-nav-links a::after {
  content: '→';
  color: var(--foreground-muted);
  font-size: 16px;
  font-weight: 400;
}
/* Keep the span class working in the prototype too */
.mobile-nav-arrow { display: none; }

.mobile-nav-footer {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}
.mobile-nav-sub {
  text-align: center;
  color: var(--foreground-muted);
  font-size: var(--body-sans-sm-size);
}

/* ─── TABLET ≤ 900px ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .gutter { display: none; }
  .sidebar { display: none; }
  .page-content { border-left: none; }

  .nav { padding: 20px 40px; }

  .hero-content { padding: 64px 40px; }
  .hero-h1 .line1 { font-size: 72px; }
  .hero-h1 .line2 { font-size: 60px; }

  .hiw-hero { min-height: 280px; }
  .hiw-h1 { font-size: 72px; }
  .hiw-step { gap: 24px; padding: 40px 0; }

  .section { padding: 48px 40px; }
  .customers-section { padding: 40px; }
  .restore-section { padding: 48px 40px; }

  .footer { padding: 40px; }
  .footer-links { flex-wrap: wrap; }
}

/* ─── MOBILE ≤ 600px ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .hero { min-height: auto; }
  .hero-content { padding: 60px 24px; gap: 24px; }
  .hero-h1 .line1 { font-size: 40px; }
  .hero-h1 .line2 { font-size: 32px; }
  .hero-subheading { font-size: var(--body-sans-md-size); max-width: 100%; }
  .hero-cta-row { width: 100%; }
  .btn-primary { display: block; width: 100%; text-align: center; font-size: 17px; }

  .hiw-hero { min-height: auto; }
  .hiw-h1 { font-size: 48px; font-style: normal; }

  .section { padding: 40px 24px; }
  .customers-section { padding: 24px; }
  .restore-section { padding: 48px 24px; }
  .section-headline { font-size: 28px; }

  .stat-number { font-size: 100px; letter-spacing: -4px; }
  .stat-number.sm { font-size: 64px; }
  .stat-pair { flex-direction: column; }
  .stat-dark { align-items: flex-start; }
  .stat-dark .stat-desc,
  .stat-dark .stat-attrib { text-align: left; }
  .stat-right { align-items: flex-start; }
  .stat-right .stat-desc,
  .stat-right .stat-attrib { text-align: left; }

  .contained-block { padding: 32px 24px; }

  .btn-primary-sm { display: block; width: 100%; text-align: center; }
  .cta-row-sm { width: 100%; }

  .hiw-step {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 20px;
    padding: 40px 0;
  }
  .hiw-step.hiw-step-reverse {
    flex-direction: column-reverse;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 20px;
    padding: 40px 0;
  }
  .step-num { font-size: 80px; letter-spacing: -3px; }
  .step-content,
  .step-content.step-content-right { align-items: flex-start; }
  .step-title { text-align: left !important; }
  .step-body { text-align: left !important; max-width: 100%; }

  .faq-q { font-size: 18px; }

  .footer { padding: 40px 24px; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 24px; }
  .footer-links { flex-direction: column; gap: 16px; }
}

/* ─── STATIC PAGE (page.php) ────────────────────────────────────────────── */
.page-body {
  max-width: 700px;
  margin: 0 auto;
  padding: 64px 48px;
}

.page-title {
  font-family: var(--font-display);
  font-size: var(--h2-sans-font-size);
  font-weight: 400;
  line-height: 1.25;
  color: var(--foreground-primary);
  margin-bottom: 16px;
}

.page-body .rule-green { margin-bottom: 48px; }

.page-content-body {
  font-size: var(--body-sans-md-size);
  line-height: 1.7;
  color: var(--foreground-primary);
}

.page-content-body p { margin-bottom: 1.4em; }
.page-content-body p:last-child { margin-bottom: 0; }

.page-content-body h2,
.page-content-body .wp-block-heading {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--foreground-primary);
  margin-top: 2.5em;
  margin-bottom: 0.6em;
}

.page-content-body h3 {
  font-size: var(--body-sans-md-size);
  font-weight: 700;
  line-height: 1.5;
  color: var(--foreground-primary);
  margin-top: 2em;
  margin-bottom: 0.4em;
}

.page-content-body a {
  color: var(--green-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.page-content-body a:hover { opacity: 0.7; }

.page-content-body ul,
.page-content-body ol {
  padding-left: 1.4em;
  margin-bottom: 1.4em;
}
.page-content-body li { margin-bottom: 0.4em; line-height: 1.7; }

.page-content-body strong { font-weight: 600; }
.page-content-body em { font-style: italic; }

@media (max-width: 900px) {
  .page-body { padding: 48px 40px; }
}
@media (max-width: 600px) {
  .page-body { padding: 40px 24px; }
  .page-content-body h2 { font-size: 22px; }
}

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
.footer { padding: 48px; }
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copy { color: var(--foreground-muted); font-size: var(--body-sans-sm-size); }
/* wp_nav_menu outputs <ul> — normalise */
.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  align-items: center;
}
.footer-links a {
  color: var(--foreground-secondary);
  font-size: 14px;
  text-decoration: none;
}
.footer-links a:hover { color: var(--foreground-primary); }
