/* ==========================================================================
   Vodyanyk landing page
   Brand tokens: see specs/001-landing-page/research.md (R4)
   ========================================================================== */

:root {
  --navy: #0B3D6B;
  --water: #2AA7E0;        /* decorative on light backgrounds; text/outline only on dark */
  --water-dark: #0F6E9E;   /* readable blue on light backgrounds (≈5.6:1 on white) */
  --orange: #E06A2C;       /* decorative accents */
  --orange-dark: #C2541A;  /* button background, white text ≈4.6:1 */
  --amber: #EBA53A;
  --mist: #E8F4FA;
  --ink: #0E2238;
  --muted: #3D5A73;        /* secondary text, ≥6.4:1 on white and mist */
  --line: #CFE3EE;
  --white: #FFFFFF;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px rgba(11, 61, 107, 0.12);

  --header-h: 68px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
ul[class], ol[class] { list-style: none; padding: 0; }
button { font: inherit; }

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

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  overflow-wrap: break-word;
}

[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

h1, h2, h3, h4 { color: var(--navy); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 0.9rem + 3.6vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem); }
h4 { font-size: 1.1rem; }
p { max-width: 70ch; }

a { color: var(--water-dark); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

:focus-visible {
  outline: 3px solid var(--water-dark);
  outline-offset: 2px;
  border-radius: 4px;
}
.section--dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--water); }

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 16px;
}
@media (min-width: 768px) { .container { padding-inline: 24px; } }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.nowrap { white-space: nowrap; }

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--white); }

.section { padding-block: var(--space-8); }
.section--mist { background: var(--mist); }
.section--dark { background: var(--navy); color: var(--white); }
.section--dark h2, .section--dark h3, .section--dark h4 { color: var(--white); }

