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

/* ── Tokens ── */
:root {
  --ink:        #3c4245;
  --ink-mid:    #6b7275;
  --ink-soft:   #9aa3a0;
  --primary:    #4d6b65;
  --primary-hover: #3d5550;
  --accent:     #8aa39d;
  --border:     #d0d4d2;
  --surface:    #f7f7f7;
  --surface-2:  #f0f0f0;
  --surface-3:  #e9e9e9;
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --shadow-sm:  0 1px 3px rgba(45,70,65,.08), 0 1px 2px rgba(45,70,65,.04);
  --shadow-md:  0 4px 16px rgba(45,70,65,.12), 0 2px 6px rgba(45,70,65,.07);
  --shadow-card:0 8px 32px rgba(45,70,65,.12), 0 2px 8px rgba(45,70,65,.07);
}

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--surface-3);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
}

body.fonts-ready {
  opacity: 1;
  transition: opacity 0.35s ease;
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(233,233,233,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 68px;
  display: flex;
  align-items: center;
  padding: 0 32px;
}

.nav-inner {
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-family: 'Staatliches', system-ui, sans-serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: .5px;
  white-space: nowrap;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--ink-mid);
  font-size: 14.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}

.nav-links a:hover,
.nav-links a.nav-active {
  color: var(--primary);
  background: var(--surface-3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-ghost {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-mid);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}

.btn-ghost:hover {
  color: var(--primary);
  background: var(--surface-3);
}

.btn-primary {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  background-image: radial-gradient(100% 100% at 100% 0%, rgba(255,255,255,.15) 0%, rgba(255,255,255,0) 100%);
  box-shadow: 0 1px 2px rgba(45,70,65,.25), inset 0 1px 0 rgba(255,255,255,.12);
  transition: background-color .15s, box-shadow .15s;
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(45,70,65,.30), inset 0 1px 0 rgba(255,255,255,.12);
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 24px 160px;
}

/* Clip container for the bg iframe — keeps overflow:hidden away from the cards */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Background iframe */
.hero-bg-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  pointer-events: none;
}

.hero.map-active .hero-bg-iframe {
  pointer-events: auto;
}

/* Dark gradient overlay for text legibility */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(30,50,47,.65) 0%,
    rgba(30,50,47,.42) 55%,
    rgba(30,50,47,.72) 100%
  );
  pointer-events: none;
}

