/* ==========================================================================
   miTerra — Main Stylesheet
   Fonts: Instrument Serif (display) + Inter 300/400/500/600 (body)
   Palette: Forest Green primary, beige bg, deep charcoal text
   Modes: Light (default) + Dark (prefers-color-scheme + [data-theme="dark"])
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */

:root {
  /* Brand colours */
  --color-green-primary:   #4A7C59;
  --color-green-hover:     #2C3E32;
  --color-green-light:     #6B9E73;
  --color-green-muted:     #EAF0EB;

  /* Surfaces */
  --color-bg:              #F5F3F0;
  --color-bg-alt:          #EDEAE6;
  --color-surface:         #FFFFFF;
  --color-surface-raised:  #FAFAF8;

  /* Text */
  --color-text:            #28251D;
  --color-text-secondary:  #5A5650;
  --color-text-muted:      #8A867E;
  --color-text-inverse:    #F5F3F0;

  /* Borders */
  --color-border:          #DDD9D2;
  --color-border-light:    #E8E4DF;

  /* Special sections */
  --color-finca-bg:        #1C2B20;
  --color-finca-overlay:   rgba(20, 32, 22, 0.72);

  /* Typography */
  --font-display:  'Instrument Serif', Georgia, serif;
  --font-body:     'Inter', system-ui, -apple-system, sans-serif;

  /* Type scale */
  --text-xs:    0.75rem;     /* 12px */
  --text-sm:    0.875rem;    /* 14px */
  --text-base:  1rem;        /* 16px */
  --text-lg:    1.125rem;    /* 18px */
  --text-xl:    1.25rem;     /* 20px */
  --text-2xl:   1.5rem;      /* 24px */
  --text-3xl:   1.875rem;    /* 30px */
  --text-4xl:   2.25rem;     /* 36px */
  --text-5xl:   3rem;        /* 48px */
  --text-hero:  clamp(2.5rem, 5.5vw, 4.5rem);

  /* Spacing */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;

  /* Layout */
  --container-max:    1200px;
  --container-pad:    clamp(1.25rem, 5vw, 3rem);
  --section-py:       clamp(4rem, 8vw, 7rem);
  --header-h:         72px;

  /* Radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:  0 12px 32px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.06);

  /* Transitions */
  --transition-fast:  150ms ease;
  --transition-base:  250ms ease;
  --transition-slow:  400ms ease;
}

/* Dark mode tokens */
[data-theme="dark"],
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg:              #16191A;
    --color-bg-alt:          #1E2223;
    --color-surface:         #232829;
    --color-surface-raised:  #2A2F30;
    --color-text:            #EDE9E4;
    --color-text-secondary:  #A8A49E;
    --color-text-muted:      #6E6A65;
    --color-border:          #2E3335;
    --color-border-light:    #282D2E;
    --color-green-muted:     #1E2D22;
    --color-finca-bg:        #0F1812;
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
    --shadow-lg:  0 12px 32px rgba(0,0,0,0.4), 0 4px 8px rgba(0,0,0,0.2);
  }
}

[data-theme="dark"] {
  --color-bg:              #16191A;
  --color-bg-alt:          #1E2223;
  --color-surface:         #232829;
  --color-surface-raised:  #2A2F30;
  --color-text:            #EDE9E4;
  --color-text-secondary:  #A8A49E;
  --color-text-muted:      #6E6A65;
  --color-border:          #2E3335;
  --color-border-light:    #282D2E;
  --color-green-muted:     #1E2D22;
  --color-finca-bg:        #0F1812;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg:  0 12px 32px rgba(0,0,0,0.4), 0 4px 8px rgba(0,0,0,0.2);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--transition-slow), color var(--transition-slow);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul, ol { list-style: none; }

address { font-style: normal; }

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--color-green-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Selection */
::selection {
  background: var(--color-green-primary);
  color: #fff;
}

/* --------------------------------------------------------------------------
   3. LAYOUT UTILITIES
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--section-py);
}

/* Alternating section backgrounds */
.about    { background-color: var(--color-bg); }
.services { background-color: var(--color-bg-alt); }
.technology { background-color: var(--color-bg); }
.why      { background-color: var(--color-bg-alt); }
.contact  { background-color: var(--color-bg); }

/* --------------------------------------------------------------------------
   4. TYPOGRAPHY COMPONENTS
   -------------------------------------------------------------------------- */

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-green-primary);
  margin-bottom: var(--space-4);
}

