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

    :root {
      --bg-primary: #0a1628;
      --bg-secondary: #0f1f3a;
      --bg-card: #132244;
      --accent: #00d4aa;
      --accent-dim: rgba(0, 212, 170, 0.15);
      --text-primary: #e8edf5;
      --text-secondary: #8a9bb8;
      --text-muted: #5a6d8a;
      --warning-yellow: #ffc107;
      --warning-orange: #ff8c00;
      --warning-red: #ff3b3b;
      --border: rgba(255, 255, 255, 0.06);
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      background-color: var(--bg-primary);
      color: var(--text-primary);
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
    }

    /* Wave decoration */
    .wave-bg {
      position: fixed;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 320px;
      pointer-events: none;
      z-index: 0;
      overflow: hidden;
    }

    .wave-bg::before,
    .wave-bg::after {
      content: "";
      position: absolute;
      bottom: -60px;
      left: -5%;
      width: 110%;
      height: 200px;
      border-radius: 45% 48% 0 0;
      opacity: 0.04;
    }

    .wave-bg::before {
      background: var(--accent);
      animation: wave-drift 12s ease-in-out infinite alternate;
    }

    .wave-bg::after {
      background: #1a6bff;
      bottom: -80px;
      animation: wave-drift 16s ease-in-out infinite alternate-reverse;
    }

    @keyframes wave-drift {
      0%   { transform: translateX(-2%) rotate(-0.5deg); }
      100% { transform: translateX(2%) rotate(0.5deg); }
    }

    /* Layout */
    .container {
      max-width: 960px;
      margin: 0 auto;
      padding: 0 24px;
      position: relative;
      z-index: 1;
    }

    /* Navigation */
    nav {
      padding: 20px 0;
      border-bottom: 1px solid var(--border);
    }

    nav .container {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .logo {
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--text-primary);
      text-decoration: none;
      letter-spacing: -0.02em;
    }

    .logo span {
      color: var(--accent);
    }

    nav a.nav-link {
      color: var(--text-secondary);
      text-decoration: none;
      font-size: 0.875rem;
      margin-left: 24px;
      transition: color 0.2s;
    }

    nav a.nav-link:hover {
      color: var(--accent);
    }

    /* Hero
       Layering follows the CoastWarn source hero: photograph at the bottom,
       a navy scrim above it (::after), and the copy on top because
       .container is position:relative with z-index:1. isolation keeps that
       stack inside the hero so it never mixes with the fixed .wave-bg. */
    .hero {
      position: relative;
      isolation: isolate;
      min-height: 78vh;
      min-height: 78svh;
      display: grid;
      align-items: end;
      padding: 100px 0 80px;
      text-align: center;
      background: var(--bg-primary);
    }

    .hero-media {
      position: absolute;
      inset: 0;
      display: block;
    }

    .hero-media img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: 50% 40%;
    }

    .hero::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(10, 22, 40, 0.15) 0%, rgba(10, 22, 40, 0.55) 55%, rgba(10, 22, 40, 0.97) 100%);
    }

    /* Copy over the photograph: a soft navy shadow and lighter secondary
       text keep every line readable where it crosses bright water. */
    .hero h1,
    .hero .hero-subtitle,
    .hero .price-tag {
      text-shadow: 0 2px 20px rgba(10, 22, 40, 0.85);
    }

    .hero .hero-subtitle {
      color: #c9d4e6;
    }

    .hero .price-tag {
      color: var(--text-secondary);
    }

    /* On a phone the photo is height-bound, so the white chairs cannot be
       moved with object-position; headroom keeps the copy below them. */
    @media (max-width: 719px) {
      .hero {
        padding-top: 36vh;
        padding-top: 36svh;
        padding-bottom: 56px;
      }
    }

    .hero-badge {
      display: inline-block;
      background: linear-gradient(var(--accent-dim), var(--accent-dim)), rgba(10, 22, 40, 0.8);
      color: var(--accent);
      font-size: 0.8rem;
      font-weight: 600;
      padding: 6px 16px;
      border-radius: 100px;
      margin-bottom: 28px;
      letter-spacing: 0.03em;
      text-transform: uppercase;
    }

    h1 {
      font-size: clamp(2.2rem, 5.5vw, 3.6rem);
      font-weight: 800;
      line-height: 1.1;
      letter-spacing: -0.03em;
      margin-bottom: 20px;
    }

    .hero-subtitle {
      font-size: clamp(1rem, 2.5vw, 1.25rem);
      color: var(--text-secondary);
      max-width: 560px;
      margin: 0 auto 40px;
      line-height: 1.5;
    }

    .cta-group {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
    }

    .app-store-badge {
      display: inline-block;
      background: var(--text-primary);
      color: var(--bg-primary);
      font-weight: 700;
      font-size: 1rem;
      padding: 14px 32px;
      border-radius: 12px;
      text-decoration: none;
      transition: background 0.2s, transform 0.2s;
    }

    .app-store-badge:hover {
      background: #fff;
      transform: translateY(-1px);
    }

    .price-tag {
      color: var(--text-muted);
      font-size: 0.875rem;
    }

    .price-tag strong {
      color: var(--accent);
    }

    /* Alert levels visual */
    .alert-levels {
      display: flex;
      justify-content: center;
      gap: 12px;
      margin-top: 48px;
    }

    .alert-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      animation: pulse 2.5s ease-in-out infinite;
    }

    .alert-dot.normal  { background: var(--accent); animation-delay: 0s; }
    .alert-dot.caution { background: var(--warning-yellow); animation-delay: 0.3s; }
    .alert-dot.warning { background: var(--warning-orange); animation-delay: 0.6s; }
    .alert-dot.danger  { background: var(--warning-red); animation-delay: 0.9s; }

    @keyframes pulse {
      0%, 100% { opacity: 0.4; transform: scale(1); }
      50%      { opacity: 1; transform: scale(1.3); }
    }

    /* Features */
    .features {
      padding: 80px 0;
    }

    .section-label {
      font-size: 0.75rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--accent);
      margin-bottom: 12px;
    }

    h2 {
      font-size: clamp(1.5rem, 3.5vw, 2.2rem);
      font-weight: 700;
      letter-spacing: -0.02em;
      margin-bottom: 48px;
    }

    .feature-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 20px;
    }

    @media (min-width: 640px) {
      .feature-grid {
        grid-template-columns: 1fr 1fr;
      }
    }

    .feature-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 28px;
      transition: border-color 0.2s;
    }

    .feature-card:hover {
      border-color: rgba(0, 212, 170, 0.2);
    }

    .feature-icon {
      font-size: 1.5rem;
      margin-bottom: 12px;
      display: block;
    }

    .feature-card h3 {
      font-size: 1rem;
      font-weight: 700;
      margin-bottom: 8px;
    }

    .feature-card p {
      font-size: 0.9rem;
      color: var(--text-secondary);
      line-height: 1.5;
    }

    .feature-card.span-full {
      grid-column: 1 / -1;
    }

    /* How it works */
    .how-it-works {
      padding: 80px 0;
      border-top: 1px solid var(--border);
    }

    .steps {
      display: grid;
      grid-template-columns: 1fr;
      gap: 32px;
      margin-top: 8px;
    }

    @media (min-width: 640px) {
      .steps {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
      }
    }

    .step {
      text-align: center;
      padding: 32px 20px;
    }

    .step-number {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: var(--accent-dim);
      color: var(--accent);
      font-size: 1.2rem;
      font-weight: 800;
      margin-bottom: 16px;
    }

    .step h3 {
      font-size: 1.1rem;
      font-weight: 700;
      margin-bottom: 8px;
    }

    .step p {
      font-size: 0.9rem;
      color: var(--text-secondary);
    }

    /* Data source */
    .data-source {
      padding: 60px 0;
      border-top: 1px solid var(--border);
      text-align: center;
    }

    .noaa-badge {
      display: inline-block;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 20px 32px;
      margin-bottom: 16px;
    }

    .noaa-badge p {
      font-size: 0.95rem;
      color: var(--text-secondary);
    }

    .noaa-badge strong {
      color: var(--text-primary);
    }

    /* Disclaimer */
    .disclaimer {
      padding: 40px 0;
      text-align: center;
    }

    .disclaimer-box {
      display: inline-block;
      background: rgba(255, 193, 7, 0.08);
      border: 1px solid rgba(255, 193, 7, 0.2);
      border-radius: 12px;
      padding: 16px 28px;
      max-width: 640px;
    }

    .disclaimer-box p {
      font-size: 0.85rem;
      color: var(--warning-yellow);
      line-height: 1.5;
    }

    /* Footer */
    footer {
      padding: 48px 0;
      border-top: 1px solid var(--border);
    }

    footer .container {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
      text-align: center;
    }

    .footer-links {
      display: flex;
      gap: 24px;
      flex-wrap: wrap;
      justify-content: center;
    }

    .footer-links a {
      color: var(--text-secondary);
      text-decoration: none;
      font-size: 0.85rem;
      transition: color 0.2s;
    }

    .footer-links a:hover {
      color: var(--accent);
    }

    .footer-copy {
      color: var(--text-muted);
      font-size: 0.8rem;
    }
