/* TideLine landing page.
 *
 * Colour roles mirror src/constants/tideline-theme.ts, including its contrast
 * decisions: blue gray is never used for small body text, and the muted role is
 * the darkened variant for that reason. Brass stays a hairline accent — in the
 * app it means "ending soon" and it shouldn't mean anything louder here.
 */

:root {
  --navy: #0B2D4B;
  --navy-surface: #16436A;
  --navy-border: #1D4F79;
  --sea-glass: #6ED1C3;
  --sea-glass-soft: #DCF0EC;
  --teal: #2E7D7A;
  --off-white: #F6F8F5;
  --surface: #FFFFFF;
  --text: #0B2D4B;
  --text-muted: #55687A;
  --on-navy: #F6F8F5;
  --on-navy-muted: #A9C4D6;
  --border: #DCE4E2;
  --brass: #C7A96B;

  --radius-card: 16px;
  --radius-pill: 999px;
  --gutter: 16px;
  --measure: 62ch;

  --font: system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--off-white);
  overflow-x: hidden;
}

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

h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.015em; font-weight: 750; }
h1 { font-size: clamp(2.25rem, 1.4rem + 4.2vw, 4rem); }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); }
h3 { font-size: 1.2rem; line-height: 1.25; }
p { margin: 0; }

a { color: var(--teal); text-underline-offset: 0.15em; }

:focus-visible {
  outline: 3px solid var(--sea-glass);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 720px) { :root { --gutter: 32px; } }

.nowrap { white-space: nowrap; }

/* Skip link ------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--sea-glass);
  color: var(--navy);
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Buttons --------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}
.button:active { transform: translateY(1px); }
.button--lg { min-height: 52px; padding-inline: 26px; font-size: 1.0625rem; }

/* Sea glass on navy: 7.8:1 for the navy text on it. */
.button--accent { background: var(--sea-glass); color: var(--navy); }
.button--accent:hover { background: #86DCD0; }

.button--ghost {
  color: var(--on-navy);
  border: 1.5px solid var(--on-navy-muted);
  background: transparent;
}
.button--ghost:hover { border-color: var(--on-navy); background: rgba(246, 248, 245, 0.06); }

/* Masthead -------------------------------------------------------------- */

.masthead {
  background: var(--navy);
  color: var(--on-navy);
  border-bottom: 1px solid var(--navy-border);
}
.masthead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding-block: 10px;
}
.masthead__brand { display: inline-flex; border-radius: 6px; }
.masthead__brand img { width: 118px; height: auto; }

.masthead__nav { display: flex; align-items: center; gap: 6px 22px; }
.masthead__nav a:not(.button) {
  color: var(--on-navy);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 2px;
}
.masthead__nav a:not(.button):hover { color: var(--sea-glass); }
.masthead__nav .button { min-height: 40px; padding: 8px 16px; }

@media (max-width: 559px) {
  .masthead__nav a:not(.button) { display: none; }
}

/* Hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  background: var(--navy);
  color: var(--on-navy);
  overflow: hidden;
  isolation: isolate;
}

/* The discovery beam: a soft sea-glass sweep from the upper right, like the
 * lighthouse in the mark. It sits under everything and is purely decorative. */
.hero__beam {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 95% at 88% 8%, rgba(110, 209, 195, 0.34) 0%, rgba(110, 209, 195, 0.10) 38%, rgba(110, 209, 195, 0) 70%),
    linear-gradient(180deg, #0B2D4B 0%, #0A2842 100%);
}
.hero__beam::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -2px;
  height: 90px;
  background:
    radial-gradient(52% 100% at 30% 100%, rgba(246, 248, 245, 0.06) 0%, rgba(246, 248, 245, 0) 70%),
    radial-gradient(52% 100% at 75% 100%, rgba(110, 209, 195, 0.08) 0%, rgba(110, 209, 195, 0) 70%);
}

.hero__grid {
  display: grid;
  gap: 40px;
  padding-block: clamp(48px, 8vw, 104px) clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (min-width: 880px) {
  .hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); gap: 56px; }
}

.eyebrow {
  margin-bottom: 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-navy-muted);
}
.eyebrow--seaglass { color: var(--sea-glass); }
.eyebrow--teal { color: var(--teal); }

.hero h1 { max-width: 12ch; }
.hero .lede {
  max-width: 52ch;
  margin-top: 20px;
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.25rem);
  color: var(--on-navy-muted);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero__facts {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--on-navy);
}
.hero__facts li { display: flex; align-items: center; gap: 10px; }
.dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sea-glass);
  box-shadow: 0 0 0 4px rgba(110, 209, 195, 0.18);
}

/* Device ----------------------------------------------------------------- */

