:root {
  --navy: #101a5c;
  --blue: #2b5fe8;
  --blue-soft: #5b8def;
  --orange: #ffa34a;
  --purple: #7f5bff;
  --teal: #21c0c7;
  --dawn: #f2c99a;

  --bg: #f6f8ff;
  --bg-alt: #ffffff;
  --card: #ffffff;
  --text: #16204a;
  --muted: #5a6486;
  --line: #e1e6f5;
  --shadow: 0 10px 30px rgba(24, 40, 120, 0.08);

  --radius: 20px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1240;
    --bg-alt: #0e174d;
    --card: #142060;
    --text: #eef1ff;
    --muted: #a6b0da;
    --line: #26337d;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

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

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

.container { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.narrow { max-width: 620px; text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px max(20px, calc((100% - var(--max)) / 2));
  background: rgba(16, 26, 92, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img { border-radius: 9px; }
.site-header nav { display: flex; gap: 22px; }
.site-header nav a {
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.85;
}
.site-header nav a:hover { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: min(92vh, 820px);
  display: grid;
  place-items: center;
  padding: 120px 20px 160px;
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, #101a5c 0%, #1d3cae 38%, #2b5fe8 62%, #6ea5ec 85%, #a9cbe9 100%);
}
.hero-inner { position: relative; z-index: 2; max-width: 720px; }
.eyebrow {
  margin: 0 0 14px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dawn);
}
.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.8rem, 8vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.lede {
  margin: 0 auto 32px;
  max-width: 520px;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: rgba(255, 255, 255, 0.86);
}
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* warm dawn glow at the bottom, like the logo */
.horizon {
  position: absolute;
  left: 50%;
  bottom: -140px;
  width: 900px;
  height: 340px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255, 196, 130, 0.75) 0%, rgba(255, 196, 130, 0) 68%);
  z-index: 1;
}

/* stars */
.stars, .stars::before, .stars::after {
  position: absolute;
  inset: 0;
  content: "";
  background-repeat: repeat;
}
.stars {
  z-index: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 18%, #fff 60%, transparent),
    radial-gradient(1.2px 1.2px at 28% 9%,  #fff 60%, transparent),
    radial-gradient(1.8px 1.8px at 46% 22%, #fff 60%, transparent),
    radial-gradient(1.2px 1.2px at 63% 8%,  #fff 60%, transparent),
    radial-gradient(1.6px 1.6px at 79% 19%, #fff 60%, transparent),
    radial-gradient(1.2px 1.2px at 91% 11%, #fff 60%, transparent),
    radial-gradient(1.2px 1.2px at 8% 40%,  #fff 60%, transparent),
    radial-gradient(1.4px 1.4px at 88% 38%, #fff 60%, transparent);
  opacity: 0.8;
  animation: twinkle 6s ease-in-out infinite alternate;
}
.stars::before {
  background-image:
    radial-gradient(1.2px 1.2px at 20% 30%, #fff 60%, transparent),
    radial-gradient(1.4px 1.4px at 54% 14%, #fff 60%, transparent),
    radial-gradient(1.2px 1.2px at 72% 30%, #fff 60%, transparent),
    radial-gradient(1.2px 1.2px at 36% 44%, #fff 60%, transparent);
  animation: twinkle 4s ease-in-out infinite alternate-reverse;
}
@keyframes twinkle { from { opacity: 0.35; } to { opacity: 1; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, .store:focus-visible, nav a:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
.btn-primary { background: #fff; color: var(--navy); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.btn-ghost { color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.55); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section h2 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.section-sub { margin: 0 0 40px; color: var(--muted); font-size: 1.05rem; }

/* ---------- App cards ---------- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr));
  gap: 24px;
}
.app-card {
  --accent: var(--blue);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.app-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(24, 40, 120, 0.14); }
.app-head { display: flex; align-items: center; gap: 18px; }
.app-icon {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 22.37%;
  box-shadow: 0 6px 16px rgba(30, 40, 120, 0.25);
}
.app-titles h3, .dlg-head h3 {
  margin: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.native {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0;
}
.app-subtitle { margin: 2px 0 0; color: var(--muted); font-size: 0.95rem; }
.app-tagline { margin: 0; font-size: 1.08rem; font-weight: 600; }
.app-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.96rem;
}
.app-points li { position: relative; padding-inline-start: 22px; }
.app-points li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.app-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.app-foot .link-btn { margin-inline-start: auto; }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-soon { background: color-mix(in srgb, var(--orange) 22%, transparent); color: #a25a08; }
.badge-live { background: color-mix(in srgb, var(--teal) 24%, transparent); color: #0b7a80; }
@media (prefers-color-scheme: dark) {
  .badge-soon { color: #ffc27d; }
  .badge-live { color: #6ee3e8; }
}

.link-btn {
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: 0;
  padding: 8px 4px;
  cursor: pointer;
}
.link-btn::after { content: " →"; }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible, .dlg-close:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.store {
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}
.store:hover { background: var(--blue); }
@media (prefers-color-scheme: dark) { .store { background: var(--blue); } .store:hover { background: var(--blue-soft); } }

/* ---------- Detail dialog ---------- */
.app-dialog {
  width: min(600px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(8, 14, 60, 0.45);
}
.app-dialog::backdrop { background: rgba(8, 14, 60, 0.6); backdrop-filter: blur(4px); }
.dlg-close {
  position: absolute;
  top: 14px;
  inset-inline-end: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--line);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.dlg-head { --accent: var(--blue); display: flex; align-items: center; gap: 18px; padding-inline-end: 40px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { padding: 4px 12px; border-radius: 999px; background: var(--line); font-size: 0.8rem; font-weight: 600; }
.app-dialog .dlg-summary { margin: 20px 0 0; font-size: 1.05rem; }
.app-dialog h4 { margin: 22px 0 6px; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.app-dialog p { margin: 0; }
.dlg-list { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }
.dlg-cta { margin-top: 26px; }
.btn-sm { padding: 10px 22px; }
.app-dialog .btn-primary { background: var(--blue); color: #fff; }

/* ---------- Values ---------- */
.values {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}
.value h3 { margin: 14px 0 6px; font-size: 1.15rem; }
.value p { margin: 0; color: var(--muted); }
.dot { display: block; width: 44px; height: 44px; border-radius: 14px; }
.dot-blue   { background: linear-gradient(135deg, #386bf5, #5b8def); }
.dot-orange { background: linear-gradient(135deg, #ffa34a, #ffc070); }
.dot-teal   { background: linear-gradient(135deg, #21c0c7, #58dcdf); }

/* ---------- Contact ---------- */
.contact .btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 24px rgba(43, 95, 232, 0.35);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 28px 0;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
}
.brand-sm { color: #fff; font-size: 0.95rem; }
.brand-sm img { border-radius: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .site-header nav { gap: 16px; }
  .brand span { display: none; }
  .section { padding: 72px 0; }
  .app-dialog { padding: 24px 20px; }
  .dlg-head { flex-direction: column; align-items: flex-start; }
  .footer-inner { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stars, .stars::before { animation: none; }
  .btn, .app-card { transition: none; }
  .app-card:hover { transform: none; }
}
