/* =================================================================
   Map Tools — landing page
   Clean, hand-written rebuild
   ================================================================= */

/* ---- Design tokens ---------------------------------------------- */
:root {
  --blue:        #1a73e8;
  --blue-dark:   #1557b0;
  --blue-soft:   #e8f0fe;
  --ink:         #1f2733;
  --ink-soft:    #5f6672;
  --line:        #e6e9ef;
  --bg:          #ffffff;
  --bg-alt:      #f5f8fc;
  --bg-deep:     #0e1726;

  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 1px 2px rgba(16,24,40,.04), 0 12px 32px rgba(16,24,40,.08);
  --shadow-lg:   0 24px 60px rgba(16,24,40,.16);
  --maxw:        1120px;
  --pad:         clamp(20px, 5vw, 40px);

  --font: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Helvetica, Arial, sans-serif;
}

/* ---- Reset / base ----------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; }
p  { margin: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

/* ---- Buttons ---------------------------------------------------- */
.btn {
  --_bg: var(--blue);
  --_fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .8em 1.5em;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 500;
  background: var(--_bg);
  color: var(--_fg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(26,115,232,.28); }
.btn:active { transform: translateY(0); }
.btn--ghost {
  --_bg: transparent;
  --_fg: var(--blue);
  border-color: var(--line);
  box-shadow: none;
}
.btn--ghost:hover { background: var(--blue-soft); box-shadow: none; border-color: var(--blue-soft); }
.btn--light {
  --_bg: #fff;
  --_fg: var(--blue);
}
.btn .chev { transition: transform .15s ease; }
.btn:hover .chev { transform: translateX(3px); }

/* ---- Header ----------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 1px 0 rgba(16,24,40,.02);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; }
.brand img { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a.link {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .95rem;
  transition: color .15s ease, background .15s ease;
}
.nav-links a.link:hover { color: var(--ink); background: var(--bg-alt); }

/* ---- Hero ------------------------------------------------------- */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(48px, 7vw, 88px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 0.48fr;   /* right column ~33% smaller than a even split */
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.hero-copy { text-align: left; }
.hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  font-weight: 900;
}
.hero .lede {
  margin-top: 22px;
  max-width: 52ch;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 300;
  color: var(--ink-soft);
}
.hero .cta-row {
  display: flex;
  gap: 14px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 34px;
}
.hero-note { margin-top: 14px; font-size: .85rem; color: var(--ink-soft); }

/* Browser frame around the hero screenshot */
.frame {
  margin: 0;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.frame__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.frame__bar i { width: 11px; height: 11px; border-radius: 50%; background: #d6dbe4; }
.frame__bar i:nth-child(1) { background: #ff5f57; }
.frame__bar i:nth-child(2) { background: #febc2e; }
.frame__bar i:nth-child(3) { background: #28c840; }
.frame img { width: 100%; }

/* ---- Section scaffolding --------------------------------------- */
section { scroll-margin-top: 80px; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 1.1rem; font-weight: 300; }

/* ---- Feature rows (alternating) -------------------------------- */
.features { padding: clamp(48px, 8vw, 96px) 0; }
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.feature-row + .feature-row { margin-top: clamp(64px, 9vw, 128px); }
.feature-row:nth-child(odd) .feature-media { order: -1; }

.feature-copy .tag {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.feature-copy h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.feature-copy p { margin-top: 16px; font-size: 1.12rem; color: var(--ink-soft); font-weight: 300; }
.feature-copy .btn { margin-top: 26px; }

/* Styled example search query */
.query {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 1.02rem;
  color: var(--ink);
  font-style: italic;
}
.query svg { flex: none; margin-top: 3px; color: var(--blue); }

/* Media (video) — box conforms to the video so the whole clip is visible */
.feature-media {
  border: 1px solid var(--line);
  border-radius: 30px;         /* matches the rounding baked into the clips so no bg shows in the corners */
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg-alt);
  max-width: 460px;            /* keep the near-square clips from getting too large */
  margin-inline: auto;
}
.feature-media video { width: 100%; height: auto; display: block; object-fit: contain; }
.feature-media video.desat { filter: saturate(0.85); }   /* ~15% less color */

/* ---- Feature grid ---------------------------------------------- */
.grid-section { background: var(--bg-alt); padding: clamp(56px, 9vw, 104px) 0; border-block: 1px solid var(--line); }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d7deea; }
.card img { width: 52px; height: 52px; margin-bottom: 18px; }
.card h3 { font-size: 1.22rem; }
.card p { margin-top: 8px; color: var(--ink-soft); font-size: 1rem; font-weight: 300; }

/* ---- Final CTA -------------------------------------------------- */
.cta {
  padding: clamp(64px, 10vw, 120px) 0;
  text-align: center;
}
.cta__panel {
  background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
  color: #fff;
  border-radius: 28px;
  padding: clamp(44px, 7vw, 80px) var(--pad);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.cta__panel::before {
  content: "";
  position: absolute;
  inset: -40% 40% auto auto;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
  pointer-events: none;
}
.cta h2 { font-size: clamp(1.9rem, 4vw, 3rem); position: relative; }
.cta p {
  position: relative;
  margin: 20px auto 0;
  max-width: 62ch;
  font-size: 1.12rem;
  font-weight: 300;
  color: rgba(255,255,255,.9);
}
.cta .btn { margin-top: 34px; position: relative; }

/* ---- Footer ----------------------------------------------------- */
.site-footer { background: var(--bg-deep); color: #b9c2d0; padding: 56px 0 40px; }
.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.1rem; }
.footer-brand img { width: 26px; height: 26px; }
.footer-links { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #d7deea;
  font-size: .92rem;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.footer-links a:hover { background: rgba(255,255,255,.14); color: #fff; }
.footer-copy {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .86rem;
  color: #7f8a9c;
}

/* ---- Reveal on scroll ------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---- Responsive ------------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { text-align: center; }
  .hero h1 { max-width: 16ch; margin-inline: auto; }
  .hero .lede { margin-inline: auto; }
  .hero .cta-row { justify-content: center; }
  .hero .frame { display: none; }   /* hide hero screenshot once it's no longer beside the title */
}

@media (max-width: 780px) {
  .nav-links .link.hide-sm { display: none; }
  .feature-row { grid-template-columns: 1fr; }
  .feature-row .feature-media { order: 0; }
}
