/* Sovereign Logos — App landing page
   Tokens are lifted from sovereignlogos/DESIGN.md (dark brand-anchor theme).
   Shape language is angular (<=4px) per design.md; the app icon (squircle) and
   the device mockup (a real rounded phone) are deliberate real-world-object
   exceptions, confirmed with the operator. */

:root {
  /* surfaces */
  --bg: #0b0b0b;
  --s1: #110a1f;
  --s2: #1a0f2e;
  --s3: #2d1b4e;
  --royal: #4a2f80;
  /* accent (gold) */
  --gold: #d4a017;
  --gold-hi: #facc15;
  --gold-deep: #b8860b;
  --verm: #c44848;
  /* text */
  --ivory: #f7f1e3;
  --muted: #c4b1e0;
  --muted-2: #8f81a8;
  /* type */
  --display: 'Cinzel', Georgia, serif;
  --body: 'EB Garamond', 'Hoefler Text', Georgia, serif;
  --ui: 'Inter', system-ui, -apple-system, sans-serif;
  /* shape + motion */
  --r: 4px;
  --maxw: 1140px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --reveal-dur: 720ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ivory);
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.6;
  font-feature-settings:
    'onum' 1,
    'kern' 1,
    'liga' 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--gold);
  text-decoration: none;
  transition: color 200ms var(--ease);
}
a:hover {
  color: var(--gold-hi);
}
:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
  border-radius: 2px;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: #0b0b0b;
  padding: 10px 16px;
  font-family: var(--ui);
  z-index: 100;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(18px, 5vw, 40px);
  background: rgba(17, 10, 31, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212, 160, 23, 0.14);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ivory);
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 17px;
}
.wordmark-cross {
  filter: drop-shadow(0 0 6px rgba(212, 160, 23, 0.5));
}
.header-cta {
  font-family: var(--ui);
  font-weight: 600;
  font-size: 14px;
  color: #0b0b0b;
  background: var(--gold);
  padding: 9px 18px;
  border-radius: var(--r);
  transition:
    background 200ms var(--ease),
    transform 200ms var(--ease);
}
.header-cta:hover {
  background: var(--gold-hi);
  color: #0b0b0b;
  transform: translateY(-1px);
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(56px, 9vw, 110px) clamp(18px, 5vw, 40px) clamp(20px, 4vw, 40px);
  overflow: hidden;
}
/* Nebula hero background — matches the homepage hero (object-cover center,
   black/20 darken, center vignette to rgba(11,11,11,0.7)), fading into the page. */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0b0b0b url('/app/assets/nebula-bg.jpg') center / cover no-repeat;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 28%, rgba(11, 11, 11, 0.72) 100%),
    linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.22)),
    linear-gradient(180deg, transparent 62%, var(--bg) 100%);
}
.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 760px;
  background:
    radial-gradient(60% 60% at 50% 22%, rgba(74, 47, 128, 0.55), transparent 70%),
    radial-gradient(40% 40% at 50% 14%, rgba(212, 160, 23, 0.22), transparent 70%);
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
}
.app-icon {
  width: clamp(96px, 14vw, 128px);
  height: clamp(96px, 14vw, 128px);
  margin: 0 auto 26px;
  border-radius: 22.37%; /* Apple's app-icon corner ratio — reads as a real App Store icon */
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(212, 160, 23, 0.18);
}
.eyebrow {
  font-family: var(--ui);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 14px;
}
.hero-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: 0.01em;
  margin: 0 0 22px;
  text-wrap: balance;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.6),
    0 8px 34px rgba(0, 0, 0, 0.5);
}
.hero-lede {
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.55;
  color: var(--ivory);
  max-width: 30em;
  margin: 0 auto 26px;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.7),
    0 2px 18px rgba(0, 0, 0, 0.5);
}
.hero-lede em {
  color: var(--gold-hi);
  font-style: italic;
}
.hero-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 0;
  margin: 0 0 30px;
}
.hero-tags li {
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ivory);
  border: 1px solid rgba(212, 160, 23, 0.5);
  border-radius: var(--r);
  padding: 7px 15px;
  background: rgba(11, 11, 11, 0.58);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

