/* ReadyMeds homepage hero. One small token system.
   Layout: one viewport (100svh) with the bar inside it, the search bar at the exact centre, and the live map behind. */

/* ---- type: Hanken Grotesk, self-hosted. One variable file covers 400-700; latin-ext only downloads if a glyph needs it.
   "Hanken Fallback" is Arial sized to Hanken's metrics, so text set before the font arrives does not move when it swaps in. ---- */
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk-latin.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk-latin-ext.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hanken Fallback"; src: local("Arial"), local("Liberation Sans"); size-adjust: 101.2%; ascent-override: 100%; descent-override: 30.3%; line-gap-override: 0%; }
:root {
  --font: "Hanken Grotesk", "Hanken Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --bg-3: #ebebef;
  --fg: #1d1d1f;
  --fg-2: #48484d;
  --fg-3: #6e6e73;
  --fg-4: #9a9aa0;
  --line: #e6e6ea;
  --line-2: #d2d2d7;
  --accent: #0b57d0;
  --accent-hover: #0a4bb5;
  --accent-soft: #e8f0fe;
  --accent-ink: #0842a0;
  --green: #1e8e3e;
  --green-soft: #e6f4ea;
  --pharmacy: #1aa260;
  --orange: #ffa41b;
  --orange-ink: #c2410c;
  --shadow-sm: 0 1px 2px rgba(20, 20, 24, 0.06), 0 1px 3px rgba(20, 20, 24, 0.04);
  --shadow-md: 0 1px 2px rgba(20, 20, 24, 0.04), 0 10px 28px -10px rgba(20, 20, 24, 0.16);
  --shadow-lg: 0 2px 4px rgba(20, 20, 24, 0.04), 0 28px 56px -18px rgba(20, 20, 24, 0.22);
  --r-pill: 999px;
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 10px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --hgut: var(--gutter); /* the header's side padding: the full width on a desktop, with room from the edges */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 1.0625rem; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---- the hero frame ---- */
.hero { position: relative; display: flex; flex-direction: column; min-height: 100svh; isolation: isolate; }
.hero--soft { background: var(--bg-2); }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-left: var(--gutter); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.body { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-block: 40px 56px; }
.stack { display: flex; flex-direction: column; align-items: center; }

/* ---- the bar ---- */
.bar { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hero > .bar { max-width: none; padding-left: var(--hgut); padding-right: var(--hgut); }
@media (min-width: 721px) { :root { --hgut: 40px; } }
.bar nav { display: flex; align-items: center; gap: 28px; font-size: 0.875rem; color: var(--fg-2); }
.bar nav a:hover { color: var(--fg); }
.bar .right { display: flex; align-items: center; gap: 8px; }
.bar .right nav { margin-right: 12px; }
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; height: 52px; width: auto; position: relative; top: 3px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: var(--r-pill); font-size: 0.9375rem; font-weight: 500; white-space: nowrap; transition: background-color 0.15s, color 0.15s, box-shadow 0.15s; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--dark { background: var(--fg); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--soft { background: var(--bg-2); color: var(--fg); }
.btn--soft:hover { background: var(--bg-3); }
.btn--ghost { color: var(--fg-2); padding: 0 12px; }
.btn--ghost:hover { color: var(--fg); background: var(--bg-2); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 0.875rem; }
.btn--lg { height: 56px; padding: 0 26px; font-size: 1.0625rem; }
.at-sm { display: none; }
@media (max-width: 720px) { .bar { height: 56px; } .bar nav { display: none; } .at-sm { display: inline-flex; } .brand img { height: 44px; top: 2px; } }

/* ---- type ---- */
.display { font-weight: 600; letter-spacing: -0.028em; line-height: 1.06; text-wrap: balance; margin: 0; }
.display--m { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem); }
.display--l { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem); letter-spacing: -0.034em; line-height: 1.0; }
.display--s { font-size: clamp(1.75rem, 1.25rem + 1.9vw, 2.625rem); }
.display .quiet { color: var(--fg-4); }
.display .ink { color: var(--accent); }
.lead { margin: 0; font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); line-height: 1.5; color: var(--fg-3); text-wrap: pretty; }
/* Phones: the headline sizes itself to its one-line width (353px at 32px) against the screen minus the gutters, so it never breaks in two. */
@media (max-width: 720px) { .display--m { font-size: min(clamp(2rem, 1.35rem + 2.6vw, 3.25rem), calc(9vw - 4px)); white-space: nowrap; } }

