/* =========================================
   LokaBay — Design System & Landing CSS
   ========================================= */

:root {
  --ink: #0a0f1a;
  --sand: #f5f0e8;
  --terracotta: #c4622d;
  --terracotta-light: #e8814a;
  --ocean: #1a5276;
  --ocean-light: #2980b9;
  --cream: #faf7f2;
  --grey: #6b7280;
  --light-border: rgba(10, 15, 26, 0.08);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 { font-family: var(--font-heading); }

/* ── Navigation ─────────────────────────── */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1.2rem 2rem;
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--light-border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.logo span { color: var(--terracotta); }
.nav-tag {
  font-size: 0.8rem;
  color: var(--grey);
  background: rgba(10, 15, 26, 0.05);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
}
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  text-decoration: none;
  color: var(--grey);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--terracotta); }
.nav-cta {
  background: var(--terracotta) !important;
  color: white !important;
  padding: 0.5rem 1.2rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--terracotta-light) !important; }

/* ── Hero ───────────────────────────────── */
.hero {
  padding: 9rem 2rem 5rem;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-content { max-width: 560px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(196, 98, 45, 0.08);
  color: var(--terracotta);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 1.5rem;
  color: var(--ink);
}
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--terracotta), var(--ocean));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.15rem;
  color: var(--grey);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 480px;
}
.hero-actions { display: flex; gap: 1rem; align-items: center; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--terracotta);
  color: white;
  padding: 0.9rem 2rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--terracotta-light); transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--grey);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.btn-secondary:hover { color: var(--ink); }

.hero-visual {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 32px 64px rgba(10, 15, 26, 0.12);
}
.hero-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}
.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(10,15,26,0.85) 0%, transparent 100%);
  padding: 2rem;
}
.hero-stat {
  display: flex;
  gap: 2rem;
  color: white;
}
.hero-stat-item {}
.hero-stat-item .val {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
}
.hero-stat-item .label {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 2px;
}

/* ── Stats Bar ───────────────────────────── */
.stats-bar {
  background: var(--ink);
  padding: 2rem;
  margin-top: -1px;
}
.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.stat-item { text-align: center; }
.stat-item .val {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: white;
}
.stat-item .label {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

/* ── Features ───────────────────────────── */
.features {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ocean);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.8rem;
}
.section-title {
  font-size: 2.4rem;
  letter-spacing: -0.8px;
  margin-bottom: 1rem;
  color: var(--ink);
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--grey);
  max-width: 560px;
  margin-bottom: 3.5rem;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feature-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid var(--light-border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(10,15,26,0.08);
}
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  font-size: 1.4rem;
}
.feature-icon.t { background: rgba(196,98,45,0.1); }
.feature-icon.o { background: rgba(26,82,118,0.1); }
.feature-icon.g { background: rgba(34,197,94,0.1); }
.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--ink);
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--grey);
  line-height: 1.6;
}

/* ── Neighborhoods ──────────────────────── */
.neighborhoods {
  background: white;
  padding: 6rem 2rem;
}
.neighborhoods-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.neighborhoods-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.n-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--light-border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.n-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(10,15,26,0.08);
}
.n-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.n-body { padding: 1.2rem; }
.n-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.n-body .location { font-size: 0.8rem; color: var(--grey); margin-bottom: 0.8rem; }
.n-yield {
  display: inline-block;
  background: rgba(196,98,45,0.08);
  color: var(--terracotta);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 6px;
}

/* ── CTA Section ─────────────────────────── */
.cta-section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.cta-box {
  background: var(--ink);
  border-radius: 24px;
  padding: 4rem;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(196,98,45,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.cta-box h2 {
  font-size: 2.5rem;
  color: white;
  margin-bottom: 1rem;
  letter-spacing: -0.8px;
  position: relative;
}
.cta-box p {
  color: rgba(255,255,255,0.65);
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 auto 2.5rem;
  position: relative;
}

/* ── Footer ─────────────────────────────── */
footer {
  border-top: 1px solid var(--light-border);
  padding: 2.5rem 2rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-inner p { font-size: 0.85rem; color: var(--grey); }

/* ── Calculator Page ─────────────────────── */
.calc-page {
  min-height: 100vh;
  background: var(--cream);
}
.calc-page nav { border-bottom: none; }
.calc-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}
.calc-header { margin-bottom: 2.5rem; }
.calc-header h1 {
  font-size: 2.2rem;
  letter-spacing: -0.8px;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.calc-header p { color: var(--grey); font-size: 1rem; }

.calc-form {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid var(--light-border);
}
.form-group { margin-bottom: 1.8rem; }
.form-group:last-of-type { margin-bottom: 2rem; }
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid rgba(10,15,26,0.1);
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--ink);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(196,98,45,0.1);
}
.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='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
.form-hint {
  font-size: 0.78rem;
  color: var(--grey);
  margin-top: 0.4rem;
}

.calc-submit {
  width: 100%;
  background: var(--terracotta);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.3px;
}
.calc-submit:hover { background: var(--terracotta-light); transform: translateY(-1px); }
.calc-submit:active { transform: translateY(0); }

/* Results Panel */
.calc-results {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid var(--light-border);
  position: sticky;
  top: 100px;
}
.calc-results h2 {
  font-size: 1.3rem;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.calc-results .results-subtitle {
  color: var(--grey);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.result-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--light-border);
}
.result-metric:last-child { border-bottom: none; }
.result-metric .metric-label {
  font-size: 0.9rem;
  color: var(--grey);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.result-metric .metric-value {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
}
.result-metric.highlight .metric-value { color: var(--terracotta); }
.result-metric .metric-note {
  font-size: 0.75rem;
  color: var(--grey);
  font-weight: 400;
}
.yield-bar {
  margin: 1.5rem 0;
  background: rgba(10,15,26,0.05);
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
}
.yield-bar-fill {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--ocean), var(--terracotta));
  transition: width 0.6s ease;
}
.yield-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--grey);
  margin-top: 0.4rem;
}
.disclaimer {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(196,98,45,0.05);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--grey);
  line-height: 1.5;
}

/* No results state */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--grey);
}
.no-results .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}
.no-results h3 { font-size: 1.1rem; color: var(--ink); margin-bottom: 0.5rem; }
.no-results p { font-size: 0.9rem; }

/* ── Responsive ─────────────────────────── */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 7rem 1.5rem 3rem;
    gap: 2.5rem;
  }
  .hero h1 { font-size: 2.5rem; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .neighborhoods-grid { grid-template-columns: repeat(2, 1fr); }
  .calc-container { grid-template-columns: 1fr; padding: 6rem 1.5rem 3rem; }
  .calc-results { position: static; }
  .cta-box { padding: 3rem 1.5rem; }
  .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}