/* ============================================
   Spangevity — Functional Medicine
   Modern, clean design with dark theme
   ============================================ */

:root {
  --bg: #141414;
  --bg-alt: #1c1c1c;
  --surface: #1e1e1e;
  --text: #e8e8e8;
  --text-secondary: #9a9a9a;
  --accent: #6b8f3c;
  --accent-hover: #5a7a2e;
  --gradient-start: #4a6b2a;
  --gradient-mid: #6b8f3c;
  --gradient-end: #8ab458;
  --line: #2e2e2e;
  --radius: 12px;
  --radius-lg: 20px;
  --max-width: 1200px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3 {
  line-height: 1.15;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  background: var(--text);
  color: #fff;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  transform: translateY(-200%);
  z-index: 100;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin: 0 auto;
}

/* ---- Header / Navigation ---- */

.site-header {
  background: rgba(20, 20, 20, 0.92);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

.brand {
  display: grid;
  gap: 0.1rem;
}

.brand-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.brand-subtitle {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-links a:not(.button) {
  position: relative;
  transition: color var(--transition);
}

.nav-links a:not(.button):hover {
  color: var(--text);
}

.nav-links a:not(.button)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  transition: width var(--transition);
  border-radius: 2px;
}

.nav-links a:not(.button):hover::after {
  width: 100%;
}

/* ---- Nav Dropdown ---- */

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  transition: color var(--transition);
}

.nav-dropdown-toggle:hover {
  color: var(--text);
}

.dropdown-arrow {
  transition: transform var(--transition);
  flex-shrink: 0;
}

.nav-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e1e1e;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  min-width: 160px;
  padding: 0.5rem;
  z-index: 60;
}

.nav-dropdown.active .nav-dropdown-menu {
  display: flex;
  flex-direction: column;
}

.nav-dropdown-menu a {
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}

.nav-dropdown-menu a:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.nav-dropdown-menu a::after {
  display: none;
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.5rem;
  width: 36px;
  height: 36px;
  position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
  position: absolute;
  left: 7px;
}

.hamburger {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger::before {
  content: "";
  top: -7px;
}

.hamburger::after {
  content: "";
  top: 7px;
}

/* ---- Buttons ---- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50px;
  padding: 0.8rem 1.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.button.primary {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
  color: #fff;
  box-shadow: 0 4px 15px rgba(107, 143, 60, 0.25);
}

.button.primary:hover {
  box-shadow: 0 6px 25px rgba(107, 143, 60, 0.4);
  transform: translateY(-1px);
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--line);
}

.button.secondary:hover {
  border-color: var(--gradient-start);
  color: var(--gradient-start);
}

/* ---- Hero Section ---- */

.hero {
  position: relative;
  padding: 10rem 0 8rem;
  text-align: center;
  overflow: hidden;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.72) 0%,
    rgba(15, 23, 42, 0.60) 50%,
    rgba(15, 23, 42, 0.80) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #8ab458;
  margin: 0 0 1.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(138, 180, 88, 0.3);
  border-radius: 50px;
  background: rgba(138, 180, 88, 0.08);
}

.hero h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 600;
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
  color: #ffffff;
}

/* ---- Gradient Text Effect ---- */

.gradient-text {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-mid) 50%, var(--gradient-end) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .gradient-text {
  background: linear-gradient(135deg, #5a7a2e 0%, #8ab458 50%, #a3c77a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #cbd5e1;
  max-width: 550px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero .button.secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.hero .button.secondary:hover {
  border-color: #8ab458;
  color: #8ab458;
}

.button-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---- Trust Strip ---- */

.trust-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2.5rem 0;
  background: var(--bg);
}

.trust-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}

.trust-icon {
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Sections ---- */

.section {
  padding: 6rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-dark {
  background: #0f1610;
  color: #e2e8f0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gradient-start);
  margin: 0 0 0.5rem;
}

.section-label.light {
  color: #8ab458;
}

.section h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
}

.section h2 em {
  font-style: italic;
}

.section-dark h2 {
  color: #f1f5f9;
}

/* ---- Two Column / Approach ---- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.approach-image-wrap img {
  border-radius: var(--radius-lg);
  min-height: 420px;
  object-fit: cover;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.approach-text .section-label {
  text-align: left;
}

.approach-text h2 {
  text-align: left;
  margin-bottom: 1.2rem;
}

.approach-text p {
  color: var(--text-secondary);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.2rem;
  color: var(--gradient-start);
  font-weight: 600;
  font-size: 0.95rem;
  transition: gap var(--transition);
}

.text-link:hover {
  gap: 0.7rem;
}

.text-link svg {
  flex-shrink: 0;
}

/* ---- Card Grid ---- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: all var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
  border-color: transparent;
}

.card-image {
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
}

.card-body h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  margin: 0 0 0.6rem;
  font-weight: 600;
}

.card-body p {
  color: var(--text-secondary);
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.card-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gradient-start);
  transition: color var(--transition);
}

.card-link:hover {
  color: var(--gradient-mid);
}

/* ---- Coming Soon Badge ---- */

.card-badge.coming-soon {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 50px;
  padding: 0.4rem 1rem;
}

/* ---- Metrics Grid ---- */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all var(--transition);
}