/* CTA row */
.cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.badge-link {
  display: inline-flex;
  border-radius: 10px; /* badges are platform artifacts; keep their native radius */
  transition:
    transform 200ms var(--ease),
    box-shadow 200ms var(--ease);
}
.badge-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}
.badge-link img {
  border-radius: 10px;
}
.play-badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  height: 54px;
  padding: 0 20px 0 18px;
  border: 1px solid #a6a6a6;
  border-radius: 10px;
  background: #000;
  font-family: var(--ui);
  line-height: 1.1;
}
.play-eyebrow {
  font-size: 9px;
  letter-spacing: 0.06em;
  color: #fff;
}
.play-name {
  font-size: 19px;
  font-weight: 500;
  color: #fff;
}
.hero-note {
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ivory);
  margin: 18px 0 0;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.75),
    0 2px 14px rgba(0, 0, 0, 0.55);
}

/* Hero QR — refined secondary affordance for desktop visitors (scan to install).
   Hidden on touch widths, where tapping the badge is the path. */
.hero-scan {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin: 28px auto 0;
  padding: 12px 20px 12px 12px;
  border: 1px solid rgba(212, 160, 23, 0.42);
  border-radius: var(--r);
  background: rgba(11, 11, 11, 0.66);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.hero-qr-frame {
  display: inline-flex;
  background: #fff;
  padding: 8px;
  border-radius: var(--r);
  line-height: 0;
}
.hero-qr {
  width: 92px;
  height: 92px;
  display: block;
}
.hero-scan-label {
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--ivory);
  text-align: left;
}
@media (max-width: 720px) {
  .hero-scan {
    display: none;
  }
}

/* ── Device mockup ──────────────────────────────────────── */
.hero-device {
  position: relative;
  z-index: 1;
  margin: clamp(36px, 6vw, 64px) auto 0;
  width: fit-content;
  will-change: transform;
}
.device {
  position: relative;
  width: clamp(258px, 30vw, 320px);
  padding: 12px;
  background: linear-gradient(160deg, #2a2540, #0d0a16);
  border-radius: 46px; /* real phone — rounded by nature */
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(212, 160, 23, 0.14),
    inset 0 0 0 2px rgba(255, 255, 255, 0.04);
}
.device--sm {
  width: clamp(232px, 26vw, 280px);
  border-radius: 40px;
}
.device-island {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 32%;
  height: 22px;
  background: #000;
  border-radius: 14px;
  z-index: 2;
}
.device-screen {
  width: 100%;
  height: auto;
  border-radius: 34px;
  display: block;
}
.device--sm .device-screen {
  border-radius: 30px;
}

/* ── Trust strip ────────────────────────────────────────── */
.trust {
  border-top: 1px solid rgba(212, 160, 23, 0.12);
  border-bottom: 1px solid rgba(212, 160, 23, 0.12);
  background: linear-gradient(180deg, rgba(17, 10, 31, 0.6), rgba(11, 11, 11, 0));
}
.trust-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px clamp(18px, 5vw, 40px);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 38px;
  justify-content: center;
}
.trust-item {
  font-family: var(--ui);
  font-size: 14.5px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.trust-mark {
  color: var(--gold);
}

/* ── Feature sections ───────────────────────────────────── */
.feature {
  padding: clamp(56px, 9vw, 104px) clamp(18px, 5vw, 40px);
}
.feature-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.feature--alt .feature-inner {
  grid-template-columns: 0.95fr 1.05fr;
}
.feature-kicker {
  font-family: var(--ui);
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 14px;
}
.feature-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.12;
  margin: 0 0 18px;
  text-wrap: balance;
}
.feature-body {
  font-size: clamp(17px, 1.9vw, 20px);
  color: var(--muted);
  max-width: 34em;
  margin: 0;
}
.feature-visual {
  display: flex;
  justify-content: center;
}

