/* Self-hosted Red Hat Display — single variable woff2 (all weights + Latvian
   latin-ext), brotli-compressed to ~33 KB, preloaded in <head>. */
@font-face {
  font-family: "Red Hat Display";
  src: url("rhd-var.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}
* { box-sizing: border-box; margin: 0; }

:root {
  --navy: #14324f;
  --navy-2: #1d4569;
  --accent: #2e9e44;
  --paper: #f7f4ef;
  --void: #dfe6ed;
  --text: #1c2b38;
  --muted: #5a6b7a;
}

html { scrollbar-gutter: stable; background-color: var(--navy); }

body {
  font-family: "Red Hat Display", system-ui, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.55;
  overflow-x: clip; /* safety net against incidental horizontal overflow */
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
code { background: #eef2f6; padding: 1px 6px; border-radius: 4px; font-size: 0.85em; }

.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy); color: #fff;
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 56px; }
.logo { display: inline-flex; align-items: center; }
.logo img { height: 26px; width: auto; display: block; }
.nav nav a { color: #cfe0ee; text-decoration: none; margin-left: 22px; font-size: 0.92rem; }
.nav nav a:hover { color: #fff; }

.hero {
  /* Flat navy — identical to the map theme's "fons", so the map's void is
     invisible and Latvia sits on the block like a sticker. */
  background: var(--navy);
  color: #fff;
  padding: 56px 0 64px;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr minmax(0, 1fr); gap: 36px; align-items: center; }
.hero h1 { font-size: 2.3rem; line-height: 1.18; font-weight: 800; }
.hero .accent { color: #8fe3a4; }
.lead { margin: 18px 0 24px; color: #d7e3ee; font-size: 1.05rem; }
.hero-cta { display: flex; gap: 12px; margin-bottom: 22px; }

/* Sticker map: the theme's void color equals the hero background, so only
   Latvia's shape is visible — but the whole area is drag/zoomable.
   Height + placeholder live in CSS so the map is "there" at first paint,
   before any JavaScript runs; the live canvas fades in over it. */
.hero-map [data-karte] {
  width: 490px;
  max-width: 100%;
  height: 500px;
  margin: 0 auto;
  /* Placeholder shown at the SAME fixed pixel scale as the live map's
     fixed center+zoom view (NOT "cover"), so when the column is narrower
     than 490px both crop identically around the centre — no jump on reveal.
     (The actual data-URI is inlined in index.html and wins via !important.) */
  background-image: url("../assets/hero-map.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 490px 500px;
}
.hero-map .maplibregl-ctrl-top-right { display: none; }
.hero-map .maplibregl-ctrl-attrib { background: rgba(20, 50, 79, 0.6); }
.hero-map .maplibregl-ctrl-attrib a { color: #9fb8cf; }
.btn { display: inline-block; padding: 11px 22px; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 0.95rem; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #27893a; }
.btn.ghost { border: 1.5px solid #6f8aa3; color: #e7f0f8; }
.btn.ghost:hover { border-color: #fff; }
.hero-points { list-style: none; padding: 0; color: #cfe0ee; font-size: 0.95rem; }
.hero-points li { margin: 6px 0; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6); }

.nav-cta { font-weight: 700; color: #8fe3a4 !important; }
.btn.outline { border: 1.5px solid #cdd6df; color: var(--navy); }
.btn.outline:hover { border-color: var(--accent); color: var(--accent); }
.btn.full { display: block; text-align: center; margin-top: 22px; }
.btn.big { padding: 15px 34px; font-size: 1.05rem; }
.btn.link { color: var(--accent); align-self: center; }
.btn.link:hover { text-decoration: underline; }

/* ---- shared section rhythm ---- */
section { padding: 84px 0; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 1.6px; font-size: 0.76rem;
  font-weight: 800; color: var(--accent); margin-bottom: 10px;
}
.eyebrow-light { color: #8fe3a4; }
h2 {
  font-size: 2rem; font-weight: 800; line-height: 1.15;
  color: var(--navy); margin-bottom: 18px; letter-spacing: -0.5px;
}
.h2-light { color: #fff; }
.section-lead { color: var(--muted); font-size: 1.05rem; max-width: 560px; margin-bottom: 36px; }

/* ---- trust strip ---- */
.trust { background: var(--navy); padding: 0; border-top: 1px solid rgba(255,255,255,0.08); }
.trust-row {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
  align-items: center; padding: 18px 20px; color: #aebfce; font-size: 0.92rem; font-weight: 600;
}
.trust-row .dot { color: #43617c; }

/* ---- steps ---- */
.steps { background: #fff; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding: 28px 24px 26px; border-radius: 16px; background: var(--paper); border: 1px solid #ece6da; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; background: var(--navy); color: #fff;
  font-weight: 800; font-size: 1.1rem; margin-bottom: 14px;
}
.step h3 { font-size: 1.15rem; color: var(--navy); margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.95rem; }
.steps-cta { display: flex; gap: 18px; align-items: center; margin-top: 34px; flex-wrap: wrap; }

/* ---- features ---- */
.features { background: var(--paper); }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat {
  background: #fff; border-radius: 16px; padding: 26px 24px;
  border: 1px solid #ece6da; transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.feat:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(20,50,79,0.1); }
.feat-ic {
  width: 46px; height: 46px; border-radius: 12px; display: flex;
  align-items: center; justify-content: center;
  background: #eef4f0; color: var(--accent); margin-bottom: 16px;
}
.feat-ic svg { width: 24px; height: 24px; }
.feat h3 { font-size: 1.1rem; color: var(--navy); margin-bottom: 8px; }
.feat p { font-size: 0.93rem; color: var(--muted); }

/* ---- integration ---- */
.integration { background: #fff; }
.int-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 16px; }
.code-card { background: var(--paper); border: 1px solid #ece6da; border-radius: 16px; padding: 22px; min-width: 0; }
.code-card pre { max-width: 100%; }
.code-head { font-size: 0.95rem; color: var(--navy); margin-bottom: 12px; font-weight: 600; }
.code-tag {
  background: var(--navy); color: #9fd4ff; font-size: 0.72rem; font-weight: 800;
  padding: 3px 9px; border-radius: 6px; letter-spacing: 0.5px; margin-right: 6px;
}
pre {
  background: var(--navy); color: #d9e8f5; padding: 16px 18px;
  border-radius: 10px; overflow-x: auto; font-size: 0.82rem; line-height: 1.5; margin-bottom: 12px;
}
pre code { background: none; padding: 0; color: inherit; }

/* ---- demo ---- */
.demo { background: var(--navy); }
.demo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.demo figure { margin: 0; }
.demo [data-karte] { border-radius: 14px; overflow: hidden; box-shadow: 0 12px 36px rgba(0,0,0,0.3); }
.demo figcaption { margin-top: 12px; font-size: 0.9rem; color: #aebfce; }
.demo figcaption code { background: rgba(255,255,255,0.1); color: #d9e8f5; }

/* ---- pricing ---- */
.bill-toggle {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 36px;
  background: #eef2f6; border-radius: 12px;
}
.bill-opt {
  border: none; background: none; cursor: pointer; font-family: inherit;
  font-size: 0.9rem; font-weight: 700; color: var(--muted);
  padding: 9px 20px; border-radius: 9px; display: inline-flex; align-items: center; gap: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.bill-opt.active { background: #fff; color: var(--navy); box-shadow: 0 2px 8px rgba(20,50,79,0.1); }
.bill-save {
  font-size: 0.68rem; font-weight: 800; background: var(--accent); color: #fff;
  padding: 2px 8px; border-radius: 20px; letter-spacing: 0.3px;
}

.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 820px; }
.price-grid.three { grid-template-columns: repeat(3, 1fr); max-width: 1040px; align-items: stretch; }
.pricing .price-card {
  background: #fff; border: 1px solid #e2e7ec; border-radius: 20px; padding: 30px 28px;
  position: relative; display: flex; flex-direction: column;
}
/* all three tiers are visually equal — no highlight on Pro */
.ribbon {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; white-space: nowrap;
  font-size: 0.72rem; font-weight: 800; padding: 5px 14px; border-radius: 20px; letter-spacing: 0.4px;
}
.price-name { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
.price .amt { font-size: 1.7rem; font-weight: 800; color: var(--navy); letter-spacing: -0.5px; line-height: 1; }
.price .amt-free, .price .amt-talk { font-size: 1.5rem; }
.price-per { font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.price-tag { font-size: 0.86rem; color: var(--muted); margin: 6px 0 20px; min-height: 2.4em; }
.price-list { list-style: none; padding: 0; font-size: 0.92rem; flex: 1; margin-bottom: 6px; }
.price-list li { margin: 12px 0; padding-left: 26px; position: relative; color: var(--text); line-height: 1.45; }
.price-list li::before {
  content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.price-note { margin-top: 28px; max-width: 880px; font-size: 0.88rem; }
.audience {
  margin-top: 10px; color: var(--muted); font-size: 0.86rem; font-weight: 600;
}
@media (max-width: 900px) {
  .price-grid.three { grid-template-columns: 1fr; max-width: 460px; }
  .pricing .price-card.pro { transform: none; }
}

/* ---- final CTA ---- */
.cta-band { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); text-align: center; }
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { color: #d7e3ee; margin-bottom: 26px; font-size: 1.05rem; }

/* ---- footer ---- */
footer { background: #0e2336; color: #aebfce; padding: 48px 0 28px; font-size: 0.9rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.foot-brand .logo { margin-bottom: 12px; }
.foot-brand .logo img { height: 30px; }
.foot-brand p { max-width: 280px; margin-bottom: 8px; }
.foot-fine { font-size: 0.8rem; color: #6e8398; }
.foot-col h4 { color: #fff; font-size: 0.92rem; margin-bottom: 12px; }
.foot-col a { display: block; color: #aebfce; text-decoration: none; margin: 7px 0; }
.foot-col a:hover { color: #9fd4ff; }
.foot-bottom {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.82rem; color: #6e8398;
}

/* ---- hamburger (hidden on desktop) ---- */
.nav-burger {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; padding: 9px; flex-direction: column;
  justify-content: space-between;
}
.nav-burger span {
  display: block; height: 2px; width: 100%; background: #fff; border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
#nav.open .nav-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#nav.open .nav-burger span:nth-child(2) { opacity: 0; }
#nav.open .nav-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 860px) {
  section { padding: 52px 0; }
  .wrap { padding: 0 18px; }
  .hero-grid, .steps-grid, .feat-grid, .int-grid, .demo-grid, .price-grid { grid-template-columns: 1fr; }
  h2 { font-size: 1.55rem; }

  /* nav -> hamburger */
  .nav-burger { display: flex; }
  .nav-inner { height: 54px; }
  .nav nav {
    position: absolute; top: 54px; left: 0; right: 0;
    background: var(--navy); display: flex; flex-direction: column; align-items: stretch;
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
    box-shadow: 0 12px 24px rgba(0,0,0,0.25);
  }
  #nav.open nav { max-height: 360px; }
  .nav nav a {
    margin: 0; padding: 14px 20px; font-size: 1rem;
    border-top: 1px solid rgba(255,255,255,0.07);
  }

  /* hero */
  .hero { padding: 36px 0 44px; }
  .hero-grid { gap: 28px; }
  .hero h1 { font-size: 1.75rem; line-height: 1.2; }
  .lead { font-size: 1rem; margin: 14px 0 22px; }
  .hero-cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-cta .btn { text-align: center; }
  .hero-map [data-karte] { width: 100%; height: 360px; }

  /* steps / pricing tweaks */
  .step { padding: 22px 20px; }
  .steps-cta { flex-direction: column; align-items: stretch; gap: 12px; }
  .steps-cta .btn { text-align: center; }
  .price-grid.three { max-width: 420px; margin: 0 auto; }
  .pricing .price-card.pro { transform: none; }

  /* footer */
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 1.55rem; }
  h2 { font-size: 1.4rem; }
  .hero-map [data-karte] { height: 300px; }
  .trust-row { font-size: 0.82rem; gap: 8px; }
}
