/* TravelHealthAI — marketing site
   Token system: color/type/motion tokens on :root, redefined for dark under
   prefers-color-scheme. Components consume tokens only, never literal values. */

:root {
  color-scheme: light;

  --ink: #142428;
  --ink-soft: #3d4f53;
  --ink-faint: #5c6f72;
  --paper: #fbfcfc;
  --surface: #ffffff;
  --surface-soft: #eef5f5;
  --surface-soft-deep: #d7e8e9;
  --line: rgba(20, 36, 40, 0.1);
  --line-soft: rgba(20, 36, 40, 0.06);

  --harbor: #1f6b73;
  --harbor-deep: #15555c;
  --harbor-tint: rgba(31, 107, 115, 0.08);
  --tide: #3d8b9a;
  --tide-deep: #2c6975;
  --tide-tint: rgba(61, 139, 154, 0.1);
  --slate: #527094;
  --slate-tint: rgba(82, 112, 148, 0.1);
  --clay: #c07a4f;

  --shadow-soft: 0 1px 2px rgba(15, 40, 45, 0.06), 0 12px 32px -16px rgba(15, 40, 45, 0.18);
  --shadow-lift: 0 2px 4px rgba(15, 40, 45, 0.08), 0 28px 56px -24px rgba(15, 40, 45, 0.28);

  --max: 40rem;
  --max-wide: 68rem;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-body: "Source Sans 3", "Avenir Next", "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --reveal-duration: 620ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --ink: #eef5f5;
    --ink-soft: #a9c0c2;
    --ink-faint: #74898b;
    --paper: #0b1517;
    --surface: #101c1e;
    --surface-soft: #152224;
    --surface-soft-deep: #1b2c2f;
    --line: rgba(238, 245, 245, 0.12);
    --line-soft: rgba(238, 245, 245, 0.07);

    --harbor: #5ec2cb;
    --harbor-deep: #86d5db;
    --harbor-tint: rgba(94, 194, 203, 0.14);
    --tide: #7fc2cf;
    --tide-deep: #9ad4de;
    --tide-tint: rgba(127, 194, 207, 0.14);
    --slate: #93aed1;
    --slate-tint: rgba(147, 174, 209, 0.14);
    --clay: #e0a476;

    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -16px rgba(0, 0, 0, 0.5);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.35), 0 32px 64px -24px rgba(0, 0, 0, 0.6);

    /* Dark-mode harbor lightens for legibility as a surface, so its own button label
       needs to flip to dark ink instead of white to hold AA contrast. */
    --button-primary-ink: #0b1517;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--harbor-tint);
  color: var(--ink);
}

a {
  color: var(--harbor);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--harbor-deep);
}

a:focus-visible,
button:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--harbor);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---------- layout shells ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 1.1rem 1.25rem;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--harbor);
}

.brand-mark {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.42rem;
  flex-shrink: 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.35rem;
  font-size: 0.95rem;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--harbor);
}

main {
  max-width: var(--max-wide);
  margin: 0 auto;
}

.prose {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.site-footer {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 3rem 1.25rem 2.75rem;
  border-top: 1px solid var(--line);
}

.site-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
}

.site-footer a:hover {
  color: var(--harbor);
}

.site-footer .meta {
  margin: 0;
}

.site-footer .legal-note {
  margin-top: 1.5rem;
  max-width: 38rem;
  color: var(--ink-faint);
  font-size: 0.85rem;
}

/* ---------- buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.7rem 1.35rem;
  border-radius: 0.8rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 180ms var(--ease), color 180ms var(--ease),
    border-color 180ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease);
}

.button-primary {
  background: var(--harbor);
  color: var(--button-primary-ink, #fff);
  box-shadow: var(--shadow-soft);
}

.button-primary:hover {
  background: var(--harbor-deep);
  color: var(--button-primary-ink, #fff);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.button-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.button-secondary:hover {
  background: var(--surface-soft);
  color: var(--harbor);
  border-color: var(--harbor);
}

.button-store {
  padding: 0.6rem 1.2rem 0.6rem 1.05rem;
}

.button-store svg {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

.button-store .store-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.button-store .store-label small {
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.85;
}

.button-store .store-label strong {
  font-size: 1rem;
  font-weight: 700;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 3rem 1.25rem 1rem;
  overflow: clip;
}

.hero-grid {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2.5rem;
}

.hero-copy {
  max-width: 34rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.1rem;
  padding: 0.32rem 0.75rem 0.32rem 0.6rem;
  border-radius: 999px;
  background: var(--harbor-tint);
  color: var(--harbor-deep);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--harbor);
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(2.3rem, 6vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink);
}

.hero .lede {
  margin: 0 0 1.85rem;
  max-width: 32rem;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.hero-note {
  margin: 1.15rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-faint);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -10% -5% -10%;
  background:
    radial-gradient(closest-side, var(--tide-tint), transparent 72%),
    radial-gradient(closest-side, var(--harbor-tint), transparent 70%);
  background-position: 30% 20%, 75% 80%;
  background-repeat: no-repeat;
  background-size: 75% 75%, 65% 65%;
  filter: blur(6px);
  z-index: 0;
  pointer-events: none;
}

.phone-frame {
  position: relative;
  z-index: 1;
  width: min(78vw, 19rem);
  border-radius: 2.4rem;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  border: 1px solid var(--line);
  transform: rotate(-2.5deg);
  transition: transform 420ms var(--ease), box-shadow 420ms var(--ease);
}

.hero-visual:hover .phone-frame {
  transform: rotate(0deg) translateY(-4px);
}

.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.phone-caption {
  position: absolute;
  left: 50%;
  bottom: -1.1rem;
  transform: translateX(-50%) rotate(-2.5deg);
  white-space: nowrap;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--harbor-deep);
}

/* ---------- trust strip ---------- */