.section-head { margin-bottom: var(--space-6); }
.section-head p { margin-top: var(--space-3); color: var(--muted); font-size: 1.125rem; }
.section--dark .section-head p { color: #DCEAF4; }
/* Intro sentences that should stay on one line when the container can hold them */
.section-head .section-lead--wide { max-width: none; text-wrap: balance; }

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--water-dark);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--orange-dark); color: var(--white); }
.btn--primary:hover { background: #A84714; color: var(--white); }
.btn--secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--secondary:hover { background: var(--navy); color: var(--white); }
.btn--sm { min-height: 44px; padding: 0.5rem 1.1rem; }

/* Forced-colours (Windows high contrast): keep button shapes visible */
@media (forced-colors: active) {
  .btn { border-color: ButtonText; }
}

/* ---------- Header & navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(8px); }
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  min-height: var(--header-h);
  padding-block: var(--space-2);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--navy);
  font-weight: 800;
  font-size: 1.3rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand img { width: 44px; height: 44px; border-radius: 50%; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--navy);
  cursor: pointer;
}
.nav-toggle svg { width: 26px; height: 26px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
}
.nav-menu a:not(.btn) {
  display: inline-block;
  padding: 0.6rem 0.7rem;
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.nav-menu a:not(.btn):hover { background: var(--mist); }

/* Without JS the links simply wrap under the logo. With JS (<768px) they collapse. */
@media (max-width: 767.98px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { flex-basis: 100%; }
  .js .nav-menu { display: none; }
  .js .nav-menu.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-block: var(--space-2) var(--space-4);
  }
  .js .nav-menu.is-open a { padding: 0.8rem 0.5rem; }
  .js .nav-menu.is-open .btn { margin-top: var(--space-2); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background-color: var(--mist);
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.75) 45%, rgba(255, 255, 255, 0.2) 100%),
    url("../img/hero-bg.jpg");
  background-size: cover;
  background-position: left center;
  background-repeat: no-repeat;
  padding-block: var(--space-8);
}
.hero-content { max-width: 40rem; }
.hero h1 { margin-top: var(--space-3); }
.hero-lead {
  margin-top: var(--space-5);
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  color: var(--ink);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
@media (max-width: 479.98px) {
  .hero-actions .btn { width: 100%; }
}
@media (min-width: 768px) {
  .hero { min-height: 70vh; display: flex; align-items: center; }
  .hero > .container { width: 100%; }
}

/* ---------- Summary ---------- */
.figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-7);
}
.figure {
  padding: var(--space-5) var(--space-4);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.figure strong {
  display: inline-block;
  color: var(--navy);
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  padding-bottom: var(--space-1);
  border-bottom: 4px solid var(--amber);
}
.figure span { display: block; margin-top: var(--space-3); color: var(--muted); font-size: 0.97rem; line-height: 1.45; }

@media (max-width: 479.98px) {
  .figures { grid-template-columns: 1fr; gap: var(--space-3); }
  .figure {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
  }
  .figure strong { font-size: 1.65rem; justify-self: start; white-space: nowrap; }
  .figure span { margin-top: 0; }
}

.summary-grid { display: grid; gap: var(--space-6); }
.summary-block h3 { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.summary-block h3 svg { width: 28px; height: 28px; color: var(--water-dark); flex: none; }

@media (min-width: 1100px) {
  .figures { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  gap: var(--space-4);
  counter-reset: step;
}
.step {
  position: relative;
  padding: var(--space-5);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--water-dark);
  color: var(--white);
  font-weight: 800;
  flex: none;
}
.step-icon { width: 40px; height: 40px; color: var(--navy); }
.step h3 { margin-bottom: var(--space-2); }
.step p { color: var(--ink); }

.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge--here { background: var(--orange-dark); color: var(--white); }

.how-demo {
  display: grid;
  gap: var(--space-6);
  align-items: center;
  margin-top: var(--space-7);
}
.how-demo-text p { margin-top: var(--space-3); }

.alert-demo { margin: 0; }
.phone {
  max-width: 360px;
  margin-inline: auto;
  padding: var(--space-4);
  background: var(--navy);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.notification {
  padding: var(--space-4);
  background: var(--white);
  border-radius: var(--radius);
}
.notification-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}
.notification-head img { width: 22px; height: 22px; border-radius: 50%; }
.notification-head time { margin-left: auto; font-weight: 400; }
.notification-body { margin-top: var(--space-2); color: var(--ink); font-size: 1rem; line-height: 1.5; }
.notification-body strong { display: block; color: var(--navy); }
.notification-actions { display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.pill {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
}
.pill--yes { background: var(--water-dark); color: var(--white); }
.pill--no { background: #E9EEF2; color: var(--ink); }
.alert-demo figcaption { margin-top: var(--space-3); text-align: center; color: var(--muted); font-size: 0.92rem; }

.diff-title { margin-top: var(--space-8); margin-bottom: var(--space-5); font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem); }
.diffs { display: grid; gap: var(--space-4); }
.diff {
  padding: var(--space-5);
  background: var(--mist);
  border-top: 4px solid var(--orange);
  border-radius: var(--radius-sm) var(--radius-sm) var(--radius) var(--radius);
}
.diff h4 { margin-bottom: var(--space-2); }
.diff p { color: var(--ink); font-size: 0.98rem; }

.benefits {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.benefits h4 { margin-bottom: var(--space-1); }
.check-list { display: grid; gap: var(--space-3); }
.check-list li { display: flex; gap: var(--space-3); align-items: flex-start; }
.check-list svg { width: 22px; height: 22px; margin-top: 2px; color: var(--water-dark); flex: none; }

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diffs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-demo { grid-template-columns: 1.1fr 1fr; }
  .check-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .diffs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Team ---------- */
.members { display: grid; gap: var(--space-4); }
.member {
  padding: var(--space-6) var(--space-5);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px; height: 120px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 4px solid var(--water);
}
.member-role { margin: var(--space-1) auto 0; color: var(--muted); font-weight: 600; }
.member-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  margin-top: var(--space-2);
  padding-inline: var(--space-2);
  color: var(--water-dark);
  font-weight: 700;
}
.member-link svg { width: 18px; height: 18px; flex: none; }

@media (min-width: 640px) {
  .members {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 760px;
    margin-inline: auto;
  }
}

/* ---------- Roadmap ---------- */
.roadmap-wrap {
  margin-top: var(--space-7);
  padding: var(--space-6) var(--space-5);
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 6px solid var(--water);
  border-radius: var(--radius);
}
.roadmap-wrap h3 { margin-bottom: var(--space-5); }
.roadmap { display: grid; gap: var(--space-5); }
.stage {
  --dot: 28px;
  position: relative;
  display: grid;
  grid-template-columns: var(--dot) 1fr;
  column-gap: var(--space-4);
  align-items: start;
  align-content: start;
}
.stage-dot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--dot); height: var(--dot);
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--muted);
}
.stage-dot svg { width: 16px; height: 16px; }
.stage-text { grid-column: 2; }
.stage h4 { line-height: 1.3; }
.stage p { margin-top: var(--space-1); color: var(--muted); font-size: 0.97rem; line-height: 1.45; }
.stage .badge { margin-top: var(--space-2); }