/* stat card (angular, per design.md) */
.stat-card {
  text-align: center;
  padding: clamp(36px, 5vw, 56px) clamp(28px, 4vw, 48px);
  background: linear-gradient(165deg, var(--s2), var(--s1));
  border: 1px solid rgba(212, 160, 23, 0.22);
  border-radius: var(--r);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
}
.stat-number {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(48px, 8vw, 84px);
  line-height: 1;
  color: var(--gold);
  letter-spacing: 0.01em;
}
.stat-label {
  display: block;
  font-family: var(--ui);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 13px;
  color: var(--ivory);
  margin-top: 10px;
}
.stat-sub {
  color: var(--muted);
  font-size: 17px;
  margin: 16px auto 0;
  max-width: 22em;
}

/* ── Scan section ───────────────────────────────────────── */
.scan {
  padding: clamp(56px, 9vw, 104px) clamp(18px, 5vw, 40px);
  background: radial-gradient(80% 120% at 80% 0%, rgba(74, 47, 128, 0.32), transparent 60%);
}
.scan-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.scan-url {
  font-family: var(--ui);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold);
  font-size: 18px;
  margin: 18px 0 0;
}
.scan-qr {
  background: #fff;
  padding: 18px;
  border-radius: var(--r);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
  line-height: 0;
}
.scan-qr img {
  width: clamp(200px, 24vw, 260px);
  height: auto;
}

/* ── Privacy ────────────────────────────────────────────── */
.privacy {
  padding: clamp(48px, 7vw, 88px) clamp(18px, 5vw, 40px);
  text-align: center;
}
.privacy-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.privacy-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 38px);
  margin: 0 0 36px;
}
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.privacy-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 20px;
  background: var(--s1);
  border: 1px solid rgba(212, 160, 23, 0.16);
  border-radius: var(--r);
}
.privacy-item .trust-mark {
  font-size: 22px;
  margin-bottom: 6px;
}
.privacy-item strong {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  color: var(--ivory);
}
.privacy-item span:last-child {
  color: var(--muted);
  font-size: 16px;
}

/* ── Final CTA ──────────────────────────────────────────── */
.final-cta {
  text-align: center;
  padding: clamp(56px, 9vw, 110px) clamp(18px, 5vw, 40px);
  background: linear-gradient(180deg, rgba(11, 11, 11, 0), rgba(17, 10, 31, 0.7));
}
.final-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 4.4vw, 52px);
  line-height: 1.1;
  margin: 0 0 32px;
  text-wrap: balance;
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid rgba(212, 160, 23, 0.14);
  background: var(--s1);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px clamp(18px, 5vw, 40px);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ivory);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-family: var(--ui);
  font-size: 14px;
}
.footer-links a {
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--gold);
}
.footer-legal {
  flex-basis: 100%;
  font-family: var(--ui);
  font-size: 13px;
  color: var(--muted-2);
  margin: 6px 0 0;
}

/* ── Motion: reveals + parallax ─────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity var(--reveal-dur) var(--ease),
    transform var(--reveal-dur) var(--ease);
}
.reveal[data-delay='1'] {
  transition-delay: 90ms;
}
.reveal[data-delay='2'] {
  transition-delay: 180ms;
}
.reveal[data-delay='3'] {
  transition-delay: 270ms;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 860px) {
  .feature-inner,
  .scan-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .feature--alt .feature-visual {
    order: -1;
  }
  .feature-body,
  .stat-sub {
    margin-left: auto;
    margin-right: auto;
  }
  .scan-inner {
    justify-items: center;
  }
  .privacy-grid {
    grid-template-columns: 1fr;
  }
  .site-header .header-cta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-glow,
  .hero-device {
    transform: none !important;
  }
  * {
    transition-duration: 0.001ms !important;
  }
}
