/* Avísame: the app's warm paper, Luci's sunny yellow for "you", minty green for safe,
   coral for help, and one deep ink for text and outlines. Chunky toy buttons. */
:root {
  --paper: #FFF6E8; --sunken: #F7ECDA; --line: #EADCC5; --card: #fff;
  --ink: #26223F; --ink2: #645F7E; --ink3: #8E88A6;
  --sun: #FFC93C; --sun-deep: #EE9B12; --glow: #FFF1B8; --trail: #FF9F1C;
  --safe: #2FC98A; --safe-deep: #1FA26C; --safe-ink: #12704A; --mint: #DDF7EA;
  --alert: #FF5A5F; --alert-deep: #D63A45; --alert-ink: #B42634; --blush: #FF9CB1; --sky: #58A8FF; --wing: #DCEEFF;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 14px 34px -14px rgba(122, 85, 32, .32);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 500 17px/1.55 var(--rounded); -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--sun-deep); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 10px; }
img, svg { display: block; }
h1, h2, h3 { font-family: var(--rounded); font-weight: 800; letter-spacing: -.015em; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 10; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 12px; }
.skip:focus { left: 8px; }

/* Release switch: tools/build-discovery.mjs sets <html data-release="soon"> until the app is live. */
html[data-release="soon"] [data-when="released"] { display: none !important; }
html:not([data-release="soon"]) [data-when="soon"] { display: none !important; }

/* ---------------------------------------------------------------- header */
.plx-bar {
  --plx-cut: var(--paper);
  display: flex; align-items: center; gap: 12px;
  max-width: 1180px; margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 6px max(18px, env(safe-area-inset-left));
}
.plx-home { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); text-decoration: none; }
.plx-mark { width: 26px; height: 26px; flex: none; }
.plx-word { font-weight: 800; font-size: 16px; }
.plx-app { display: inline-flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 2px solid var(--line); min-width: 0; }
.plx-app img { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.plx-app-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 800; font-size: 18px; }
.plx-get { margin-left: auto; flex: none; display: inline-flex; align-items: center; min-height: 44px; }
.plx-get img { height: 40px; width: auto; }
.soon-pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px;
  background: #fff; border: 2px solid var(--ink); font-weight: 800; font-size: 13px; white-space: nowrap;
}
.soon-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sun-deep); }
@media (max-width: 419px) { .plx-word { display: none; } }

/* ------------------------------------------------------------------ hero */
.hero {
  max-width: 1180px; margin: 0 auto;
  padding: 10px max(20px, env(safe-area-inset-right)) 8px max(20px, env(safe-area-inset-left));
}
.eyebrow { margin: 0 0 6px; font-weight: 800; font-size: 14px; color: var(--ink2); }
.hero h1 { margin: 0; font-size: clamp(31px, 8.4vw, 60px); line-height: 1.04; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 58%, var(--sun) 58%, var(--sun) 92%, transparent 92%); padding: 0 .06em; }
.lede { margin: 10px 0 0; max-width: 30em; color: var(--ink2); font-size: 17px; line-height: 1.45; }
@media (min-width: 980px) { .lede { font-size: 20px; margin-top: 16px; } }
.lede b { color: var(--ink); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 14px; }
.badge img { height: 48px; width: auto; }
.soon {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px 0 8px; border-radius: 16px;
  background: #fff; border: 2.5px solid var(--ink); font-weight: 800; box-shadow: 0 4px 0 var(--ink);
}
.soon svg { width: 34px; height: 34px; }
.soon small { display: block; font-size: 12px; font-weight: 700; color: var(--ink2); line-height: 1.1; }
.soon span { line-height: 1.15; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 14px; font-weight: 700; color: var(--ink2); }
.facts li { display: inline-flex; align-items: center; gap: 6px; }
.facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--safe); }

/* ------------------------------------------------------------------ demo */
.stage {
  max-width: 1180px; margin: 0 auto; padding: 14px max(14px, env(safe-area-inset-right)) 30px max(14px, env(safe-area-inset-left));
  display: grid; gap: 16px; justify-items: center;
}
.phone {
  position: relative; width: min(100%, 360px); aspect-ratio: 360 / 700; max-height: 78dvh;
  border-radius: 46px; background: var(--ink); padding: 10px; box-shadow: var(--shadow);
}
.screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 37px; background: var(--paper);
  display: flex; flex-direction: column;
}
.status { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px 0; font-size: 13px; font-weight: 800; flex: none; }
.status .island { width: 88px; height: 24px; border-radius: 14px; background: var(--ink); }
.status .pill { min-width: 34px; height: 16px; border-radius: 9px; background: var(--sky); color: #fff; font-size: 0; }
.status .pill.on { background: var(--sky); }
.status .pill.off { background: transparent; }

.view { position: absolute; inset: 44px 0 0; display: flex; flex-direction: column; padding: 8px 16px 18px; gap: 10px; transition: opacity .25s ease; }
.view[hidden] { display: none; }

.luci { width: 100%; height: 100%; }
.luci-wrap { animation: bob 1.7s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(-3px); } to { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .luci-wrap { animation: none; } }

.bubble {
  position: relative; background: #fff; border: 2.5px solid var(--ink); border-radius: 18px; padding: 8px 14px;
  font-weight: 800; font-size: 17px; text-align: center; line-height: 1.25;
}
.bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -10px; width: 16px; height: 16px; margin-left: -8px;
  background: #fff; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg) skew(8deg, 8deg);
}

