/* RouteMint landing. Colours, type and logo come from the app's design rules (docs/design.md, variant 2). */
:root {
  --graphite: #1D1D1F;
  --blue: #2F6BDB;
  --blue-press: #2558B8;
  --sky: #BFDFFF;
  --ice: #EAF3FF;
  --ground: #F4F3F0;
  --chip: #EFEEEA;
  --card: #FFFFFF;
  --muted: #6B6B70;

  --th-history: #3F7BEA;
  --th-arch: #D9468F;
  --th-nature: #189E8A;
  --th-art: #8B6AD9;
  --th-kids: #D4A20B;
  --th-food: #C24E3E;
  --th-evening: #4A4FB0;
  --th-film: #E2761B;
  --th-date: #EC6A8C;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Geeza Pro", "Noto Sans Arabic", "Segoe UI Arabic", sans-serif;
  --mark: "Nunito", "Inter", sans-serif;

  --s-small: 15px;
  --s-body: 17px;
  --s-lead: 20px;
  --s-h: clamp(34px, 3.8vw, 56px);
  --s-hero: clamp(40px, 5.4vw, 84px);

  --m: clamp(16px, 2.4vw, 32px);
  --wrap: 1280px;
  --r-big: 32px;
  --r: 20px;
  --gap: clamp(96px, 11vw, 160px);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--card); color: var(--graphite);
  font: 400 var(--s-body)/1.55 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1.5px; }
