/* Tagalong public site. Palette matches the iOS app theme. */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-italic-500.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans Pro";
  src: url("/assets/fonts/source-sans-pro-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans Pro";
  src: url("/assets/fonts/source-sans-pro-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans Pro";
  src: url("/assets/fonts/source-sans-pro-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --subtle: #EFEDE7;
  --border: #E1DED6;
  --border-subtle: #ECE9E2;
  --text: #1F2326;
  --text-2: #4E555A;
  --text-3: #5A6066;
  --teal: #2F5D62;
  --teal-deep: #24484C;
  --on-teal: #FFFFFF;
  --accent: #E3EEEC;
  --gold: #C08A3E;
  --danger: #A8443B;
  --danger-subtle: #F6E4E1;
  --font-display: "Fraunces", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans Pro", "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 72rem;
  --prose: 40rem;
  --radius: 14px;
  --shadow: 0 16px 40px rgba(31, 35, 38, 0.08);
  --header-h: 4.25rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

html:focus-within { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; }
a { color: var(--teal-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--teal); }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--teal);
  color: var(--on-teal);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus { top: 0.75rem; }

.wrap {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

/* Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.logo img, .logo svg {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  display: block;
}
.logo:hover { color: var(--teal-deep); }

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem 1.35rem;
}
.nav-desktop a {
  text-decoration: none;
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-desktop a:hover { color: var(--text); }
.nav-desktop .nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--teal);
  color: var(--on-teal);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
}
.nav-desktop .nav-cta:hover { background: var(--teal-deep); color: var(--on-teal); }

.nav-toggle { display: block; position: relative; }
.nav-toggle > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  padding: 0.4rem 0.2rem;
  font-size: 0.95rem;
}
.nav-toggle > summary::-webkit-details-marker { display: none; }
.nav-toggle > summary::after {
  content: "";
  display: inline-block;
  width: 1.15rem;
  height: 0.7rem;
  margin-left: 0.15rem;
  vertical-align: -0.05rem;
  background:
    linear-gradient(var(--text), var(--text)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--text), var(--text)) 0 50% / 100% 2px no-repeat,
    linear-gradient(var(--text), var(--text)) 0 100% / 100% 2px no-repeat;
}
.nav-toggle[open] > summary::after {
  background: linear-gradient(var(--text), var(--text)) 0 50% / 100% 2px no-repeat;
}
.nav-toggle nav {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 14rem;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
}
.nav-toggle nav a {
  text-decoration: none;
  color: var(--text);
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  font-weight: 600;
}
.nav-toggle nav a:hover { background: var(--subtle); }
.nav-toggle .nav-cta { color: var(--teal-deep); }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .nav-desktop { display: flex; }
}

/* Buttons & forms
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--teal);
  color: var(--on-teal);
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}
.btn:hover { background: var(--teal-deep); color: var(--on-teal); }
.btn-ghost {
  background: var(--subtle);
  color: var(--text);
}
.btn-ghost:hover { background: var(--border); color: var(--text); }

.waitlist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}
.waitlist label.vh,
.vh, .honeypot {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.waitlist input[type="email"] {
  flex: 1 1 16rem;
  font: inherit;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  min-width: 0;
}
.waitlist input[type="email"]:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}
.waitlist .status {
  flex-basis: 100%;
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  color: var(--text-2);
  min-height: 1.4em;
}
.waitlist .status.is-ok { color: var(--teal-deep); }
.waitlist .status.is-err { color: var(--danger); }
.waitlist-note {
  margin: 0.7rem 0 0;
  color: var(--text-3);
  font-size: 0.92rem;
}

/* Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: 2.25rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero { padding: 3.5rem 0 4.5rem; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 3rem; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.9rem;
}
.eyebrow .dot {
  width: 0.45rem; height: 0.45rem;
  border-radius: 50%;
  background: var(--gold);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.35rem, 6vw, 4.15rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  max-width: 14ch;
}
.hero .lead {
  font-size: 1.15rem;
  color: var(--text-2);
  max-width: 36rem;
  margin: 0 0 1.5rem;
}
.hero-actions { max-width: 32rem; }

/* Decorative phone / group card */
.hero-visual { display: flex; justify-content: center; }
.device {
  width: min(100%, 22rem);
  background: var(--teal);
  color: var(--on-teal);
  border-radius: 2rem;
  padding: 1.15rem 1.15rem 1.35rem;
  box-shadow: var(--shadow), 0 0 0 8px color-mix(in srgb, var(--teal) 18%, transparent);
  position: relative;
}
.device-bar {
  height: 0.35rem;
  width: 3.5rem;
  background: rgba(255,255,255,0.28);
  border-radius: 999px;
  margin: 0 auto 1.1rem;
}
.device h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.15rem;
  letter-spacing: -0.02em;
}
.device .meta { margin: 0 0 1rem; font-size: 0.92rem; color: rgba(255,255,255,0.78); }
.faces { display: flex; align-items: center; margin: 0 0 1.1rem; }
.face {
  width: 2.4rem; height: 2.4rem;
  border-radius: 50%;
  border: 2px solid var(--teal);
  margin-left: -0.45rem;
  display: grid; place-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  background: #4a7a7e;
}
.faces .face:first-child { margin-left: 0; }
.face:nth-child(2) { background: #3d6c70; }
.face:nth-child(3) { background: #C08A3E; color: #1F2326; }
.face:nth-child(4) { background: #EFEDE7; color: var(--teal-deep); }
.face.add { background: transparent; border-style: dashed; border-color: rgba(255,255,255,0.45); color: #fff; }
.face.add::after { content: "+"; font-size: 1rem; line-height: 1; }
.device .panel {
  background: rgba(255,255,255,0.1);
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
}
.device .panel strong { display: block; font-weight: 600; margin-bottom: 0.15rem; }
.device .panel span { color: rgba(255,255,255,0.8); font-size: 0.88rem; }

/* Sections
   -------------------------------------------------------------------------- */
main { flex: 1; }
section { padding: 3.25rem 0; }
.band { background: var(--subtle); }
.section-kicker {
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.5rem;
}
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.45rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 0.6rem;
}
.section-intro {
  color: var(--text-2);
  max-width: 36rem;
  margin: 0 0 2rem;
  font-size: 1.08rem;
}

.steps { display: grid; gap: 1.25rem; counter-reset: step; }
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.4rem 1.35rem 1.5rem;
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.7rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.55rem;
  letter-spacing: -0.02em;
}
.step h3 {
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}
.step p { margin: 0; color: var(--text-2); }

.safety-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 720px) {
  .safety-grid { grid-template-columns: 1fr 1fr; }
}
.safety-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
}
.safety-card h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.safety-card p { margin: 0; color: var(--text-2); }
.safety-follow {
  margin-top: 1.5rem;
}
blockquote.pull {
  margin: 0 0 2rem;
  padding: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.3;
  color: var(--teal-deep);
  max-width: 24em;
}

/* FAQ
   -------------------------------------------------------------------------- */
.faq { max-width: 44rem; }
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0.15rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 1rem 1.75rem 1rem 0;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--teal);
  font-weight: 400;
  font-size: 1.35rem;
}
.faq details[open] summary::after { content: "–"; }
.faq details p {
  margin: 0 0 1rem;
  color: var(--text-2);
  padding-right: 1.5rem;
}

