/* MekinaTrack landing page. Brand: teal #009199 (AA text #007b82, dark #2dd4bf), terracotta #CC7859, ink #16191c. */
@font-face {
  font-family: "Pally";
  src: url("/assets/fonts/Pally-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --teal: #009199;
  --teal-ink: #007b82;
  --teal-deep: #0b5f63;
  --teal-night: #062b2d;
  --teal-light: #2dd4bf;
  --teal-wash: #e5f4f5;
  --terra: #cc7859;
  --terra-wash: #f8e9e2;
  --red: #d03b3b;
  --ink: #16191c;
  --ink-2: #4a5157;
  --muted: #7b8389;
  --line: #e3e6e8;
  --paper: #fbfaf7;
  --card: #ffffff;
  --radius: 22px;
  --shadow: 0 20px 50px -20px rgba(11, 61, 64, .28);
  --font-body: "Noto Sans Ethiopic", "PT Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Pally", "Noto Sans Ethiopic", system-ui, sans-serif;
}
html[lang="en"] { --font-body: "PT Sans", "Noto Sans Ethiopic", system-ui, -apple-system, "Segoe UI", sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-ink); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
/* Pally has no Ethiopic glyphs: Amharic headings fall back to Noto Sans Ethiopic, made bold */
html[lang="am"] h1, html[lang="am"] h2, html[lang="am"] h3 { font-weight: 700; letter-spacing: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--teal-light); outline-offset: 3px; border-radius: 6px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; text-decoration: none;
  border: 2px solid transparent; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: .95rem; }
