/* Обрій — маркетинговий сайт. Палітра й шрифт свідомо ті самі, що й у мобільному застосунку
   (mobile-app/lib/core/theme/app_theme.dart) — AppColors.* один в один, PlexSans/IBM Plex Sans
   той самий variable font. Радар-фон і його розгортка повторюють app_radar_background.dart:
   CustomPainter там малює промінь з радіальним градієнтом-шлейфом, обертаючи canvas — тут те саме
   робить <canvas> у script.js. */

:root {
  color-scheme: dark;

  --bg: #0b0e0f;
  --surface: #14181a;
  --surface-raised: #1c2124;
  --surface-muted: #23292c;
  --nav: #0e1213;

  --accent: #eaedee;
  --accent-strong: #ffffff;
  --on-accent: #0b0e0f;

  --text-primary: #eaedee;
  --text-secondary: #98a1a5;
  --text-tertiary: #7e868a;

  --border: #2a3134;
  --border-subtle: rgba(43, 58, 66, 0.6);

  /* Взято з самої іконки застосунку (компас-стрілка) — єдина тепла пляма на інакше монохромному
     екрані приладу; використовується щадно, лише для живого "blip" на радарі й фокус-стану. */
  --signal: #e8a33d;

  --radius-card: 14px;
  --radius-control: 10px;
  --radius-pill: 999px;

  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  /* Confirmed live: without this, jumping to #download landed the store badges *under* the
     sticky .nav (64px) rather than below it — the browser's default anchor scroll has no idea a
     sticky header will cover part of the target afterward, so it read as "scrolled too far." */
  scroll-padding-top: 84px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  /* Confirmed bug: without this, tapping .nav-cta (an <a>, background already near-white) left a
     persistent white tap-highlight overlay on mobile WebKit that looked like the button "turned
     white and stayed" — nothing to do with :visited, which `color: inherit` at the base specificity
     already handles correctly on its own. A component-specific override (e.g. `a:active{color:
     inherit}`) would out-specificity .nav-cta's own `color: var(--on-accent)` and, since --accent
     and --text-primary happen to share the same hex value here, silently erase the button's text —
     tried that, reverted it. Don't reintroduce a `:visited`/`:active`/`:focus` color rule above the
     component's own specificity. */
  -webkit-tap-highlight-color: transparent;
}

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

/* ---------- Radar background (canvas), shared across the whole page ---------- */

#radar-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
  #radar-canvas {
    opacity: 0.28;
  }
}

.page {
  position: relative;
  z-index: 1;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 18, 19, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 650;
  font-size: 17px;
  letter-spacing: -0.2px;
  color: var(--text-primary);
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 550;
  color: var(--text-secondary);
}

.nav-links a {
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  /* !important, not a `:visited`/`:focus` override: confirmed live that after one click this
     same-page `#download` link's computed `color` silently flips to match its own background
     (both resolve to the same near-white), reproduced across fresh tabs regardless of :active/
     :focus state — pinning it down further wasn't worth it since the pill's text is only ever
     one colour by design anyway. `!important` wins regardless of which pseudo-class/UA rule is
     actually responsible. */
  color: var(--on-accent) !important;
  font-size: 13.5px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .nav-links .nav-link-text {
    display: none;
  }
  .nav-links {
    gap: 16px;
  }
}

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

.hero {
  padding: 96px 0 72px;
}

.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(232, 163, 61, 0.18);
}

h1 {
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.9px;
  font-weight: 650;
  margin: 0 0 20px;
  text-wrap: balance;
}

.hero-lede {
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 46ch;
  margin: 0 0 34px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 10px 18px 10px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: var(--text-primary);
  cursor: default;
  transition: border-color 0.15s ease, transform 0.15s ease;
  /* Also used on a <button> (Android tester sign-up) — resets the UA defaults an <a> never had. */
  font: inherit;
  text-align: left;
}

.store-badge.is-live {
  cursor: pointer;
}

.store-badge.is-live:hover {
  border-color: var(--text-tertiary);
  transform: translateY(-1px);
}

.store-badge svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--text-primary);
}

.store-badge-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.store-badge-eyebrow {
  font-size: 10.5px;
  color: var(--text-tertiary);
  letter-spacing: 0.3px;
}

.store-badge-name {
  font-size: 14.5px;
  font-weight: 650;
}

.store-badge-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin-left: 4px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  background: var(--surface-muted);
  color: var(--text-secondary);
}

