/* ===== DESIGN TOKENS ===== */
:root {
  /* Primary - Warm Pine */
  --forest: #2D4739;
  --spruce: #3A5F4A;
  --sage: #6B8F7A;
  --lichen: #A8C4B4;

  /* Secondary - Warm Neutrals */
  --cream: #FAF8F5;
  --canvas: #F2EDE6;
  --sand: #E5DED3;
  --rope: #C4B8A8;
  --bark: #8B7355;

  /* Accent - Sunset/Warmth */
  --ember: #C4593B;
  --sunset: #E07850;
  --golden: #D4A84B;

  /* Text */
  --ink: #2A2621;
  --stone: #5C564E;

  /* Typography */
  --font-display: 'DM Serif Display', serif;
  --font-body: 'Source Sans 3', sans-serif;
}

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

/* ===== BASE ===== */
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: var(--spruce);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--ember);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--forest);
  line-height: 1.2;
}

h1 { font-size: 52px; }
h2 { font-size: 36px; }
h3 { font-size: 28px; }
h4 { font-size: 22px; }

p {
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink);
}

.label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bark);
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.page-content {
  padding-top: 80px;
  padding-bottom: 80px;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--sand);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--forest);
  text-decoration: none;
}

.site-logo:hover {
  color: var(--forest);
}

/* ===== PRIMARY NAV ===== */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: var(--canvas);
  color: var(--forest);
}

.nav-link.active {
  color: var(--forest);
}

.nav-link .chevron {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: transform 0.2s ease;
}

.nav-item:hover .chevron {
  transform: rotate(180deg);
}

.nav-cta {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  background: var(--ember);
  color: white;
  text-decoration: none;
  margin-left: 8px;
}

.nav-cta:hover {
  background: var(--sunset);
  color: white;
  transform: translateY(-2px);
}

/* ===== MEGA DROPDOWN ===== */
.mega-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(45, 71, 57, 0.15);
  padding: 32px;
  min-width: 480px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  pointer-events: none;
}

.nav-item:hover .mega-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.mega-dropdown::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
}

.dropdown-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sand);
}

.dropdown-grid {
  display: grid;
  gap: 8px;
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: var(--canvas);
}

.dropdown-icon {
  width: 48px;
  height: 48px;
  background: var(--canvas);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.dropdown-item:hover .dropdown-icon {
  background: var(--sage);
}

.dropdown-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--forest);
  fill: none;
  stroke-width: 1.5;
  transition: all 0.2s ease;
}

.dropdown-item:hover .dropdown-icon svg {
  stroke: white;
}

.dropdown-content h4 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--forest);
  margin-bottom: 4px;
}

.dropdown-content p {
  font-size: 14px;
  color: var(--stone);
  line-height: 1.5;
}

.dropdown-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--sand);
}

.view-all-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--spruce);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.view-all-link:hover {
  color: var(--ember);
}

.view-all-link span {
  transition: transform 0.2s ease;
}

.view-all-link:hover span {
  transform: translateX(4px);
}

/* ===== MOBILE NAV ===== */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  z-index: 1002;
  position: relative;
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
  stroke: var(--ink);
  stroke-width: 2;
  fill: none;
  transition: stroke 0.3s ease;
}

.mobile-toggle.active svg {
  stroke: var(--cream);
}