.stage--done .stage-dot { background: var(--water-dark); border-color: var(--water-dark); color: var(--white); }
.stage--current .stage-dot {
  border: 4px solid var(--orange-dark);
  box-shadow: 0 0 0 5px rgba(194, 84, 26, 0.18);
}
.stage--next h4 { color: var(--muted); }

/* Path: vertical below 768px (line runs down from each dot to the next) */
.stage:not(:last-child)::before {
  content: "";
  position: absolute;
  left: calc(var(--dot) / 2 - 1.5px);
  top: var(--dot);
  bottom: calc(-1 * var(--space-5));
  border-left: 3px solid var(--water-dark);
}
.stage--current:not(:last-child)::before,
.stage--next:not(:last-child)::before { border-left: 3px dashed var(--muted); }

@media (min-width: 768px) {
  .roadmap { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
  .stage { grid-template-columns: 1fr; grid-template-rows: var(--dot) auto; row-gap: var(--space-3); }
  .stage-text { grid-column: 1; padding-right: var(--space-3); }
  /* Path: horizontal from this dot's centre to the next column's dot */
  .stage:not(:last-child)::before {
    left: calc(var(--dot) / 2);
    right: calc(-1 * var(--space-4));
    top: calc(var(--dot) / 2 - 1.5px);
    bottom: auto;
    border-left: 0;
    border-top: 3px solid var(--water-dark);
  }
  .stage--current:not(:last-child)::before,
  .stage--next:not(:last-child)::before { border-left: 0; border-top: 3px dashed var(--muted); }
}

/* ---------- Contact ---------- */
.asks { display: grid; gap: var(--space-4); }
.ask {
  padding: var(--space-5);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
}
.ask h3 { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-2); }
.ask h3 svg { width: 26px; height: 26px; color: var(--amber); flex: none; }
.ask p { color: #E6F0F7; }

.contact-panel {
  margin-top: var(--space-7);
  padding: var(--space-6) var(--space-5);
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-lg);
  text-align: center;
}
.contact-panel h3 { color: var(--navy); }
.contact-panel p { margin: var(--space-2) auto 0; color: var(--muted); }
.contact-email {
  display: inline-block;
  margin-top: var(--space-4);
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  font-weight: 800;
  color: var(--navy);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-email:hover { color: var(--water-dark); text-decoration: underline; }
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
@media (min-width: 768px) {
  .asks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: var(--space-6);
  background: var(--ink);
  color: #DCE6EE;
  font-size: 0.95rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.footer-brand { display: flex; align-items: center; gap: var(--space-3); color: var(--white); font-weight: 700; }
.footer-brand img { width: 36px; height: 36px; border-radius: 50%; }
.site-footer a { color: var(--water); }
.site-footer a:hover { color: var(--white); }
.footer-meta { display: grid; gap: var(--space-1); }

/* ---------- 404 page ---------- */
.notfound {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-6) 16px;
  background: var(--mist);
  text-align: center;
}
.notfound img { width: 96px; height: 96px; margin: 0 auto var(--space-5); border-radius: 50%; }
.notfound p { margin: var(--space-3) auto var(--space-6); color: var(--muted); }
