/* ============================================================
   FocusXP Website — Shared Stylesheet
   Light-first, dark mode via prefers-color-scheme + .dark class
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Light (Classic theme) */
  --bg:           #FFFAF0;
  --bg-alt:       #FFF5E4;
  --surface:      #FFFFFF;
  --surface-2:    #F5F0E8;
  --border:       rgba(0,0,0,0.08);
  --text:         #2D2D2D;
  --text-muted:   #777777;
  --text-subtle:  #AAAAAA;
  --accent:       #FF6B81;
  --accent-2:     #C084FC;
  --accent-grad:  linear-gradient(135deg, #FF6B81 0%, #C084FC 100%);
  --accent-glow:  rgba(255, 107, 129, 0.25);
  --green:        #22C55E;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:    0 16px 48px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
  --radius-sm:    10px;
  --radius-md:    16px;
  --radius-lg:    24px;
  --radius-xl:    32px;
  --nav-blur:     rgba(255,250,240,0.85);
}

.dark {
  /* Dark theme */
  --bg:           #1E1E2E;
  --bg-alt:       #181825;
  --surface:      #2A2A3E;
  --surface-2:    #313145;
  --border:       rgba(255,255,255,0.07);
  --text:         #CDD6F4;
  --text-muted:   #A6ADC8;
  --text-subtle:  #6C7086;
  --accent:       #89B4FA;
  --accent-2:     #CBA6F7;
  --accent-grad:  linear-gradient(135deg, #89B4FA 0%, #CBA6F7 100%);
  --accent-glow:  rgba(137, 180, 250, 0.20);
  --green:        #A6E3A1;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.30), 0 1px 2px rgba(0,0,0,0.20);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.40), 0 2px 6px rgba(0,0,0,0.20);
  --shadow-lg:    0 16px 48px rgba(0,0,0,0.50), 0 4px 12px rgba(0,0,0,0.30);
  --nav-blur:     rgba(30,30,46,0.85);
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --bg:           #1E1E2E;
    --bg-alt:       #181825;
    --surface:      #2A2A3E;
    --surface-2:    #313145;
    --border:       rgba(255,255,255,0.07);
    --text:         #CDD6F4;
    --text-muted:   #A6ADC8;
    --text-subtle:  #6C7086;
    --accent:       #89B4FA;
    --accent-2:     #CBA6F7;
    --accent-grad:  linear-gradient(135deg, #89B4FA 0%, #CBA6F7 100%);
    --accent-glow:  rgba(137, 180, 250, 0.20);
    --green:        #A6E3A1;
    --shadow-sm:    0 1px 3px rgba(0,0,0,0.30), 0 1px 2px rgba(0,0,0,0.20);
    --shadow-md:    0 4px 16px rgba(0,0,0,0.40), 0 2px 6px rgba(0,0,0,0.20);
    --shadow-lg:    0 16px 48px rgba(0,0,0,0.50), 0 4px 12px rgba(0,0,0,0.30);
    --nav-blur:     rgba(30,30,46,0.85);
  }
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.25rem; }
p  { color: var(--text-muted); line-height: 1.7; }

.gradient-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout Utilities ──────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header p {
  max-width: 520px;
  margin: 16px auto 0;
  font-size: 1.1rem;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  opacity: 1;
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.05rem;
}

/* ── Navigation ────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  background: var(--nav-blur);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
  text-decoration: none;
}
.nav-link:hover {
  opacity: 1;
  color: var(--text);
  background: var(--surface-2);
}

.theme-toggle {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s;
  margin-left: 4px;
}
.theme-toggle:hover {
  background: var(--surface);
  color: var(--text);
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  padding-top: 160px;
  padding-bottom: 96px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.hero-badge span {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 {
  max-width: 780px;
  margin: 0 auto 24px;
}

.hero p {
  max-width: 520px;
  margin: 0 auto 40px;
  font-size: 1.15rem;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 72px;
}

/* App Store badge */
.appstore-badge {
  display: inline-block;
  transition: all 0.2s;
}
.appstore-badge:hover {
  opacity: 1;
  transform: translateY(-2px);
}
.appstore-badge img {
  height: 52px;
}

/* ── iPhone Mockup ─────────────────────────────────────────── */
.mockup-wrapper {
  display: flex;
  justify-content: center;
  gap: 32px;
  align-items: flex-end;
}

.iphone {
  width: 220px;
  background: var(--surface);
  border-radius: 44px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border), inset 0 0 0 1px rgba(255,255,255,0.05);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.iphone.large { width: 260px; transform: translateY(-20px); }
.iphone.small { width: 190px; opacity: 0.7; }

/* Pin mockup internals to dark theme regardless of page theme */
.iphone {
  --bg:          #1E1E2E;
  --bg-alt:      #181825;
  --surface:     #2A2A3E;
  --surface-2:   #313145;
  --border:      rgba(255,255,255,0.09);
  --text:        #CDD6F4;
  --text-muted:  #A6ADC8;
  --text-subtle: #6C7086;
  --accent:      #89B4FA;
  --accent-2:    #CBA6F7;
  --accent-grad: linear-gradient(135deg, #89B4FA 0%, #CBA6F7 100%);
  background: #1E1E2E;
  border-color: rgba(255,255,255,0.09);
}

.iphone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 26px;
  background: #1E1E2E;
  border-radius: 20px;
  z-index: 2;
}

.iphone-screen {
  aspect-ratio: 9/19.5;
  background: #1E1E2E;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 20px;
  gap: 10px;
  position: relative;
}

/* Fake UI inside mockup */
.mock-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mock-level {
  font-size: 9px;
  font-weight: 700;
  color: var(--accent);
}

.mock-xp-bar {
  height: 4px;
  background: #313145;
  border-radius: 4px;
  width: 100%;
  overflow: hidden;
}
.mock-xp-fill {
  height: 100%;
  width: 62%;
  background: var(--accent-grad);
  border-radius: 4px;
}

.mock-timer-ring {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 6px solid #313145;
  border-top-color: #89B4FA;
  border-right-color: #89B4FA;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 8px 0;
}

.iphone.large .mock-timer-ring {
  width: 130px;
  height: 130px;
}

.mock-mode {
  font-size: 7px;
  font-weight: 600;
  color: var(--text-subtle);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mock-time {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.iphone.large .mock-time { font-size: 26px; }

.mock-orbs {
  display: flex;
  gap: 6px;
}

.mock-orb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #313145;
}
.mock-orb.filled { background: var(--accent-grad); }

.mock-btn {
  background: var(--accent-grad);
  color: white;
  border-radius: 100px;
  padding: 8px 24px;
  font-size: 10px;
  font-weight: 700;
  width: 80%;
  text-align: center;
}

.mock-tabs {
  display: flex;
  justify-content: space-around;
  width: 100%;
  padding: 8px 4px 4px;
  border-top: 1px solid rgba(255,255,255,0.09);
  margin-top: auto;
}

.mock-tab {
  font-size: 16px;
  opacity: 0.4;
}
.mock-tab.active { opacity: 1; }

/* Stats mockup */
.mock-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  width: 100%;
  padding: 0 4px;
  height: 60px;
}

.mock-bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: #313145;
}
.mock-bar.accent { background: var(--accent-grad); }
.mock-bar.accent-2 { background: linear-gradient(to top, var(--accent), var(--accent-2)); opacity: 0.6; }

