/* ============================================================
   Readnite — Stylesheet
   Design system mirrored from the app (src/constants/colors.ts):
   Display: TikTok Sans (the app's heading face)
   Body:    Geist (the app's text face)
   Palette: DARK_THEME — bg #060708, cards #0c0d0f, ember #eb4900
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=TikTok+Sans:opsz,wght@12..36,300..900&family=Geist:wght@300..700&display=swap');

/* --- Custom Properties ------------------------------------ */
:root {
  /* Background layers (app: BACKGROUND / CARD_BACKGROUND) */
  --bg:        #060708;
  --surface:   #0c0d0f;
  --surface-2: #131518;
  --border:    #1e2124;
  --border-2:  #2e3135;

  /* Text (app: TEXT_PRIMARY / TEXT_SECONDARY) */
  --text:   #edeef0;
  --text-2: #b0b4ba;
  --text-3: #565c64;

  /* Accent: ember orange (app: PRIMARY_COLOR) */
  --accent:      #eb4900;
  --accent-dim:  color-mix(in srgb, var(--accent) 10%, transparent);
  --accent-glow: color-mix(in srgb, var(--accent) 6%, transparent);

  /* Legacy aliases (privacy / support pages depend on these) */
  --bg-primary:    #060708;
  --bg-card:       #0c0d0f;
  --text-primary:  #edeef0;
  --text-secondary: #b0b4ba;
  --accent-hover:  #ff5d10;
  --radius:        12px;

  /* Typography (app: FONTS.serif = TikTok Sans, FONTS.sans = Geist) */
  --font-display: 'TikTok Sans', system-ui, sans-serif;
  --font-body:    'Geist', system-ui, sans-serif;

  /* Layout */
  --max-w: 1140px;
  --pad-h: 32px;
  --section-v: 128px;
}

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

html { scroll-behavior: smooth; }

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

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- Container -------------------------------------------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-h);
}

/* ============================================================
   GRAIN OVERLAY
   ============================================================ */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='512' height='512'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 9999;
  animation: grain-shift 9s steps(10) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0,0); }
  10%  { transform: translate(-2%,-3%); }
  20%  { transform: translate(3%, 1%); }
  30%  { transform: translate(-1%, 4%); }
  40%  { transform: translate(2%,-2%); }
  50%  { transform: translate(-3%, 1%); }
  60%  { transform: translate(1%, 3%); }
  70%  { transform: translate(-2%,-1%); }
  80%  { transform: translate(3%, 2%); }
  90%  { transform: translate(-1%,-3%); }
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}
.reveal-delay   { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.30s; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  border-bottom: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
}

.nav.scrolled {
  background: rgba(12, 13, 14, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-h);
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo {
  height: 28px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-2);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-end { flex-shrink: 0; }

.badge-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(251, 97, 8,0.2);
  border-radius: 100px;
  padding: 5px 12px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px 0 72px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 10%;
  right: 0;
  width: 55%;
  height: 80%;
  background: radial-gradient(ellipse at 70% 40%, rgba(251, 97, 8,0.07) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 72px;
  flex: 1;
}

/* Eyebrow label */
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}

/* Hero heading */
.hero-heading {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 5.5vw, 6.2rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 28px;
}

.hero-heading em,
.cta-heading em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 420px;
  margin-bottom: 40px;
}

/* Google Play card */
.gplay-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  padding: 14px 20px;
  cursor: default;
}

.gplay-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.gplay-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.gplay-label {
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
}

