/* ==========================================================================
   AirAlert+ — design tokens
   ========================================================================== */
:root {
  --bg: #06111A;
  --bg-raised: #0B1B27;
  --bg-card: #0E212F;
  --accent: #FF4D43;
  --accent-dim: #C93A32;
  --text: #F4F7FA;
  --text-secondary: #93A6B5;
  --text-muted: #61717E;
  --border: rgba(244, 247, 250, 0.09);
  --border-strong: rgba(244, 247, 250, 0.16);
  --focus: #6FD4FF;
  --ok: #33C27C;

  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max-content: 1120px;
  --max-reading: 860px;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

ul, ol { color: var(--text-secondary); padding-left: 1.3em; }
li { margin-bottom: 0.5em; }

strong { color: var(--text); font-weight: 600; }

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

.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;
}

.skip-link {
  position: absolute;
  left: 1em;
  top: -3.5em;
  background: var(--accent);
  color: #fff;
  padding: 0.7em 1.1em;
  border-radius: var(--radius-s);
  z-index: 1000;
  transition: top 0.15s ease;
  font-weight: 600;
}
.skip-link:focus { top: 1em; }

.wrap {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 17, 26, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand .mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  display: block;
  flex: none;
}
.brand .plus { color: var(--accent); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--text); }
.main-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  flex: none;
}
.lang-switch a {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--text-muted);
}
.lang-switch a[aria-current="true"] {
  background: var(--text);
  color: var(--bg);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex: none;
  color: var(--text);
}
.menu-toggle svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-flex; }

  .mobile-nav {
    display: none;
    border-bottom: 1px solid var(--border);
    background: var(--bg-raised);
  }
  .mobile-nav.open { display: block; }
  .mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 8px 24px 18px;
  }
  .mobile-nav li { margin: 0; }
  .mobile-nav a {
    display: block;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
  }
  .mobile-nav li:last-child a { border-bottom: none; }
  .mobile-nav a[aria-current="page"] { color: var(--accent); }
}

@media (min-width: 861px) {
  .mobile-nav { display: none !important; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 88px 0 64px;
  text-align: center;
}
.mock-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.mock-live .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(51,194,124,0.6);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(51,194,124,0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(51,194,124,0); }
  100% { box-shadow: 0 0 0 0 rgba(51,194,124,0); }
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin-bottom: 20px;
}
.hero h1 .plus { color: var(--accent); }

.hero .lede {
  max-width: 620px;
  margin: 0 auto 36px;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.cta-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius-m);
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #ff6259; transform: translateY(-1px); }
.btn-primary svg { width: 18px; height: 18px; }

.hero .fineprint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* hero product shot */
.hero-shot {
  max-width: 280px;
  margin: 56px auto 0;
}
.hero-shot img {
  width: 100%;
  border-radius: 28px;
}

/* screenshot gallery */
.shot-gallery {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 24px 22px;
  margin: 0 -24px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.shot-gallery::-webkit-scrollbar { height: 6px; }
.shot-gallery::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.shot-gallery figure {
  flex: none;
  width: 200px;
  margin: 0;
  scroll-snap-align: start;
}
.shot-gallery img {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--border);
  display: block;
}
.shot-gallery figcaption {
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}
@media (max-width: 640px) {
  .shot-gallery { padding-left: 24px; padding-right: 24px; }
}

/* ==========================================================================
   Feature grid
   ========================================================================== */
.section { padding: 64px 0; }
.section-head { max-width: 620px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
.section-head p { font-size: 1rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 980px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 26px 22px;
}
.feature-card .icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,77,67,0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feature-card .icon svg { width: 19px; height: 19px; }
.feature-card h3 { font-size: 1.02rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.92rem; margin: 0; }

/* Safety note on home */
.safety-note {
  border-top: 1px solid var(--border);
  padding: 40px 0 64px;
}
.safety-note .box {
  max-width: var(--max-reading);
  margin: 0 auto;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}
.safety-note svg {
  width: 18px; height: 18px;
  flex: none;
  margin-top: 2px;
  color: var(--text-muted);
}

/* ==========================================================================
   Page header (non-home pages)
   ========================================================================== */
.page-hero {
  padding: 56px 0 20px;
}
.page-hero h1 { font-size: clamp(1.9rem, 4.6vw, 2.6rem); }
.page-hero .updated {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 10px;
}

/* ==========================================================================
   Legal / reading layout
   ========================================================================== */
.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0,1fr);
  gap: 48px;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 8px 24px 96px;
  align-items: start;
}
@media (max-width: 860px) {
  .legal-layout { grid-template-columns: 1fr; padding-top: 0; }
}

.toc {
  position: sticky;
  top: 96px;
  border-left: 2px solid var(--border);
  padding-left: 18px;
}
.toc-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 10px; }
.toc a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: inline-block;
}
.toc a:hover { color: var(--text); }
@media (max-width: 860px) {
  .toc { position: static; border-left: none; padding-left: 0; border: 1px solid var(--border); border-radius: var(--radius-m); padding: 16px 18px; }
}

.legal-content {
  max-width: var(--max-reading);
}
.legal-content h2 {
  font-size: 1.28rem;
  margin-top: 2.1em;
  padding-top: 0.2em;
  scroll-margin-top: 90px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li { font-size: 0.98rem; }
.legal-content ol.clauses {
  list-style: none;
  padding: 0;
  margin: 0;
}
.legal-content ol.clauses > li {
  padding: 18px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 90px;
}
.legal-content ol.clauses > li:first-child { border-top: none; padding-top: 0; }
.legal-content ol.clauses > li strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.02rem;
}
.legal-content .meta-block {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.legal-content .meta-block p { color: var(--text-muted); margin: 0 0 4px; }

/* ==========================================================================
   FAQ accordion
   ========================================================================== */
.faq-list {
  max-width: var(--max-reading);
  margin: 0 auto;
  padding: 0 24px 96px;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev {
  flex: none;
  width: 22px; height: 22px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.faq-item[open] summary .chev { transform: rotate(180deg); color: var(--accent); }
.faq-item .answer {
  padding: 0 4px 24px;
  color: var(--text-secondary);
  font-size: 0.96rem;
  max-width: 720px;
}
.faq-item summary:focus-visible { outline-offset: 4px; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 24px 100px;
}
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 36px 32px;
  text-align: center;
}
.contact-card .icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(255,77,67,0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.contact-card .icon svg { width: 24px; height: 24px; }
.contact-card h2 { font-size: 1.3rem; margin-bottom: 8px; }
.contact-card p.desc { margin-bottom: 22px; }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--radius-m);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  font-weight: 600;
  color: var(--text);
  font-size: 0.98rem;
  word-break: break-all;
}
.contact-link svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.contact-note {
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0 34px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-brand {
  font-weight: 700;
  color: var(--text);
  font-size: 0.98rem;
}
.footer-brand .plus { color: var(--accent); }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.footer-nav a {
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.footer-nav a:hover { color: var(--text); }
.footer-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
