/* ==========================================================================
   MapnQin — Map & Kin
   ========================================================================== */

:root {
  --navy: #0b2545;
  --navy-2: #13315c;
  --teal: #13a89e;
  --teal-soft: #d6f3f0;
  --coral: #ff6b4a;
  --coral-dark: #e4532f;

  --bg: #f7f5f0;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --text: #0b2545;
  --muted: #4b5d75;
  --border: #e3e1da;
  --hero-grad: radial-gradient(1200px 600px at 80% -10%, #d6f3f0 0%, transparent 60%),
    radial-gradient(800px 500px at -10% 110%, #ffe3db 0%, transparent 60%);

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(11, 37, 69, 0.18);
  --container: 1160px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07182e;
    --bg-alt: #0b2545;
    --surface: #10294b;
    --text: #eef3f8;
    --muted: #a9b8ca;
    --border: #1d3a61;
    --teal-soft: #0f3a4a;
    --hero-grad: radial-gradient(1200px 600px at 80% -10%, #0f3a4a 0%, transparent 60%),
      radial-gradient(800px 500px at -10% 110%, #3a1f2a 0%, transparent 60%);
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--coral); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--coral); color: #fff; }
.btn-primary:hover { background: var(--coral-dark); }
.btn-ghost { border-color: var(--text); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--text); color: var(--bg); }
.btn-light { background: #fff; color: var(--navy); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.25rem; }
.brand img { width: 38px; height: 38px; }
.brand span b { color: var(--teal); font-weight: 800; }

.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-weight: 600; color: var(--muted); }
.nav-links a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch {
  display: inline-flex; border: 1.5px solid var(--border); border-radius: 999px; padding: 3px;
  font-size: .85rem; font-weight: 700;
}
.lang-switch a { text-decoration: none; padding: 4px 10px; border-radius: 999px; color: var(--muted); }
.lang-switch a[aria-current="true"] { background: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) {
  .lang-switch a[aria-current="true"] { background: var(--teal); color: var(--navy); }
}
.nav-cta { padding: 10px 18px; font-size: .95rem; }

.menu-toggle {
  display: none; background: none; border: 0; color: var(--text); padding: 8px; cursor: pointer;
}
.menu-toggle svg { width: 28px; height: 28px; }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .nav-cta { display: none; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 20px 20px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; font-size: 1.05rem; }
}

/* ---------- Hero ---------- */
.hero { background: var(--hero-grad); padding: 72px 0 96px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal-soft); color: var(--teal);
  font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.hero h1 em { font-style: normal; color: var(--coral); }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 34ch; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-map {
  position: relative; aspect-ratio: 1 / 1; width: 100%;
  border-radius: 32px; background: var(--navy); box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-map svg { width: 100%; height: 100%; }
.hero-map .contour { fill: none; stroke: #13a89e; stroke-width: 1.4; opacity: .35; }
.hero-map .link { stroke: #ffffff; stroke-width: 1.2; opacity: .35; stroke-dasharray: 4 6; animation: dash 18s linear infinite; }
.hero-map .node { fill: #13a89e; }
.hero-map .node-hot { fill: #ff6b4a; }
.hero-map .pulse { fill: none; stroke: #ff6b4a; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: pulse 2.8s ease-out infinite; }
.hero-map .pulse.d2 { animation-delay: .9s; }
.hero-map .pulse.d3 { animation-delay: 1.8s; }
.map-card {
  position: absolute; left: 20px; bottom: 20px;
  background: rgba(255, 255, 255, .95); color: var(--navy);
  border-radius: 14px; padding: 12px 16px; font-size: .9rem; line-height: 1.4;
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .4);
  display: flex; gap: 10px; align-items: center;
}
.map-card strong { display: block; }
.map-card .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }

@keyframes dash { to { stroke-dashoffset: -400; } }
@keyframes pulse { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(2.6); opacity: 0; } }

@media (max-width: 900px) {
  .hero { padding: 40px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-map { max-width: 520px; margin: 0 auto; }
}

/* ---------- Stats ---------- */
.stats { margin-top: -48px; position: relative; z-index: 2; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.stat { padding: 28px 24px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat-value { font-size: clamp(1.8rem, 3.2vw, 2.4rem); font-weight: 800; color: var(--teal); line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .95rem; }
@media (max-width: 700px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.kicker { color: var(--coral); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin-bottom: 10px; display: block; }
@media (max-width: 700px) { .section { padding: 72px 0; } .section-head { margin-bottom: 40px; } }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; }
.about-points li { display: flex; gap: 14px; align-items: flex-start; }
.about-points .check {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--teal-soft); color: var(--teal);
  display: grid; place-items: center; font-weight: 800; font-size: .9rem;
}
.quote-card {
  background: var(--navy); color: #fff; border-radius: 28px; padding: 44px;
  position: relative; overflow: hidden;
}
.quote-card::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  border-radius: 50%; border: 2px solid rgba(19, 168, 158, .4);
  box-shadow: 0 0 0 30px rgba(19, 168, 158, .08), 0 0 0 60px rgba(19, 168, 158, .05);
}
.quote-card p { font-size: 1.35rem; font-weight: 700; line-height: 1.45; position: relative; z-index: 1; }
.quote-card small { color: #a9d9d4; font-weight: 600; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } .quote-card { padding: 32px; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; position: relative;
}
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-size: 3rem; font-weight: 800; color: var(--teal); opacity: .25; line-height: 1;
  position: absolute; right: 24px; top: 20px;
}
.step-icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--teal-soft); color: var(--teal); margin-bottom: 20px;
}
.step-icon svg { width: 28px; height: 28px; }
.step p { color: var(--muted); margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* Focus areas */
.focus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.focus-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.focus-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--teal); }
.focus-card .ico {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  margin-bottom: 18px; color: #fff;
}
.focus-card .ico svg { width: 24px; height: 24px; }
.focus-card p { color: var(--muted); margin: 0; font-size: .97rem; }
.c1 { background: #2b7de9; } .c2 { background: #e5484d; } .c3 { background: #f5a524; }
.c4 { background: #8b5cf6; } .c5 { background: #ff6b4a; } .c6 { background: #13a89e; }
@media (max-width: 900px) { .focus-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .focus-grid { grid-template-columns: 1fr; } }

/* Audience */
.audience-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.audience {
  border-top: 3px solid var(--teal); padding-top: 20px;
}
.audience p { color: var(--muted); margin: 0; font-size: .97rem; }
@media (max-width: 900px) { .audience-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; } }
@media (max-width: 520px) { .audience-grid { grid-template-columns: 1fr; } }

/* CTA */
.cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; border-radius: 32px; padding: 64px;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
  position: relative; overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .12) 1.2px, transparent 1.2px);
  background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent 30%, #000);
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000);
}
.cta > * { position: relative; }
.cta p { color: #c9d6e6; font-size: 1.1rem; margin: 0; }
.cta-options { display: grid; gap: 12px; }
.cta-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 14px; padding: 16px 20px; text-decoration: none; color: #fff; font-weight: 700;
  transition: background .15s ease;
}
.cta-option:hover { background: rgba(255, 255, 255, .16); }
.cta-option span { color: #a9d9d4; font-weight: 500; font-size: .9rem; display: block; }
.cta-option .arrow { color: var(--coral); font-size: 1.4rem; }
@media (max-width: 900px) { .cta { grid-template-columns: 1fr; padding: 40px 28px; } }

/* ---------- Footer ---------- */
.site-footer { padding: 72px 0 32px; border-top: 1px solid var(--border); margin-top: 104px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; color: var(--text); }
.footer-grid a:hover { color: var(--teal); }
.footer-about p { color: var(--muted); max-width: 32ch; margin-top: 14px; }
.footer-about .footer-related { font-size: .9rem; max-width: 40ch; }
.footer-about .footer-related a { display: block; color: var(--teal); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  color: var(--muted); font-size: .9rem;
}
.footer-bottom a { color: var(--muted); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