.gplay-store {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.gplay-soon {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(251, 97, 8,0.18);
  border-radius: 100px;
  padding: 4px 10px;
}

/* Hero device */
.hero-device {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.device-halo {
  position: absolute;
  inset: -80px;
  background: radial-gradient(ellipse at center, rgba(251, 97, 8,0.11) 0%, transparent 65%);
  pointer-events: none;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  animation: bob 2.8s ease-in-out infinite;
}

.scroll-hint i { font-size: 0.9rem; }

@keyframes bob {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
  50%       { opacity: 0.9; transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   PHONE FRAME
   ============================================================ */
.phone-frame {
  position: relative;
  background: #0d0e10;
  border-radius: 44px;
  padding: 13px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 0 0 2px rgba(0,0,0,0.7),
    0 48px 96px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.05);
  width: 260px;
  animation: float-phone 7s ease-in-out infinite;
}

.phone-frame.phone-lg {
  width: 290px;
}

@keyframes float-phone {
  0%, 100% { transform: translateY(0px) rotate(-0.5deg); }
  50%       { transform: translateY(-14px) rotate(0.5deg); }
}

.phone-pill {
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 26px;
  background: #0d0e10;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

.phone-screen {
  border-radius: 32px;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  background: #12141a;
  position: relative;
}

/* Real screenshot — covers the CSS sketch when the file exists */
.screenshot-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 10;
}

/* ============================================================
   UI ILLUSTRATIONS — Shared
   ============================================================ */
.ui-bar-sm {
  height: 5px;
  background: rgba(255,255,255,0.11);
  border-radius: 3px;
  display: block;
}

.ui-icon-sq {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: rgba(255,255,255,0.07);
}

/* ============================================================
   UI — Reader view
   ============================================================ */
.ui-reader {
  width: 100%;
  height: 100%;
  background: #12141a;
  padding: 38px 16px 14px;
  display: flex;
  flex-direction: column;
}

.ui-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.ui-btn-group {
  display: flex;
  gap: 3px;
  align-items: center;
}

.ui-dot-btn {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
}

.ui-book-meta { margin-bottom: 14px; }

.ui-book-title-text {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 3px;
  opacity: 0.85;
}

.ui-chapter-label {
  font-size: 7px;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ui-para {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.ui-line {
  height: 5px;
  background: rgba(255,255,255,0.11);
  border-radius: 2px;
}

.ui-reader-footer {
  margin-top: auto;
}

.ui-progress-track {
  height: 2px;
  background: rgba(255,255,255,0.07);
  border-radius: 1px;
  overflow: hidden;
  margin-bottom: 5px;
}

.ui-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 1px;
}

.ui-page-label {
  font-size: 7px;
  color: rgba(255,255,255,0.18);
  text-align: center;
}

/* ============================================================
   UI — Library view
   ============================================================ */
.ui-library {
  width: 100%;
  height: 100%;
  background: #12141a;
  padding: 38px 12px 12px;
}

.ui-lib-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.ui-folders {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.ui-folder { flex: 1; }

.ui-folder-tab {
  width: 28px;
  height: 5px;
  background: rgba(251, 97, 8,0.22);
  border-radius: 3px 3px 0 0;
}

.ui-folder-body {
  background: rgba(251, 97, 8,0.07);
  border: 1px solid rgba(251, 97, 8,0.13);
  border-radius: 0 6px 6px 6px;
  padding: 7px 5px;
}

.ui-book-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.ui-book-tile {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 6px;
  overflow: hidden;
}

.ui-cover { height: 46px; }

.ui-book-footer { padding: 5px 5px 6px; }

.ui-mini-prog {
  height: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 1px;
  overflow: hidden;
  margin-top: 4px;
}

.ui-mini-fill {
  height: 100%;
  background: var(--accent);
  opacity: 0.65;
}

/* ============================================================
   UI — Stats view
   ============================================================ */
.ui-stats {
  width: 100%;
  height: 100%;
  background: #12141a;
  padding: 38px 13px 13px;
}

.ui-streak-card {
  background: linear-gradient(135deg, rgba(251, 97, 8,0.13), rgba(251, 97, 8,0.04));
  border: 1px solid rgba(251, 97, 8,0.14);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
  margin-bottom: 14px;
}

.ui-streak-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 3px;
}

.ui-streak-sub {
  font-size: 8px;
  color: rgba(255,255,255,0.35);
}

.ui-stat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.ui-stat-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ui-stat-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.ui-stat-fill {
  height: 100%;
  background: var(--accent);
  opacity: 0.65;
  border-radius: 2px;
}

.ui-week-row {
  display: flex;
  gap: 4px;
}

.ui-day {
  flex: 1;
  height: 22px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
}

.ui-day.on {
  background: rgba(251, 97, 8,0.35);
}

/* ============================================================
   UI — Challenges view
   ============================================================ */
.ui-challenges {
  width: 100%;
  height: 100%;
  background: #12141a;
  padding: 38px 12px 12px;
}

.ui-xp-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
}

.ui-xp-lv {
  font-size: 7px;
  font-weight: 500;
  color: var(--accent);
  flex-shrink: 0;
}

.ui-xp-track {
  flex: 1;
  height: 4px;
  background: rgba(251, 97, 8,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.ui-xp-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.ui-badge-row {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.ui-badge {
  flex: 1;
  aspect-ratio: 1;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  filter: grayscale(1);
  opacity: 0.3;
}

.ui-badge.earned {
  background: rgba(251, 97, 8,0.12);
  border-color: rgba(251, 97, 8,0.2);
  filter: none;
  opacity: 1;
}

.ui-ch-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ui-ch-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 7px 8px;
}

.ui-ch-emoji { font-size: 13px; flex-shrink: 0; }

.ui-ch-content { flex: 1; min-width: 0; }

.ui-ch-prog {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.ui-ch-fill {
  height: 100%;
  background: var(--accent);
  opacity: 0.8;
  border-radius: 2px;
}

/* ============================================================
   FEATURES SECTION
   ============================================================ */
.features {
  padding: var(--section-v) 0;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
  max-width: var(--max-w);
  margin: 0 auto 112px;
  padding: 0 var(--pad-h);
}

.feature-row:last-child { margin-bottom: 0; }

/* Flip by reversing column direction */

.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.feature-tag i { font-size: 0.9rem; }

.feature-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 18px;
}

.feature-body {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-2);
  line-height: 1.78;
  max-width: 380px;
  margin-bottom: 26px;
}

.feature-checklist {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.feature-checklist li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.875rem;
  color: var(--text-2);
}

.feature-checklist li i {
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.feature-device {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ============================================================
   STATS BAND
   ============================================================ */
.stats-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 64px 0;
}

.stats-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  text-align: center;
}

.stat-item { padding: 0 48px; }

.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4.5rem;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 10px;
}

.stat-sup {
  font-size: 2.5rem;
  color: var(--accent);
  vertical-align: super;
}

.stat-desc {
  font-size: 0.85rem;
  color: var(--text-3);
  line-height: 1.55;
}

.stat-desc span { color: var(--text-2); }

.stat-rule {
  width: 1px;
  height: 60px;
  background: var(--border-2);
}

/* ============================================================
   CLOUD / PREMIUM SECTION
   ============================================================ */
.cloud-section {
  padding: var(--section-v) 0;
}

.cloud-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
}

.cloud-card-wrap {
  display: flex;
  justify-content: center;
}

.cloud-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 380px;
  position: relative;
  overflow: hidden;
}

.cloud-card-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(251, 97, 8,0.08), transparent 65%);
  pointer-events: none;
}

