/* Tipat Dam site. Colours mirror the app (app/src/constants/theme.ts) so site, store and app feel like one thing. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  /* Fill for cards, chips and list rows: the app's backgroundElement. Groups things without borders. */
  --element: #f0f0f3;
  /* Background of alternate page bands: a step lighter than --element so grey items still show on it. */
  --band: #f7f7f9;
  --ink: #000000;
  --muted: #60646c;
  --line: #d9d9e0;
  --accent: #c62828;
  --accent-strong: #7f0000;
  --on-accent: #ffffff;
  --accent-soft: #fdecec;
  --success: #2e7d32;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 8px 24px rgb(0 0 0 / 8%);
  --radius: 18px;
  --font: 'Rubik', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #212225;
    --element: #212225;
    --band: #111214;
    --ink: #ffffff;
    --muted: #b0b4ba;
    --line: #3a3d42;
    --accent: #ef5350;
    --accent-strong: #c62828;
    --on-accent: #ffffff;
    --accent-soft: #2e1515;
    --success: #66bb6a;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 40%);
    color-scheme: dark;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  overflow-x: hidden;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1040px; margin-inline: auto; padding-inline: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 8px; }
.fine { color: var(--muted); font-size: 14px; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; }
.drop { width: 30px; height: 30px; fill: var(--accent); flex: none; }
.appicon { width: 32px; height: 32px; border-radius: 22%; flex: none; display: block; }
.brand--small { font-size: 16px; }
.brand--small .drop { width: 24px; height: 24px; }
.lang {
  font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink);
  border: 1px solid transparent; border-radius: 999px; padding: 6px 14px; background: var(--element);
}
.lang:hover { border-color: var(--accent); }

/* ---------- section cards: each section is a rounded card inside the page margins; the hero stays open ---------- */
.band {
  width: calc(100% - 32px); max-width: 1008px; margin: 0 auto 20px;
  border-radius: 28px; padding: 48px 20px;
}
.band > .wrap { max-width: none; padding-inline: 0; }
.band--tint { background: var(--band); }
.band--soft { background: var(--accent-soft); }
.band--accent { background: #c62828; color: #fff; }
.section-title { font-size: clamp(26px, 6vw, 36px); font-weight: 700; text-wrap: balance; }
@media (min-width: 760px) {
  .band { padding: 80px 56px; margin-bottom: 28px; border-radius: 36px; }
}

/* ---------- hero ---------- */
.band.hero { border-radius: 0; padding: 40px 0 56px; }
.badge {
  display: inline-block; font-size: 13px; font-weight: 500; letter-spacing: .02em;
  color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 3px 12px; margin-bottom: 16px;
}
.hero h1 { font-size: clamp(34px, 8.5vw, 60px); font-weight: 700; letter-spacing: -.01em; max-width: 17ch; text-wrap: balance; }
.hero__name { display: block; font-size: 17px; font-weight: 500; color: var(--accent); letter-spacing: .01em; margin-bottom: 10px; }
.lead { font-size: clamp(18px, 4.6vw, 21px); color: var(--muted); max-width: 46ch; margin-top: 16px; }
.hero .stores { margin-top: 28px; }
/* Free · no ads · no sign-up: answers the doubts people have right before installing. */
.perks { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; }
.perks li { display: inline-flex; align-items: center; gap: 6px; }
.perks svg { width: 18px; height: 18px; fill: var(--success); flex: none; }
/* Desktop: centre the hero. There is no app screenshot beside it yet, so start-aligned text left half the row empty.
   Phones keep start alignment: the text fills the width anyway and long lines read better that way. */
@media (min-width: 760px) {
  .band.hero { text-align: center; padding: 88px 0 96px; }
  .hero h1, .hero .lead { margin-inline: auto; }
  .hero .stores, .hero .perks { justify-content: center; }
}

/* ---------- store buttons ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; min-width: 176px;
  padding: 10px 18px; border-radius: 14px; text-decoration: none;
  background: var(--accent); color: var(--on-accent); line-height: 1.15; font-weight: 500; font-size: 18px;
  transition: transform .15s ease, background .15s ease;
}
.store small { display: block; font-size: 12px; font-weight: 400; opacity: .9; }
.store svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.store:hover { transform: translateY(-1px); background: var(--accent-strong); color: var(--on-accent); }

/* ---------- how it works: a numbered journey (find → book → reminded → again) ---------- */
.features .section-title { margin-bottom: 40px; }
@media (min-width: 760px) {
  .features .section-title { text-align: center; margin-bottom: 64px; }
}
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; }
.step { position: relative; display: flex; gap: 16px; align-items: flex-start; }
.step__icon {
  position: relative; z-index: 1; flex: none; display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft);
}
.step__icon svg { width: 24px; height: 24px; fill: var(--accent); }
.step__num {
  position: absolute; top: -4px; inset-inline-end: -4px; display: grid; place-items: center;
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--band);
  background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; line-height: 1;
}
/* The thread between steps: vertical on phones, horizontal on desktop. */
.step:not(:last-child)::after {
  content: ''; position: absolute; inset-inline-start: 23px; top: 54px; bottom: -28px; width: 2px; background: var(--line);
}
.step h3 { font-size: 18px; font-weight: 500; margin: 4px 0 6px; }
.step p { color: var(--muted); font-size: 16px; }
.step__loop svg { width: 18px; height: 18px; fill: var(--accent); vertical-align: -3px; }
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 48px; }
  .step { flex-direction: column; align-items: center; text-align: center; }
  .step h3 { margin-top: 18px; }
  .step:not(:last-child)::after { top: 23px; bottom: auto; height: 2px; width: auto; inset-inline-start: calc(50% + 34px); inset-inline-end: calc(-50% - 14px); }
}

