/* Riftseed — Cosmic Toy Dark Design System */

:root {
  --bg: #110d1e;
  --bg-deep: #0b0816;
  --surface: #211730;
  --surface-raised: #2d2040;
  --surface-recessed: #181228;
  --rim: rgba(168, 128, 194, 0.22);
  --rim-strong: rgba(230, 107, 98, 0.45);
  --coral: #e66b62;
  --coral-bright: #ee7769;
  --coral-deep: #b63e49;
  --gold: #ffb769;
  --gold-soft: rgba(255, 183, 105, 0.14);
  --violet: #b68df2;
  --green: #69e291;
  --ink: #f7ebdd;
  --ink-secondary: #d7cbe5;
  --ink-muted: #a696ba;
  --shadow-lg: 0 24px 64px rgba(6, 4, 14, 0.65);
  --shadow-card: 0 12px 32px rgba(8, 5, 18, 0.45);
  --radius-card: 22px;
  --radius-pill: 999px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  background-color: var(--bg-deep);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at 18% 12%, rgba(169, 102, 214, 0.14), transparent 44%),
              radial-gradient(circle at 82% 24%, rgba(230, 107, 98, 0.12), transparent 40%),
              linear-gradient(180deg, #130e22 0%, #0d0a18 55%, #120d20 100%);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* Subtle cosmic starfield texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 14% 22%, rgba(247, 235, 221, 0.45) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 38% 14%, rgba(255, 183, 105, 0.42) 50%, transparent 100%),
    radial-gradient(1px 1px at 67% 32%, rgba(247, 235, 221, 0.36) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 86% 18%, rgba(230, 107, 98, 0.4) 50%, transparent 100%),
    radial-gradient(1px 1px at 24% 68%, rgba(247, 235, 221, 0.3) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 78% 76%, rgba(255, 183, 105, 0.34) 50%, transparent 100%);
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== NAV ===== */
.site-nav {
  position: relative;
  z-index: 10;
  max-width: 1160px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: 0 4px 16px rgba(230, 107, 98, 0.25);
  border: 1px solid rgba(255, 183, 105, 0.24);
  display: block;
}

.brand-wordmark {
  height: 24px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: var(--ink-secondary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.18s ease;
}

.nav-links a:hover {
  color: var(--ink);
  text-decoration: none;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, #b8404d 0%, #8d283b 100%);
  color: #fff !important;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 183, 105, 0.35);
  box-shadow: 0 6px 18px rgba(182, 62, 73, 0.35);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--rim);
  border-radius: 12px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #100c1c;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 24px 36px;
  gap: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.nav-drawer.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.22s ease;
}

.nav-drawer-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-close {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--rim);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.nav-drawer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
}

.nav-drawer-links a {
  font-family: 'Fredoka', sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

@media (max-width: 780px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ===== HERO ===== */
.hero {
  padding: 36px 0 64px;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 44px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 24px 0 48px;
    gap: 36px;
    text-align: center;
  }
}

.kicker-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 183, 105, 0.1);
  border: 1px solid rgba(255, 183, 105, 0.28);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 18px;
}

.hero h1 .accent {
  background: linear-gradient(90deg, #ff9966 0%, #ff6b6b 55%, #ffb769 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 18px;
  color: var(--ink-secondary);
  max-width: 560px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .hero-lead { margin-inline: auto; }
}

.hero-points {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-bottom: 30px;
  max-width: 520px;
}

@media (max-width: 900px) {
  .hero-points {
    margin-inline: auto;
    text-align: left;
  }
}

.hero-points li {
  position: relative;
  padding-left: 26px;
  font-size: 15.5px;
  color: var(--ink-secondary);
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.52em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold) 0%, var(--coral) 100%);
  box-shadow: 0 0 10px rgba(230, 107, 98, 0.65);
}

/* Store buttons */
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

@media (max-width: 900px) {
  .store-row { justify-content: center; }
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 22px;
  border-radius: 15px;
  background: var(--surface-raised);
  border: 1px solid var(--rim);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(6, 4, 14, 0.45);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.store-btn.primary {
  background: linear-gradient(180deg, var(--coral-bright) 0%, var(--coral-deep) 100%);
  border-color: rgba(255, 183, 105, 0.4);
  color: #fff;
}

.store-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 183, 105, 0.55);
  text-decoration: none;
}

