/* ============================================================
   PSN GO — psngo.app
   Design tokens mirror PSNGo/App/Theme.swift exactly
   ============================================================ */

:root {
  /* Backgrounds */
  --bg: #0e0e18;
  --bg-card: #17171f;
  --bg-card-hover: #1f1f2a;

  /* Accent */
  --accent: #0070CC;
  --accent-hover: #0088ff;

  /* Icon gradient */
  --gradient-start: #003087;
  --gradient-end: #6366F1;

  /* PlayStation sacred symbols */
  --ps-triangle: #00D659;
  --ps-circle: #EE3D47;
  --ps-cross: #6399E4;
  --ps-square: #EC6EAE;

  /* Rarity (same as sacred symbols) */
  --rarity-common: #00D659;
  --rarity-uncommon: #6399E4;
  --rarity-rare: #EE3D47;
  --rarity-ultra-rare: #EC6EAE;

  /* Trophy type colors */
  --trophy-platinum: #7BB8E0;
  --trophy-gold: #FFD700;
  --trophy-silver: #A8B4C0;
  --trophy-bronze: #CD7F32;

  /* Stats section accents */
  --stats-overview: #4A90D9;
  --stats-velocity: #FF6B35;
  --stats-rarity: #00CCFF;
  --stats-completion: #22C55E;
  --stats-whatsnext: #A8C4E0;
  --stats-streaks: #FBBF24;

  /* Typography */
  --font-hero: 'Orbitron', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --nav-height: 64px;
  --section-pad: 80px;
  --container-max: 1120px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   Reset & Base
   ============================================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: #e4e4e7;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   Utility
   ============================================================ */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-pad) 0;
}

.section-label {
  font-family: var(--font-hero);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-hero);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.125rem;
  color: #a1a1aa;
  max-width: 600px;
  line-height: 1.6;
}

/* ============================================================
   Fade-in animation (IntersectionObserver)
   ============================================================ */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   Nav (sticky, frosted glass on scroll)
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(14, 14, 24, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 4px;
  text-decoration: none;
  color: #fff;
}