/* ---------- map ---------- */
.mapsec { scroll-margin-top: 0; }
/* No card behind the map: drop the card's side padding so its edges line up with the cards above and below. */
.band.mapsec { padding-inline: 0; }
.mapsec__intro { color: var(--muted); margin-top: 6px; }
.mapsec__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip, .locate, .more {
  border: 1px solid transparent; background: var(--element); border-radius: 999px;
  padding: 7px 14px; font-size: 15px; cursor: pointer;
}
.chip[aria-checked='true'] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 500; }
.locate { display: inline-flex; align-items: center; gap: 6px; }
.locate svg { width: 18px; height: 18px; fill: var(--accent); }
.locate[aria-pressed='true'] { border-color: var(--accent); color: var(--accent); font-weight: 500; }
.mapsec__count { margin-top: 12px; font-weight: 500; min-height: 1.6em; }
.map {
  position: relative; margin-top: 8px; height: min(62vh, 520px); min-height: 340px;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--accent-soft);
  direction: ltr; z-index: 0;
}
.map__status { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); padding: 16px; text-align: center; }
.mapsec > .fine { margin-top: 12px; }

.places { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.place {
  display: flex; align-items: center; gap: 12px; background: var(--element);
  border: 1px solid transparent; border-radius: 16px; padding: 20px 18px; min-height: 92px;
}
.place__main { flex: 1; min-width: 0; cursor: pointer; }
.place__name { font-weight: 500; }
.place__meta { color: var(--muted); font-size: 14px; }
.place__meta span + span::before { content: ' · '; }
.place.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
@media (min-width: 760px) { .places { grid-template-columns: 1fr 1fr; } }
.more { margin-top: 12px; }

.btn-book {
  flex: none; border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer;
  background: var(--accent); color: var(--on-accent); font-weight: 500; font-size: 15px;
}
.btn-book:hover { background: var(--accent-strong); }

/* Google Maps info window, themed to match the page in both modes */
.gm-style .gm-style-iw-c { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); padding: 14px 16px !important; border-radius: 14px; }
.gm-style .gm-style-iw-d { overflow: auto !important; padding: 0 !important; }
.gm-style .gm-style-iw-tc::after { background: var(--surface); }
.gm-style .gm-style-iw-chr { position: absolute; inset-inline-end: 0; top: 0; }
.gm-style .gm-ui-hover-effect > span { background-color: var(--muted); }
.gm-style { font-family: var(--font); }
.pop { font: 15px/1.4 var(--font); padding-inline-end: 28px; }
.pop__name { font-weight: 500; font-size: 16px; }
.pop__meta { color: var(--muted); font-size: 14px; margin: 2px 0 10px; }
.pop__note { color: var(--muted); font-size: 13px; margin: -6px 0 10px; }
/* One row per date, like the app. Scrolls when a permanent station has many. */
.pop__dates { list-style: none; margin: 0 0 12px; padding: 0; max-height: 210px; overflow-y: auto; }
.pop__dates li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 8px 10px; border-radius: 10px; background: var(--element);
}
.pop__dates li + li { margin-top: 4px; }
.pop__day { font-weight: 500; font-size: 14px; }
.pop__time { color: var(--muted); font-size: 14px; white-space: nowrap; }
.me { width: 16px; height: 16px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 6px rgb(37 99 235 / 20%); transform: translateY(50%); }
.cluster {
  display: grid; place-items: center; border-radius: 50%;
  background: #fff; color: var(--accent); font-weight: 700; font-size: 14px;
  border: 3px solid var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* ---------- trust + cta ---------- */
.trust .wrap { max-width: 720px; }
.trust__icon {
  display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface); margin-bottom: 18px;
}
.trust__icon svg { width: 28px; height: 28px; fill: var(--accent); }
.trust h2 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.trust p { font-size: 18px; }
@media (min-width: 760px) { .trust { text-align: center; } }