.store-btn svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.store-btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.store-btn-text .sm {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
}

.store-btn-text .lg {
  font-family: 'Fredoka', sans-serif;
  font-size: 17px;
  font-weight: 600;
}

.store-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-muted);
}

/* Phone showcase frame */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 107, 98, 0.28) 0%, rgba(182, 141, 242, 0.12) 45%, transparent 72%);
  filter: blur(18px);
  z-index: 0;
  pointer-events: none;
}

.phone-frame {
  position: relative;
  z-index: 1;
  width: 296px;
  max-width: 100%;
  padding: 10px;
  border-radius: 40px;
  background: linear-gradient(160deg, #3c2a56 0%, #171126 100%);
  border: 2px solid rgba(255, 224, 198, 0.14);
  box-shadow: var(--shadow-lg);
}

.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 30px;
}

/* ===== 3-STEP LOOP ===== */
.loop-section {
  padding: 28px 0 72px;
}

.loop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 820px) {
  .loop-grid { grid-template-columns: 1fr; }
}

.loop-card {
  background: linear-gradient(180deg, var(--surface-raised) 0%, var(--surface) 100%);
  border: 1px solid var(--rim);
  border-radius: var(--radius-card);
  padding: 26px 24px;
  box-shadow: var(--shadow-card);
}

.loop-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--gold-soft);
  color: var(--gold);
  font-family: 'Fredoka', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.loop-card h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.loop-card p {
  font-size: 15px;
  color: var(--ink-secondary);
}

/* ===== ALTERNATING FEATURE ROWS ===== */
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-head h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 12px;
}

.section-head p {
  font-size: 16.5px;
  color: var(--ink-muted);
}

.features-section {
  padding: 48px 0 72px;
}

.feature-rows {
  display: grid;
  gap: 72px;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
}

.feature-row.reverse .feature-media {
  order: -1;
}

@media (max-width: 820px) {
  .feature-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .feature-row.reverse .feature-media {
    order: 0;
  }
}

.feature-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--coral-bright);
  margin-bottom: 10px;
}

.feature-copy h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.18;
  color: var(--ink);
  margin-bottom: 14px;
}

.feature-copy p {
  font-size: 16px;
  color: var(--ink-secondary);
  margin-bottom: 16px;
}

.feature-list {
  list-style: none;
  display: grid;
  gap: 9px;
}

.feature-list li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  color: var(--ink-secondary);
}

.feature-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-size: 13px;
}

.feature-media {
  display: flex;
  justify-content: center;
}

.feature-media .phone-frame {
  width: 274px;
}

/* ===== 23 WORLDS SHOWCASE ===== */
.worlds-section {
  padding: 56px 0 72px;
}

.worlds-panel {
  background: linear-gradient(180deg, rgba(45, 32, 64, 0.86) 0%, rgba(28, 19, 43, 0.94) 100%);
  border: 1px solid var(--rim);
  border-radius: 28px;
  padding: 42px 28px;
  box-shadow: var(--shadow-card);
}

.worlds-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 28px;
}

@media (max-width: 820px) {
  .worlds-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 460px) {
  .worlds-grid { grid-template-columns: 1fr; }
}

.world-tile {
  background: var(--surface-recessed);
  border: 1px solid var(--rim);
  border-radius: 18px;
  padding: 20px 16px;
  text-align: center;
}

.world-tile img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin: 0 auto 12px;
  display: block;
}

.world-tile .tier {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.world-tile h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 6px;
}

.world-tile p {
  font-size: 13.5px;
  color: var(--ink-muted);
}

/* ===== FAQ ===== */
.faq-section {
  padding: 40px 0 72px;
}

.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--rim);
  border-radius: 18px;
  padding: 22px 24px;
}

.faq-item h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.faq-item p {
  font-size: 15px;
  color: var(--ink-secondary);
}

/* ===== FINAL CTA ===== */
.cta-section {
  padding: 20px 0 84px;
}

.cta-card {
  background: radial-gradient(circle at top right, rgba(230, 107, 98, 0.22), transparent 52%),
              linear-gradient(180deg, var(--surface-raised) 0%, var(--surface) 100%);
  border: 1px solid var(--rim-strong);
  border-radius: 28px;
  padding: 48px 28px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.cta-card h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--ink);
  margin-bottom: 10px;
}