button { font: inherit; color: inherit; }
h1, h2, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
::selection { background: var(--sky); color: var(--graphite); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
.launch-in :focus-visible, .hero :focus-visible { outline-color: #fff; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--m); top: -60px; z-index: 50; background: var(--card); padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 12px; }
.ic { width: 1.15em; height: 1.15em; flex: none; }

h2 { font-size: var(--s-h); font-weight: 700; line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
section { padding-left: var(--m); padding-right: var(--m); }

/* ---------- buttons: one shape, the app's blue ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--blue); color: #fff;
  font-size: var(--s-body); font-weight: 600; letter-spacing: -0.01em; text-decoration: none; cursor: pointer;
  transition: background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--blue-press); } }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: var(--s-small); }
.btn-light { background: rgb(255 255 255 / 0.92); color: var(--graphite); }
@media (hover: hover) and (pointer: fine) { .btn-light:hover { background: #fff; } .btn-light:hover .ic { transform: translateX(3px); } }
.btn-light .ic { transition: transform 200ms var(--ease-out); }
.btn-white { background: #fff; color: var(--blue); }
@media (hover: hover) and (pointer: fine) { .btn-white:hover { background: var(--ice); } }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: calc(var(--wrap) + 2 * var(--m)); margin: 0 auto; padding: 14px var(--m);
  background: var(--card);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; }
.brand-word { font-family: var(--mark); font-weight: 900; font-size: 24px; letter-spacing: -0.03em; line-height: 1; }
.bar-links { display: flex; gap: 30px; font-size: var(--s-small); font-weight: 500; }
.bar-links a { text-decoration: none; padding: 10px 0; }
@media (hover: hover) and (pointer: fine) { .bar-links a:hover { color: var(--blue); } }
.bar-end { display: flex; align-items: center; gap: 12px; }
.langpick { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px 0 14px; border: 0; border-radius: 999px;
  background: var(--ground); color: var(--graphite); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background-color 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .lang-btn:hover { background: var(--chip); } }
.lang-btn .ic { width: 18px; height: 18px; }
.lang-btn .lang-chev { width: 16px; height: 16px; transition: transform 200ms var(--ease-out); }
.lang-btn[aria-expanded="true"] .lang-chev { transform: rotate(180deg); }
.lang-code { display: none; }
.lang-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 30; min-width: 210px; margin: 0; padding: 6px; list-style: none;
  background: #fff; border-radius: 18px; display: grid; gap: 2px;
  box-shadow: 0 18px 40px -16px rgb(10 20 45 / 0.4); /* taste-skill-ignore */
  animation: menu-in 160ms var(--ease-out);
}
.lang-menu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
.lang-menu button {
  width: 100%; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: none; cursor: pointer;
  text-align: start; font-size: 15px; font-weight: 500; color: var(--graphite);
}
.lang-menu button[aria-current="true"] { background: var(--ice); color: var(--blue); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .lang-menu button[aria-current="false"]:hover { background: var(--ground); } }

/* ---------- hero ---------- */
.hero {
  position: relative; max-width: calc(var(--wrap) + 2 * var(--m)); margin: 0 auto;
  height: min(86svh, 820px); min-height: 560px;
}
.hero-img {
  position: absolute; inset: 0 var(--m); width: calc(100% - 2 * var(--m)); height: 100%;
  object-fit: cover; object-position: 50% 62%; border-radius: var(--r-big);
}
.hero::before {
  /* a soft scrim over the sky so the white headline reads */
  content: ""; position: absolute; inset: 0 var(--m); border-radius: var(--r-big); z-index: 1;
  background: linear-gradient(100deg, rgb(16 32 64 / 0.68) 0%, rgb(16 32 64 / 0.38) 42%, rgb(16 32 64 / 0) 68%);
}
.hero-copy { position: relative; z-index: 2; padding: clamp(40px, 7vw, 96px) clamp(28px, 5vw, 72px); max-width: min(1000px, 62%); color: #fff; display: grid; gap: 24px; }
.hero h1 { font-size: var(--s-hero); font-weight: 700; line-height: 1.02; letter-spacing: -0.035em; }
.hero h1 .soft { color: var(--sky); white-space: nowrap; }
@media (max-width: 680px) { .hero h1 .soft { white-space: normal; } }
.hero-lead { font-size: var(--s-lead); line-height: 1.5; max-width: 34ch; color: #fff; text-shadow: 0 1px 12px rgb(10 20 45 / 0.55), 0 0 2px rgb(10 20 45 / 0.35); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
@keyframes float-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- the app in a phone, turned a little in space ---------- */
.phone-wrap {
  --ps: 0.74;
  position: absolute; z-index: 2; right: calc(var(--m) + clamp(24px, 6vw, 110px)); top: 50%;
  width: calc(390px * var(--ps)); height: calc(844px * var(--ps)); margin-top: calc(-422px * var(--ps));
  perspective: 1800px;
  animation: phone-in 1100ms var(--ease-out) 150ms both;
}
.device {
  position: absolute; left: 50%; top: 50%; width: 390px; height: 844px; margin: -422px 0 0 -195px;
  padding: 12px; border-radius: 64px; background: #1D1D1F;
  transform-style: preserve-3d;
  transform: scale(var(--ps)) rotateY(-24deg) rotateX(9deg) rotateZ(4deg);
  box-shadow:
    inset 0 0 0 2px #3A3A3D, inset 0 0 0 5px #111113,
    -40px 60px 90px -30px rgb(10 20 45 / 0.55), -10px 24px 40px -18px rgb(10 20 45 / 0.45); /* taste-skill-ignore */
}
/* the side of the body, seen because the phone is turned */
.device::before {
  content: ""; position: absolute; inset: 0; border-radius: 64px; background: #0E0E10;
  transform: translateZ(-16px); box-shadow: 0 0 0 1px #2A2A2D;
}
/* side buttons */
.device::after {
  content: ""; position: absolute; right: -4px; top: 190px; width: 5px; height: 96px; border-radius: 3px; background: #2A2A2D;
  box-shadow: -398px -46px 0 0 #2A2A2D, -398px 30px 0 0 #2A2A2D;
}
.screen { position: relative; width: 100%; height: 100%; border-radius: 52px; overflow: hidden; background: var(--ground); font-family: var(--font); color: var(--graphite); }
.screen .ic { width: 18px; height: 18px; }
.scr-map { position: absolute; left: 0; top: 0; width: 100%; height: auto; }
.scr-status { background: linear-gradient(to bottom, rgb(244 243 240 / 0.95) 60%, rgb(244 243 240 / 0)); position: absolute; left: 0; right: 0; top: 0; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 34px 0 42px; font-size: 16px; font-weight: 600; }
.island { position: absolute; left: 50%; top: 11px; width: 120px; height: 34px; margin-left: -60px; border-radius: 20px; background: #000; }
.scr-bat { width: 26px; height: 12px; border-radius: 4px; border: 2px solid var(--graphite); position: relative; }
.scr-bat::after { content: ""; position: absolute; inset: 1px 5px 1px 1px; background: var(--graphite); border-radius: 1px; }
.scr-btn { position: absolute; top: 62px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / 0.12); }
.scr-back { left: 16px; } .scr-back .ic { transform: scaleX(-1); }
.scr-cal { right: 68px; }
.scr-share { right: 16px; background: var(--blue); color: #fff; }
.scr-pin { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 3px solid #fff; background: center / cover no-repeat; box-shadow: 0 4px 10px -3px rgb(0 0 0 / 0.35); }
.scr-pin b { position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--graphite); color: var(--sky); font-size: 12px; font-weight: 700; border: 2px solid #fff; }
.scr-sheet { position: absolute; left: 0; right: 0; top: 380px; bottom: 0; background: #fff; border-radius: 28px 28px 0 0; padding: 12px 18px 0; display: grid; align-content: start; gap: 10px; }
.scr-handle { justify-self: center; width: 40px; height: 5px; border-radius: 3px; background: #D9D8D3; }
.scr-label { font-size: 13px; color: var(--muted); margin-top: 2px; }
.scr-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: -6px; }
.scr-chips { display: flex; gap: 6px; }
.scr-chips > span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--chip); font-size: 14px; font-weight: 600; }
.scr-chips .scr-chip-blue { background: var(--ice); color: var(--blue); }
.scr-chips .ic { width: 16px; height: 16px; }
.scr-row { display: flex; gap: 8px; align-items: center; }
.scr-seg { flex: 1; display: flex; padding: 4px; border-radius: 999px; background: var(--chip); font-size: 14px; font-weight: 500; }
.scr-seg span { flex: 1; text-align: center; padding: 9px 0; border-radius: 999px; }
.scr-seg .on { background: #fff; font-weight: 600; }
.scr-ai { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px; background: var(--blue); color: #fff; font-weight: 700; font-size: 15px; }
.scr-stops { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.scr-stops li { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; min-height: 50px; }
.scr-stops li b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 13px; flex: none; }
.scr-stops img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; }
.scr-stops .scr-leg { min-height: 30px; margin-left: 36px; gap: 6px; font-size: 13px; font-weight: 500; color: var(--graphite); }
.scr-stops .scr-leg { display: inline-flex; width: fit-content; padding: 0 10px; border-radius: 999px; background: var(--chip); min-height: 28px; }
.scr-stops .scr-leg .ic { width: 15px; height: 15px; }
.scr-actions { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; padding: 12px 18px 30px; background: #fff; }
.scr-actions span { flex: 1; display: grid; place-items: center; height: 54px; border-radius: 999px; font-weight: 700; font-size: 17px; }
.scr-save { background: var(--ice); color: var(--blue); }
.scr-start { background: var(--blue); color: #fff; }
@keyframes phone-in { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* ---------- try: live map ---------- */
.try { max-width: calc(var(--wrap) + 2 * var(--m)); margin: var(--gap) auto 0; }
.try-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; align-items: end; margin-bottom: 40px; }
.try-head p { max-width: 46ch; color: var(--graphite); }
.try-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; }
.map-wrap { position: relative; border-radius: var(--r-big); overflow: hidden; background: var(--ice); min-height: 620px; }
.map { position: absolute; inset: 0; }
.map-fallback { position: absolute; inset: auto 24px 24px; padding: 14px 18px; background: var(--card); border-radius: 16px; }
.panel { background: var(--ice); border-radius: var(--r-big); padding: 28px; display: grid; gap: 28px; align-content: start; }
.sum { background: var(--card); border-radius: 24px; padding: 22px; display: grid; gap: 14px; }
.sum-title { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.sum-nums { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; column-gap: 24px; row-gap: 8px; }
.sum-nums .lbl { white-space: nowrap; }
.sum-nums p { display: grid; }
.big { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
.lbl { color: var(--muted); font-size: 13px; }
.sum-note { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--graphite); min-height: 2.9em; }
.sum-note .ic { color: var(--blue); width: 18px; height: 18px; margin-top: 1px; }
.flash { animation: flash 420ms var(--ease-out); }
@keyframes flash { from { opacity: 0.25; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.ctl { display: grid; gap: 10px; }
.ctl-label { font-weight: 600; font-size: var(--s-small); }

.seg { display: flex; gap: 4px; background: var(--card); border-radius: 999px; padding: 4px; }
.seg button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--graphite);
  transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out), transform 160ms var(--ease-out);
}
.seg button:active { transform: scale(0.96); }
.seg button[aria-checked="true"] { background: var(--blue); color: #fff; }
@media (hover: hover) and (pointer: fine) { .seg button[aria-checked="false"]:hover { background: var(--ice); } }
.seg-icons { display: grid; grid-template-columns: 1fr 1fr; border-radius: 24px; }
.seg-icons button { border-radius: 20px; justify-content: flex-start; padding: 0 14px; }

.toggle { display: flex; align-items: center; gap: 14px; cursor: pointer; min-height: 44px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-ui { width: 52px; height: 32px; border-radius: 999px; background: #CCD6E4; position: relative; flex: none; transition: background-color 200ms var(--ease-out); }
.toggle-ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform 240ms var(--ease-out); }
.toggle input:checked + .toggle-ui { background: var(--blue); }
.toggle input:checked + .toggle-ui::after { transform: translateX(20px); }
.toggle input:focus-visible + .toggle-ui { outline: 3px solid var(--blue); outline-offset: 3px; }
.toggle-t { display: block; font-weight: 600; font-size: var(--s-small); }
.toggle-s { display: block; font-size: 13px; color: var(--muted); }

/* map markers (built in main.js) */
.mk { display: block; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; background: var(--sky) center / cover no-repeat; box-shadow: 0 4px 12px -4px rgb(0 0 0 / 0.35); cursor: default; }
.mk { position: relative; }
.mk b { position: absolute; right: -6px; bottom: -6px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--graphite); color: var(--sky); font-size: 11px; font-weight: 700; border: 2px solid #fff; }
.mk-btn { display: block; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.mk.cand { width: 38px; height: 38px; opacity: 0.78; filter: grayscale(0.35); transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out); }
.mk.cand b { background: var(--blue); color: #fff; font-size: 15px; }
@media (hover: hover) and (pointer: fine) { .mk-btn:hover .mk.cand { opacity: 1; filter: none; transform: scale(1.08); } }
.mk-btn:active .mk { transform: scale(0.94); }
.mk-in { animation: mk-in 260ms var(--ease-out) both; }
.mk-ring::before, .mk-ring::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; pointer-events: none;
  background: rgb(47 107 219 / 0.36); border: 3px solid var(--blue); opacity: 0;
  animation: mk-ring 1.2s var(--ease-out) 300ms 2;
}
.mk-ring::after { animation-delay: 500ms; background: none; }
@keyframes mk-ring { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(2.4); } }
@keyframes mk-in { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
.maplibregl-ctrl-attrib { font-size: 12px; }

.collage { position: relative; aspect-ratio: 1 / 0.92; }
.collage img { position: absolute; object-fit: cover; border-radius: 28px; }
.c1 { left: 0; top: 0; width: 78%; height: 56%; }
.c2 { right: 0; top: 8%; width: 32%; height: 46%; }
.c3 { left: 6%; bottom: 0; width: 46%; height: 50%; }
.chat {
  position: absolute; right: 0; bottom: 6%; width: min(300px, 46%);
  background: var(--card); border-radius: 22px; padding: 14px; display: grid; gap: 10px;
  box-shadow: 0 18px 40px -18px rgb(20 40 80 / 0.4);
}
.chat-q { background: var(--blue); color: #fff; border-radius: 16px 16px 4px 16px; padding: 10px 12px; font-size: 14px; line-height: 1.4; justify-self: end; }
.chat-a { display: flex; gap: 10px; align-items: center; background: var(--ice); border-radius: 16px 16px 16px 4px; padding: 10px 12px; font-size: 14px; line-height: 1.4; }
.spark { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sky); color: var(--graphite); flex: none; }
.spark .ic { width: 14px; height: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips li { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--ground); font-size: 14px; font-weight: 500; }
.chips .ic { width: 16px; height: 16px; color: var(--th); }
.card { position: relative; border-radius: 28px; overflow: hidden; color: #fff; display: flex; align-items: flex-end; }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .card:hover img { transform: scale(1.04); } }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(10 20 40 / 0.72), rgb(10 20 40 / 0) 55%); }
.card-body { position: relative; z-index: 1; padding: 22px; display: grid; gap: 4px; }
.card-t { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.card-t .ic-bg { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--th); }
.card-t .ic { width: 18px; height: 18px; }
.card-s { font-size: 14px; color: #fff; opacity: 0.92; }

/* route stops in the panel */
.stops { display: grid; gap: 2px; margin: 4px 0 0; padding: 0; list-style: none; counter-reset: st; }
.stops li { display: flex; align-items: center; gap: 10px; min-height: 34px; font-size: 14px; font-weight: 500; }
.stops li::before { counter-increment: st; content: counter(st); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--graphite); color: var(--sky); font-size: 11px; font-weight: 700; flex: none; }
.stops .leg-t { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stops .leg-t .ic { width: 15px; height: 15px; }
.stops li.is-new { animation: flash 420ms var(--ease-out); }
.adds { display: flex; flex-wrap: wrap; gap: 8px; }
.adds button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 6px; border: 0; border-radius: 999px;
  background: var(--card); cursor: pointer; font-size: 14px; font-weight: 500; color: var(--graphite);
  transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out), transform 160ms var(--ease-out);
}
.adds button img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.adds button::after { content: "+"; font-size: 18px; line-height: 1; color: var(--blue); }
.adds button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.adds button[aria-pressed="true"]::after { content: "×"; color: #fff; }
.adds button:active { transform: scale(0.97); }

/* ---------- share / ai ---------- */
.feature {
  max-width: calc(var(--wrap) + 2 * var(--m)); margin: var(--gap) auto 0;
  display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center;
}
.feature-flip .feature-text { order: 2; }
.feature-text { display: grid; gap: 20px; justify-items: start; }
.feature-text p { max-width: 46ch; }
.fi { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ice); color: var(--blue); }
.fi .ic { width: 24px; height: 24px; }
.fi-ai { background: var(--sky); color: var(--graphite); }
.share-pic { background: var(--ice); border-radius: var(--r-big); padding: clamp(28px, 5vw, 64px); display: grid; gap: 16px; justify-items: center; }
.msg { width: min(360px, 100%); background: var(--card); border-radius: 24px 24px 24px 8px; padding: 14px; display: grid; gap: 8px; box-shadow: 0 18px 40px -22px rgb(20 40 80 / 0.4); }
.msg-from { font-size: 13px; font-weight: 600; color: var(--blue); }
.msg-text { font-size: 15px; }
.msg-card { background: var(--ground); border-radius: 16px; overflow: hidden; }
.msg-map { position: relative; height: 140px; background: #E9EEF5; display: flex; align-items: center; justify-content: center; gap: 26px; }
.msg-map::before { content: ""; position: absolute; left: 18%; right: 18%; top: 50%; height: 6px; margin-top: -3px; border-radius: 6px; background: var(--th-history); }
.msg-map img { position: relative; width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; }
.msg-t { padding: 10px 12px 0; font-weight: 600; font-size: 15px; }
.msg-s { padding: 0 12px 12px; font-size: 13px; color: var(--muted); }
.msg-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--card); font-size: var(--s-small); font-weight: 600; }
.pill .ic { color: var(--blue); width: 18px; height: 18px; }
.collage { position: relative; aspect-ratio: 1 / 0.82; }

/* ---------- ready routes ---------- */
.ready { max-width: calc(var(--wrap) + 2 * var(--m)); margin: var(--gap) auto 0; }

/* ---------- AI: a big chat window over a picture ---------- */
.ai-stage { position: relative; border-radius: var(--r-big); overflow: hidden; min-height: 620px; display: grid; place-items: center; padding: 48px 28px; }
.ai-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ai-stage::before { content: ""; position: absolute; inset: 0; background: rgb(16 32 64 / 0.28); z-index: 1; }
.chatwin {
  position: relative; z-index: 2; width: min(460px, 100%); background: #fff; border-radius: 28px; overflow: hidden;
  display: grid; box-shadow: 0 30px 70px -28px rgb(10 20 45 / 0.6); /* taste-skill-ignore */
}
.cw-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--chip); }
.cw-head b { font-size: 16px; white-space: nowrap; }
.cw-sub { margin-inline-start: auto; font-size: 13px; color: var(--muted); }
.cw-body { padding: 18px; display: grid; gap: 14px; background: var(--ground); }
.cw-me { justify-self: end; max-width: 85%; background: var(--blue); color: #fff; padding: 12px 14px; border-radius: 20px 20px 6px 20px; font-size: 15px; line-height: 1.45; }
.cw-ai { justify-self: start; width: 92%; background: #fff; padding: 14px; border-radius: 20px 20px 20px 6px; display: grid; gap: 12px; font-size: 15px; line-height: 1.45; }
.cw-places { display: grid; gap: 8px; }
.cw-places li { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 16px; background: var(--ice); }
.cw-places img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; }
.cw-places b { display: block; font-size: 15px; }
.cw-places span span { font-size: 13px; color: var(--muted); }
.cw-add { justify-self: start; }
.cw-add[aria-pressed="true"] { background: var(--ice); color: var(--blue); }
.cw-input { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 12px 12px 12px 20px; font-size: 15px; color: var(--muted); background: #fff; border-top: 1px solid var(--chip); }
.cw-input i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; }
.cw-input .ic { width: 18px; height: 18px; transform: rotate(-90deg); }

/* chat: the draft in the field, the send button, typing, the café */
.cw-body { max-height: 470px; overflow-y: auto; scroll-behavior: smooth; }
.cw-input { gap: 12px; }
.cw-draft { color: var(--graphite); font-weight: 500; }
.cw-draft.cw-empty { color: var(--muted); font-weight: 400; }
.cw-send { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--blue); color: #fff; cursor: pointer; flex: none; transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out); }
.cw-send .ic { width: 18px; height: 18px; transform: rotate(-90deg); }
.cw-send:active { transform: scale(0.94); }
.cw-send:disabled { background: #C9D6EE; cursor: default; }
.cw-new { animation: flash 420ms var(--ease-out); }
.cw-typing { justify-self: start; display: flex; gap: 5px; padding: 14px 16px; background: #fff; border-radius: 20px 20px 20px 6px; }
.cw-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typing 1s infinite ease-in-out; }
.cw-typing i:nth-child(2) { animation-delay: 150ms; } .cw-typing i:nth-child(3) { animation-delay: 300ms; }
@keyframes typing { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.cw-cup, .add-cup { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--graphite); color: var(--sky); flex: none; }
.add-cup { width: 32px; height: 32px; border-radius: 50%; }
.add-cup .ic { width: 16px; height: 16px; }
.cw-done { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--blue); }
.cw-done .ic { width: 18px; height: 18px; }
.mk.mk-cafe { background: var(--graphite); color: var(--sky); display: grid; place-items: center; }
.mk.mk-cafe > .ic { width: 20px; height: 20px; }

/* chat hints: a bubble pointing at the send button, a line under "show on the map" */
.chatwin { position: relative; }
.cw-tip {
  position: absolute; right: 12px; bottom: 74px; z-index: 3; margin: 0;
  padding: 8px 12px; border-radius: 12px; background: var(--graphite); color: #fff; font-size: 13px; font-weight: 600;
  animation: tip-bob 1.6s var(--ease-io) 3;
}
.cw-tip::after { content: ""; position: absolute; right: 18px; bottom: -6px; width: 12px; height: 12px; background: var(--graphite); transform: rotate(45deg); border-radius: 2px; }
@keyframes tip-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.cw-hint { font-size: 13px; color: var(--muted); }
.cw-show .ic { width: 18px; height: 18px; }
.pulse-loop { position: relative; }
.pulse-loop::after {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; pointer-events: none;
  border: 3px solid var(--blue); opacity: 0; animation: ring 1.6s var(--ease-out) 4;
}

/* "tap me": a ring that grows out of the button a few times */
.pulse { position: relative; }
.pulse::after {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; pointer-events: none;
  border: 3px solid var(--blue); opacity: 0; animation: ring 1.4s var(--ease-out) 3;
}
@keyframes ring { 0% { opacity: 0.7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35); } }

/* share: navigation app choice */
.msg-actions { position: relative; }
.nav-btn { min-height: 52px; }
.nav-menu {
  position: absolute; left: 50%; top: calc(100% + 10px); transform: translateX(-50%); z-index: 5; width: 260px;
  background: #fff; border-radius: 20px; padding: 6px; display: grid;
  box-shadow: 0 20px 40px -16px rgb(10 20 45 / 0.45); /* taste-skill-ignore */
  animation: pop-in 180ms var(--ease-out);
}
.nav-menu[hidden] { display: none; }
@keyframes pop-in { from { opacity: 0; transform: translateX(-50%) translateY(-4px) scale(0.97); } to { opacity: 1; transform: translateX(-50%); } }
.nav-menu a { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; text-decoration: none; font-weight: 600; font-size: 16px; }
.nav-menu small { font-size: 13px; color: var(--muted); font-weight: 400; }
@media (hover: hover) and (pointer: fine) { .nav-menu a:hover { background: var(--ice); } }
.nav-menu a:focus-visible { outline-offset: -3px; }

/* ---------- ready routes: a carousel of cards over the map, as in the app ---------- */
.ready-stage { position: relative; height: 640px; border-radius: var(--r-big); overflow: hidden; background: var(--ice); }
.ready-stage .map { position: absolute; inset: 0; }
.rcarousel {
  position: absolute; left: 0; right: 0; bottom: 18px; z-index: 2;
  display: flex; gap: 12px; padding: 4px 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.rcarousel::-webkit-scrollbar { display: none; }
.rcard {
  flex: 0 0 min(380px, 84%); scroll-snap-align: center;
  display: flex; gap: 14px; align-items: center; padding: 12px; text-align: left;
  border: 2px solid transparent; border-radius: 24px; background: #fff; cursor: pointer; font-family: inherit; color: var(--graphite);
  box-shadow: 0 10px 30px -14px rgb(10 20 45 / 0.45); /* taste-skill-ignore */
  transition: border-color 180ms var(--ease-out), transform 160ms var(--ease-out);
}
.rcard:active { transform: scale(0.98); }
.rcard[aria-checked="true"] { border-color: var(--th); }
.rcard img { width: 96px; height: 96px; border-radius: 16px; object-fit: cover; flex: none; }
.rc-body { display: grid; gap: 6px; min-width: 0; }
.rc-by { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; color: var(--muted); text-transform: uppercase; }
.rc-by i { width: 18px; height: 4px; border-radius: 2px; background: var(--th); }
.rc-t { font-size: 18px; letter-spacing: -0.01em; line-height: 1.2; }
.rc-m { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rc-m > span { display: inline-flex; align-items: center; gap: 4px; }
.rc-m .ic { width: 14px; height: 14px; }
@media (min-width: 1081px) { .rcarousel { justify-content: center; } }

/* share: the hint above the navigate button */
.msg-actions { display: grid; justify-items: center; gap: 10px; }
.nav-tip {
  position: relative; margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--graphite); color: #fff; font-size: 13px; font-weight: 600;
  animation: tip-bob 1.6s var(--ease-io) 3;
}
.nav-tip::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; margin-left: -6px; background: var(--graphite); transform: rotate(45deg); border-radius: 2px; }

/* ---------- faq ---------- */
.faq { max-width: 880px; margin: var(--gap) auto 0; }
.faq h2 { text-align: center; margin-bottom: 32px; }
.faq-list { display: grid; gap: 10px; }
.faq details { background: var(--ground); border-radius: 22px; padding: 0 24px; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 64px; font-weight: 600; font-size: var(--s-body);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; font-weight: 400; color: var(--blue); transition: transform 200ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; max-width: 64ch; }

/* ---------- launch ---------- */
.launch { max-width: calc(var(--wrap) + 2 * var(--m)); margin: var(--gap) auto 0; }
.launch-in {
  background: var(--blue); color: #fff; border-radius: var(--r-big);
  padding: clamp(40px, 6vw, 80px); display: grid; grid-template-columns: 1fr 1fr; gap: 32px 56px; align-items: center;
}
.launch-copy { display: grid; gap: 16px; }
.launch-copy p { color: #fff; max-width: 40ch; }
.launch-form { display: grid; gap: 12px; }
.field input {
  width: 100%; min-height: 56px; padding: 0 22px; border: 2px solid transparent; border-radius: 999px; background: #fff;
  font: 500 17px var(--font); color: var(--graphite); caret-color: var(--blue);
  transition: border-color 160ms var(--ease-out);
}
.field input::placeholder { color: var(--muted); }
.field input:focus { outline: none; border-color: var(--graphite); box-shadow: 0 0 0 3px #fff; }
.seg-on-blue { background: transparent; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.6); }
.seg-on-blue button { color: #fff; }
.seg-on-blue button[aria-checked="true"] { background: #fff; color: var(--blue); }
@media (hover: hover) and (pointer: fine) { .seg-on-blue button[aria-checked="false"]:hover { background: rgb(255 255 255 / 0.12); } }

/* the field for bots: invisible and out of reach, without pushing the page sideways (that widened it right to left) */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.form-msg { min-height: 1.5em; font-size: var(--s-small); color: #fff; }
.form-msg.err { color: #fff; font-weight: 600; }
.launch-form.done .field, .launch-form.done .seg, .launch-form.done .btn { display: none; }
.launch-form.done .form-msg { font-size: var(--s-lead); font-weight: 600; }
.field input[aria-invalid="true"] { border-color: #FFB4B4; }

/* ---------- footer ---------- */
.foot {
  max-width: calc(var(--wrap) + 2 * var(--m)); margin: 72px auto 0; padding: 28px var(--m) 36px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px 24px; font-size: var(--s-small);
}
.foot .brand-mark { width: 28px; height: 28px; }
.foot .brand-word { font-size: 20px; }
.foot-links { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.foot-links a, .linkish { text-decoration: none; color: var(--graphite); display: inline-flex; align-items: center; min-height: 44px; }
.linkish { border: 0; background: none; padding: 0; cursor: pointer; font-size: inherit; }
@media (hover: hover) and (pointer: fine) { .foot-links a:hover, .linkish:hover { color: var(--blue); } }
.foot-year { justify-self: end; color: var(--muted); }
.credits { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.credits ul { margin-top: 8px; columns: 2; column-gap: 40px; }
.credits li { break-inside: avoid; margin-bottom: 4px; }
.credits a { color: var(--graphite); }

/* ---------- right to left ---------- */
[dir="rtl"] .hero::before { background: linear-gradient(260deg, rgb(16 32 64 / 0.68) 0%, rgb(16 32 64 / 0.38) 42%, rgb(16 32 64 / 0) 68%); }
[dir="rtl"] .phone-wrap { right: auto; left: calc(var(--m) + clamp(24px, 6vw, 110px)); }
[dir="rtl"] .device { transform: scale(var(--ps)) rotateY(24deg) rotateX(9deg) rotateZ(-4deg); }
[dir="rtl"] .btn-light .ic, [dir="rtl"] .scr-back .ic { transform: scaleX(-1); }
[dir="rtl"] .cw-input .ic { transform: rotate(-90deg); }
[dir="rtl"] .cw-tip { right: auto; left: 12px; }
[dir="rtl"] .cw-tip::after { right: auto; left: 18px; }
.map, .ready-stage .map { direction: ltr; }
[dir="rtl"] .rcarousel { direction: ltr; }
[dir="rtl"] .rcard { direction: rtl; }
/* letter spacing breaks joined Arabic letters and does nothing good for Chinese */
:lang(ar) *, :lang(zh) * { letter-spacing: 0 !important; }
:lang(ar) .brand-word, :lang(zh) .brand-word { letter-spacing: -0.03em !important; }

/* ---------- entrances ---------- */
.js .reveal { opacity: 1; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-card, .flash, .mk-in, .phone-wrap, .cw-new, .nav-menu { animation: none; }
  .pulse::after, .pulse-loop::after, .mk-ring::before, .mk-ring::after { animation: none; opacity: 0; }
  .pulse-loop { box-shadow: 0 0 0 3px var(--sky); }
  .cw-tip, .nav-tip { animation: none; }
  .cw-typing i { animation: none; opacity: 0.6; }
}

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
  .bar-links { display: none; }
  .phone-wrap { --ps: 0.6; right: calc(var(--m) + 16px); }
  .hero-copy { max-width: 60%; }
  .try-grid { grid-template-columns: 1fr; }
  .map-wrap { min-height: 520px; }
  .panel { grid-template-columns: 1fr 1fr; }
  .sum { grid-column: 1 / -1; }
  .launch-in { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; }
  .feature-flip .feature-text { order: 0; }
}

/* ---------- phone ---------- */
@media (max-width: 680px) {
  :root { --s-lead: 18px; --gap: 88px; }
  .bar { padding-top: 10px; padding-bottom: 10px; }
  .bar .btn-sm { display: none; }
  .lang-full { display: none; }
  .lang-code { display: inline; }
  .brand-word { font-size: 22px; }
  .hero { height: auto; min-height: 0; }
  .hero-img { position: absolute; inset: 0 var(--m); height: 100%; }
  .hero::before { background: linear-gradient(to bottom, rgb(20 40 80 / 0.6) 0%, rgb(20 40 80 / 0.25) 55%, rgb(20 40 80 / 0.45) 100%); }
  .hero-copy { padding: 36px 24px 24px; max-width: none; }
  .phone-wrap { --ps: 0.62; position: relative; right: auto; top: auto; margin: 8px auto -40px; }
  [dir="rtl"] .phone-wrap { left: auto; }
  .hero-actions .btn { width: 100%; }
  .try-head { grid-template-columns: 1fr; }
  .map-wrap { min-height: 420px; border-radius: 24px; }
  .panel { grid-template-columns: 1fr; padding: 18px; border-radius: 24px; gap: 22px; }
  .big { font-size: 20px; }
  .chat { width: 62%; bottom: 0; }
  .card-body { padding: 16px; }
  .card-t { font-size: 17px; }
  .faq h2 { text-align: start; }
  .ready-stage { height: 560px; border-radius: 24px; }
  .rcarousel { padding: 4px 16px; bottom: 14px; }
  .rcard img { width: 76px; height: 76px; }
  .ai-stage { min-height: 0; padding: 24px 12px; border-radius: 24px; }
  .cw-ai { width: 100%; }
  .collage { aspect-ratio: 1 / 0.95; }
  .faq details { padding: 0 18px; }
  .launch-in { padding: 36px 22px; border-radius: 24px; }
  .launch-form .btn { width: 100%; }
  .foot { grid-template-columns: 1fr; gap: 14px; }
  .foot-links { justify-content: flex-start; }
  .foot-year { justify-self: start; }
  .credits ul { columns: 1; }
}