.section-label--light {
  color: rgba(255,255,255,0.6);
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 3.5vw, var(--text-5xl));
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}

.section-heading--light {
  color: #fff;
}

.section-intro {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 52ch;
  line-height: 1.7;
}

.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-header--center {
  text-align: center;
}

.section-header--center .section-intro {
  margin-inline: auto;
}

.body-lg {
  font-size: var(--text-lg);
  line-height: 1.75;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-5);
}

p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

p + p {
  margin-top: var(--space-4);
}

strong {
  font-weight: 600;
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   5. BUTTONS
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 0.8125rem 1.625rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  transition: background-color var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast),
              transform var(--transition-fast),
              box-shadow var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* Primary: green fill */
.btn-primary {
  background-color: var(--color-green-primary);
  color: #fff;
  border-color: var(--color-green-primary);
}

.btn-primary:hover {
  background-color: var(--color-green-hover);
  border-color: var(--color-green-hover);
  box-shadow: var(--shadow-md);
}

/* Ghost: transparent, green text */
.btn-ghost {
  background-color: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

.btn-ghost:hover {
  background-color: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.8);
}

/* Outline light — for dark backgrounds */
.btn-outline-light {
  background-color: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}

.btn-outline-light:hover {
  background-color: rgba(255,255,255,0.1);
  border-color: #fff;
}

/* Full width */
.btn-full {
  width: 100%;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   6. HEADER
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(245,243,240,0.92);
  transition: background-color var(--transition-slow),
              border-color var(--transition-slow);
}

[data-theme="dark"] .site-header {
  background-color: rgba(22,25,26,0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: var(--space-8);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
  text-decoration: none;
  color: var(--color-text);
  transition: opacity var(--transition-fast);
}

.logo:hover {
  opacity: 0.75;
}

.logo-mark {
  flex-shrink: 0;
  color: var(--color-green-primary);
}

.logo-wordmark {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--color-text);
  line-height: 1;
}

/* Image-based logo (real brand files) */
.logo--img {
  gap: 0;
}

.logo-img {
  display: block;
  height: 44px;
  width: auto;
  /* The logo JPGs have a white background — mix-blend-mode
     makes them work on both light and dark backgrounds */
  mix-blend-mode: multiply;
  border-radius: 2px;
}

[data-theme="dark"] .logo-img {
  /* In dark mode, invert the white-bg logo so it reads on dark surfaces */
  filter: invert(1) hue-rotate(180deg) saturate(0.85) brightness(1.1);
  mix-blend-mode: normal;
}

/* Nav */
.site-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}

.site-nav a {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-secondary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast),
              background-color var(--transition-fast);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--color-text);
  background-color: var(--color-border-light);
}

/* Nav CTA pill */
.site-nav a.nav-cta {
  font-weight: 500;
  color: var(--color-green-primary);
  border: 1.5px solid var(--color-green-primary);
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
}

.site-nav a.nav-cta:hover {
  background-color: var(--color-green-primary);
  color: #fff;
}

/* Header controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  margin-left: auto;
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  background: transparent;
  border: 1px solid transparent;
  transition: color var(--transition-fast),
              background-color var(--transition-fast),
              border-color var(--transition-fast);
}

.theme-toggle:hover {
  color: var(--color-text);
  background-color: var(--color-border-light);
  border-color: var(--color-border);
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background-color: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition-base),
              opacity var(--transition-base),
              width var(--transition-base);
  transform-origin: center;
}

/* Hamburger → X animation */
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  width: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   7. HERO
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-finca-bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  /* REPLACE: set background-image to url('assets/images/hero-coffee.jpg') */
  background-image: url('assets/images/hero-coffee.jpg');
  background-size: cover;
  background-position: center 40%;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(20, 32, 22, 0.78) 0%,
    rgba(20, 32, 22, 0.55) 50%,
    rgba(28, 43, 32, 0.45) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-block: clamp(4rem, 10vw, 8rem);
  max-width: 760px;
}