.cloud-card-icon {
  display: block;
  font-size: 2.2rem;
  color: var(--accent);
  margin-bottom: 14px;
}

.cloud-pill {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--text-2);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 24px;
}

.cloud-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cloud-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}

.cloud-file-row i {
  font-size: 1.05rem;
  color: var(--text-3);
  flex-shrink: 0;
}

.cloud-file-name {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  width: 70%;
}

.cloud-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(251, 97, 8,0.14);
  border: 1px solid rgba(251, 97, 8,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cloud-check i {
  font-size: 0.65rem;
  color: var(--accent);
}

.cloud-prog-wrap {
  width: 64px;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.cloud-prog-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  animation: sync-grow 2.2s ease-in-out infinite alternate;
}

@keyframes sync-grow {
  from { width: 35%; }
  to   { width: 82%; }
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  padding: var(--section-v) 0;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(251, 97, 8,0.05), transparent 65%);
  pointer-events: none;
}

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

.cta-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 18px;
}

.cta-sub {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-2);
  margin-bottom: 36px;
}

.cta-actions {
  display: flex;
  justify-content: center;
}

.cta-btn {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(251, 97, 8,0.22);
  border-radius: 12px;
  padding: 13px 30px;
  transition: background 0.2s, border-color 0.2s;
}

.cta-btn:hover {
  background: rgba(251, 97, 8,0.17);
  border-color: rgba(251, 97, 8,0.38);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
}

.footer-logo {
  height: 22px;
  width: auto;
  display: block;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.footer-brand:hover .footer-logo {
  opacity: 0.9;
}

.footer-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-3);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text-2); }

