/* Chasing Salt — site styles
   Palette pulled from the app icon (night navy to plum) and the in-app ocean mesh. */

:root {
  --navy: #0c1e30;
  --navy-2: #13293f;
  --plum: #4a2c6e;
  --salt: #f5f6f9;
  --paper: #ffffff;
  --ink: #142233;
  --ink-soft: #4b5b6e;
  --mist: #b9c6d6;
  --tide: #2fa8d8;
  --tide-deep: #0f6f99;
  --alert: #ffb547;
  --line: #dde3eb;

  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --measure: 64ch;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--salt);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--tide-deep); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--tide); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.35rem; line-height: 1.25; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 2; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; font-family: var(--serif); font-size: 1.25rem; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.nav { display: flex; gap: clamp(14px, 2.6vw, 30px); font-size: 0.97rem; }
.nav a { color: inherit; text-decoration: none; opacity: 0.85; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; text-decoration: underline; }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }

.on-dark { color: var(--salt); }
.on-dark a:not(.btn) { color: var(--salt); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse 60% 70% at 78% 40%, rgba(47, 168, 216, 0.22), transparent 70%),
    linear-gradient(170deg, var(--navy) 0%, var(--navy-2) 45%, var(--plum) 100%);
  color: var(--salt);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding-top: clamp(24px, 6vw, 72px);
  padding-bottom: clamp(56px, 9vw, 112px);
}
.hero h1 { max-width: 12ch; }
.hero .lede { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: #dbe4ee; max-width: 46ch; margin: 24px 0 32px; }
.hero-art { position: relative; justify-self: center; width: min(100%, 400px); }
.hero-art .mascot { width: 72%; margin: 0 auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.45)); }
.hero-art .mascot { animation: settle 1.1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes settle { from { transform: translateY(18px) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero-art .mascot { animation: none; } }

/* The pressure alert that floats over the mascot: real copy from the app's alert */
.alert-card {
  position: absolute;
  left: -10%;
  bottom: -4%;
  width: min(330px, 92%);
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 4px 12px;
  padding: 14px 16px;
  background: rgba(245, 246, 249, 0.92);
  color: var(--ink);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(5, 10, 25, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.9rem;
  line-height: 1.35;
  animation: drop-in 0.7s 0.9s cubic-bezier(.2,.9,.25,1.2) both;
}
@keyframes drop-in { from { transform: translateY(-14px) scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .alert-card { animation: none; } }
.alert-card img { grid-row: span 2; width: 38px; height: 38px; border-radius: 9px; }
.alert-card .meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--ink-soft); }
.alert-card .meta b { color: var(--ink); font-weight: 600; }
.alert-card p { margin: 0; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 14ch; }
  .hero-art { width: min(100%, 340px); margin-top: 8px; }
  .alert-card { left: 0; }
}

/* ---------- CTA ---------- */
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px 12px 18px;
  border-radius: 14px;
  background: #000; color: #fff;
  text-decoration: none; font-weight: 600; line-height: 1.15;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.btn:hover { background: #1b1b1b; }
.btn svg { width: 26px; height: 26px; flex: none; }
.btn small { display: block; font-weight: 500; font-size: 0.72rem; opacity: 0.85; }
.btn span { display: block; font-size: 1.12rem; }
.cta-note { font-size: 0.95rem; color: var(--mist); margin: 0; }
.light .cta-note { color: var(--ink-soft); }

/* ---------- Sections ---------- */
section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 40rem; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head p { color: var(--ink-soft); font-size: 1.15rem; margin-top: 16px; }

/* Feature rows: phone + copy, alternating */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: center;
}
.feature + .feature { margin-top: clamp(72px, 10vw, 128px); }
.feature.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); }
.feature.flip .phone { order: 2; }
.feature .copy { max-width: 34rem; }
.feature .copy h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 16px; }
.feature .copy p { color: var(--ink-soft); }
.feature ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.feature li { padding-left: 26px; position: relative; }
.feature li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--tide); box-shadow: 0 0 0 3px rgba(47, 168, 216, 0.18);
}
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.examples q { quotes: "\201C" "\201D"; font-size: 0.92rem; padding: 6px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }

@media (max-width: 760px) {
  .feature, .feature.flip { grid-template-columns: 1fr; }
  .feature.flip .phone { order: 0; }
  .feature .phone { max-width: 260px; margin: 0 auto; }
}