.nav-logo-psn {
  font-family: var(--font-hero);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.nav-logo-go {
  font-family: var(--font-hero);
  font-size: 1.125rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #0070CC;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: #a1a1aa;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}

.nav-links a:hover {
  color: #fff;
}

.nav-link-item {
  display: block;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}

.btn-download:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.btn-coming-soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #a1a1aa;
  padding: 0 28px;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: default;
  height: 48px;
}

/* Compact pill in nav bar */
.nav .btn-coming-soon {
  height: auto;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 0.875rem;
}

/* Spacing above iOS 17 note in CTA */
.final-cta .btn-coming-soon {
  margin-bottom: 16px;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 80%;
  background: radial-gradient(ellipse at center, var(--gradient-start) 0%, transparent 70%);
  opacity: 0.4;
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-tagline {
  font-family: var(--font-hero);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #a1a1aa;
  line-height: 1.6;
  max-width: 480px;
}

.hero-callout {
  font-family: var(--font-hero);
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #e4e4e7;
  height: 48px;
  padding: 0 28px;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-2px);
}

/* Hero logo (SVG with textLength for perfect alignment) */
.hero-logo {
  display: block;
  overflow: visible;
}

/* Official Apple App Store badge */
.app-store-badge {
  display: inline-block;
  transition: transform 0.15s var(--ease), opacity 0.15s var(--ease);
}

.app-store-badge img {
  height: 48px;
  width: auto;
}

.app-store-badge:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* Hero phone mockup area */
.hero-mockup {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-frame {
  position: relative;
  width: 280px;
  aspect-ratio: 1 / 2.17;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-radius: 52px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}

/* Dynamic Island — sized relative to frame width */
.phone-frame::before {
  content: '';
  position: absolute;
  top: 4%;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 4%;
  background: #000;
  border-radius: 20px;
  z-index: 2;
}

.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.features-header {
  text-align: center;
  margin-bottom: 16px;
}

/* ============================================================
   Feature Rows (alternating text + phone mockup)
   ============================================================ */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 64px 0;
}

.feature-row + .feature-row {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.feature-row-reverse {
  direction: rtl;
}

.feature-row-reverse > * {
  direction: ltr;
}

.feature-row-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-row-phone {
  display: flex;
  justify-content: center;
}

/* ============================================================
   Ownership / Your Data Section
   ============================================================ */

.ownership-section {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ownership-inner {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.ownership-lead {
  font-size: 1.125rem;
  color: #a1a1aa;
  line-height: 1.7;
  margin-top: 20px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.ownership-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.ownership-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ownership-icon {
  color: #a1a1aa;
  margin-bottom: 4px;
}

.ownership-card strong {
  font-family: var(--font-hero);
  font-size: 1rem;
  color: #fff;
}

.ownership-card span {
  font-size: 0.8125rem;
  color: #71717a;
  line-height: 1.5;
}

.ownership-zero {
  margin-top: 40px;
}

.ownership-zero p {
  font-family: var(--font-hero);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #52525b;
  line-height: 1.8;
}

@media (max-width: 767px) {
  .ownership-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ============================================================
   Security / FAQ Section
   ============================================================ */

.faq-header {
  text-align: center;
  margin-bottom: 48px;
}

.faq-header .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.ownership-header {
  text-align: center;
  margin-top: 56px;
  margin-bottom: 24px;
}

.ownership-title {
  font-family: var(--font-hero);
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s var(--ease);
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.faq-item h3 {
  font-family: var(--font-hero);
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.3;
}

.faq-item p {
  font-size: 0.9375rem;
  color: #a1a1aa;
  line-height: 1.7;
}

.faq-item strong {
  color: #e4e4e7;
}

.faq-item a {
  color: var(--accent);
}

@media (max-width: 767px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Dual Phone Layout (Pro sections)
   ============================================================ */

.dual-phones {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  gap: 20px;
}

.dual-phones .phone-left {
  transform: perspective(800px) rotateY(8deg);
}

.dual-phones .phone-right {
  transform: perspective(800px) rotateY(-8deg);
}

.dual-phones .phone-sm {
  width: 190px;
  border-radius: 36px;
}

@media (max-width: 767px) {
  .dual-phones .phone-sm {
    width: 150px;
    border-radius: 28px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .dual-phones .phone-sm {
    width: 170px;
    border-radius: 32px;
  }
}

/* ============================================================
   Share Cards Stack (overlapping angled cards)
   ============================================================ */

/* ============================================================
   Share Cards Stack (overlapping angled cards)
   ============================================================ */

.share-cards-stack {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 480px;
  gap: 0;
}

.share-card {
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  width: 52%;
  height: auto;
}

.share-card-back {
  transform: rotate(-2deg);
  z-index: 0;
  margin-right: -24px;
}

.share-card-front {
  transform: rotate(2deg);
  z-index: 1;
  margin-left: -24px;
  margin-top: 20px;
}

@media (max-width: 767px) {
  .share-cards-stack {
    width: 340px;
  }
}

/* Smaller phone frame for inline feature mockups */
.phone-sm {
  width: 240px;
  border-radius: 46px;
}

/* ============================================================
   Pro Features Section
   ============================================================ */

.pro-features {
  position: relative;
}

.pro-features::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(135deg, var(--trophy-platinum), var(--gradient-end), var(--trophy-gold));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.3;
}

.pro-features-inner {
  position: relative;
  background: rgba(23, 23, 31, 0.6);
  border-radius: 24px;
  padding: 48px;
  overflow: hidden;
}

.pro-header {
  margin-bottom: 16px;
}

/* Feature rows inside the Pro container need tighter spacing */
.pro-feature-row {
  padding: 48px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pro-feature-row:first-of-type {
  margin-top: 32px;
}

.pro-features .section-label {
  color: var(--trophy-platinum);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.pro-features .section-title {
  background: linear-gradient(135deg, #fff 30%, var(--trophy-platinum));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pro-feature-label {
  font-family: var(--font-hero);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Pro mini cards row (for features without mockups) */
.pro-extras-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.pro-mini-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 24px;
  border-top: 3px solid var(--accent);
}

.pro-mini-card h3 {
  font-family: var(--font-hero);
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.pro-mini-card p {
  font-size: 0.875rem;
  color: #a1a1aa;
  line-height: 1.5;
}

.pro-extras {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.pro-extra {
  font-size: 0.875rem;
  color: #a1a1aa;
}

.pro-extra strong {
  color: #e4e4e7;
}

/* ============================================================
   Dark Mode Callout
   ============================================================ */

.dark-callout {
  text-align: center;
  padding: 48px 0;
}

.dark-callout-inner {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 20px 36px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dark-callout-icon {
  font-size: 1.75rem;
}

.dark-callout-text h3 {
  font-family: var(--font-hero);
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  text-align: left;
}

.dark-callout-text p {
  font-size: 0.8125rem;
  color: #a1a1aa;
  text-align: left;
}

/* ============================================================
   Final CTA
   ============================================================ */

.final-cta {
  text-align: center;
  padding: 80px 0;
}

.final-cta-logo {
  display: block;
  overflow: visible;
  margin: 0 auto 24px;
}

.final-cta h2 {
  font-family: var(--font-hero);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 24px;
}

.final-cta .btn-primary {
  margin-bottom: 16px;
}

.final-cta .cta-note {
  font-size: 0.8125rem;
  color: #71717a;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  font-size: 0.8125rem;
  color: #71717a;
}

.footer-tagline {
  margin-top: 8px;
  color: #52525b;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.8125rem;
  color: #71717a;
  transition: color 0.2s var(--ease);
}

.footer-links a:hover {
  color: #e4e4e7;
}

.footer-disclaimer {
  width: 100%;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.6875rem;
  color: #52525b;
  line-height: 1.6;
}

/* ============================================================
   Legal pages (privacy, terms)
   ============================================================ */

.legal-page {
  padding-top: calc(var(--nav-height) + 48px);
  padding-bottom: 80px;
  min-height: 100vh;
}

.legal-page h1 {
  font-family: var(--font-hero);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.legal-page .effective-date {
  font-size: 0.875rem;
  color: #71717a;
  margin-bottom: 40px;
}

.legal-page h2 {
  font-family: var(--font-hero);
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-page p {
  color: #a1a1aa;
  margin-bottom: 16px;
  line-height: 1.7;
}

.legal-page ul {
  color: #a1a1aa;
  margin-bottom: 16px;
  padding-left: 24px;
  line-height: 1.8;
}

.legal-page li {
  margin-bottom: 4px;
}

.legal-page strong {
  color: #e4e4e7;
}

.legal-page a {
  color: var(--accent);
}

/* ============================================================
   Responsive
   ============================================================ */

/* Mobile (default) */
@media (max-width: 767px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .hero-text {
    align-items: center;
  }

  .hero-logo {
    margin: 0 auto;
  }

  .hero-subtitle {
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
  }

  .phone-frame {
    width: 200px;
    border-radius: 38px;
  }

  .nav-link-item {
    display: none;
  }

  .feature-row {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
    padding: 48px 0;
  }

  .feature-row-reverse {
    direction: ltr;
  }

  .feature-row-text {
    align-items: center;
  }

  .phone-sm {
    width: 200px;
    border-radius: 36px;
  }

  .pro-features-inner {
    padding: 32px 16px;
  }

  .pro-feature-row {
    padding: 32px 0;
  }

  .pro-extras-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .phone-frame {
    width: 240px;
    border-radius: 46px;
  }

  .feature-row {
    gap: 40px;
  }

  .phone-sm {
    width: 220px;
    border-radius: 40px;
  }
}
