/* ==========================================================================
   Geoffline Design System CSS
   Clean, offline-first, mobile-friendly stylesheet matching Theme.swift
   ========================================================================== */

:root {
  /* Brand neutrals */
  --bg: #FFFFFF;
  --surface: #F4F6F2;
  --surface-card: #FFFFFF;
  --surface-card-hover: #FAFCF8;
  --border: rgba(28, 35, 33, 0.08);
  --text: #1C2321;
  --text-secondary: rgba(28, 35, 33, 0.65);
  --text-tertiary: rgba(28, 35, 33, 0.45);

  /* Brand Palette (Theme.swift) */
  --ocean: #5AB0E0;
  --ocean-deep: #2D7FB8;
  --ocean-light: #BFE3F5;

  --land: #6CC070;
  --land-deep: #3E8E48;
  --land-light: #C9EBC0;

  --earth: #B88A5E;
  --earth-deep: #7A5638;
  --earth-light: #EAD7BC;

  --sea: #3B7FC4;
  --sea-deep: #24578E;

  --lagoon: #3DB5AE;
  --lagoon-deep: #23827C;

  --forest: #3F9A5B;
  --forest-deep: #286B3B;

  --desert: #E6C27A;
  --desert-deep: #B8914A;
  --desert-label: #4A3420;

  --clay: #CD7B55;
  --clay-deep: #94502F;

  --sun: #F7C948;
  --sun-deep: #C99A1E;

  --coral: #F06A5D;
  --coral-deep: #B94438;

  --lavender: #9B7FD1;
  --lavender-deep: #6F55A6;

  /* Geometry & Chunky Metrics (Metrics.swift) */
  --radius-card: 28px;
  --radius-btn: 20px;
  --radius-pill: 9999px;
  --lip: 5px;

  /* Typography */
  --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Fredoka", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 960px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1113;
    --surface: #1A1F22;
    --surface-card: #15191C;
    --surface-card-hover: #1E2327;
    --border: rgba(244, 246, 242, 0.1);
    --text: #F4F6F2;
    --text-secondary: rgba(244, 246, 242, 0.68);
    --text-tertiary: rgba(244, 246, 242, 0.45);
  }
}

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

html {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Language Visibility Rules */
[data-lang] {
  display: none;
}
html[data-current-lang="en"] [data-lang="en"],
html[data-current-lang="es"] [data-lang="es"] {
  display: block;
}
html[data-current-lang="en"] span[data-lang="en"],
html[data-current-lang="es"] span[data-lang="es"],
html[data-current-lang="en"] a[data-lang="en"],
html[data-current-lang="es"] a[data-lang="es"] {
  display: inline;
}
html[data-current-lang="en"] .badge[data-lang="en"],
html[data-current-lang="es"] .badge[data-lang="es"],
html[data-current-lang="en"] .btn[data-lang="en"],
html[data-current-lang="es"] .btn[data-lang="es"] {
  display: inline-flex;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--ocean), var(--sea));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 var(--sea-deep);
  color: #FFFFFF;
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: var(--radius-btn);
  transition: all 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
  background-color: var(--surface);
}

.nav-link.active {
  color: var(--sea);
  background-color: var(--surface);
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  background-color: var(--surface);
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn.active {
  background-color: var(--surface-card);
  color: var(--text);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Hero Section */
.hero {
  padding: 56px 0 36px;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background-color: var(--surface);
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ocean-deep);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2.5vw, 1.28rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.5;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 36px;
}

/* Chunky Pushable Buttons (Theme.swift Tone & Metrics) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 26px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  user-select: none;
}

.btn-ocean {
  background-color: var(--ocean);
  color: #FFFFFF;
  box-shadow: 0 var(--lip) 0 var(--ocean-deep);
}
.btn-ocean:hover {
  background-color: #51a4d1;
}
.btn-ocean:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--ocean-deep);
}

.btn-land {
  background-color: var(--land);
  color: #FFFFFF;
  box-shadow: 0 var(--lip) 0 var(--land-deep);
}
.btn-land:hover {
  background-color: #61b365;
}
.btn-land:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--land-deep);
}

.btn-neutral {
  background-color: var(--surface);
  color: var(--text);
  box-shadow: 0 var(--lip) 0 var(--border);
}
.btn-neutral:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--border);
}

.btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Feature Badges */
.feature-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 36px 0;
}

.card {
  background-color: var(--surface);
  border-radius: var(--radius-card);
  padding: 26px;
  border: 1px solid var(--border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
  box-shadow: 0 3px 0 rgba(0,0,0,0.12);
}

.card-icon.ocean { background-color: var(--ocean); color: #fff; }
.card-icon.land { background-color: var(--land); color: #fff; }
.card-icon.sea { background-color: var(--sea); color: #fff; }
.card-icon.lagoon { background-color: var(--lagoon); color: #fff; }
.card-icon.sun { background-color: var(--sun); color: #1C2321; }
.card-icon.coral { background-color: var(--coral); color: #fff; }
.card-icon.lavender { background-color: var(--lavender); color: #fff; }
.card-icon.earth { background-color: var(--earth); color: #fff; }

.card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Section Header */
.section-header {
  text-align: center;
  margin: 48px 0 24px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto;
}

/* FAQ Accordion / Cards */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 32px 0;
}

.faq-item {
  background-color: var(--surface);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  border: 1px solid var(--border);
}

.faq-item h3 {
  font-size: 1.18rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-item p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.55;
  margin-bottom: 8px;
}

.faq-item p:last-child {
  margin-bottom: 0;
}

.faq-item ul {
  margin: 8px 0 8px 24px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.faq-item li {
  margin-bottom: 4px;
}

/* Legal & Long Content Styling */
.legal-wrapper {
  max-width: 780px;
  margin: 32px auto 64px;
}

.legal-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.legal-header h1 {
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

.legal-section {
  margin-bottom: 36px;
}

.legal-section h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.legal-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 16px 0 8px;
  color: var(--text);
}

.legal-section p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 12px;
}

.legal-section ul {
  margin: 8px 0 16px 24px;
  color: var(--text-secondary);
}

.legal-section li {
  margin-bottom: 6px;
  line-height: 1.55;
}

.highlight-box {
  background-color: var(--surface);
  border-left: 4px solid var(--ocean);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.95rem;
}

.highlight-box.coral {
  border-left-color: var(--coral);
}

.highlight-box.land {
  border-left-color: var(--land);
}

/* Contact Box */
.contact-card {
  background: linear-gradient(135deg, var(--surface), var(--surface-card));
  border-radius: var(--radius-card);
  padding: 32px;
  text-align: center;
  border: 1px solid var(--border);
  margin: 40px 0;
}

.contact-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.contact-card p {
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 20px;
}

.email-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: var(--ocean-light);
  color: var(--ocean-deep);
  border-radius: var(--radius-btn);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--ocean-deep);
  transition: transform 0.1s ease;
}

.email-pill:active {
  transform: translateY(2px);
}

/* Footer */
footer.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background-color: var(--surface);
  padding: 40px 0 28px;
}

.footer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  list-style: none;
}

.footer-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

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

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .nav-wrap {
    height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
  }
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    overflow-x: auto;
    padding-top: 8px;
  }
  .nav-link {
    font-size: 0.88rem;
    padding: 6px 10px;
  }
  .hero {
    padding: 36px 0 24px;
  }
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }
  .btn {
    width: 100%;
  }
  .card {
    padding: 20px;
  }
  .faq-item {
    padding: 20px;
  }
  .contact-card {
    padding: 24px 18px;
  }
}