/* Legacy aliases for privacy/support pages */
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}
.footer-nav a {
  color: var(--text-2);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--accent); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-3);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  :root { --section-v: 80px; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .hero-sub { margin-inline: auto; }
  .hero-badge { display: flex; justify-content: center; }
  .hero-glow { display: none; }
  .hero-device { order: -1; }

  .feature-row {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
    margin-bottom: 80px;
  }

  .feature-body { max-width: 100%; }
  .feature-checklist { display: inline-flex; text-align: left; }
  .feature-device { order: -1; }

  .stats-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .stat-rule { display: none; }
  .stat-item { padding: 0; }

  .cloud-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .nav-links { display: none; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { margin-left: 0; }
}

@media (max-width: 480px) {
  :root { --pad-h: 20px; }
  .hero-heading { font-size: 2.7rem; }
  .phone-frame { width: 230px; }
  .phone-frame.phone-lg { width: 250px; }
}

/* ============================================================
   3D PHONE TILT
   ============================================================ */
.feature-device,
.hero-device {
  perspective: 900px;
}

/* Base 3D tilt — visible on feature phones */
@keyframes float-phone {
  0%, 100% { transform: rotateY(-14deg) rotateX(6deg) translateY(0px); }
  50%       { transform: rotateY(-14deg) rotateX(6deg) translateY(-16px); }
}

/* Flipped rows tilt the other direction */
.feature-flip .phone-frame {
  animation: float-phone-flip 7s ease-in-out infinite;
}

@keyframes float-phone-flip {
  0%, 100% { transform: rotateY(14deg) rotateX(6deg) translateY(0px); }
  50%       { transform: rotateY(14deg) rotateX(6deg) translateY(-16px); }
}

/* Hero — most dramatic tilt + cast shadow that sells the 3D */
.hero-device .phone-frame {
  animation: float-phone-hero 8s ease-in-out infinite;
  /* override the flat box-shadow with a proper cast shadow */
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 0 0 2px rgba(0,0,0,0.7),
    0 80px 120px rgba(0,0,0,0.75),
    0 40px 60px  rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

@keyframes float-phone-hero {
  0%, 100% { transform: rotateY(-18deg) rotateX(10deg) translateY(0px); }
  50%       { transform: rotateY(-15deg) rotateX(8deg)  translateY(-22px); }
}

/* Ground shadow: an ellipse that stays below the phone */
.device-halo {
  background: radial-gradient(ellipse at center,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.25) 35%,
    transparent 70%);
  transform: perspective(400px) rotateX(72deg) translateY(70px) scaleX(1.1);
  transform-origin: center center;
}

/* Warm glow ring around hero phone stays separate from the shadow halo */
.hero-device::after {
  content: '';
  position: absolute;
  inset: -120px;
  background: radial-gradient(ellipse at 55% 35%,
    rgba(251, 97, 8, 0.14) 0%,
    transparent 60%);
  pointer-events: none;
  z-index: -1;
}

/* ============================================================
   SHARED SECTION TITLES (used by Pricing & Feedback)
   ============================================================ */
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}

.section-title em { font-style: normal; color: var(--accent); }

.section-sub {
  font-size: 1rem;
  color: var(--text-2);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================================
   PRICING SECTION
   ============================================================ */
.pricing-section {
  padding: var(--section-v) 0;
  border-top: 1px solid var(--border);
}

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

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  perspective: 1400px;
}

/* 3D card base */
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 22px;
  padding: 36px 30px;
  position: relative;
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

.pricing-card:hover {
  transform: translateY(-10px) rotateX(2deg);
  box-shadow:
    0 2px  0   rgba(255,255,255,0.04),
    0 24px 60px rgba(0,0,0,0.55),
    0 10px 24px rgba(0,0,0,0.35);
}

/* Featured (Premium) card */
.pricing-card-featured {
  background: var(--surface-2);
  border-color: rgba(235, 73, 0, 0.32);
  box-shadow:
    0 0  0   1px rgba(235, 73, 0, 0.10),
    0 32px 80px rgba(0,0,0,0.42),
    0 0  80px rgba(235, 73, 0, 0.06);
}

.pricing-card-featured:hover {
  transform: translateY(-12px) rotateX(2deg);
  box-shadow:
    0 2px  0   rgba(255,255,255,0.04),
    0 28px 72px rgba(0,0,0,0.58),
    0 10px 28px rgba(0,0,0,0.38),
    0 0   0  1px rgba(235, 73, 0, 0.22),
    0 0  100px rgba(235, 73, 0, 0.09);
}

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