.store-badge-status.is-live {
  background: rgba(232, 163, 61, 0.14);
  color: var(--signal);
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-trust svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ---------- Hero visual: the app icon on its own radar disc ---------- */

.hero-visual {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.hero-disc {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(234, 237, 238, 0.05), transparent 70%);
}

.hero-disc::before,
.hero-disc::after {
  content: '';
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
}

.hero-disc::after {
  inset: 30%;
}

.hero-icon {
  position: relative;
  width: 58%;
  border-radius: 22%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  z-index: 2;
}

.hero-blip {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(232, 163, 61, 0.55);
  animation: blip-pulse 2.6s ease-out infinite;
  z-index: 3;
}

@keyframes blip-pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 163, 61, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(232, 163, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 163, 61, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-blip { animation: none; }
}

@media (max-width: 860px) {
  .hero {
    padding: 56px 0 48px;
    text-align: left;
  }
  .hero .container {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    order: -1;
    max-width: 280px;
    margin: 0 auto 8px;
  }
}

/* ---------- Section scaffolding ---------- */

section {
  padding: 76px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-head {
  max-width: 62ch;
  margin: 0 0 44px;
}

.section-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 10px;
}

.section-head h2 {
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.5px;
  margin: 0 0 12px;
  text-wrap: balance;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 15.5px;
  margin: 0;
}

/* ---------- Features grid ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 980px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 22px 20px;
}

.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-muted);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.feature-icon svg {
  width: 19px;
  height: 19px;
  color: var(--text-primary);
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.1px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
}

/* ---------- Trust / disclaimer band ---------- */

.trust-band {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 26px 28px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.trust-band svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--signal);
  margin-top: 2px;
}

.trust-band strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
}

.trust-band p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Roadmap ---------- */

.roadmap-col,
.roadmap-next {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 22px 20px 6px;
}

.roadmap-col {
  margin-bottom: 18px;
}

.roadmap-col-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
}

.roadmap-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Two ways a dot gets its colour: nested in a labelled `.roadmap-col` (done), or standalone with
   its own `data-state` (the "Далі" header above `.roadmap-next`, which isn't a `.roadmap-col`
   itself since its content is grouped sub-lists, not one flat `.roadmap-list`). */
.roadmap-col[data-state="done"] .roadmap-dot,
.roadmap-dot[data-state="done"] { background: #7fd8a6; }
.roadmap-col[data-state="next"] .roadmap-dot,
.roadmap-dot[data-state="next"] { background: var(--text-tertiary); }

.roadmap-next-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 2px;
}

@media (max-width: 980px) {
  .roadmap-next-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .roadmap-next-grid { grid-template-columns: 1fr; }
}

.roadmap-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 4px;
}

.roadmap-col-head h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0;
}

.roadmap-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.roadmap-list li {
  padding: 14px 0;
  border-top: 1px solid var(--border-subtle);
  font-size: 14.5px;
  line-height: 1.5;
}

.roadmap-list li:first-child {
  border-top: none;
}

.roadmap-list strong {
  display: block;
  font-weight: 600;
  margin-bottom: 3px;
  color: var(--text-primary);
}

.roadmap-list span {
  color: var(--text-secondary);
  font-size: 13.5px;
}

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

footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0 48px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-tertiary);
  font-size: 13.5px;
}

.footer-brand img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.footer-links {
  display: flex;
  gap: 22px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.footer-links a {
  text-decoration: none;
}

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

/* ---------- Android tester sign-up modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 7, 8, 0.68);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.modal-head h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.2px;
}

.modal-close {
  appearance: none;
  border: none;
  background: none;
  color: var(--text-tertiary);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  margin: -4px;
  border-radius: 6px;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-lede {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 20px;
}

#android-tester-form {
  display: grid;
  gap: 14px;
}

.modal-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.modal-field span {
  color: var(--text-secondary);
  font-weight: 550;
}

.modal-field input,
.modal-field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 10px 12px;
  color: var(--text-primary);
  font: inherit;
  font-size: 14.5px;
  resize: vertical;
}

.modal-field input:focus,
.modal-field textarea:focus {
  outline: none;
  border-color: var(--text-tertiary);
}

.modal-submit {
  appearance: none;
  border: none;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--on-accent) !important;
  font: inherit;
  font-size: 14.5px;
  font-weight: 650;
  padding: 12px 16px;
  cursor: pointer;
  margin-top: 4px;
}

.modal-submit:hover {
  background: var(--accent-strong);
}