.trust-strip {
  max-width: var(--max-wide);
  margin: 3.5rem auto 0;
  padding: 0 1.25rem;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  overflow: hidden;
}

.trust-item {
  position: relative;
  background: var(--surface);
  padding: 1.35rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  transition: background-color 220ms var(--ease);
}

.trust-item:hover {
  background: var(--surface-soft);
}

.trust-item svg {
  transition: transform 220ms var(--ease);
}

.trust-item:hover svg {
  transform: translateY(-1px) scale(1.06);
}

.trust-item svg {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  color: var(--harbor);
  margin-top: 0.15rem;
}

.trust-item strong {
  display: block;
  font-size: 0.98rem;
  color: var(--ink);
}

.trust-item span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.87rem;
  color: var(--ink-faint);
}

/* ---------- section shell + reveal ---------- */

.section {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 5.5rem 1.25rem 0;
}

.section-head {
  max-width: 34rem;
  margin: 0 0 2.75rem;
}

.section-kicker {
  display: block;
  margin: 0 0 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tide-deep);
}

.section-head h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(1.6rem, 3.6vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--ink);
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--reveal-duration) var(--ease), transform var(--reveal-duration) var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- journey ---------- */

.journey {
  display: flex;
  flex-direction: column;
  gap: 4.5rem;
}

.journey-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.journey-copy .step-index {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.journey-copy .step-index .dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
}

.journey-item[data-phase="prepare"] .step-index { color: var(--tide-deep); }
.journey-item[data-phase="prepare"] .dot { background: var(--tide); }
.journey-item[data-phase="travel"] .step-index { color: var(--harbor); }
.journey-item[data-phase="travel"] .dot { background: var(--harbor); }
.journey-item[data-phase="return"] .step-index { color: var(--slate); }
.journey-item[data-phase="return"] .dot { background: var(--slate); }

.journey-copy h3 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.journey-copy p {
  margin: 0;
  color: var(--ink-soft);
}

.journey-visual {
  display: flex;
  justify-content: center;
}

.journey-visual .phone-frame {
  width: min(70vw, 15.5rem);
  transform: none;
}

.journey-visual .phone-frame:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift), 0 0 0 1px var(--line);
}

.journey-visual-empty {
  width: 100%;
  max-width: 15.5rem;
  aspect-ratio: 3 / 4;
  border-radius: 1.4rem;
  background: linear-gradient(155deg, var(--slate-tint), transparent 60%);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  transition: transform 420ms var(--ease), background-color 420ms var(--ease);
}

.journey-visual-empty:hover {
  transform: translateY(-4px);
  background: linear-gradient(155deg, var(--slate-tint), var(--surface-soft) 80%);
}

.journey-visual-empty svg {
  width: 3.5rem;
  height: 3.5rem;
  color: var(--slate);
}

/* ---------- trust / faq section ---------- */

.faq {
  border-top: 1px solid var(--line);
  padding-top: 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  overflow: hidden;
}

.faq-item {
  background: var(--surface);
  padding: 1.5rem 1.6rem;
  transition: background-color 220ms var(--ease);
}

.faq-item:hover {
  background: var(--surface-soft);
}

.faq-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
}

.faq-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

/* ---------- cta band ---------- */

.cta-band {
  margin: 6rem 1.25rem 0;
  max-width: var(--max-wide);
  margin-left: auto;
  margin-right: auto;
  padding: 3.25rem 1.75rem;
  border-radius: 1.5rem;
  background: linear-gradient(155deg, var(--harbor-tint), var(--tide-tint) 65%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.cta-band h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.cta-band p {
  margin: 0 0 1.75rem;
  color: var(--ink-soft);
}

.cta-band .actions {
  justify-content: center;
}

/* ---------- legal-page prose (privacy / terms / support) ---------- */

.meta {
  margin: 0 0 0.75rem;
  color: var(--ink-faint);
  font-size: 0.9rem;
}

h1.page-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}

.prose h2 {
  margin: 2.25rem 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.prose h3 {
  margin: 1.5rem 0 0.4rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
}

.prose p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.content-block {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.content-block h2 {
  margin-top: 0;
}

.calm-list {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  color: var(--ink-soft);
}

.calm-list li {
  margin-bottom: 0.55rem;
}

.calm-list strong {
  color: var(--ink);
  font-weight: 600;
}

.support-email {
  color: var(--harbor);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}

.support-email:hover {
  color: var(--harbor-deep);
  text-decoration: underline;
}

/* ---------- responsive ---------- */

@media (min-width: 46rem) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .hero-copy {
    max-width: none;
  }

  .trust-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .journey-item {
    grid-template-columns: 1fr 1fr;
  }

  .journey-item[data-phase="travel"] .journey-copy {
    order: 2;
  }

  .faq-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 60rem) {
  .hero {
    padding-top: 5rem;
  }
}

/* ---------- motion & accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  .reveal {
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .phone-frame {
    transform: none;
  }
}