.hero-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--space-5);
}

.hero-heading {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: var(--space-6);
}

.hero-sub {
  font-size: clamp(var(--text-base), 1.8vw, var(--text-lg));
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255,255,255,0.72);
  max-width: 52ch;
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.hero-scroll-hint {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.35);
  animation: scrollBob 2.2s ease-in-out infinite;
}

@keyframes scrollBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* --------------------------------------------------------------------------
   8. ABOUT
   -------------------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.about-text {
  padding-top: var(--space-4);
}

.about-visual {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Image placeholder (shown until real images are added) */
.image-placeholder {
  position: relative;
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.image-placeholder--tall {
  aspect-ratio: 3 / 4;
}

/* When real images are added, these styles apply */
.image-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Stat strip */
.about-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.stat {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-4);
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-green-primary);
  line-height: 1.1;
  margin-bottom: var(--space-1);
}

.stat-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Founder block */
.about-founder {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border-light);
}

.founder-name {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.founder-title {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-green-primary);
  margin-bottom: var(--space-3);
}

.founder-bio {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   9. SERVICES
   -------------------------------------------------------------------------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-10);
}

.service-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

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

.service-card--accent {
  background-color: var(--color-green-muted);
  border-color: rgba(74,124,89,0.2);
}

.service-num {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-green-primary);
  opacity: 0.7;
}

.service-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text);
  flex-shrink: 0;
}

.service-body {
  font-size: var(--text-sm);
  line-height: 1.75;
  color: var(--color-text-secondary);
  flex: 1;
}

.service-note {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-green-primary);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-light);
  margin-top: auto;
}

.service-card--accent .service-note {
  border-top-color: rgba(74,124,89,0.25);
}

.services-cta {
  text-align: center;
}

/* --------------------------------------------------------------------------
   10. TECHNOLOGY
   -------------------------------------------------------------------------- */

.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

.tech-list {
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  list-style: none;
}

.tech-list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--space-4);
  align-items: start;
}

.tech-icon {
  color: var(--color-green-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.8;
  flex-shrink: 0;
  letter-spacing: 0;
}

.tech-list strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.tech-list p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0;
}

/* --------------------------------------------------------------------------
   11. FINCA EL EDÉN
   -------------------------------------------------------------------------- */

.finca {
  position: relative;
  background-color: var(--color-finca-bg);
  padding-block: 0;
  overflow: hidden;
}

.finca-bg {
  position: absolute;
  inset: 0;
  /* REPLACE: set background-image to url('assets/images/finca-landscape.jpg') */
  background-image: url('assets/images/finca-landscape.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.finca-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(15, 24, 18, 0.88) 0%,
    rgba(28, 43, 32, 0.72) 100%
  );
}

.finca-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
  padding-block: var(--section-py);
}

.finca-text {
  color: #fff;
}

.finca-location {
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--space-5);
  margin-top: calc(-1 * var(--space-2));
}

.finca-body {
  font-size: var(--text-base);
  line-height: 1.75;
  color: rgba(255,255,255,0.72);
  margin-bottom: var(--space-4);
}

.finca-body + .btn {
  margin-top: var(--space-4);
}

/* Finca pillar cards */
.finca-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-self: center;
}

.finca-pillar {
  background-color: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: background-color var(--transition-base);
}

.finca-pillar:hover {
  background-color: rgba(255,255,255,0.11);
}

.pillar-icon {
  font-size: var(--text-xl);
  line-height: 1;
  display: block;
  margin-bottom: var(--space-1);
}