.chunky {
  --face: var(--sun); --lip: var(--sun-deep); --fg: var(--ink);
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px;
  border: 0; border-radius: 20px; background: var(--face); color: var(--fg);
  font: 800 18px/1.1 var(--rounded); box-shadow: 0 5px 0 var(--lip); cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.chunky:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--lip); }
.chunky.safe { --face: var(--safe); --lip: var(--safe-deep); --fg: #fff; }
.chunky.quiet { --face: #fff; --lip: var(--line); min-height: 48px; font-size: 16px; }
.chunky.alert { --face: #fff; --lip: #F3B8BB; --fg: var(--alert-ink); }

/* Home */
.home-hero { flex: 1; display: grid; place-items: center; align-content: center; gap: 14px; min-height: 0; }
.home-hero .luci-wrap { width: 150px; height: 150px; }
.circle-card { background: #fff; border-radius: 22px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 18px -10px rgba(122, 85, 32, .35); }
.circle-card p { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink2); line-height: 1.25; }
.circle-card p b { color: var(--ink); }
.avatars { display: flex; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px;
  border: 2.5px solid #fff; margin-left: -8px; color: var(--ink);
}
.avatar:first-child { margin-left: 0; }

/* Map */
.map-card { position: relative; flex: 1; min-height: 0; border-radius: 24px; overflow: hidden; background: #F4E9D4; }
.map-card svg.map { width: 100%; height: 100%; }
.trip-card { background: #fff; border-radius: 20px; padding: 10px 14px; box-shadow: 0 8px 18px -10px rgba(122, 85, 32, .35); }
.trip-card .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trip-card h3 { margin: 0; font-size: 17px; }
.trip-card .eta { font-size: 13px; font-weight: 700; color: var(--ink2); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--safe-ink); background: var(--mint); border-radius: 999px; padding: 4px 9px; white-space: nowrap; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--safe); }
.watching {
  position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px;
  background: #fff; border-radius: 999px; font-size: 13px; font-weight: 800; box-shadow: 0 6px 14px -8px rgba(38, 34, 63, .5);
  transform: translateY(-8px); opacity: 0; transition: transform .35s cubic-bezier(.2, 1.4, .4, 1), opacity .25s;
}
.watching.show { transform: none; opacity: 1; }
.watching .avatar { width: 26px; height: 26px; font-size: 12px; border-width: 2px; }
.trip-actions { display: grid; grid-template-columns: 1fr 76px; gap: 10px; align-items: start; }
.sos-hold {
  position: relative; height: 54px; border: 0; border-radius: 20px; background: var(--alert); color: #fff;
  font: 900 17px var(--rounded); box-shadow: 0 5px 0 var(--alert-deep); cursor: pointer; overflow: hidden;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.sos-hold .fill { position: absolute; inset: 0; background: var(--alert-deep); transform-origin: left; transform: scaleX(0); }
.sos-hold span { position: relative; }
.hint { margin: 0; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--ink3); }

/* Check-in and SOS overlays */
.overlay { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 12px; padding: 60px 22px 26px; text-align: center; }
.overlay[hidden] { display: none; }
.overlay.check { background: rgba(255, 246, 232, .96); }
.overlay.sos { background: linear-gradient(180deg, #FF6B6F, #E9434C); color: #fff; }
.overlay h3 { margin: 0; font-size: 26px; }
.overlay p { margin: 0; font-weight: 700; font-size: 15px; color: var(--ink2); }
.overlay.sos p { color: #FFE3E4; }
.ring { position: relative; width: 168px; height: 168px; }
.ring svg.dial { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring .luci-wrap { position: absolute; inset: 30px; }
.ring .count { position: absolute; right: -6px; top: 4px; background: var(--ink); color: #fff; font-weight: 800; font-size: 13px; border-radius: 999px; padding: 3px 9px; }
.overlay .luci-wrap.big { width: 140px; height: 140px; }
.overlay .chunky { max-width: 290px; }
.people { background: #fff; color: var(--ink); border-radius: 18px; padding: 10px 14px; font-size: 14px; font-weight: 700; text-align: left; width: 100%; max-width: 290px; }
.people ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.people li { display: flex; align-items: center; gap: 8px; }
.people li .avatar { width: 24px; height: 24px; margin: 0; font-size: 11px; border-width: 0; }
.people li b { margin-left: auto; font-size: 12px; color: var(--safe-ink); }

/* PIN sheet */
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 28px 28px 0 0; padding: 16px 18px 18px;
  box-shadow: 0 -10px 30px -12px rgba(38, 34, 63, .35); transform: translateY(105%); transition: transform .32s cubic-bezier(.2, .9, .3, 1);
}
.sheet.open { transform: none; }
@media (prefers-reduced-motion: reduce) { .sheet { transition: none; } }
.sheet h3 { margin: 0; text-align: center; font-size: 19px; }
.sheet .sub { margin: 2px 0 10px; text-align: center; font-size: 13px; font-weight: 700; color: var(--ink2); }
.dots { display: flex; justify-content: center; gap: 14px; margin: 6px 0 12px; }
.dots i { width: 15px; height: 15px; border-radius: 50%; border: 2.5px solid var(--ink); }
.dots i.on { background: var(--ink); }
.dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keys button {
  min-height: 46px; border: 0; border-radius: 16px; background: var(--sunken); color: var(--ink); font: 800 20px var(--rounded);
  box-shadow: 0 3px 0 var(--line); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.keys button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.keys .muted { background: transparent; box-shadow: none; font-size: 14px; color: var(--ink2); }
.pin-hint { margin: 10px 0 0; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--ink2); }
.pin-hint b { color: var(--ink); }

/* Arrived */
.arrived { flex: 1; display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; }
.arrived .luci-wrap { width: 150px; height: 150px; }
.arrived h3 { margin: 0; font-size: 30px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--mint); color: var(--safe-ink); font-weight: 800; font-size: 14px; }
.chip svg { width: 16px; height: 16px; }

/* ----------------------------------------------------- the friend's view */
.friend { width: min(100%, 360px); }
.friend-label { margin: 0 0 8px; font-size: 13px; font-weight: 800; color: var(--ink2); text-align: center; }
.browser { border-radius: 22px; background: #fff; box-shadow: var(--shadow); overflow: hidden; border: 2px solid var(--line); }
.browser .url { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--sunken); font-size: 12px; font-weight: 700; color: var(--ink2); }
.browser .url span { flex: 1; text-align: center; background: #fff; border-radius: 9px; padding: 4px 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.browser .url svg { width: 12px; height: 12px; }
.f-body[hidden], .f-msg[hidden] { display: none; }
.f-body { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 12px; align-items: center; transition: background-color .3s; }
.f-map { height: 112px; border-radius: 16px; overflow: hidden; background: #F4E9D4; }
.f-map svg { width: 100%; height: 100%; }
.f-text h3 { margin: 0; font-size: 17px; line-height: 1.2; }
.f-text p { margin: 4px 0 0; font-size: 13px; font-weight: 700; color: var(--ink2); line-height: 1.3; }
.f-pill { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 4px 9px; background: var(--sunken); color: var(--ink2); }
.f-pill.good { background: var(--mint); color: var(--safe-ink); }
.f-pill.warn { background: #FFF0CC; color: #8A5A00; }
.f-pill.bad { background: #FFE3E4; color: var(--alert-ink); }
.browser.alarm { border-color: var(--alert); }
.browser.alarm .f-body { background: #FFF1F1; }
.f-msg { margin: 0; padding: 12px; font-size: 14px; font-weight: 700; color: var(--ink2); }
.f-msg .msg { display: inline-block; background: var(--mint); color: var(--ink); border-radius: 16px 16px 16px 4px; padding: 8px 12px; }
.f-msg .msg u { color: var(--safe-ink); text-decoration-color: var(--safe); }
.conversion { width: min(100%, 360px); text-align: center; display: grid; justify-items: center; gap: 10px; }
.conversion[hidden] { display: none; }
.conversion p { margin: 0; font-weight: 800; font-size: 18px; }
.demo-note { margin: 0; text-align: center; font-size: 13px; font-weight: 700; color: var(--ink3); max-width: 360px; }

/* --------------------------------------------------------------- reasons */
.section { max-width: 1080px; margin: 0 auto; padding: 34px max(20px, env(safe-area-inset-right)) 10px max(20px, env(safe-area-inset-left)); }
.section > h2 { margin: 0 0 6px; font-size: clamp(28px, 7vw, 40px); line-height: 1.08; }
.section > .intro { margin: 0 0 20px; color: var(--ink2); max-width: 36em; }
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.reason { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; background: #fff; border-radius: 26px; padding: 16px; box-shadow: 0 10px 24px -16px rgba(122, 85, 32, .45); }
.reason .art { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; border: 2.5px solid var(--ink); }
.reason .art svg { width: 40px; height: 40px; }
.reason h3 { margin: 0 0 4px; font-size: 20px; line-height: 1.2; }
.reason p { margin: 0; color: var(--ink2); }
.reason.big { background: var(--ink); color: #fff; }
.reason.big p { color: #D9D5EC; }

/* What leaves the phone */
.leaves { display: grid; gap: 10px; margin: 0; }
.leave { background: #fff; border-radius: 22px; padding: 14px 16px; border: 2px solid var(--line); }
.leave dt { font-weight: 800; font-size: 15px; color: var(--ink2); }
.leave dd { margin: 4px 0 0; }
.leave dd b { color: var(--ink); }
.lock-note { margin: 14px 0 0; font-size: 15px; color: var(--ink2); }

/* Questions */
#faq details { background: #fff; border-radius: 20px; margin: 0 0 10px; border: 2px solid var(--line); }
#faq summary { list-style: none; cursor: pointer; padding: 14px 48px 14px 16px; font-weight: 800; font-size: 17px; position: relative; min-height: 44px; }
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 24px; font-weight: 800; color: var(--sun-deep); }
#faq details[open] summary::after { content: "–"; }
.faq-a { padding: 0 16px 14px; color: var(--ink2); }
.faq-a p { margin: 0 0 8px; }
.faq-a p:last-child { margin-bottom: 0; }

/* Final call */
.final { max-width: 1080px; margin: 24px auto 0; padding: 0 max(20px, env(safe-area-inset-right)) 36px max(20px, env(safe-area-inset-left)); }
.final-card { position: relative; background: var(--ink); color: #fff; border-radius: 34px; padding: 28px 22px; display: grid; justify-items: center; text-align: center; gap: 12px; overflow: hidden; }
.final-card .luci-wrap { width: 120px; height: 120px; }
.final-card h2 { margin: 0; font-size: clamp(28px, 7vw, 40px); line-height: 1.08; }
.final-card p { margin: 0; color: #D9D5EC; max-width: 30em; }
.final-card .soon { color: var(--ink); }
.stars i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .7); }

/* ---------------------------------------------------------------- footer */
.plx-foot { --plx-cut: #fff; padding: 22px max(20px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); border-top: 2px solid var(--line); color: var(--ink2); font-size: 14.5px; }
.plx-foot > * { max-width: 1040px; margin-left: auto; margin-right: auto; }
.plx-foot-note { margin-top: 0; margin-bottom: 10px; font-size: 12.5px; line-height: 1.5; }
.plx-foot-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.plx-foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 700; }
.plx-foot-more { margin-top: 16px; padding-top: 14px; border-top: 2px solid var(--line); }
.plx-foot-more .plx-home { color: var(--ink); }
.plx-foot-more ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; }
.plx-foot-more li a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink2); }
.plx-foot-copy { margin-bottom: 0; font-size: 12.5px; }

/* ---------------------------------------------------------------- larger */
@media (min-width: 640px) {
  .reasons { grid-template-columns: 1fr 1fr; }
  .reason.big { grid-column: 1 / -1; }
  .leaves { grid-template-columns: 1fr 1fr; }
  .plx-foot-more ul { grid-template-columns: 1fr 1fr; column-gap: 24px; }
}
@media (min-width: 980px) {
  .plx-bar { padding-top: 18px; }
  .top { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: center; padding: 10px 40px 0; }
  .hero { padding: 0; }
  .hero h1 { font-size: 50px; }
  .stage { padding: 0; grid-template-columns: 350px 270px; align-items: center; gap: 24px; }
  .stage .phone { grid-row: 1 / span 3; }
  .friend { width: 270px; }
  .f-body { grid-template-columns: 1fr; }
  .f-map { height: 170px; }
  .conversion { width: 270px; }
  .demo-note { max-width: 270px; }
  .reasons { grid-template-columns: repeat(3, 1fr); }
  .reason.big { grid-column: span 3; grid-template-columns: 64px 1fr; }
  .plx-foot-more ul { grid-template-columns: repeat(3, 1fr); }
}

/* On the dark final card, Luci glows so her antennae read against the night. */
.final-card .luci-wrap { border-radius: 50%; background: radial-gradient(circle, rgba(255, 201, 60, .45) 0, rgba(255, 201, 60, .12) 55%, transparent 72%); }
.final-card .luci path[stroke="#26223F"] { stroke: #FFE7A3; }