.mobile-toggle .line-1,
.mobile-toggle .line-2,
.mobile-toggle .line-3 {
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-toggle.active .line-1 {
  transform: translateY(6px) rotate(45deg);
}

.mobile-toggle.active .line-2 {
  opacity: 0;
}

.mobile-toggle.active .line-3 {
  transform: translateY(-6px) rotate(-45deg);
}

/* ===== MOBILE OVERLAY ===== */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: var(--forest);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-overlay-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mobile-nav-item {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-overlay.active .mobile-nav-item {
  opacity: 1;
  transform: translateY(0);
}

.mobile-overlay.active .mobile-nav-item:nth-child(1) { transition-delay: 0.1s; }
.mobile-overlay.active .mobile-nav-item:nth-child(2) { transition-delay: 0.15s; }
.mobile-overlay.active .mobile-nav-item:nth-child(3) { transition-delay: 0.2s; }
.mobile-overlay.active .mobile-nav-item:nth-child(4) { transition-delay: 0.25s; }
.mobile-overlay.active .mobile-nav-item:nth-child(5) { transition-delay: 0.3s; }
.mobile-overlay.active .mobile-nav-item:nth-child(6) { transition-delay: 0.35s; }

.mobile-nav-link {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--cream);
  text-decoration: none;
  padding: 12px 24px;
  display: block;
  transition: all 0.2s ease;
  position: relative;
}

.mobile-nav-link:hover {
  color: var(--golden);
}

.mobile-nav-link::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 24px;
  right: 24px;
  height: 2px;
  background: var(--sage);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.mobile-nav-link:hover::after {
  transform: scaleX(1);
}

.mobile-nav-cta {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  padding: 16px 32px;
  border-radius: 6px;
  background: var(--ember);
  color: white;
  text-decoration: none;
  margin-top: 24px;
  transition: all 0.25s ease;
  opacity: 0;
  transform: translateY(20px);
}

.mobile-overlay.active .mobile-nav-cta {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s;
}

.mobile-nav-cta:hover {
  background: var(--sunset);
  color: white;
  transform: translateY(-2px);
}

.mobile-overlay-bg {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  pointer-events: none;
}

.mobile-overlay-bg svg {
  width: 100%;
  height: 100%;
}

.mobile-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  opacity: 0;
  transform: rotate(-90deg);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.2s;
}

.mobile-overlay.active .mobile-close {
  opacity: 1;
  transform: rotate(0deg);
}

.mobile-close svg {
  width: 28px;
  height: 28px;
  stroke: var(--cream);
  stroke-width: 2;
  fill: none;
  transition: stroke 0.2s ease;
}

.mobile-close:hover svg {
  stroke: var(--golden);
}

/* ===== BUTTONS ===== */
.btn {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: var(--forest);
  color: white;
}

.btn-primary:hover {
  background: var(--spruce);
  color: white;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--canvas);
  color: var(--forest);
  border: 2px solid var(--sage);
}

.btn-secondary:hover {
  background: var(--sage);
  color: white;
  border-color: var(--sage);
}

.btn-accent {
  background: var(--ember);
  color: white;
}

.btn-accent:hover {
  background: var(--sunset);
  color: white;
  transform: translateY(-2px);
}

/* ===== LINKS ===== */
.arrow-link {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  color: var(--spruce);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.arrow-link:hover {
  color: var(--ember);
  border-bottom-color: var(--ember);
}

.arrow-link span {
  transition: transform 0.2s ease;
}

.arrow-link:hover span {
  transform: translateX(4px);
}

/* ===== CARDS ===== */
.card {
  background: white;
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 4px 20px rgba(45, 71, 57, 0.08);
}

.service-card {
  background: var(--canvas);
  border-radius: 20px;
  padding: 36px;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--sage), var(--golden));
}

.service-card h4 {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--forest);
  margin-bottom: 14px;
}

.service-card p {
  font-size: 18px;
  color: var(--stone);
  line-height: 1.75;
}

/* ===== HERO ===== */
.hero {
  background: var(--canvas);
  border-radius: 24px;
  padding: 80px 60px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 52px;
  color: var(--forest);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero .tagline {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 22px;
  color: var(--spruce);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.hero p {
  font-size: 22px;
  color: var(--stone);
  line-height: 1.8;
  margin-bottom: 36px;
}

.topo-bg {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
}

.topo-bg svg {
  width: 100%;
  height: 100%;
}

/* ===== PAGE HEADER ===== */
.page-header {
  text-align: center;
  padding: 60px 0 40px;
}

.page-header h1 {
  margin-bottom: 16px;
}

.page-header p {
  font-size: 22px;
  color: var(--stone);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== SECTION SPACING ===== */
.section {
  margin-bottom: 80px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--forest);
  margin-bottom: 32px;
}

/* ===== PORTFOLIO GRID ===== */
.portfolio-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  justify-content: center;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 6px;
  border: 2px solid var(--sand);
  background: transparent;
  color: var(--stone);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--sage);
  color: var(--forest);
}

.filter-btn.active {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}

.project-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(45, 71, 57, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  display: block;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(45, 71, 57, 0.12);
}