/* ── Features Grid ─────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-grad);
  opacity: 0;
  transition: opacity 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

.feature-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-style: normal;
  line-height: 1;
  user-select: none;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.feature-pro-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border: 1px solid var(--accent);
  border-radius: 100px;
  padding: 2px 8px;
  margin-left: 8px;
  position: relative;
  top: -1px;
}
/* fix: border uses accent color via pseudo */

/* ── How It Works ──────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(16.67% + 20px);
  right: calc(16.67% + 20px);
  height: 1px;
  background: linear-gradient(to right, var(--accent), var(--accent-2));
  opacity: 0.3;
}

.step {
  text-align: center;
  padding: 0 16px;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.step h3 { margin-bottom: 8px; }
.step p  { font-size: 0.9rem; }

/* ── Pricing ───────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 780px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  position: relative;
  transition: all 0.25s ease;
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg);
}

.pricing-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-grad);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 100px;
  white-space: nowrap;
}

.pricing-plan {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 8px;
}

.pricing-card h2 {
  font-size: 2rem;
  margin-bottom: 4px;
}

.pricing-card .price-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.pricing-features {
  list-style: none;
  margin-bottom: 32px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.pricing-features li:last-child { border-bottom: none; }

.pricing-features .check { color: var(--green); font-size: 1rem; }
.pricing-features .lock  { color: var(--text-subtle); font-size: 0.85rem; }

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 48px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.footer-logo img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

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

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); opacity: 1; }

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-subtle);
  text-align: right;
}

/* ── Policy Pages ──────────────────────────────────────────── */
.policy-hero {
  padding-top: 120px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}

.policy-hero .section-label { display: block; margin-bottom: 8px; }

.policy-hero p {
  margin-top: 12px;
  font-size: 0.9rem;
}

.policy-body {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 96px;
}

.policy-body h2 {
  font-size: 1.3rem;
  margin: 40px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.policy-body h3 {
  font-size: 1rem;
  margin: 24px 0 8px;
  color: var(--text);
}

.policy-body p {
  margin-bottom: 12px;
  font-size: 0.93rem;
}

.policy-body ul, .policy-body ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.policy-body li {
  font-size: 0.93rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.6;
}

.policy-body a { font-weight: 500; }

.policy-callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .mockup-wrapper .small { display: none; }
  .iphone.large { transform: none; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; }
  .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
}

@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
  .section { padding: 64px 0; }
  .nav-links .nav-link { display: none; }
  .hero { padding-top: 120px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-copy { text-align: left; }
}

/* ── Bottom CTA Section ────────────────────────────────────── */
.cta-section {
  padding: 96px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section h2 { margin-bottom: 16px; }
.cta-section p  { max-width: 440px; margin: 0 auto 40px; font-size: 1.05rem; }

/* ── Stats Bar ─────────────────────────────────────────────── */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 64px;
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50%       { box-shadow: 0 0 40px var(--accent-glow); }
}

.iphone.large {
  animation: float 5s ease-in-out infinite;
}

.step-number {
  animation: pulse-glow 3s ease-in-out infinite;
}

/* fade-up on scroll — shorter translate, faster trigger */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* mockups visible immediately — no fade-up delay */
.mockup-wrapper .iphone {
  opacity: 1 !important;
  transform: none;
}
.mockup-wrapper .iphone.large {
  transform: translateY(-20px);
  animation: float 5s ease-in-out infinite;
}
.mockup-wrapper .iphone.small {
  opacity: 0.75 !important;
}
