/* Tidelock — Harbour palette, Editorial type. Same tokens as the iOS app (Theme.swift).
   No web fonts and no third-party requests: the serif is the system's (New York on Apple devices). */

:root {
  --ink: #0F2A3D;
  --muted: #5B6B76;
  --teal: #0C7372;
  --teal-ink: #FFFFFF;
  --sea: #CDE8E4;
  --sand: #F6F1E9;
  --surface: #FFFFFF;
  --rule: #DCD4C6;
  --coral: #E8825F;
  --navy: #0F2A3D;
  --shadow: 0 30px 60px -20px rgba(15, 42, 61, 0.28);
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 22px;
  --max: 1120px;
  --pill-bg: #0F2A3D;
  --pill-ink: #FFFFFF;
  --badge-navy: #0F2A3D;
  color-scheme: light;
}

/* Light is the default. Dark when the visitor picks Dark, or picks Auto on a dark system
   (data-theme on <html>, set by assets/js/theme.js). */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --ink: #F4F7F8;
    --muted: #9FB4C0;
    --teal: #5CC2BE;
    --teal-ink: #0F2A3D;
    --sea: #1B3B52;
    --sand: #0F2A3D;
    --surface: #1B3B52;
    --rule: #2C4E66;
    --shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55);
    --pill-bg: #5CC2BE;
    --pill-ink: #0F2A3D;
    --badge-navy: #2F5A78;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --ink: #F4F7F8;
    --muted: #9FB4C0;
    --teal: #5CC2BE;
    --teal-ink: #0F2A3D;
    --sea: #1B3B52;
    --sand: #0F2A3D;
    --surface: #1B3B52;
    --rule: #2C4E66;
    --shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55);
    --pill-bg: #5CC2BE;
    --pill-ink: #0F2A3D;
    --badge-navy: #2F5A78;
    color-scheme: dark;
}

* { 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(--sand);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

/* Type */
.eyebrow {
  color: var(--teal);
  font-size: 12px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase;
  margin: 0 0 12px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(42px, 6.4vw, 72px); line-height: 1.04; }
h2 { font-size: clamp(32px, 4.2vw, 46px); line-height: 1.1; }
h3 { font-size: 24px; line-height: 1.2; }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 34em; margin: 18px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--sand) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-bottom-color: var(--rule); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 22px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav-links a { color: var(--ink); text-decoration: none; }
.nav-links a:hover { color: var(--teal); }
.nav-links .pill { color: var(--pill-ink); }
@media (max-width: 640px) { .nav-links .hide-sm { display: none; } }

/* Buttons */
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--pill-bg); color: var(--pill-ink);
  padding: 14px 24px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none; border: 0;
  white-space: nowrap;
}
.pill.small { padding: 9px 16px; font-size: 14px; }
.pill svg { width: 18px; height: 18px; }
.link-quiet { color: var(--teal); font-weight: 600; text-decoration: none; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 32px; }
.soon { font-size: 13px; color: var(--muted); }

/* Premium tag, inline in text (links to pricing) */
.tag-premium {
  /* Same size and line as the sentence around it: a soft coral highlight, not a separate chip. */
  padding: 0 0.35em; border-radius: 6px;
  background: color-mix(in srgb, var(--coral) 24%, transparent); color: var(--ink);
  font: inherit; font-weight: 600; text-decoration: none;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.tag-premium:hover { background: color-mix(in srgb, var(--coral) 38%, transparent); }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 48px; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 32px; } }

/* Phone frame */
.phone {
  position: relative; width: 100%; max-width: 320px; margin: 0 auto;
  border-radius: 46px; padding: 10px; background: #0B1D2A;
  box-shadow: var(--shadow);
}
.phone img { border-radius: 37px; width: 100%; height: auto; aspect-ratio: 1290 / 2796; }
.hero-visual { position: relative; padding: 0 24px; }

/* Status card — the app's signature element */
.status-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--sea); color: var(--ink);
  border-radius: 18px; padding: 14px 18px;
  font-size: 15px; line-height: 1.35;
  box-shadow: 0 16px 40px -18px rgba(15, 42, 61, 0.35);
}
.status-card svg { flex: none; width: 28px; height: 28px; color: var(--teal); }
.status-card strong { display: block; font-weight: 600; }
.status-card span { color: var(--muted); font-size: 13px; }
.hero-visual .status-card { position: absolute; left: -8px; bottom: 64px; max-width: 280px; }
@media (max-width: 860px) { .hero-visual .status-card { left: 0; right: 0; margin: 0 auto; width: fit-content; } }

/* Promise strip */
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 40px 0 0; padding: 0; list-style: none; }
.promises li { background: var(--surface); border-radius: var(--radius); padding: 22px; display: flex; gap: 14px; align-items: flex-start; }
.promises strong { display: block; font-size: 17px; margin-bottom: 2px; }
.promises div > span { color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .promises { grid-template-columns: 1fr; } }