/* Phone frame around simulator screenshots */
.phone {
  width: 100%;
  aspect-ratio: 1206 / 2622;
  border-radius: 46px;
  padding: 10px;
  background: linear-gradient(145deg, #2a3442, #0d131c);
  box-shadow: 0 1px 0 1px #3a4554 inset, 0 30px 60px -20px rgba(12, 30, 48, 0.45), 0 10px 20px -10px rgba(12, 30, 48, 0.3);
}
.phone img, .phone .placeholder { width: 100%; height: 100%; object-fit: cover; border-radius: 37px; }
.phone .placeholder {
  display: grid; place-items: center; text-align: center; padding: 24px;
  background: linear-gradient(170deg, #0a4d7a, #1e3a5f 55%, #003049);
  color: var(--mist); font-size: 0.9rem;
}

/* ---------- Insights ---------- */
.insights { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.report-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px clamp(32px, 6vw, 80px); }
.report-groups h3 { font-size: 1.3rem; padding-bottom: 12px; border-bottom: 2px solid var(--ink); margin-bottom: 4px; }
.report-groups dl { margin: 0; }
.report-groups dl > div { display: grid; grid-template-columns: 12rem 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.report-groups dt { font-weight: 600; }
.report-groups dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 900px) { .report-groups { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .report-groups dl > div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Symptoms ---------- */
.symptoms-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.chips li { padding: 8px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 0.97rem; }
.chips li i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 0.05em; }
@media (max-width: 820px) { .symptoms-grid { grid-template-columns: 1fr; } }

/* ---------- Privacy band ---------- */
.privacy-band { background: linear-gradient(170deg, var(--navy) 0%, #1a2550 100%); color: var(--salt); }
.privacy-band h2 { max-width: 18ch; }
.privacy-band .lede { color: #cfd9e5; font-size: 1.15rem; max-width: 44ch; margin-top: 20px; }
.privacy-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: end; }
.privacy-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,0.18); }
.privacy-list li { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.18); display: flex; justify-content: space-between; gap: 16px; }
.privacy-list li span:last-child { color: var(--mist); text-align: right; }
@media (max-width: 820px) { .privacy-cols { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.pricing { text-align: left; }
.price-panel {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(20px, 4vw, 48px); align-items: center;
  padding: clamp(28px, 5vw, 48px); border-radius: 28px; background: var(--paper); border: 1px solid var(--line);
}
.price-panel .icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 10px 24px -8px rgba(74, 44, 110, 0.5); }
.price { font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1; }
.price small { font-family: var(--sans); font-size: 1rem; color: var(--ink-soft); }
.price-panel p { margin: 10px 0 0; color: var(--ink-soft); }
.fine { font-size: 0.86rem; color: var(--ink-soft); max-width: 70ch; margin-top: 20px; }
@media (max-width: 820px) { .price-panel { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 48rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-weight: 600; font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 1.6rem; font-weight: 400; color: var(--tide-deep); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 20px; color: var(--ink-soft); max-width: var(--measure); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--mist); font-size: 0.93rem; padding: 48px 0 40px; }
.site-footer a { color: var(--salt); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 26px; list-style: none; padding: 0; margin: 0; }
.disclaimer { max-width: 70ch; margin-top: 28px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.86rem; }
.site-footer .brand { color: var(--salt); }

/* ---------- Document pages (privacy, terms, support) ---------- */
.doc-hero { background: linear-gradient(170deg, var(--navy) 0%, var(--navy-2) 60%, var(--plum) 140%); color: var(--salt); padding-bottom: clamp(40px, 6vw, 72px); }
.doc-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); max-width: 20ch; }
.doc-hero p { color: #cfd9e5; margin: 16px 0 0; max-width: 56ch; font-size: 1.12rem; }
.doc-hero .wrap > div { padding-top: clamp(24px, 5vw, 56px); }
.doc { padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 9vw, 112px); }
.doc-body { max-width: 46rem; }
.doc-body h2 { font-size: clamp(1.5rem, 2.6vw, 1.85rem); margin: 2.4em 0 0.6em; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { font-family: var(--sans); font-weight: 700; font-size: 1.08rem; margin: 1.8em 0 0.4em; }
.doc-body ul { padding-left: 1.2em; margin: 0 0 1em; }
.doc-body li { margin-bottom: 0.4em; }
.doc-body table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 0.96rem; }
.doc-body th, .doc-body td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.doc-body th { font-weight: 700; }
.doc-body .summary { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--tide); border-radius: 12px; padding: 20px 24px; margin-bottom: 2em; }
.doc-body .summary p:last-child, .doc-body .summary ul:last-child { margin-bottom: 0; }
.updated { font-size: 0.95rem; color: var(--mist); }
.table-scroll { overflow-x: auto; }

.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 24px 28px; margin-bottom: 2.5em; }
.contact-card h2 { margin: 0 !important; font-size: 1.4rem; }
.contact-card p { margin: 6px 0 0; color: var(--ink-soft); }
.mail-btn { display: inline-flex; align-items: center; padding: 12px 20px; border-radius: 12px; background: var(--tide-deep); color: #fff; text-decoration: none; font-weight: 600; }
.mail-btn:hover { background: #0b5a7d; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 20;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--salt);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 24px -8px rgba(12, 30, 48, 0.55);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s, background 0.2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--plum); }
.to-top svg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
