/* ═══════════════════════════════════════════════════════════
   THE ROOT RACK — Stylesheet
   Authentic. Appalachian. Not Corporate.
   ═══════════════════════════════════════════════════════════ */

/* ── Reset & Variables ──────────────────────────────────── */

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

:root {
  --earth: #2C1810;
  --bark: #5C3A21;
  --amber: #C8883A;
  --gold: #E8B84B;
  --sage: #7A8B6F;
  --moss: #4A5D3F;
  --cream: #F5F0E8;
  --fog: #E8E2D6;
  --stone: #9C9284;
  --white: #FFFFFF;
  --danger: #B44D3E;

  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 1140px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(44,24,16,0.06);
  --shadow-md: 0 8px 30px rgba(44,24,16,0.08);
  --shadow-lg: 0 16px 50px rgba(44,24,16,0.12);
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--earth);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232C1810' fill-opacity='0.018'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--bark); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── Typography ─────────────────────────────────────────── */

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--earth);
}

h1 { font-size: 3.2rem; font-weight: 800; letter-spacing: -1.5px; }
h2 { font-size: 2.4rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

.section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--amber);
  font-weight: 700;
  margin-bottom: 16px;
  display: block;
}

.text-moss { color: var(--moss); }
.text-amber { color: var(--amber); }
.text-bark { color: var(--bark); }
.text-stone { color: var(--stone); }
.text-center { text-align: center; }

.lead {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--bark);
  max-width: 620px;
}

.lead.centered { margin-left: auto; margin-right: auto; text-align: center; }

/* ── Navigation ─────────────────────────────────────────── */

.site-nav {
  padding: 20px 0;
  position: sticky;
  top: 0;
  background: rgba(245,240,232,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.site-nav.scrolled {
  border-bottom-color: var(--fog);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--earth);
  letter-spacing: -0.5px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo:hover { color: var(--earth); }
.logo span { color: var(--amber); }
.logo-leaf { color: var(--moss); font-size: 1.2rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--bark);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--earth);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--amber);
  border-radius: 1px;
}

.nav-cta {
  background: var(--earth);
  color: var(--cream) !important;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition);
}
.nav-cta:hover {
  background: var(--bark) !important;
  color: var(--cream) !important;
  transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--earth);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── Buttons ────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 32px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  line-height: 1;
}

.btn-primary {
  background: var(--earth);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--bark);
  color: var(--cream);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-amber {
  background: var(--amber);
  color: var(--white);
}
.btn-amber:hover {
  background: #b87a30;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--earth);
  border: 2px solid var(--earth);
}
.btn-outline:hover {
  background: var(--earth);
  color: var(--cream);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.05rem;
  border-radius: 12px;
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  padding: 80px 0 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero h1 { margin-bottom: 24px; }

.hero .lead { margin-bottom: 36px; }

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-badge {
  background: var(--earth);
  border-radius: var(--radius-lg);
  padding: 48px;
  width: 100%;
  max-width: 440px;
  position: relative;
  overflow: hidden;
}

.hero-badge::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(200,136,58,0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-badge-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--amber);
  margin-bottom: 20px;
}

.hero-badge h3 {
  color: var(--cream);
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.hero-badge p {
  color: rgba(245,240,232,0.7);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 28px;
}

.badge-roots {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.badge-root-tag {
  background: rgba(200,136,58,0.15);
  color: var(--gold);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ── Divider ────────────────────────────────────────────── */

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  margin: 20px 0;
  opacity: 0.3;
}

/* ── Sections ───────────────────────────────────────────── */

.section { padding: 80px 0; }
.section-lg { padding: 100px 0; }

.section-header {
  margin-bottom: 50px;
}
.section-header.centered { text-align: center; }
.section-header.centered .lead { margin-left: auto; margin-right: auto; }

.section-header h2 { margin-bottom: 16px; }

/* ── Cards / Grid ───────────────────────────────────────── */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  border: 1px solid var(--fog);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.card-icon.green { background: rgba(74,93,63,0.12); }
.card-icon.amber { background: rgba(200,136,58,0.12); }
.card-icon.brown { background: rgba(92,58,33,0.12); }
.card-icon.sage { background: rgba(122,139,111,0.12); }

.card h3 { margin-bottom: 10px; }
.card p { color: var(--bark); font-size: 0.95rem; }

/* ── Value Props / Stats Strip ──────────────────────────── */

.stats-strip {
  background: var(--earth);
  padding: 60px 0;
  position: relative;
  z-index: 1;
}

.stats-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200,136,58,0.1) 0%, transparent 50%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
  position: relative;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-desc {
  font-size: 0.8rem;
  color: rgba(245,240,232,0.6);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  line-height: 1.4;
}

/* ── Root Story Cards ───────────────────────────────────── */

.story-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--fog);
  transition: transform var(--transition), box-shadow var(--transition);
}

.story-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.story-card-header {
  background: var(--earth);
  padding: 32px 28px 24px;
  position: relative;
  overflow: hidden;
}

.story-card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--amber), var(--gold), var(--amber));
}

.story-card-header .story-botanical {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--amber);
  margin-bottom: 8px;
  font-weight: 600;
}

.story-card-header h3 {
  color: var(--cream);
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.story-card-header .story-region {
  color: rgba(245,240,232,0.6);
  font-size: 0.85rem;
  font-style: italic;
}

.story-card-body {
  padding: 28px;
}

.story-section {
  margin-bottom: 20px;
}
.story-section:last-child { margin-bottom: 0; }

.story-section-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--amber);
  font-weight: 700;
  margin-bottom: 6px;
}

