:root {
  color-scheme: light;
  --ink: #122019;
  --muted: #607069;
  --green: #187951;
  --green-dark: #105e3e;
  --blue: #1670b7;
  --yellow: #f2c84b;
  --red: #c93631;
  --line: #dce5e0;
  --canvas: #f4f7f5;
  --surface: #ffffff;
  --blue-soft: #e7f2fa;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; }
.wordmark img { padding: 5px; background: #eaf3f8; border-radius: 7px; }
.header-actions { display: flex; align-items: center; gap: 22px; color: var(--muted); font-weight: 650; }
.header-actions a:hover, .footer-links a:hover { color: var(--green); }
.language-switch {
  width: 44px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
}

main { overflow: hidden; }
.hero {
  position: relative;
  min-height: 680px;
  padding: 100px max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #edf6fb;
}
.hero-copy { position: relative; z-index: 2; width: min(610px, 58%); }
.eyebrow { margin: 0 0 14px; color: var(--blue); font-size: 13px; font-weight: 850; letter-spacing: .08em; }
h1 { margin: 0; max-width: 690px; font-size: clamp(44px, 5.4vw, 72px); line-height: 1.02; letter-spacing: 0; }
h2 { margin: 0; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.1; letter-spacing: 0; }
h3 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: 0; }
.hero-lead { max-width: 560px; margin: 24px 0 30px; color: #405c6d; font-size: 20px; }
.download-row { display: flex; align-items: center; gap: 24px; }
.app-store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font-weight: 780;
  transition: background .2s ease, transform .2s ease;
}
.app-store-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.qr-block { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; max-width: 190px; }
.qr-block img { width: 92px; height: 92px; border: 1px solid var(--line); }
.availability { margin: 15px 0 0; color: var(--muted); font-size: 14px; }
.hero-screens { position: absolute; inset: 34px max(0px, calc((100vw - 1240px) / 2)) 0 auto; width: 48%; pointer-events: none; }
.phone { position: absolute; width: min(360px, 29vw); border: 1px solid #d5dfda; border-radius: 28px 28px 0 0; box-shadow: 0 24px 55px rgba(31, 68, 53, .16); }
.phone-front { right: 0; top: 78px; z-index: 2; }
.phone-back { right: min(270px, 19vw); top: 0; opacity: .82; }

.features { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 92px 0; }
.section-heading { max-width: 680px; margin-bottom: 44px; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature-grid article { min-height: 220px; padding: 32px 32px 36px 0; }
.feature-grid article + article { padding-left: 32px; border-left: 1px solid var(--line); }
.feature-number { display: block; margin-bottom: 34px; color: var(--green); font-weight: 850; }
.feature-grid p { margin: 12px 0 0; color: var(--muted); }

.product-band { padding: 90px max(24px, calc((100vw - 1180px) / 2)); display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 70px; border-top: 1px solid var(--line); background: #eaf2ed; }
.product-band-alerts { background: #edf5f9; }
.product-band-shelters { background: var(--surface); }
.product-band-preparedness { background: #eaf2ed; }
.product-band-reverse { grid-template-columns: 1.2fr .8fr; }
.product-band-reverse .product-copy { order: 2; }
.product-band-reverse .screen-pair { order: 1; }
.product-copy p:not(.eyebrow) { margin: 24px 0; color: var(--muted); font-size: 18px; }
.text-link { color: var(--green); font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.screen-pair { height: 560px; display: flex; align-items: flex-start; justify-content: center; gap: 22px; overflow: hidden; }
.screen-pair img { width: min(305px, 45%); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 20px 45px rgba(28, 54, 43, .13); }
.screen-pair img + img { margin-top: 48px; }

.official-notice { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 38px 0; display: grid; grid-template-columns: 140px 1fr; gap: 24px; border-bottom: 1px solid var(--line); }
.official-notice strong { color: var(--red); }
.official-notice p { margin: 0; color: var(--muted); }
.final-download { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; }
.final-download img { border-radius: 20px; }
.final-download h2 { font-size: 30px; }
.final-download p { margin: 8px 0 0; color: var(--muted); }

footer { width: min(1180px, calc(100% - 40px)); min-height: 110px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-brand { color: var(--ink); font-size: 16px; }
.footer-links { display: flex; gap: 22px; }

.legal-page { width: min(820px, calc(100% - 40px)); margin: 0 auto; padding: 64px 0 90px; }
.legal-page h1 { font-size: clamp(38px, 6vw, 58px); }
.legal-page h2 { margin: 40px 0 10px; font-size: 23px; }
.legal-page p, .legal-page li { color: #45554d; }
.legal-page ul { padding-left: 22px; }
.legal-page .notice { margin: 28px 0; padding: 18px; border-left: 4px solid var(--red); background: #fff; }
.legal-page .contact { color: var(--green); font-weight: 800; }
.language-nav { display: flex; gap: 18px; margin: 20px 0; color: var(--green); font-weight: 750; }
.language-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
[hidden] { display: none !important; }
.divider { margin: 55px 0; border: 0; border-top: 1px solid var(--line); }

@media (max-width: 1050px) and (min-width: 821px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid article { padding: 30px; }
  .feature-grid article + article { padding-left: 30px; border-left: 0; }
  .feature-grid article:nth-child(even) { border-left: 1px solid var(--line); }
  .feature-grid article:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .product-band { gap: 42px; }
}

@media (max-width: 820px) {
  .site-header { width: min(100% - 28px, 1180px); }
  .header-actions a { display: none; }
  .hero { min-height: 760px; padding: 58px 20px 0; align-items: flex-start; }
  .hero-copy { width: 100%; }
  h1 { font-size: clamp(42px, 12vw, 60px); }
  .hero-lead { font-size: 18px; }
  .qr-block { display: none; }
  .hero-screens { inset: auto 0 30px; width: 100%; height: 330px; }
  .phone { width: 190px; border-radius: 20px 20px 0 0; }
  .phone-front { right: 8%; top: 0; }
  .phone-back { right: auto; left: 7%; top: 30px; }
  .features { padding: 38px 0 64px; }
  .section-heading { margin-bottom: 28px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid article { min-height: 0; padding: 26px 0; }
  .feature-grid article + article { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .feature-number { margin-bottom: 15px; }
  .product-band { grid-template-columns: 1fr; gap: 44px; padding-top: 64px; padding-bottom: 0; }
  .product-band-reverse .product-copy, .product-band-reverse .screen-pair { order: initial; }
  .screen-pair { height: 440px; }
  .official-notice { grid-template-columns: 1fr; gap: 8px; }
  .final-download { grid-template-columns: auto 1fr; }
  .final-download .app-store-button { grid-column: 1 / -1; }
  footer { grid-template-columns: 1fr; gap: 18px; padding: 30px 0; }
}

@media (max-width: 430px) {
  .hero { min-height: 660px; }
  .hero-screens { height: 270px; bottom: 24px; }
  .phone { width: 150px; }
  .phone-front { right: 6%; top: 0; }
  .phone-back { left: 5%; top: 16px; }
  .app-store-button { width: 100%; }
  .download-row { display: block; }
  .screen-pair { height: 350px; gap: 10px; }
  .screen-pair img { border-radius: 16px; }
  .final-download img { width: 70px; height: 70px; }
  .final-download h2 { font-size: 24px; }
  .footer-links { flex-direction: column; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
/* Family invitation */
.invite-page { min-height: 100vh; background: #f4f7f5; }
.invite-main { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 32px 20px; }
.invite-card { width: min(100%, 560px); padding: 44px; text-align: center; border: 1px solid #d5dfd9; border-radius: 8px; background: #fff; }
.invite-card h1 { margin: 12px 0 10px; font-size: clamp(30px, 6vw, 46px); line-height: 1.08; }
.invite-card > p:not(.eyebrow):not(.invite-privacy):not(.invite-return-title):not(.invite-family-name) { margin: 0 auto 20px; max-width: 430px; color: #58625c; line-height: 1.55; }
.invite-card > .invite-family-name { margin: -9px auto 11px; color: #173d2b; font-size: clamp(20px, 5vw, 27px); line-height: 1.25; font-weight: 850; }
.invite-icon { width: 72px; height: 72px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 8px; background: #e8f5ee; }
.invite-steps { max-width: 430px; margin: 0 auto 22px; padding-left: 24px; color: #405047; text-align: left; line-height: 1.5; }
.invite-steps li + li { margin-top: 8px; }
.invite-steps li::marker { color: var(--green); font-weight: 800; }
.invite-primary { width: 100%; }
.invite-installed-label { margin: 18px 0 9px; color: #58625c; font-size: 15px; }
.invite-secondary {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid #8ab59f;
  border-radius: 7px;
  background: #fff;
  color: var(--green-dark);
  cursor: pointer;
  font-weight: 780;
  transition: border-color .2s ease, background .2s ease;
}
.invite-secondary:hover { border-color: var(--green); background: #eff8f3; }
.invite-installed.text-link { display: inline-block; margin-top: 14px; padding: 0; border: 0; background: transparent; cursor: pointer; font: inherit; }
.invite-return-title { margin: 0 auto 16px; color: #263d31; font-size: 17px; line-height: 1.4; font-weight: 800; }
.invite-privacy { margin: 30px 0 0; padding-top: 20px; border-top: 1px solid #e1e6e3; color: #78827c; font-size: 13px; line-height: 1.5; }
@media (max-width: 600px) { .invite-card { padding: 30px 20px; } }