.metric-card:hover {
  border-color: rgba(107, 143, 60, 0.3);
  box-shadow: 0 8px 30px rgba(107, 143, 60, 0.08);
}

.metric-number {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-label {
  margin: 0.8rem 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---- Reviews ---- */

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.review-card {
  margin: 0;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition);
}

.review-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.review-text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  font-style: italic;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.review-card cite {
  font-style: normal;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.review-card cite span {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ---- CTA / Contact ---- */

.cta-box {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.cta-text p {
  color: #94a3b8;
  line-height: 1.7;
}

.cta-info {
  margin-top: 2rem;
}

.cta-info p {
  margin: 0.3rem 0;
  font-size: 0.95rem;
}

.cta-info a {
  color: #8ab458;
  transition: color var(--transition);
}

.cta-info a:hover {
  color: #a3c77a;
}

.cta-coaching-link {
  margin-top: 1.5rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(8px);
}

label {
  display: grid;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  gap: 0.35rem;
  color: #94a3b8;
}

input,
textarea {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  color: #f1f5f9;
  transition: border-color var(--transition);
}

input::placeholder,
textarea::placeholder {
  color: #475569;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--gradient-start);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.contact-form .button.primary {
  width: 100%;
  padding: 1rem;
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

/* ---- Footer ---- */

.site-footer {
  background: #0d0d0d;
  color: #94a3b8;
  padding: 3rem 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-brand .brand-title {
  color: #f1f5f9;
  margin-bottom: 0.3rem;
}

.footer-tagline {
  font-size: 0.9rem;
  margin: 0.3rem 0 0;
  color: #64748b;
}

.footer-credentials {
  font-size: 0.78rem;
  margin: 0.5rem 0 0;
  color: #64748b;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.footer-links a {
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #e2e8f0;
}

.footer-contact p {
  margin: 0.3rem 0;
  font-size: 0.9rem;
}

.footer-contact a {
  transition: color var(--transition);
}

.footer-contact a:hover {
  color: #8ab458;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.2rem 0;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.8rem;
  color: #475569;
}

/* ---- Scroll Animations ---- */

.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:nth-child(2).animate-in {
  transition-delay: 0.1s;
}

.card:nth-child(3).animate-in {
  transition-delay: 0.2s;
}

.metric-card:nth-child(2).animate-in {
  transition-delay: 0.08s;
}

.metric-card:nth-child(3).animate-in {
  transition-delay: 0.16s;
}

.metric-card:nth-child(4).animate-in {
  transition-delay: 0.24s;
}

.review-card:nth-child(2).animate-in {
  transition-delay: 0.1s;
}

.review-card:nth-child(3).animate-in {
  transition-delay: 0.2s;
}

/* ---- Responsive ---- */

@media (max-width: 960px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    right: 1.25rem;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: #1e1e1e;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    gap: 0.25rem;
    min-width: 200px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a:not(.button) {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    color: var(--text);
  }

  .nav-links a:not(.button):hover {
    background: var(--bg-alt);
  }

  .nav-links a:not(.button)::after {
    display: none;
  }

  /* Dropdown in mobile nav */
  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-toggle {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    color: var(--text);
  }

  .nav-dropdown-toggle:hover {
    background: var(--bg-alt);
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 1rem;
    min-width: auto;
  }

  .nav-dropdown.active .nav-dropdown-menu {
    display: flex;
  }

  .nav-links .button {
    margin-top: 0.5rem;
  }

  .hero {
    padding: 6rem 0 5rem;
    min-height: 70vh;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 7vw, 3.5rem);
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .review-grid {
    grid-template-columns: 1fr;
  }

  .cta-box {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 5rem 0 4rem;
    min-height: 60vh;
  }

  .section {
    padding: 4rem 0;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .button-row {
    flex-direction: column;
    align-items: center;
  }

  .button-row .button {
    width: 100%;
    text-align: center;
  }
}