.story-section p {
  font-size: 0.92rem;
  color: var(--bark);
  line-height: 1.65;
}

.story-personal-note {
  background: rgba(200,136,58,0.06);
  border-left: 3px solid var(--amber);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin-top: 20px;
}

.story-personal-note p {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--bark);
}

.story-personal-note .note-sig {
  font-style: normal;
  font-weight: 600;
  color: var(--earth);
  margin-top: 8px;
  font-size: 0.82rem;
}

/* ── Product / Root Catalog Cards ───────────────────────── */

.root-catalog-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--fog);
  overflow: hidden;
  transition: all var(--transition);
}

.root-catalog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.root-catalog-img {
  height: 200px;
  background: var(--earth);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.root-catalog-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200,136,58,0.15) 0%, transparent 60%);
}

.root-catalog-img .root-emoji {
  font-size: 4rem;
  position: relative;
  z-index: 1;
}

.root-catalog-body {
  padding: 24px;
}

.root-catalog-body h3 { margin-bottom: 4px; }

.root-botanical-name {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--stone);
  margin-bottom: 12px;
}

.root-catalog-body p {
  font-size: 0.9rem;
  color: var(--bark);
  margin-bottom: 16px;
}

.root-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.root-tag {
  background: rgba(74,93,63,0.1);
  color: var(--moss);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.root-availability {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 12px;
}

.root-availability .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.root-availability .dot.available { background: var(--moss); }
.root-availability .dot.seasonal { background: var(--amber); }
.root-availability .dot.limited { background: var(--danger); }

/* ── Subscribe / CTA Section ────────────────────────────── */

.subscribe-hero {
  background: var(--earth);
  border-radius: var(--radius-lg);
  padding: 64px;
  position: relative;
  overflow: hidden;
  margin: 40px 0;
}

.subscribe-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(200,136,58,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.subscribe-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(74,93,63,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.subscribe-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.subscribe-hero h2 {
  color: var(--cream);
  font-size: 2.6rem;
  margin-bottom: 16px;
}

.subscribe-hero p {
  color: rgba(245,240,232,0.75);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

.subscribe-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 24px;
}

.subscribe-price .amount {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.subscribe-price .period {
  font-size: 1rem;
  color: rgba(245,240,232,0.6);
}

.subscribe-features {
  list-style: none;
  margin-bottom: 32px;
}

.subscribe-features li {
  color: rgba(245,240,232,0.8);
  padding: 6px 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.subscribe-features li::before {
  content: '\2713';
  color: var(--gold);
  font-weight: 700;
  font-size: 1rem;
}

/* ── About Page ─────────────────────────────────────────── */

.about-hero {
  padding: 60px 0 40px;
}

.about-hero h1 { max-width: 700px; }
.about-hero .lead { margin-top: 20px; }

.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--amber), var(--fog));
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -37px;
  top: 4px;
  width: 12px;
  height: 12px;
  background: var(--amber);
  border-radius: 50%;
  border: 3px solid var(--cream);
}

.timeline-item h3 { margin-bottom: 8px; }
.timeline-item p { color: var(--bark); font-size: 0.95rem; }

/* ── Contact Form ───────────────────────────────────────── */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--earth);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--fog);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--earth);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(200,136,58,0.12);
}

.form-group textarea { resize: vertical; min-height: 140px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.alert {
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.alert-success {
  background: rgba(74,93,63,0.1);
  color: var(--moss);
  border: 1px solid rgba(74,93,63,0.2);
}

.alert-error {
  background: rgba(180,77,62,0.1);
  color: var(--danger);
  border: 1px solid rgba(180,77,62,0.2);
}

/* ── Legal Pages ────────────────────────────────────────── */

.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 0 80px;
}

.legal-content h1 {
  font-size: 2.4rem;
  margin-bottom: 8px;
}

.legal-content .last-updated {
  font-size: 0.85rem;
  color: var(--stone);
  margin-bottom: 40px;
}

.legal-content h2 {
  font-size: 1.4rem;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-content h3 {
  font-size: 1.15rem;
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-content p {
  color: var(--bark);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.legal-content ul, .legal-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.legal-content li {
  color: var(--bark);
  margin-bottom: 6px;
  font-size: 0.95rem;
}

/* ── Footer ─────────────────────────────────────────────── */

.site-footer {
  background: var(--earth);
  padding: 64px 0 32px;
  color: rgba(245,240,232,0.7);
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo {
  color: var(--cream);
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(245,240,232,0.6);
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: rgba(245,240,232,0.6);
  font-size: 0.88rem;
  transition: color var(--transition);
}
.footer-col a:hover {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid rgba(245,240,232,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(245,240,232,0.4);
}

/* ── 404 Page ───────────────────────────────────────────── */

.page-404 {
  text-align: center;
  padding: 120px 0;
}
.page-404 .big-404 {
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: 800;
  color: var(--fog);
  line-height: 1;
  margin-bottom: 16px;
}
.page-404 p {
  color: var(--bark);
  margin-bottom: 32px;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.8rem; }

  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    padding: 20px 24px;
    border-bottom: 1px solid var(--fog);
    gap: 16px;
    box-shadow: var(--shadow-md);
  }

  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 50px 0 40px; }

  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }

  .subscribe-hero { padding: 40px 28px; }
  .subscribe-hero h2 { font-size: 2rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .section { padding: 60px 0; }
  .section-lg { padding: 70px 0; }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  .container { padding: 0 16px; }
  .hero-badge { padding: 32px 24px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}
