:root {
  --blue-900: #0a163d;
  --blue-800: #102054;
  --blue-700: #163083;
  --blue-600: #1f3fa6;
  --gold: #e3a72b;
  --gold-light: #ffdf8a;
  --ink: #0a163d;
  --paper: #f6f8ff;
  --card: #ffffff;
  --text: #1b2347;
  --muted: #5b658c;
  --border: #e0e5f5;
  --maxw: 880px;
  --radius: 18px;
  --shadow: 0 10px 40px rgba(10, 22, 61, 0.12);
}

* { box-sizing: border-box; }

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

html { -webkit-text-size-adjust: 100%; }

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

a { color: var(--blue-600); }
a:hover { color: var(--blue-700); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 248, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.1rem;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; display: block; }
.brand span b { color: var(--gold); }
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  margin-left: 18px;
}
.nav a:hover { color: var(--blue-700); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(1200px 600px at 50% -5%, rgba(227, 167, 43, 0.22), transparent 60%),
    linear-gradient(180deg, var(--blue-700), var(--blue-900) 70%);
  background-size: 100% 100%, 100% 200%;
  animation: heroShift 16s ease-in-out infinite alternate;
  color: #eaf0ff;
  text-align: center;
  padding: 84px 20px 92px;
}
/* rotating sunburst rays behind the icon (echoes the app art) */
.hero::before {
  content: "";
  position: absolute;
  top: -10%;
  left: 50%;
  width: 150vw;
  height: 150vw;
  max-width: 1100px;
  max-height: 1100px;
  transform: translate(-50%, -42%);
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 223, 138, 0.10) 0deg 6deg,
    transparent 6deg 12deg
  );
  -webkit-mask-image: radial-gradient(closest-side, #000 0%, transparent 72%);
  mask-image: radial-gradient(closest-side, #000 0%, transparent 72%);
  animation: spin 70s linear infinite;
  z-index: -1;
  pointer-events: none;
}
/* drifting sparkle field */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255, 223, 138, 0.8), transparent),
    radial-gradient(2px 2px at 75% 22%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 60% 65%, rgba(255, 223, 138, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 35% 75%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(2px 2px at 88% 60%, rgba(255, 223, 138, 0.6), transparent);
  animation: twinkle 5s ease-in-out infinite alternate;
  z-index: -1;
  pointer-events: none;
}
.hero > * { position: relative; }
.hero .app-icon {
  width: 168px;
  height: 168px;
  border-radius: 36px;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 223, 138, 0.25),
    0 0 60px rgba(227, 167, 43, 0.45);
  margin-bottom: 26px;
  animation: floaty 6s ease-in-out infinite, glowPulse 3.5s ease-in-out infinite;
}
.hero h1 {
  margin: 0 0 6px;
  font-size: clamp(2.1rem, 6vw, 3.2rem);
  letter-spacing: -0.02em;
}
.hero h1 b { color: var(--gold-light); }
.hero .tagline {
  margin: 0 auto 28px;
  max-width: 560px;
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  color: #c3cdf0;
}

/* Buttons */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-block;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: #3a2906;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(227, 167, 43, 0.4);
  transition: transform 0.12s ease, box-shadow 0.25s ease;
}
/* shimmer sweep (gold primary only) */
.btn:not(.secondary)::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  transform: skewX(-20deg);
  animation: shimmer 3.2s ease-in-out infinite;
}
.btn:hover {
  transform: translateY(-2px);
  color: #3a2906;
  box-shadow: 0 12px 32px rgba(227, 167, 43, 0.6);
}
.btn:active { transform: translateY(0); }
.btn.secondary {
  background: transparent;
  color: #eaf0ff;
  border: 1px solid rgba(234, 240, 255, 0.35);
  box-shadow: none;
  margin-left: 10px;
}
.device-note {
  margin-top: 18px;
  font-size: 0.85rem;
  color: #9fabd6;
}

/* Features */
.features {
  padding: 64px 0;
}
.features h2, .section h2 {
  text-align: center;
  font-size: 1.7rem;
  margin: 0 0 8px;
  color: var(--ink);
}
.features h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: 12px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
}
.features .sub {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 40px;
  max-width: 540px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.feature {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feature::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(10, 22, 61, 0.16);
  border-color: rgba(227, 167, 43, 0.5);
}
.feature:hover::before { transform: scaleX(1); }
.feature .emoji {
  font-size: 1.7rem;
  display: block;
  margin-bottom: 10px;
}
.feature h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--ink); }
.feature p { margin: 0; color: var(--muted); font-size: 0.96rem; }

/* CTA band */
.cta {
  scroll-margin-top: 76px;
  position: relative;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(120deg, var(--blue-800), var(--blue-600), var(--blue-700), var(--blue-900));
  background-size: 300% 300%;
  animation: gradientPan 12s ease infinite;
  color: #eaf0ff;
  padding: 64px 20px;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 240px at 50% 0%, rgba(227, 167, 43, 0.22), transparent 70%);
  pointer-events: none;
}
.cta > * { position: relative; }
.cta h2 { color: #fff; margin: 0 0 8px; font-size: 1.6rem; }
.cta p { color: #c3cdf0; margin: 0 0 24px; }

/* Content pages */
.section { padding: 56px 0; }
.doc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px clamp(20px, 4vw, 44px);
  box-shadow: var(--shadow);
}
.doc h1 { margin-top: 0; color: var(--ink); font-size: 2rem; letter-spacing: -0.01em; }
.doc h2 { color: var(--blue-700); font-size: 1.2rem; margin: 28px 0 6px; }
.doc .updated { color: var(--muted); font-size: 0.9rem; margin-top: -6px; }
.doc p, .doc li { color: var(--text); }
.doc .lead { font-size: 1.1rem; }
.doc code {
  background: #eef1fb;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.9em;
}
.page-hero {
  background: linear-gradient(180deg, var(--blue-800), var(--blue-900));
  color: #eaf0ff;
  text-align: center;
  padding: 48px 20px;
}
.page-hero h1 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.6rem); }
.page-hero h1 b { color: var(--gold-light); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.site-footer a { color: var(--muted); text-decoration: none; margin-left: 18px; }
.site-footer a:first-child { margin-left: 0; }
.site-footer a:hover { color: var(--blue-700); }

@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .btn.secondary { margin-left: 0; margin-top: 10px; display: inline-block; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .site-footer nav a { margin-left: 0; margin-right: 18px; }
}

/* Animations */
@keyframes spin {
  to { transform: translate(-50%, -42%) rotate(360deg); }
}
@keyframes twinkle {
  from { opacity: 0.35; }
  to   { opacity: 0.9; }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 18px 50px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,223,138,0.25), 0 0 50px rgba(227,167,43,0.35);
  }
  50% {
    box-shadow: 0 18px 50px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,223,138,0.45), 0 0 80px rgba(227,167,43,0.65);
  }
}
@keyframes shimmer {
  0%   { left: -120%; }
  60%, 100% { left: 130%; }
}
@keyframes heroShift {
  from { background-position: 0% 0%, 0% 0%; }
  to   { background-position: 0% 0%, 0% 100%; }
}
@keyframes gradientPan {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .hero::before,
  .hero::after,
  .hero .app-icon,
  .btn:not(.secondary)::after,
  .cta {
    animation: none !important;
  }
}