.btn-primary { background: var(--teal-ink); color: #fff; box-shadow: 0 12px 24px -12px rgba(0, 123, 130, .8); }
.btn-primary:hover { background: var(--teal-deep); }
.btn-ghost { color: var(--teal-ink); border-color: rgba(0, 123, 130, .3); background: rgba(255, 255, 255, .6); }
.btn-ghost:hover { border-color: var(--teal-ink); }
.btn-light { background: #fff; color: var(--teal-deep); }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-outline-light:hover { border-color: #fff; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.cta-row.center { justify-content: center; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 247, .78); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.nav.scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(0, 0, 0, .35); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand img { height: 34px; width: auto; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .98rem; }
.nav-links a:hover { color: var(--teal-ink); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang {
  font: 700 .85rem var(--font-body); color: var(--teal-ink); background: var(--teal-wash);
  border: 0; border-radius: 999px; padding: 8px 12px; cursor: pointer; min-width: 46px;
}
.lang:hover { background: #d4eef0; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 70px 0 90px; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; z-index: -1; }
.blob-a { width: 520px; height: 520px; background: radial-gradient(circle at 30% 30%, #9be7e2, transparent 70%); top: -160px; right: -120px; animation: drift 18s ease-in-out infinite alternate; }
.blob-b { width: 420px; height: 420px; background: radial-gradient(circle at 50% 50%, #f3c9b6, transparent 70%); bottom: -180px; left: -120px; animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.08); } }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; font-weight: 700; color: var(--teal-ink); background: var(--teal-wash);
  padding: 6px 14px; border-radius: 999px; font-size: .88rem; margin-bottom: 18px;
}
.hero h1 span { display: block; }
.accent { background: linear-gradient(90deg, var(--teal-ink), var(--teal) 50%, var(--terra)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 36em; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 0; color: var(--ink-2); font-size: .95rem; }
.hero-points li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); margin-right: 8px; transform: translateY(-1px); }

.hero-art { position: relative; }
.city { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(11, 61, 64, .18)); }
.city-bg { fill: #eef6f5; }
.blocks rect { fill: #fff; stroke: #dcebea; stroke-width: 1.5; }
.park circle { fill: #cfeee4; }
.streets { stroke: #e2efee; stroke-width: 14; stroke-linecap: round; fill: none; }
.route { fill: none; stroke: url(#road); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 720; stroke-dashoffset: 720; animation: draw 2.4s .4s ease forwards; }
.route-glow { fill: none; stroke: var(--teal-light); stroke-width: 16; stroke-linecap: round; opacity: .14; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pin { animation: bounce 2.2s ease-in-out infinite; transform-box: fill-box; }
.pin .pulse { fill: var(--teal); opacity: .35; transform-box: fill-box; transform-origin: center; animation: pulse 2.2s ease-out infinite; }
.station .ring { fill: var(--terra); opacity: .3; transform-box: fill-box; transform-origin: center; animation: pulse 2.6s ease-out infinite; }
@keyframes pulse { from { transform: scale(.6); opacity: .5; } to { transform: scale(2.6); opacity: 0; } }
@keyframes bounce { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

.float {
  position: absolute; display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow);
  font-size: .9rem; line-height: 1.3; animation: float 6s ease-in-out infinite;
}
.float small { display: block; color: var(--muted); }
.card-a { left: -18px; top: 18%; }
.card-b { right: -10px; bottom: 16%; animation-delay: -2s; border: 1px solid #f3d0d0; }
.card-c { right: 8%; top: -8px; animation-delay: -4s; gap: 4px; padding: 10px 16px; }
.card-c .speed { font: 700 1.6rem/1 var(--font-head); color: var(--teal-ink); }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot-teal { background: var(--teal); box-shadow: 0 0 0 5px var(--teal-wash); }
.dot-red { background: var(--red); box-shadow: 0 0 0 5px #fbe3e3; animation: blink 1.6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes blink { 50% { box-shadow: 0 0 0 9px rgba(208, 59, 59, .12); } }

/* ---------- stats ---------- */
.stats { background: var(--ink); color: #fff; padding: 34px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat strong { display: block; font: 700 2.2rem/1.1 var(--font-head); color: var(--teal-light); }
.stat > span { color: #c3c9cd; font-size: .95rem; }
.stat strong small { font-size: .5em; font-weight: 700; margin-left: .25em; color: var(--teal-light); }

/* ---------- sections ---------- */
.section { padding: 100px 0; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.section-head .lead { margin-inline: auto; }
.section-head.light h2 { color: #fff; }
.section-head.light .lead { color: #b8d6d6; }
.section-head.light .eyebrow { background: rgba(45, 212, 191, .14); color: var(--teal-light); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.feature p { color: var(--ink-2); margin: 0; font-size: .98rem; }
.ill { width: 120px; height: 90px; margin-bottom: 14px; }
.ill-bg { fill: var(--teal-wash); }
.ill-route, .ill-route-dash { fill: none; stroke: var(--teal-ink); stroke-width: 4; stroke-linecap: round; }
.ill-route-dash { stroke-dasharray: 6 8; animation: dash 3s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -56; } }
.ill-pin { fill: var(--terra); }
.ill-ring { fill: none; stroke: var(--terra); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-out infinite; }
.ill-start { fill: var(--teal-ink); }
.ill-pump { fill: var(--teal-ink); }
.ill-screen { fill: #fff; }
.ill-hose { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.ill-drop { fill: var(--terra); animation: drip 2.4s ease-in infinite; transform-box: fill-box; }
@keyframes drip { 0% { transform: translateY(-6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }
.ill-line { fill: none; stroke: var(--teal-ink); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.ill-line-alert { fill: none; stroke: var(--red); stroke-width: 4; stroke-linecap: round; }
.ill-alert { fill: var(--red); animation: blinkSvg 1.6s ease-in-out infinite; }
.ill-alert-mark { stroke: #fff; stroke-width: 3.5; stroke-linecap: round; }
@keyframes blinkSvg { 50% { opacity: .7; } }
.ill-play { fill: var(--terra); }
.ill-gauge { fill: none; stroke: #c9e6e7; stroke-width: 9; stroke-linecap: round; }
.ill-gauge-fill { fill: none; stroke: var(--teal-ink); stroke-width: 9; stroke-linecap: round; }
.ill-needle { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; transform-origin: 60px 66px; animation: needle 3s ease-in-out infinite; }
@keyframes needle { 0%, 100% { transform: rotate(-35deg); } 50% { transform: rotate(10deg); } }
.ill-bar { fill: #9fd3d6; }
.ill-bar-accent { fill: var(--terra); }

/* ---------- live map ---------- */
.live { background: radial-gradient(1200px 600px at 80% 0%, #0d4b4f, var(--teal-night) 60%); color: #fff; }
.live-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; }
.map-wrap { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7); border: 1px solid rgba(255, 255, 255, .1); }
.map { height: 560px; background: #0a3a3d; }
.map-fallback { display: grid; place-items: center; height: 100%; color: #b8d6d6; padding: 24px; text-align: center; }
.badge-demo { position: absolute; top: 14px; left: 14px; background: rgba(6, 43, 45, .85); color: var(--teal-light); font-size: .8rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
.panel { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius); padding: 20px; max-height: 560px; overflow: auto; }
.panel h3 { font-size: .95rem; color: #b8d6d6; margin: 4px 0 12px; }
.vehicles, .events { list-style: none; padding: 0; margin: 0 0 20px; }
.vehicles li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: .9rem; cursor: pointer; }
.vehicles li:hover .plate { color: var(--teal-light); }
.plate { font-weight: 700; }
.v-speed { color: var(--teal-light); font-variant-numeric: tabular-nums; text-align: right; }
.v-model { color: #9fb9ba; font-size: .8rem; }
.fuelbar { grid-column: 1 / -1; height: 5px; background: rgba(255, 255, 255, .1); border-radius: 3px; overflow: hidden; }
.fuelbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal-light), var(--teal)); border-radius: 3px; transition: width .6s ease; }
.fuelbar i.low { background: var(--terra); }
.events li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; background: rgba(255, 255, 255, .06); font-size: .88rem; animation: slideIn .5s ease; }
.events li small { display: block; color: #9fb9ba; }
.events .ev-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--teal-light); }
.events .ev-drop .ev-dot { background: #ff7b7b; }
@keyframes slideIn { from { opacity: 0; transform: translateX(16px); } }
.maplibregl-popup-content { font: 14px/1.4 var(--font-body); border-radius: 12px; padding: 10px 14px; color: var(--ink); }

/* ---------- fuel story ---------- */
.fuel-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 34px; margin-bottom: 12px; color: var(--ink-2); }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--teal-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23007b82' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.chart-card { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 10px; box-shadow: var(--shadow); }
.chart-card figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: .92rem; color: var(--muted); margin-bottom: 6px; }
.chart-card figcaption strong { color: var(--ink); }
.chart { width: 100%; height: auto; overflow: visible; }
.chart .grid path { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font-size: 12px; text-anchor: end; }
.chart .axis text:nth-child(n+5) { text-anchor: middle; }
.chart .area { fill: rgba(0, 145, 153, .08); opacity: 0; transition: opacity 1s .8s; }
.chart .line { fill: none; stroke: var(--teal-ink); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.chart .mark { opacity: 0; transition: opacity .5s; }
.chart .mark text { font-size: 13px; font-weight: 700; }
.chart .refuel circle { fill: var(--teal-ink); }
.chart .refuel text { fill: var(--teal-ink); }
.chart .drop circle { fill: var(--red); }
.chart .drop .ring { fill: none; stroke: var(--red); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: pulse 2s ease-out infinite; }
.chart .drop text { fill: var(--red); }
.chart .drop-band { stroke: var(--red); stroke-width: 18; opacity: 0; stroke-linecap: round; }
.chart-card.in .line { animation: drawLine 2.6s ease forwards; }
.chart-card.in .area { opacity: 1; }
.chart-card.in .refuel { opacity: 1; transition-delay: .9s; }
.chart-card.in .drop { opacity: 1; transition-delay: 2.3s; }
.chart-card.in .drop-band { animation: band 1s 2.3s ease forwards; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes band { to { opacity: .12; } }

/* ---------- how ---------- */
.how { background: linear-gradient(180deg, var(--paper), #f1f7f6); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.step { position: relative; background: var(--card); border-radius: var(--radius); padding: 30px 26px; border: 1px solid var(--line); }
.step-n { position: absolute; top: -16px; left: 26px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--terra); color: #fff; font: 700 1.05rem var(--font-head); box-shadow: 0 8px 16px -8px rgba(204, 120, 89, .9); }
.step-ill { width: 100px; height: 70px; margin: 8px 0 10px; }
.s-box { fill: var(--teal-wash); stroke: var(--teal-ink); stroke-width: 2.5; }
.s-led { fill: var(--terra); animation: blinkSvg 1.4s infinite; }
.s-lines { stroke: var(--teal-ink); stroke-width: 3; stroke-linecap: round; }
.s-wave { fill: none; stroke: var(--teal-ink); stroke-width: 3.5; stroke-linecap: round; animation: blinkSvg 1.8s infinite; }
.s-route { fill: none; stroke: var(--terra); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 5 6; animation: dash 3s linear infinite; }
.step p { color: var(--ink-2); margin: 0; font-size: .98rem; }

/* ---------- cta + footer ---------- */
.cta { padding: 90px 0; background: linear-gradient(135deg, var(--teal-ink), var(--teal-deep) 55%, #12454a); color: #fff; text-align: center; position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(204, 120, 89, .45), transparent 70%); animation: drift 16s ease-in-out infinite alternate; }
.cta-inner { position: relative; z-index: 1; max-width: 760px; }
.cta-logo { height: 40px; width: auto; margin: 0 auto 24px; }
.cta p { color: #cfe7e8; font-size: 1.1rem; }
.footer { padding: 34px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: .92rem; }
.footer-inner img { height: 26px; width: auto; }
.footer p { margin: 0; }

/* ---------- reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
[data-reveal].in { opacity: 1; transform: none; }
.features [data-reveal]:nth-child(3n+2), .steps [data-reveal]:nth-child(2) { transition-delay: .12s; }
.features [data-reveal]:nth-child(3n), .steps [data-reveal]:nth-child(3) { transition-delay: .24s; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .fuel-grid, .live-grid { grid-template-columns: 1fr; }
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
  .panel { max-height: none; }
  .map { height: 440px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { width: min(1180px, 100% - 32px); }
  .hero { padding: 40px 0 70px; }
  .features, .steps { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .card-a { left: 0; top: 4%; }
  .card-b { right: 0; bottom: 4%; }
  .card-c { display: none; }
  .map { height: 380px; }
  .brand img { height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .route { stroke-dashoffset: 0; }
  .chart .line { stroke-dashoffset: 0; }
  .chart .mark, .chart .area { opacity: 1; }
}