.pricing-tier-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}

.pricing-card-featured .pricing-tier-label { color: var(--accent); }

.pricing-amount {
  display: flex;
  align-items: flex-start;
  gap: 2px;
  line-height: 1;
  margin-bottom: 4px;
}

.pricing-currency {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text-2);
  margin-top: 7px;
}

.pricing-num {
  font-family: var(--font-display);
  font-size: 3.6rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.pricing-period {
  font-size: 0.77rem;
  color: var(--text-3);
  margin-bottom: 18px;
}

.pricing-tagline {
  font-size: 0.87rem;
  color: var(--text-2);
  line-height: 1.62;
  margin-bottom: 22px;
  min-height: 42px;
}

.pricing-trial-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(235, 73, 0, 0.2);
  border-radius: 100px;
  padding: 5px 12px;
  margin-bottom: 22px;
  align-self: flex-start;
}

.pricing-feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
  flex: 1;
}

.pricing-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.855rem;
  line-height: 1.5;
}

.pricing-feature-list li i {
  font-size: 0.92rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.pf-yes         { color: var(--text-2); }
.pf-yes i       { color: var(--accent); }
.pf-yes.pf-accent { color: var(--text); }
.pf-no          { color: var(--text-3); }
.pf-no i        { color: var(--text-3); }

.pricing-cta {
  display: block;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 12px;
  padding: 12px 24px;
  transition: all 0.2s;
  margin-top: auto;
  cursor: pointer;
}

.pricing-cta-ghost {
  color: var(--text-2);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-2);
}

.pricing-cta-ghost:hover {
  color: var(--text);
  background: rgba(255,255,255,0.07);
  border-color: var(--text-3);
}

.pricing-cta-filled {
  color: #fff;
  background: var(--accent);
  border: 1px solid transparent;
  box-shadow: 0 4px 20px rgba(235, 73, 0, 0.35);
}

.pricing-cta-filled:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 28px rgba(235, 73, 0, 0.5);
  transform: translateY(-1px);
}

.pricing-student-note {
  font-size: 0.74rem;
  color: var(--text-3);
  text-align: center;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  line-height: 1.5;
}

.pricing-student-note i { color: var(--accent); opacity: 0.7; }

.pricing-note {
  text-align: center;
  font-size: 0.77rem;
  color: var(--text-3);
  margin-top: 36px;
}

@media (max-width: 960px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }
  .pricing-card-featured { order: -1; }
}

/* ============================================================
   FEEDBACK SECTION
   ============================================================ */
.feedback-section {
  padding: var(--section-v) 0;
  border-top: 1px solid var(--border);
}

.feedback-header {
  text-align: center;
  margin-bottom: 40px;
}

.feedback-guidelines {
  max-width: 680px;
  margin: 0 auto 36px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.guidelines-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
  flex-shrink: 0;
}

.guidelines-title i { color: var(--accent); font-size: 0.9rem; }

.guidelines-rules {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.79rem;
  color: var(--text-3);
}

.gl-dot { color: var(--border-2); }

.feedback-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.feedback-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 12px 26px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

.feedback-submit-btn:hover {
  border-color: rgba(235, 73, 0, 0.38);
  color: var(--accent);
  background: rgba(235, 73, 0, 0.05);
}

.feedback-submit-btn i { font-size: 1rem; color: var(--accent); }

/* List */
.feedback-list { max-width: 680px; margin: 0 auto; }

.feedback-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-3);
  font-size: 0.87rem;
  padding: 52px 0;
}

.feedback-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: fb-spin 0.7s linear infinite;
}

@keyframes fb-spin { to { transform: rotate(360deg); } }

.feedback-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-3);
  padding: 64px 0;
  text-align: center;
}

.feedback-empty i  { font-size: 2.4rem; opacity: 0.35; display: block; }
.feedback-empty p  { font-size: 0.9rem; }

.hidden { display: none !important; }

/* Feedback item card */
.feedback-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feedback-item:hover {
  border-color: var(--border-2);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

/* Vote button */
.vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 46px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  color: var(--text-2);
}