.finca-pillar strong {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.finca-pillar p {
  font-size: var(--text-xs);
  line-height: 1.65;
  color: rgba(255,255,255,0.55);
  margin: 0;
}

/* --------------------------------------------------------------------------
   12. WHY MITERRA
   -------------------------------------------------------------------------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

.why-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

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

.why-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--color-green-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-green-primary);
  flex-shrink: 0;
}

.why-card h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.why-card p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* --------------------------------------------------------------------------
   13. CONTACT
   -------------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.contact-text {
  padding-top: var(--space-4);
}

.contact-details {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.contact-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.contact-item a {
  color: var(--color-green-primary);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.contact-item a:hover {
  color: var(--color-green-hover);
  text-decoration: underline;
}

.contact-item span {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* Contact form */
.contact-form {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.form-group label span {
  color: var(--color-green-primary);
  margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.6875rem 0.875rem;
  line-height: 1.5;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              background-color var(--transition-fast);
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-green-primary);
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.15);
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A867E' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

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

.form-footer {
  margin-top: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.form-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  margin: 0;
}

/* Form messages */
.form-message {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin-top: var(--space-4);
}

.form-message[hidden] {
  display: none;
}

.form-message--success {
  background-color: var(--color-green-muted);
  border: 1px solid rgba(74,124,89,0.3);
  color: var(--color-green-hover);
}

.form-message--error {
  background-color: #fff0f0;
  border: 1px solid rgba(180, 60, 60, 0.25);
  color: #7a2020;
}

[data-theme="dark"] .form-message--error {
  background-color: rgba(180, 60, 60, 0.12);
  color: #f0a0a0;
}

/* --------------------------------------------------------------------------
   14. FOOTER
   -------------------------------------------------------------------------- */

.site-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border-light);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(3rem, 5vw, 6rem);
  padding-block: clamp(3rem, 5vw, 4.5rem);
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-tagline {
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.footer-col h4 {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.footer-col address,
.footer-col nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-col a,
.footer-col address {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.65;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--color-green-primary);
  text-decoration: underline;
}

/* Legal bar */
.footer-legal {
  background-color: var(--color-bg-alt);
  border-top: 1px solid var(--color-border-light);
  padding-block: var(--space-5);
}

.footer-legal .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.footer-legal p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0;
}

/* --------------------------------------------------------------------------
   15. RESPONSIVE — TABLET (max 960px)
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {

  .services-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin-inline: auto;
  }

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

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .footer-cols {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   16. RESPONSIVE — MOBILE (max 720px)
   -------------------------------------------------------------------------- */

@media (max-width: 720px) {

  /* Nav: full-screen drawer */
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background-color: var(--color-bg);
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--space-8) var(--container-pad);
    gap: var(--space-2);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    z-index: 99;
    overflow-y: auto;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    width: 100%;
  }

  .site-nav a {
    font-size: var(--text-xl);
    font-family: var(--font-display);
    padding: var(--space-3) 0;
    width: 100%;
    border-radius: 0;
    border-bottom: 1px solid var(--color-border-light);
  }

  .site-nav a.nav-cta {
    margin-top: var(--space-4);
    border-radius: var(--radius-sm);
    text-align: center;
    justify-content: center;
    border-color: var(--color-green-primary);
  }

  .nav-toggle {
    display: flex;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-stat-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Tech */
  .tech-grid {
    grid-template-columns: 1fr;
  }

  .tech-visual {
    order: -1;
  }

  /* Finca */
  .finca-bg {
    background-attachment: scroll; /* disable fixed on mobile */
  }

  .finca-content {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .finca-pillars {
    grid-template-columns: 1fr 1fr;
  }

  /* Why */
  .why-grid {
    grid-template-columns: 1fr;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Form */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-cols {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .footer-legal .container {
    flex-direction: column;
    text-align: center;
  }

  /* Hero */
  .hero-heading br {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   17. REDUCED MOTION
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   18. PRINT
   -------------------------------------------------------------------------- */

@media print {
  .site-header,
  .hero-scroll-hint,
  .header-controls,
  .services-cta,
  .finca-pillars { display: none; }

  body {
    font-size: 11pt;
    color: #000;
    background: #fff;
  }
}