/* Hero text sits above overlay */
.hero-content {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: 'Staatliches', system-ui, sans-serif;
  font-size: clamp(56px, 9vw, 110px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 24px;
  text-wrap: balance;
  text-shadow: 0 2px 20px rgba(36,0,41,.4);
}

.hero h1 em {
  font-style: normal;
  color: rgba(195,220,216,.95);
}

.hero p {
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: 18px;
  color: rgba(255,255,255,.78);
  line-height: 1.65;
  text-wrap: balance;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-ctas .btn-primary {
  font-size: 15px;
  padding: 13px 28px;
  border-radius: var(--radius-md);
}

.btn-outline {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  padding: 13px 28px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.08);
  transition: border-color .15s, background .15s;
}

.btn-outline:hover {
  border-color: rgba(255,255,255,.75);
  background: rgba(255,255,255,.15);
}

/* ── Hero content fade on map interaction ── */
.hero-content,
.hero-overlay,
.hero-cards {
  transition: opacity 0.5s ease;
}

.hero.map-active .hero-content,
.hero.map-active .hero-overlay,
.hero.map-active .hero-cards {
  opacity: 0;
  pointer-events: none;
}

/* ── Hero floating cards ── */
.hero-cards {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  z-index: 3;
  white-space: nowrap;
}

.hero-card {
  width: 300px;
  height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.15);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.card-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.card-dots {
  display: flex;
  gap: 5px;
}

.card-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.card-dots span:nth-child(1) { background: #ff5f56; }
.card-dots span:nth-child(2) { background: #ffbd2e; }
.card-dots span:nth-child(3) { background: #27c93f; }

.card-url {
  font-size: 11px;
  color: var(--ink-soft);
  background: rgba(255,255,255,.7);
  border-radius: 4px;
  padding: 2px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  letter-spacing: .1px;
}

a.hero-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.hero-card:hover {
  box-shadow: var(--shadow-card), 0 0 0 2px rgba(255,255,255,.4);
}

.hero-card img {
  flex: 1;
  width: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: top left;
  display: block;
}

/* ── Section base ── */
.section {
  padding: 96px 24px;
}

/* First content section needs extra top padding to clear card overhang */
.section-first {
  padding-top: 130px;
}

.section-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 16px;
  text-align: center;
}

.section h2 {
  font-family: 'Staatliches', system-ui, sans-serif;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: .5px;
  color: var(--primary);
  text-align: center;
  margin-bottom: 16px;
  text-wrap: balance;
}

.section-sub {
  max-width: 520px;
  margin: 0 auto 56px;
  text-align: center;
  font-size: 17px;
  color: var(--ink-mid);
  line-height: 1.65;
}

/* ── Features grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 28px 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}

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

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-family: 'Staatliches', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--primary);
  margin-bottom: 10px;
  letter-spacing: .3px;
}

.feature-card p {
  font-size: 15px;
  color: var(--ink-mid);
  line-height: 1.6;
}

/* ── Alt section bg ── */
.section-alt {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ── Steps ── */
.steps-list {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}

.step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: 'Staatliches', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.step-card p {
  font-size: 14.5px;
  color: var(--ink-mid);
  line-height: 1.55;
}

/* ── Download ── */
.download-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.download-card {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 28px;
  font-weight: 600;
  color: var(--primary);
  font-size: 15px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  min-width: 200px;
  justify-content: center;
}

.download-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.download-card span.os-icon {
  font-size: 24px;
}

/* ── CTA Banner ── */
.cta-banner {
  background: var(--primary);
  background-image: radial-gradient(ellipse at 70% 40%, rgba(138,163,157,.3) 0%, transparent 60%);
  padding: 96px 24px;
  text-align: center;
}

.cta-banner h2 {
  font-family: 'Staatliches', system-ui, sans-serif;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 400;
  color: #fff;
  letter-spacing: .5px;
  margin-bottom: 16px;
  text-wrap: balance;
}

.cta-banner p {
  font-size: 17px;
  color: rgba(255,255,255,.72);
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.btn-primary-light {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 13px 32px;
  border-radius: var(--radius-md);
  background: #fff;
  background-image: radial-gradient(100% 100% at 100% 0%, rgba(138,163,157,.12) 0%, rgba(255,255,255,0) 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  transition: box-shadow .15s, transform .15s;
}

.btn-primary-light:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.22);
  transform: translateY(-1px);
}

/* ── Footer ── */
footer {
  background: var(--primary);
  color: rgba(255,255,255,.55);
  padding: 40px 32px;
  font-size: 14px;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-family: 'Staatliches', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: rgba(255,255,255,.85);
  letter-spacing: .5px;
}

footer a {
  color: rgba(255,255,255,.55);
  text-decoration: none;
  transition: color .15s;
}

footer a:hover {
  color: #fff;
}

.footer-links {
  display: flex;
  gap: 24px;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  max-width: 1080px;
  margin: 0 auto;
}

/* ── Burger button (hidden on desktop) ── */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.nav-burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-mid);
  transition: transform 0.25s ease, opacity 0.25s ease, width 0.25s ease;
  transform-origin: center;
}

.nav-burger:hover span {
  background: var(--primary);
}

/* Animate to ✕ when open */
nav.nav-open .nav-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
nav.nav-open .nav-burger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
nav.nav-open .nav-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile menu panel ── */
.nav-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
  background: rgba(233,233,233,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.nav-mobile-menu ul a {
  display: block;
  text-decoration: none;
  color: var(--ink-mid);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}

.nav-mobile-menu ul a:hover {
  color: var(--primary);
  background: var(--surface-3);
}

.nav-mobile-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-mobile-actions .btn-ghost,
.nav-mobile-actions .btn-primary {
  flex: 1;
  text-align: center;
}

nav.nav-open .nav-mobile-menu {
  display: flex;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-cards { display: none; }
  .section-first { padding-top: 96px; }
}

@media (max-width: 640px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-burger { display: flex; }
  .hero { padding: 72px 20px 100px; min-height: 85vh; }
  .section { padding: 72px 20px; }
  .download-cards { flex-direction: column; align-items: stretch; }
  .download-card { justify-content: center; }
}