/* ---- the composer: one box you can write a whole request into ---- */
.composer { position: relative; width: 100%; max-width: 680px; text-align: left; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-md); transition: box-shadow 0.2s var(--ease), border-color 0.2s; }
.composer:focus-within { border-color: #b9bcc6; box-shadow: var(--shadow-lg); }
.composer textarea { display: block; width: 100%; min-height: 60px; max-height: 240px; margin: 0; padding: 18px 22px 6px; border: 0; background: transparent; resize: none; outline: none; font-size: 1.0625rem; line-height: 1.5; }
.composer--lg textarea { min-height: 92px; padding-top: 20px; }
@media (max-width: 720px) { .composer textarea { min-height: 84px; } }
.composer textarea::placeholder { color: var(--fg-4); }
.composer .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px 10px 12px; }
.composer .quiet-row { display: flex; align-items: center; gap: 4px; min-width: 0; flex-wrap: wrap; }
.qbtn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--r-pill); font-size: 0.8125rem; font-weight: 500; color: var(--fg-2); white-space: nowrap; transition: background-color 0.15s; }
.qbtn:hover { background: var(--bg-2); }
.qbtn.is-set { background: var(--bg-2); color: var(--fg); }
.qbtn svg { width: 16px; height: 16px; flex: none; }
.send { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--accent); color: #fff; transition: background-color 0.15s, transform 0.2s var(--ease); }
.send:hover { background: var(--accent-hover); }
.send:active { transform: scale(0.96); }
.send svg { width: 18px; height: 18px; }
.composer .acts { display: flex; align-items: center; gap: 8px; flex: none; }
.mic { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bg-2); color: var(--fg-2); transition: background-color 0.15s, color 0.15s, transform 0.2s var(--ease); }
.mic:hover { background: var(--bg-3); color: var(--fg); }
.mic:active { transform: scale(0.96); }
.mic svg { width: 19px; height: 19px; }
.mic.is-on { background: #d93025; color: #fff; animation: miclisten 1.4s ease-out infinite; }
@keyframes miclisten { 0% { box-shadow: 0 0 0 0 rgba(217, 48, 37, 0.45); } 70% { box-shadow: 0 0 0 12px rgba(217, 48, 37, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 48, 37, 0); } }
@media (prefers-reduced-motion: reduce) { .mic.is-on { animation: none; } }
.cnote { margin: 10px 0 0; font-size: 0.8125rem; line-height: 1.4; color: var(--fg-3); text-align: center; }
.menu button svg { width: 17px; height: 17px; flex: none; color: var(--fg-3); }
.menu button.is-busy { color: var(--fg-3); pointer-events: none; }

/* ---- the map ---- */
.map { position: relative; overflow: hidden; background: #f3f0e9 url("map.svg") center / cover no-repeat; }
/* The embed is taller than its box by --map-chrome and the box clips it, so the embed's bottom strip (logo, map-type thumbnail, pan control, attribution) sits out of view. */
.map { --map-chrome: 100px; }
.map iframe { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% + var(--map-chrome)); border: 0; pointer-events: none; }
.map .pins { position: absolute; inset: 0; }
.pin { position: absolute; width: max-content; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; }
.pin b { display: flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: var(--r-pill); background: var(--bg); color: var(--fg); font-size: 0.8125rem; font-weight: 600; line-height: 1; white-space: nowrap; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 6px 16px -6px rgba(0, 0, 0, 0.3); border: 1px solid rgba(0, 0, 0, 0.05); }
.pin i { width: 9px; height: 9px; margin-top: -5px; border-radius: 2px; background: var(--bg); transform: rotate(45deg); box-shadow: 2px 2px 3px -1px rgba(0, 0, 0, 0.12); }
.pin.is-on b, .pin.is-on i { background: var(--fg); color: #fff; }
.pin.is-on i { box-shadow: none; }
/* a chosen pin is black, so everything written on it is white, whatever its other states (a later collection, a chain) say */
.pin.is-on b, .pin.is-on .nm, .pin.is-on .pr, .pin--chain.is-on b, .pin--chain.is-on .pr, .pin.is-later.is-on b { color: #fff; }
.pin.is-later.is-on .t { color: #8ff0b0; }
.pin .t { color: var(--green); font-weight: 600; }
.pin.is-on .t { color: #8ff0b0; }
.pin.has-ico b { padding: 3px 11px 3px 3px; }
.ico { display: block; width: 24px; height: 24px; flex: none; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); }
.ico img { display: block; width: 100%; height: 100%; }
.pin.is-on .ico { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22); }
.rate { display: inline-flex; align-items: center; gap: 2px; flex: none; color: var(--fg-2); }
.rate svg { width: 12px; height: 12px; flex: none; fill: #f5a300; }
.pin.is-on .rate { color: rgba(255, 255, 255, 0.85); }
.you { position: absolute; width: 16px; height: 16px; transform: translate(-50%, -50%); border-radius: 50%; background: #4285f4; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.you::before { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; border-radius: 50%; background: rgba(66, 133, 244, 0.18); transform: translate(-50%, -50%); animation: halo 2.4s ease-out infinite; }
@keyframes halo { 0% { transform: translate(-50%, -50%) scale(0.6); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; } }

/* ---- what a pin can carry: rating, the 24-hour lock box, a price, a chain's logo ---- */
.pin .rate { display: inline-flex; align-items: center; gap: 2px; font-size: 0.8125rem; font-weight: 600; color: var(--fg-2); }
.pin .rate svg { width: 11px; height: 11px; fill: #f5a300; }
.pin.is-on .rate { color: rgba(255, 255, 255, 0.85); }
.h24 { display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 6px; border-radius: var(--r-pill); background: var(--orange); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.02em; color: #1d1d1f; }
.h24 svg { width: 11px; height: 11px; }
.pin .pr { font-weight: 700; }
.pin--chain b { color: var(--fg-2); border: 1px dashed var(--line-2); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.pin--chain i { box-shadow: none; border-right: 1px dashed var(--line-2); border-bottom: 1px dashed var(--line-2); }
.pin--chain .pr { color: var(--fg); }
.pin--chain.is-on b, .pin--chain.is-on i { border-color: var(--fg); }
.clogo { display: inline-flex; align-items: center; height: 24px; padding: 0 4px; }
.clogo img { display: block; height: 16px; width: auto; max-width: 72px; }
.pin--chain .clogo { height: 22px; padding: 0 3px; }
.pin--chain .clogo img { height: 14px; max-width: 60px; }

/* ---- small menus and editable chips, shared by the hero and search ---- */
.chipwrap { position: relative; }
.menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 12; min-width: 244px; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; font-size: 0.9375rem; text-align: left; }
.menu button:hover { background: var(--bg-2); }
.menu button.is-on { font-weight: 600; }
.menu button small { margin-left: auto; font-size: 0.8125rem; color: var(--fg-4); font-weight: 400; }
.qbtn--edit input { width: 150px; border: 0; background: none; outline: none; font: inherit; color: inherit; }