.cta-card p {
  font-size: 17px;
  color: var(--ink-secondary);
  margin-bottom: 26px;
}

.cta-card .store-row {
  justify-content: center;
}

/* ===== STICKY MOBILE CTA ===== */
.sticky-cta {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translate(-50%, 120%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 18px;
  background: rgba(24, 18, 40, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--rim-strong);
  box-shadow: 0 14px 36px rgba(4, 2, 12, 0.72);
  transition: transform 0.24s ease;
  max-width: calc(100vw - 20px);
}

.sticky-cta.visible {
  transform: translate(-50%, 0);
}

.sticky-cta .store-btn {
  min-height: 44px;
  padding: 8px 12px;
  gap: 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.sticky-cta .store-btn svg { width: 20px; height: 20px; }
.sticky-cta .store-btn-text .sm { font-size: 9px; }
.sticky-cta .store-btn-text .lg { font-size: 13.5px; }

/* ===== DOC / LEGAL / SUPPORT PAGES ===== */
.page-header {
  text-align: center;
  padding: 32px 20px 26px;
  border-bottom: 1px solid var(--rim);
  background: linear-gradient(180deg, rgba(45, 32, 64, 0.5) 0%, transparent 100%);
}

.page-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  text-decoration: none;
}

.page-header-brand:hover { text-decoration: none; }

.subnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  font-size: 14px;
  font-weight: 600;
}

.subnav a {
  color: var(--ink-muted);
}

.subnav a:hover,
.subnav a[aria-current="page"] {
  color: var(--gold);
  text-decoration: none;
}

.doc-wrap {
  max-width: 820px;
  margin: 36px auto 64px;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.doc-card {
  background: var(--surface);
  border: 1px solid var(--rim);
  border-radius: var(--radius-card);
  padding: 36px;
  box-shadow: var(--shadow-card);
}

@media (max-width: 600px) {
  .doc-card { padding: 24px 20px; }
}

.doc-card h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(28px, 4vw, 38px);
  color: var(--ink);
  margin-bottom: 8px;
}

.doc-meta {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 26px;
}

.doc-card h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 21px;
  color: var(--gold);
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rim);
}

.doc-card h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 17px;
  color: var(--ink);
  margin: 18px 0 8px;
}

.doc-card p,
.doc-card li {
  font-size: 15px;
  color: var(--ink-secondary);
  margin-bottom: 10px;
}

.doc-card ul {
  padding-left: 22px;
  margin-bottom: 14px;
}

.callout {
  background: var(--surface-recessed);
  border: 1px solid var(--rim);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 18px 0;
}

.callout.danger {
  border-color: rgba(235, 107, 114, 0.35);
  background: rgba(182, 62, 73, 0.14);
}

.callout strong {
  color: var(--ink);
}

/* Form controls for /delete-account */
.form-group {
  margin: 18px 0;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.form-group input[type="email"],
.form-group input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--rim);
  background: var(--surface-recessed);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
}

.checkbox-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 18px 0 22px;
}

.checkbox-row input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--coral);
  flex-shrink: 0;
}

.checkbox-row label {
  font-size: 14px;
  color: var(--ink-secondary);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 14px;
  border: 1px solid rgba(255, 183, 105, 0.35);
  background: linear-gradient(180deg, #b8404d 0%, #8d283b 100%);
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-danger:hover { filter: brightness(1.06); }

/* ===== FOOTER ===== */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--rim);
  padding: 36px 20px 92px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 12px;
}

.footer-links a {
  color: var(--ink-secondary);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* Store listings are not public yet. Keep availability explicit. */
.store-btn.store-unavailable { background: var(--surface-recessed); border-color: var(--rim); box-shadow: none; cursor: default; }
.store-btn.store-unavailable .sm { color: var(--gold); }
.store-btn.store-unavailable:hover { transform: none; filter: none; }

/* Keep the mobile navigation usable with keyboards and larger text. */
.nav-drawer { overflow-y: auto; }
.nav-drawer-links a { display: inline-flex; min-height: 44px; align-items: center; padding: 3px 6px; }
:where(a, button, input):focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.form-group input::placeholder { color: var(--ink-muted); opacity: 1; }