.project-card-image {
  height: 200px;
  background: var(--canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rope);
  font-size: 14px;
  overflow: hidden;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-body {
  padding: 24px;
}

.project-card-body h3 {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--forest);
  margin-bottom: 8px;
}

.project-card-body p {
  font-size: 16px;
  color: var(--stone);
  line-height: 1.6;
}

.project-card-type {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--bark);
  margin-top: 12px;
}

/* ===== CASE STUDY ===== */
.case-study-hero {
  background: var(--canvas);
  border-radius: 24px;
  padding: 60px;
  margin-bottom: 60px;
}

.case-study-hero .label {
  margin-bottom: 16px;
  display: block;
}

.case-study-hero h1 {
  margin-bottom: 16px;
}

.case-study-hero p {
  font-size: 22px;
  color: var(--stone);
  max-width: 700px;
}

.case-study-content {
  max-width: 800px;
  margin: 0 auto;
  overflow-x: hidden;
}

.case-study-content h2 {
  margin-top: 48px;
  margin-bottom: 20px;
}

.case-study-content h3 {
  margin-top: 32px;
  margin-bottom: 16px;
}

.case-study-content p {
  margin-bottom: 20px;
}

.case-study-content ul,
.case-study-content ol {
  margin: 0 0 20px 24px;
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink);
}

.case-study-content li {
  margin-bottom: 8px;
}

.case-study-content img {
  border-radius: 12px;
  margin: 32px 0;
}

.case-study-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  margin-bottom: 24px;
}

.case-study-content th,
.case-study-content td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--sand);
}

.case-study-content th {
  font-weight: 700;
  color: var(--forest);
}

.case-study-content .table-wrap {
  overflow-x: auto;
}

/* ===== HERO ACTIONS ===== */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

/* ===== PROBLEM SECTION ===== */
.problem-section {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.problem-section .section-title {
  margin-bottom: 20px;
}

.problem-section p {
  font-size: 20px;
  color: var(--stone);
  line-height: 1.8;
}

/* ===== GUIDE INTRO ===== */
.guide-intro {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.guide-intro p {
  font-size: 20px;
  color: var(--stone);
  line-height: 1.8;
}

/* ===== PROCESS STEPS ===== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.process-step {
  background: var(--canvas);
  border-radius: 16px;
  padding: 32px;
}

.process-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--forest);
  color: white;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 16px;
}

.process-step h4 {
  margin-bottom: 12px;
}

.process-step p {
  font-size: 16px;
  color: var(--stone);
  line-height: 1.7;
}

/* ===== SERVICES GRID ===== */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* ===== TESTIMONIALS ===== */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.testimonial-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(45, 71, 57, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testimonial-card blockquote {
  margin: 0;
}

.testimonial-card blockquote p {
  font-size: 16px;
  color: var(--stone);
  line-height: 1.75;
  font-style: italic;
}

.testimonial-card cite {
  display: block;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  font-style: normal;
  color: var(--forest);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--forest);
  color: var(--lichen);
  padding: 60px 0 40px;
  margin-top: 80px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--cream);
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 16px;
  color: var(--lichen);
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  gap: 32px;
}

.footer-nav a {
  font-size: 15px;
  font-weight: 600;
  color: var(--lichen);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--cream);
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 24px 40px 0;
  border-top: 1px solid var(--spruce);
  font-size: 14px;
  color: var(--lichen);
}

.footer-bottom p {
  color: var(--lichen);
}

/* ===== CONTACT ===== */
.contact-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .primary-nav {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .header-inner {
    padding: 0 24px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }

  .page-content {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  h1 { font-size: 34px; }
  h2 { font-size: 28px; }

  .hero {
    padding: 48px 32px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 18px;
  }

  .case-study-hero {
    padding: 28px;
  }

  .case-study-content table {
    display: block;
    overflow-x: auto;
    font-size: 14px;
  }

  .footer-inner {
    flex-direction: column;
    padding: 0 32px;
  }

  .footer-nav {
    flex-direction: column;
    gap: 16px;
  }

  .footer-bottom {
    padding: 24px 24px 0;
  }

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

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

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

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

  .problem-section p,
  .guide-intro p {
    font-size: 18px;
  }
}