.cta { text-align: center; }
.cta__title { font-size: clamp(28px, 7vw, 44px); font-weight: 700; margin-bottom: 32px; text-wrap: balance; }
.cta .stores, .cta .perks { justify-content: center; }
.cta .perks svg { fill: #fff; }
/* On the red band the buttons flip to white so they stay the strongest thing on it. */
.cta .store { background: #fff; color: #000; }
.cta .store:hover { background: #f0f0f3; color: #000; }

/* ---------- modal ---------- */
.modal { border: 0; padding: 0; background: transparent; max-width: min(440px, calc(100vw - 32px)); width: 100%; color: var(--ink); }
.modal::backdrop { background: rgb(20 10 14 / 55%); }
.modal__box { background: var(--surface); border-radius: 22px; padding: 26px 22px 20px; text-align: center; box-shadow: var(--shadow); }
.modal__drop .appicon { width: 52px; height: 52px; margin-inline: auto; }
.modal h2 { font-size: 22px; margin: 8px 0 6px; }
.modal__place { font-weight: 500; color: var(--accent); margin-bottom: 8px; }
.modal__place:empty { display: none; }
.modal p { color: var(--muted); }
.modal .stores { justify-content: center; margin-top: 20px; }
.modal .store { min-width: 0; flex: 1 1 160px; justify-content: center; }
.modal__close { margin-top: 14px; background: none; border: 0; color: var(--muted); padding: 8px 16px; cursor: pointer; text-decoration: underline; }

/* ---------- footer ---------- */
.footer { padding-block: 12px 36px; font-size: 15px; }
.footer__row { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer__links a { color: var(--muted); }

/* ---------- privacy ---------- */
.prose { max-width: 720px; padding-block: 32px 64px; }
.prose h1 { font-size: clamp(30px, 7vw, 42px); margin-bottom: 6px; }
.prose .lead { margin: 20px 0 8px; max-width: none; }
.prose h2 { font-size: 21px; margin: 32px 0 8px; }
.prose ul { padding-inline-start: 22px; margin: 0; }
.prose li + li { margin-top: 6px; }
.prose p + p { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