.vote-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.vote-btn.voted {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.vote-btn i    { font-size: 1rem; }
.vote-count    { font-size: 0.8rem; font-weight: 600; }

/* Item content */
.feedback-item-content { flex: 1; min-width: 0; }

.feedback-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.feedback-item-title {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
}

.feedback-category-badge {
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 2px 8px;
  flex-shrink: 0;
}

.feedback-status-badge {
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 100px;
  padding: 2px 8px;
  flex-shrink: 0;
}

.status-planned     { color: #4a9eff; background: rgba(74,158,255,0.10); border: 1px solid rgba(74,158,255,0.20); }
.status-in-progress { color: #f0a500; background: rgba(240,165,0,0.10);  border: 1px solid rgba(240,165,0,0.20);  }
.status-done        { color: #4caf7d; background: rgba(76,175,125,0.10); border: 1px solid rgba(76,175,125,0.22); }
.status-declined    { color: var(--text-3); background: rgba(255,255,255,0.03); border: 1px solid var(--border); }

.feedback-item-desc {
  font-size: 0.82rem;
  color: var(--text-3);
  line-height: 1.62;
  margin-top: 5px;
}

/* ============================================================
   FEEDBACK MODAL
   ============================================================ */
.feedback-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.feedback-modal {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 22px;
  padding: 42px 40px;
  width: 100%;
  max-width: 520px;
  position: relative;
  animation: modal-in 0.28s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 0.9rem;
  font-family: var(--font-body);
}

.modal-close:hover { background: rgba(255,255,255,0.10); color: var(--text); }

.modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.55rem;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.modal-sub {
  font-size: 0.88rem;
  color: var(--text-2);
  margin-bottom: 28px;
}

.feedback-form  { display: flex; flex-direction: column; gap: 20px; }
.ff-group       { display: flex; flex-direction: column; gap: 6px; }

.ff-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
}

.ff-req { color: var(--accent); }
.ff-opt { color: var(--text-3); font-weight: 400; }

.ff-group input,
.ff-group textarea,
.ff-group select {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.2s;
  width: 100%;
  outline: none;
}

.ff-group input::placeholder,
.ff-group textarea::placeholder { color: var(--text-3); }

.ff-group input:focus,
.ff-group textarea:focus,
.ff-group select:focus { border-color: var(--accent); }

.ff-group textarea { resize: vertical; }

.ff-group select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23858b94' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.ff-counter { font-size: 0.71rem; color: var(--text-3); text-align: right; }

.ff-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 13px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(235, 73, 0, 0.32);
}

.ff-submit:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 22px rgba(235, 73, 0, 0.45);
}

.ff-submit:disabled { opacity: 0.55; cursor: not-allowed; }

.feedback-form-success {
  text-align: center;
  padding: 20px 0 8px;
}

.feedback-form-success i {
  font-size: 2.8rem;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}

.feedback-form-success h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.feedback-form-success p { color: var(--text-2); font-size: 0.9rem; }

@media (max-width: 960px) {
  .feedback-guidelines {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .feedback-modal {
    padding: 28px 24px;
  }
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Ember field — the app's signature dark-mode effect, ported.
   Particles are generated by js/main.js; hidden for users who
   prefer reduced motion.
   ============================================================ */
.ember-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-inner,
.scroll-hint,
.cta-inner {
  position: relative;
  z-index: 1;
}

.ember-p {
  position: absolute;
  left: var(--x);
  bottom: -12px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle, #ffb27a 0%, var(--accent) 55%, transparent 78%);
  box-shadow: 0 0 6px 1px color-mix(in srgb, var(--accent) 50%, transparent);
  opacity: 0;
  will-change: transform, opacity;
  animation: ember-rise var(--dur) linear infinite;
  animation-delay: var(--delay);
}

@keyframes ember-rise {
  0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0; }
  8%   { opacity: var(--peak); }
  55%  { opacity: calc(var(--peak) * 0.55); }
  100% { transform: translate3d(var(--sway), -82vh, 0) scale(0.35); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ember-p { display: none; }
}

/* ============================================================
   Polish layer — small details that make it feel like one product
   ============================================================ */
::selection {
  background: color-mix(in srgb, var(--accent) 32%, transparent);
  color: var(--text);
}

html {
  scrollbar-color: var(--border-2) var(--bg);
  scrollbar-width: thin;
}

h1, h2, h3 { text-wrap: balance; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  height: 1.5px;
  background: var(--accent);
  transition: right 0.25s ease;
}
.nav-links a:hover::after { right: 0; }