/* Page headers (interior)
   -------------------------------------------------------------------------- */
.page-hero {
  padding: 2.5rem 0 1.5rem;
}
.page-hero .wrap {
  width: min(100% - 2rem, var(--prose));
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 0.7rem;
  max-width: 18ch;
}
.page-hero .lead { color: var(--text-2); max-width: 38rem; margin: 0; font-size: 1.12rem; }
.crumbs {
  font-size: 0.9rem;
  color: var(--text-3);
  margin: 0 0 0.9rem;
}
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.prose {
  width: min(100% - 2rem, var(--prose));
  margin: 0 auto 3.5rem;
}
.prose h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
}
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.6rem;
}
.prose p, .prose li { color: var(--text-2); }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1rem; }
.prose li { margin: 0 0 0.4rem; }
.prose .meta { color: var(--text-3); font-size: 0.95rem; margin-bottom: 1.2rem; }
.note {
  background: var(--accent);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  color: var(--teal-deep);
  margin: 0 0 1.5rem;
}
.note p { color: var(--teal-deep); margin: 0; }

.resource-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.resource-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 0 0 0.7rem;
}
.resource-list h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.resource-list p { margin: 0; color: var(--text-2); }

/* 404
   -------------------------------------------------------------------------- */
.lost {
  text-align: left;
  padding: 4rem 0 5rem;
  width: min(100% - 2rem, 36rem);
  margin: 0 auto;
}
.lost h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.8rem;
}
.lost p { color: var(--text-2); font-size: 1.1rem; }
.lost .actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.lost .actions p { margin: 0; }

/* Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
  background: var(--subtle);
  margin-top: auto;
}
.footer-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr; align-items: start; }
}
.site-footer .blurb {
  color: var(--text-2);
  margin: 0.5rem 0 0;
  max-width: 28rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.2rem;
}
.footer-nav a { text-decoration: none; color: var(--text); font-weight: 600; }
.footer-nav a:hover { color: var(--teal); }
.copyright {
  margin: 1.75rem 0 0;
  font-size: 0.9rem;
  color: var(--text-3);
}

/* Track / safety-link pages
   -------------------------------------------------------------------------- */
body.track-page { max-width: none; }
.track-shell {
  width: min(100% - 2rem, 42rem);
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
}
.track-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.track-brand .logo { font-size: 1.05rem; }
.track-shell h1 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}
.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.pill {
  display: inline-block;
  background: var(--subtle);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.9rem;
  color: var(--text-2);
}
#map {
  height: 60vh;
  min-height: 280px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 0.75rem 0;
  background: var(--subtle);
}
#map[hidden], .pills[hidden] { display: none; }
.ended {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-2);
  margin: 0.75rem 0;
}
.track-note { color: var(--text-3); font-size: 0.92rem; margin: 0.75rem 0 0; }
.track-actions { margin: 0.85rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header, .site-footer, .skip, .waitlist, .hero-visual, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: inherit; }
}

@media (max-width: 560px) {
  .waitlist { flex-direction: column; align-items: stretch; }
  .waitlist input[type="email"],
  .waitlist .btn { width: 100%; flex: 0 0 auto; }
}