.hero__device {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 16px;
}
.hero__device figcaption {
  font-size: 0.9rem;
  color: var(--on-navy-muted);
  text-align: center;
}

.phone {
  width: min(280px, 72vw);
  padding: 12px;
  border-radius: 44px;
  background: #06182A;
  border: 1px solid var(--navy-border);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(110, 209, 195, 0.10),
    inset 0 0 0 1px rgba(246, 248, 245, 0.05);
  transform: rotate(-3deg);
}
.phone__screen {
  position: relative;
  /* The screen's aspect is the real Feed screenshot (1440x3120) with only the
   * Android status bar (top 140px) and system nav bar (bottom 156px) trimmed
   * by object-position below: 1440 x 2824. The file itself is untouched. Set
   * on the screen, not the padded frame, so the trim is exact. */
  aspect-ratio: 1440 / 2824;
  border-radius: 34px;
  /* Navy behind the screenshot, so nothing lighter ever peeks at the edges
   * while it loads — the app's own header colour. */
  background: var(--navy);
  overflow: hidden;
}
.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Of the 296px of height that cover trims, 140 come off the top (status
   * bar) and 156 off the bottom (system nav): 140 / 296 = 47.3%. */
  object-position: 50% 47.3%;
}

@media (prefers-reduced-motion: no-preference) {
  .phone { transition: transform 300ms ease; }
  .hero__device:hover .phone { transform: rotate(0deg); }
}

/* Sections --------------------------------------------------------------- */

.section { padding-block: clamp(56px, 8vw, 104px); }
.section__lede {
  max-width: var(--measure);
  margin-top: 16px;
  font-size: 1.125rem;
  color: var(--text-muted);
}

.section--navy {
  background: var(--navy);
  color: var(--on-navy);
}
.section--navy h2 { color: var(--on-navy); }
.section--navy p { color: var(--on-navy-muted); }

/* Steps ------------------------------------------------------------------- */

.steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
  counter-reset: step;
}
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.step {
  position: relative;
  padding: 24px 22px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--teal);
}
.step__icon {
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--sea-glass-soft);
  color: var(--navy);
}
.step__icon svg { width: 24px; height: 24px; }
.step h3 { margin-bottom: 8px; }
.step p { font-size: 0.975rem; color: var(--text-muted); }

/* Why --------------------------------------------------------------------- */

.why {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 880px) {
  .why { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 64px; }
}
.why__copy > p { max-width: var(--measure); margin-top: 16px; font-size: 1.125rem; }

.checks {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  max-width: var(--measure);
}
.checks li {
  position: relative;
  padding-left: 34px;
  color: var(--on-navy);
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--sea-glass);
  /* a check mark, drawn so it needs no icon font */
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><circle cx='10' cy='10' r='10' fill='black'/><path d='M6 10.5l2.6 2.5L14 7.5' stroke='white' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><circle cx='10' cy='10' r='10' fill='black'/><path d='M6 10.5l2.6 2.5L14 7.5' stroke='white' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
}

/* The brand PNGs are opaque, each on its own colour (#F6F8F5 for the light
 * ones, #0B2D4B for the reversed lockup). They are only ever placed on exactly
 * that colour, so the artwork never shows a box. Here the symbol sits on an
 * off-white tile — the same treatment as the brand board's standalone panel. */
.why__mark {
  display: grid;
  place-items: center;
}
.why__mark .tile {
  display: grid;
  place-items: center;
  width: min(320px, 70vw);
  aspect-ratio: 1;
  border-radius: 28px;
  background: var(--off-white);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(110, 209, 195, 0.14);
}
.why__mark img { width: 58%; }

/* Towns ------------------------------------------------------------------- */

.towns {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.towns li {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 600;
}
.towns li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--sea-glass);
  vertical-align: 1px;
}

.footnote {
  margin-top: 22px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* CTA --------------------------------------------------------------------- */

/* Off-white, to match the primary lockup's baked-in background exactly. */
.section--cta {
  background: var(--off-white);
  border-top: 1px solid var(--border);
  border-bottom: 3px solid var(--brass);
}
.cta {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 18px;
}
.cta__lockup { width: min(420px, 82vw); }
.cta > p { max-width: 58ch; font-size: 1.125rem; color: var(--text-muted); }
.cta .footnote { margin-top: 0; font-weight: 700; letter-spacing: 0.06em; color: var(--teal); }

/* Footer ------------------------------------------------------------------ */

.footer {
  background: var(--navy);
  color: var(--on-navy-muted);
  padding-block: 28px;
  font-size: 0.9rem;
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--on-navy);
}
/* Reversed lockup: navy on navy, seamless. */
.footer__brand img { width: 96px; }