.badge {
  flex: none; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: #0C7372; color: #FFFFFF; /* fixed brand teal: white glyphs stay readable in dark mode */
}
.badge svg { width: 22px; height: 22px; }
.badge.navy { background: var(--badge-navy); }
.badge.slate { background: #3E6A86; }
.badge.coral { background: var(--coral); }

/* Sections */
section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.band { background: var(--surface); }

/* Feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; padding: 40px 0; }
.feature + .feature { border-top: 1px solid var(--rule); }
.feature.flip .feature-copy { order: 2; }
.feature .phone { max-width: 280px; }
.feature-copy p { color: var(--muted); font-size: 18px; margin: 14px 0 0; max-width: 30em; }
.points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.points li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.points svg { flex: none; width: 20px; height: 20px; color: var(--teal); margin-top: 2px; }
@media (max-width: 860px) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 32px; }
  .feature.flip .feature-copy { order: 0; }
}

/* How it works: numbered steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { background: var(--surface); border-radius: var(--radius); padding: 24px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: #0C7372; color: #FFFFFF; font-weight: 700; font-size: 14px; margin-bottom: 14px;
}
.steps strong { display: block; font-size: 18px; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--sea); color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 500;
}
.chip svg { width: 16px; height: 16px; color: var(--teal); }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.plan { background: var(--sand); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 6px; }
.plan.featured { outline: 2px solid var(--teal); }
.plan h3 { margin-bottom: 4px; }
.plan .price { font-family: var(--serif); font-size: 40px; line-height: 1.1; }
.plan .price small { font-family: var(--sans); font-size: 15px; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; font-size: 15px; }
.plan li svg { flex: none; width: 18px; height: 18px; color: var(--teal); margin-top: 3px; }
.plan .options { display: grid; gap: 8px; margin-top: 6px; }
.plan .option { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface); font-size: 15px; }
.plan .option b { font-weight: 600; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* Region picker for prices */
.region { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 15px; color: var(--muted); }
.region select {
  appearance: none; -webkit-appearance: none;
  font: inherit; color: var(--ink); background: var(--sand);
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 8px 36px 8px 14px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--teal) 50%), linear-gradient(135deg, var(--teal) 50%, transparent 50%);
  background-position: right 18px center, right 13px center; background-size: 5px 5px; background-repeat: no-repeat;
}

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border-radius: 16px; padding: 4px 20px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--teal); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--muted); }

/* Closing CTA */
.closing { text-align: center; }
.closing img.app-icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 22px; box-shadow: var(--shadow); }
.closing .lede { margin-left: auto; margin-right: auto; }
.closing .cta-row { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 36px 0 48px; font-size: 14px; color: var(--muted); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--teal); }

/* Document pages (privacy, support) */
.doc { padding: 48px 0 72px; }
.doc h1 { font-size: clamp(38px, 5vw, 52px); }
.doc h2 { font-size: 26px; margin: 40px 0 10px; }
.doc .card { background: var(--sea); border-radius: 18px; padding: 20px 22px; margin: 28px 0; }
.doc .card strong { display: block; font-size: 19px; margin-bottom: 4px; }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; }
.doc ol.steps-inline { list-style: none; padding: 0; counter-reset: s; display: grid; gap: 10px; }
.doc ol.steps-inline li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border-radius: 14px; padding: 12px 16px; margin: 0; }
.doc ol.steps-inline li::before { content: counter(s); flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #0C7372; color: #FFFFFF; font-size: 13px; font-weight: 700; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 20; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Utility classes (no inline styles: the Content-Security-Policy blocks them) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.feature-title { margin-top: 16px; }
.after-steps { margin-top: 28px; }
.after-faq { margin-top: 24px; }
.plan-note { margin-top: 20px; }
.brand-small { font-size: 18px; }
.brand-small img { width: 24px; height: 24px; border-radius: 6px; }
.footer-note { margin: 10px 0 0; }
.footer-legal { margin: 18px 0 0; }

/* Theme: quick toggle in the header, Auto / Light / Dark in the footer */
.theme-toggle {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 50%; border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
  cursor: pointer; padding: 0;
}
.theme-toggle:hover { color: var(--teal); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
:root[data-effective-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-effective-theme="dark"] .theme-toggle .icon-moon { display: none; }

.appearance { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; }
.appearance-label { color: var(--muted); }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule); }
.segmented button {
  font: inherit; font-size: 13px; font-weight: 500; color: var(--muted);
  background: transparent; border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer;
}
.segmented button[aria-checked="true"] { background: var(--sea); color: var(--ink); font-weight: 600; }

/* Small phones: keep the header on one line (Help stays in the footer) */
.brand { flex: none; }
@media (max-width: 480px) {
  .nav-links { gap: 12px; }
  .nav-links .hide-xs { display: none; }
}
