/* =============================================================================
   Kensic.app — Dark Premium Website
   Colors matched to the app's Adobe Night dark theme
   ============================================================================= */

:root {
  /* Palette — Adobe Night dark theme (default) */
  --bg: #111113;
  --bg-deeper: #0A0A0C;
  --card: #292421;
  --card-highlight: #352F2B;
  --text-primary: #FFFFFF;
  --text-secondary: #9B9B9B;
  --accent-amber: #D4836A;          /* terracotta (Adobe Night secondary) */
  --accent-green: #6FA088;          /* sage green (Adobe Night tertiary) */
  --accent-blue: #5C9AAD;           /* teal (Adobe Night accent) */
  --accent-purple: #B8A9D4;         /* soft lavender */
  --accent-pink: #D4836A;           /* terracotta (warm rose) */
  --accent-red: #C45A5A;            /* soft red */
  --border: #3A3530;
  --border-light: #453E38;
  --logo-bg: #111113;
  --card-overlay-dark: rgba(17, 17, 19, 0.95);
  --card-overlay-mid: rgba(17, 17, 19, 0.4);
  --btn-text: #FFFFFF;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Layout */
  --max-width: 1100px;
  --section-padding: 48px 24px;
  --radius: 16px;
  --radius-sm: 10px;
}

/* Terrace Theme — warm, light, earthy
   To activate: add data-theme="terrace" to <html>
   To revert:   remove the attribute (defaults to Adobe Night dark) */
[data-theme="terrace"] {
  --bg: #FAF9F6;
  --bg-deeper: #F3F0EB;
  --card: #F0EDE8;
  --card-highlight: #E8E4DE;
  --text-primary: #1A1A1A;
  --text-secondary: #5C5C5C;
  --accent-amber: #C47257;      /* terracotta coral replaces amber */
  --accent-green: #5B8A72;      /* sage green */
  --accent-blue: #4A7A8A;       /* muted teal-blue */
  --accent-purple: #7A6B8A;     /* dusty lavender */
  --accent-pink: #B85C6A;       /* muted rose */
  --accent-red: #C45A5A;        /* soft red */
  --border: #E0DDD8;
  --border-light: #D5D1CB;
  --logo-bg: #F0EDE8;
  --card-overlay-dark: rgba(26, 26, 26, 0.92);
  --card-overlay-mid: rgba(26, 26, 26, 0.35);
  --btn-text: #FFFFFF;
}

/* Terrace overrides for hardcoded dark backgrounds */
[data-theme="terrace"] .nav {
  background: rgba(250, 249, 246, 0.88);
  border-bottom-color: rgba(224, 221, 216, 0.6);
}

[data-theme="terrace"] a:hover { color: #A85E47; }
[data-theme="terrace"] .nav-cta:hover { background: #A85E47; }
[data-theme="terrace"] .btn-primary { background: var(--accent-amber); }
[data-theme="terrace"] .btn-primary:hover {
  box-shadow: 0 8px 24px rgba(196, 114, 87, 0.25);
  background: #A85E47;
}
[data-theme="terrace"] .btn-secondary {
  border-color: var(--accent-green);
  color: var(--accent-green);
}
[data-theme="terrace"] .btn-secondary:hover {
  background: rgba(91, 138, 114, 0.1);
}
[data-theme="terrace"] .form-submit:hover { background: #A85E47; }

[data-theme="terrace"] .store-badge {
  background: var(--card);
  border-color: var(--border);
}

[data-theme="terrace"] .hero::before {
  background: radial-gradient(circle, rgba(196, 114, 87, 0.08) 0%, transparent 70%);
}

[data-theme="terrace"] .highlight { color: var(--accent-green); }

[data-theme="terrace"] .map-bg iframe {
  filter: saturate(0.4) brightness(1.05);
  opacity: 0.22;
}

[data-theme="terrace"] .flip-card-front .card-front-overlay h3,
[data-theme="terrace"] .flip-card-front .meta-value,
[data-theme="terrace"] .flip-card-front .flip-hint,
[data-theme="terrace"] .flip-card-front .impression-badge { color: #fff; }
[data-theme="terrace"] .flip-card-front .story-tag { color: #d4b3ff; }

@media (max-width: 768px) {
  [data-theme="terrace"] .nav-links {
    background: rgba(250, 249, 246, 0.96);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Optimize scroll performance */
  overflow-x: hidden;
}

/* Add will-change hint for fixed nav to optimize compositing */
.nav {
  will-change: transform;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent-amber);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: #f0c860;
}

img {
  max-width: 100%;
  display: block;
  /* Optimize image rendering */
  image-rendering: auto;
  will-change: auto;
}

/* =============================================================================
   Navigation
   ============================================================================= */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(17, 17, 19, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(58, 53, 48, 0.5);
  padding: 0 24px;
  /* Optimize fixed positioning */
  transform: translateZ(0);
  backface-visibility: hidden;
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  font-family: 'Gotu', sans-serif;
  color: var(--text-primary);
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text-primary);
}

.nav-cta {
  background: var(--accent-amber);
  color: var(--btn-text) !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  transition: transform 0.15s, background 0.2s;
}
.nav-cta:hover {
  background: #f0c860;
  transform: translateY(-1px);
  color: var(--btn-text) !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(17, 17, 19, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.active {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }
}

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

.hero {
  padding: 120px 24px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232, 184, 76, 0.08) 0%, transparent 70%);
  pointer-events: none;
  will-change: auto;
  backface-visibility: hidden;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.hero-logo {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  margin: 0 auto 28px;
  box-shadow: 0 8px 40px rgba(232, 184, 76, 0.15);
}

.hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent-amber) 0%, #f0c860 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: clamp(18px, 3vw, 22px);
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.5;
}

.hero-cta-group {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-amber);
  color: var(--btn-text);
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 184, 76, 0.25);
  color: var(--btn-text);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-primary);
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s;
}
.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--accent-amber);
  color: var(--text-primary);
}

/* Store badges */
.store-badges {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.store-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #000;
  border: 1px solid #555;
  border-radius: 10px;
  padding: 10px 20px 10px 14px;
  color: white;
  position: relative;
  min-width: 168px;
  transition: transform 0.15s, border-color 0.2s;
}
.store-badge:hover {
  transform: translateY(-2px);
  border-color: #888;
}

.store-badge .badge-svg {
  flex-shrink: 0;
}

.store-badge .badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.store-badge .badge-sub {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.3px;
  color: #ccc;
}

.store-badge .badge-store {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.store-badge .coming-soon {
  background: var(--accent-purple);
  color: white;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  position: absolute;
  top: -8px;
  right: -6px;
}

/* =============================================================================
   Features
   ============================================================================= */

.features {
  padding: var(--section-padding);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-amber);
  margin-bottom: 12px;
  text-align: center;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-secondary);
  text-align: center;
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto 28px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.2s, border-color 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

/* =============================================================================
   Power Features (Beyond the Basics)
   ============================================================================= */

.power-features {
  padding: var(--section-padding);
  background: var(--bg-deeper);
}

.power-features .section-title em {
  font-style: italic;
  color: var(--accent-amber);
}

.power-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  margin-bottom: 32px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.power-group-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.power-group-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.power-group-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.power-group-sub {
  color: var(--text-secondary);
  font-size: 14px;
}

.power-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.power-item {
  display: flex;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-deeper);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.power-item:hover {
  transform: translateY(-3px);
  border-color: var(--accent-amber);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.power-item-icon {
  font-size: 28px;
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  flex-shrink: 0;
}

.power-item-body h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.power-item-body p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.power-item-body code {
  background: var(--card-highlight);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
}

@media (max-width: 600px) {
  .power-group {
    padding: 24px 18px;
  }
  .power-group-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .power-items {
    grid-template-columns: 1fr;
  }
  .power-item {
    flex-direction: column;
    gap: 10px;
  }
}

/* =============================================================================
   Pricing
   ============================================================================= */

.pricing {
  padding: var(--section-padding);
  background: var(--bg-deeper);
}

.pricing-cards-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 40px 0;
  margin: 0 -24px;
}

.pricing-cards-wrapper::-webkit-scrollbar {
  height: 8px;
}

.pricing-cards-wrapper::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 10px;
}

.pricing-cards-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.pricing-cards-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--accent-green);
}

.pricing-cards {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 24px;
  padding: 0 24px;
  width: max-content;
  margin: 0 auto;
}

.pricing-card {
  flex-shrink: 0;
  width: 320px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  position: relative;
  transition: transform 0.2s;
  scroll-snap-align: center;
}
.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-card.featured {
  border-color: var(--accent-green);
  box-shadow: 0 0 40px rgba(52, 199, 89, 0.1);
}

.pricing-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-green);
  color: white;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 14px;
  border-radius: 20px;
}

.pricing-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 4px;
}
.pricing-price span {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
}

.pricing-detail {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
}

.pricing-features li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-features li::before {
  content: '✓';
  color: var(--accent-green);
  font-weight: 700;
  font-size: 14px;
}

.highlight-trial {
  color: var(--accent-green);
  font-weight: 600;
}

/* =============================================================================
   Signup / Interest Form
   ============================================================================= */

/* Signup Popup Overlay */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.popup-overlay.active {
  display: flex;
  opacity: 1;
}

.popup-box {
  position: relative;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.popup-overlay.active .popup-box {
  transform: translateY(0) scale(1);
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.popup-close:hover {
  color: var(--text-primary);
  background: var(--border);
}

.popup-box h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}

.popup-box .subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 28px;
}

/* Waitlist counter */
.waitlist-count {
  font-size: 13px;
  color: var(--accent-green);
  font-weight: 500;
  margin: -16px 0 20px;
}

/* Multiselect chip grid */
.form-group-label {
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  margin-top: 16px;
}

.multiselect-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.multiselect-grid .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
}
.multiselect-grid .chip:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}
.multiselect-grid .chip input[type="checkbox"] {
  display: none;
}
.multiselect-grid .chip.selected {
  background: var(--accent-amber);
  border-color: var(--accent-amber);
  color: var(--btn-text);
}

/* Single-select grid (same chip look, but only one can be active) */
.single-select-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.single-select-grid .chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
}
.single-select-grid .chip:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}
.single-select-grid .chip.selected {
  background: var(--accent-amber);
  border-color: var(--accent-amber);
  color: var(--btn-text);
}

/* Referral sub-sections */
.referral-sub {
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sub-label {
  margin-top: 4px;
  margin-bottom: 6px;
}
.referral-text-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.referral-text-input::placeholder {
  color: var(--text-secondary);
}
.referral-text-input:focus {
  border-color: var(--accent-amber);
}

.form-group {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.form-group input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input::placeholder {
  color: var(--text-secondary);
}

.form-group input:focus {
  border-color: var(--accent-amber);
}

.form-submit {
  width: 100%;
  background: var(--accent-amber);
  color: var(--btn-text);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}
.form-submit:hover {
  transform: translateY(-1px);
  background: #f0c860;
}
.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-success {
  display: none;
  color: var(--accent-green);
  font-weight: 600;
  font-size: 15px;
  padding: 16px;
}

.form-error {
  display: none;
  color: var(--accent-red);
  font-size: 13px;
  margin-top: 8px;
}

.form-note {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 12px;
}

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

.footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-brand img {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}

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

.footer-links a {
  color: var(--text-secondary);
  font-size: 13px;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--text-primary);
}

/* =============================================================================
   Utility pages (success, cancel, portal, privacy, terms)
   ============================================================================= */

.page-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.page-card {
  max-width: 480px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 36px;
  text-align: center;
}

.page-card .icon {
  font-size: 56px;
  margin-bottom: 20px;
  display: block;
}

.page-card h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
}

.page-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.page-card .btn-primary {
  display: inline-flex;
}

/* Legal pages */
.legal {
  padding: 100px 24px 60px;
}

.legal-inner {
  max-width: 720px;
  margin: 0 auto;
}

.legal h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.legal .last-updated {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 36px;
}

.legal h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--accent-amber);
}

.legal p, .legal li {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

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

/* =============================================================================
   Animations
   ============================================================================= */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-in-delay-4 { animation-delay: 0.4s; opacity: 0; }

/* Subtle pulse for CTA */
@keyframes subtlePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 184, 76, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(232, 184, 76, 0); }
}

.pulse {
  animation: subtlePulse 2.5s ease-in-out infinite;
}

/* --- Scroll Reveal System --- */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes revealScale {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes revealLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Elements start hidden, JS adds .revealed on scroll.
   Safety: if JS never fires, auto-show after 1.5s via fallback animation. */
@keyframes revealFallback {
  to { opacity: 1; }
}

.reveal {
  opacity: 0;
  animation: revealFallback 0s 1.5s forwards;
  /* Optimize for smooth scroll animations */
  will-change: opacity, transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Clean up will-change after animation to free GPU memory */
@keyframes cleanWillChange {
  to { will-change: auto; }
}

.reveal.revealed {
  animation: revealUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards,
              cleanWillChange 0s 0.6s forwards;
}

.reveal-scale.revealed {
  animation: revealScale 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards,
              cleanWillChange 0s 0.5s forwards;
}

.reveal-left.revealed {
  animation: revealLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards,
              cleanWillChange 0s 0.6s forwards;
}

/* Stagger children within grids */
.reveal-stagger.revealed > :nth-child(1) { animation: revealUp 0.45s ease-out 0.00s forwards; opacity: 0; }
.reveal-stagger.revealed > :nth-child(2) { animation: revealUp 0.45s ease-out 0.08s forwards; opacity: 0; }
.reveal-stagger.revealed > :nth-child(3) { animation: revealUp 0.45s ease-out 0.16s forwards; opacity: 0; }
.reveal-stagger.revealed > :nth-child(4) { animation: revealUp 0.45s ease-out 0.24s forwards; opacity: 0; }
.reveal-stagger.revealed > :nth-child(5) { animation: revealUp 0.45s ease-out 0.32s forwards; opacity: 0; }
.reveal-stagger.revealed > :nth-child(6) { animation: revealUp 0.45s ease-out 0.40s forwards; opacity: 0; }
.reveal-stagger.revealed > :nth-child(7) { animation: revealUp 0.45s ease-out 0.48s forwards; opacity: 0; }
.reveal-stagger.revealed > :nth-child(8) { animation: revealUp 0.45s ease-out 0.56s forwards; opacity: 0; }
.reveal-stagger.revealed > :nth-child(9) { animation: revealUp 0.45s ease-out 0.64s forwards; opacity: 0; }

/* Touch/tap feedback for interactive cards */
.feature-card:active,
.privacy-feature-card:active,
.principle-card:active,
.frustration-card:active,
.pricing-card:active {
  transform: scale(0.97);
  transition: transform 0.1s ease;
}

/* Section label slide-in */
.section-label {
  transition: opacity 0.4s, transform 0.4s;
}

/* Feature icon entrance bounce */
@keyframes iconPop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.reveal-stagger.revealed .feature-icon,
.reveal-stagger.revealed .principle-icon {
  animation: iconPop 0.4s ease-out forwards;
  opacity: 0;
}

.reveal-stagger.revealed > :nth-child(1) .feature-icon,
.reveal-stagger.revealed > :nth-child(1) .principle-icon { animation-delay: 0.05s; }
.reveal-stagger.revealed > :nth-child(2) .feature-icon,
.reveal-stagger.revealed > :nth-child(2) .principle-icon { animation-delay: 0.13s; }
.reveal-stagger.revealed > :nth-child(3) .feature-icon,
.reveal-stagger.revealed > :nth-child(3) .principle-icon { animation-delay: 0.21s; }
.reveal-stagger.revealed > :nth-child(4) .feature-icon { animation-delay: 0.29s; }
.reveal-stagger.revealed > :nth-child(5) .feature-icon { animation-delay: 0.37s; }
.reveal-stagger.revealed > :nth-child(6) .feature-icon { animation-delay: 0.45s; }

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; animation: none; }
  .reveal.revealed,
  .reveal-scale.revealed,
  .reveal-left.revealed { animation: none; opacity: 1; }
  .reveal-stagger.revealed > * { animation: none; opacity: 1; }
  .reveal-stagger.revealed .feature-icon,
  .reveal-stagger.revealed .principle-icon { animation: none; opacity: 1; }
}

/* =============================================================================
   Privacy Details Section
   ============================================================================= */

.privacy-details {
  padding: var(--section-padding);
  background: var(--bg-deeper);
}

/* Privacy Breakdown Intro */
.privacy-breakdown-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 32px;
}

.privacy-breakdown-intro h3 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* Privacy Principles Cards */
.privacy-principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.principle-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}

.principle-card .principle-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.principle-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.principle-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  font-weight: 400;
}

/* Distinct color per principle */
.principle-card:nth-child(1) h3 { color: var(--accent-amber); }
.principle-card:nth-child(1) { border-bottom: 3px solid var(--accent-amber); }
.principle-card:nth-child(1):hover { border-color: var(--accent-amber); }

.principle-card:nth-child(2) h3 { color: var(--accent-green); }
.principle-card:nth-child(2) { border-bottom: 3px solid var(--accent-green); }
.principle-card:nth-child(2):hover { border-color: var(--accent-green); }

.principle-card:nth-child(3) h3 { color: var(--accent-pink); }
.principle-card:nth-child(3) { border-bottom: 3px solid var(--accent-pink); }
.principle-card:nth-child(3):hover { border-color: var(--accent-pink); }

.principle-card:hover {
  transform: translateY(-2px);
}

/* Privacy Features Grid */
.privacy-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto 24px;
}

.privacy-feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.privacy-feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-light);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.privacy-feature-card .feature-icon {
  font-size: 32px;
  line-height: 1;
}

.privacy-feature-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.privacy-feature-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.privacy-feature-card.feature-highlighted {
  border-color: var(--accent-amber);
  background: linear-gradient(135deg, rgba(232, 184, 76, 0.05) 0%, rgba(175, 82, 222, 0.05) 100%);
}

.privacy-more-card {
  border-style: dashed;
  border-color: var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.privacy-more-card .feature-icon {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-amber);
  background: rgba(232, 184, 76, 0.15);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Security Features Dropdown */
.security-features-dropdown {
  max-width: 900px;
  margin: 48px auto 0;
}

.security-dropdown-toggle {
  width: 100%;
  background: var(--card);
  border: 2px solid var(--accent-green);
  border-radius: var(--radius-sm);
  padding: 24px 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font);
  font-size: 16px;
  color: var(--text-primary);
  text-align: left;
  transition: all 0.3s ease;
}

.security-dropdown-toggle:hover {
  background: var(--card-highlight);
  border-color: var(--accent-amber);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.security-dropdown-toggle .toggle-text {
  flex: 1;
  line-height: 1.5;
}

.security-dropdown-toggle .feature-count {
  color: var(--accent-green);
  font-weight: 700;
}

.security-dropdown-toggle .toggle-arrow {
  font-size: 18px;
  color: var(--accent-green);
  transition: transform 0.3s ease;
}

.security-dropdown-toggle.active .toggle-arrow {
  transform: rotate(180deg);
}

.security-features-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.5s ease, padding 0.5s ease;
  opacity: 0;
  padding: 0 28px;
}

.security-features-list.expanded {
  max-height: 5000px;
  opacity: 1;
  padding: 32px 28px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.security-section {
  margin-bottom: 32px;
}

.security-section:last-child {
  margin-bottom: 0;
}

.security-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-amber);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.security-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.security-list li {
  padding: 10px 0 10px 24px;
  position: relative;
  line-height: 1.6;
  color: var(--text-secondary);
  font-size: 14px;
}

.security-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: 700;
}

.security-list li strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Tier Badges */
.tier-badge {
  display: inline-block;
  padding: 3px 8px;
  margin-left: 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

.tier-night {
  background: rgba(232, 184, 76, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(232, 184, 76, 0.3);
}

/* Security Overkill Callout */
.security-callout {
  max-width: 900px;
  margin: 48px auto 0;
  background: linear-gradient(135deg, rgba(111, 160, 136, 0.08) 0%, rgba(212, 131, 106, 0.08) 100%);
  border: 2px solid var(--accent-green);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  gap: 24px;
  align-items: center;
}

.security-callout .callout-gif {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border-light);
}

.security-callout .callout-gif img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.security-callout .callout-content {
  flex: 1;
}

.security-callout h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-amber);
  margin: 0 0 12px;
  font-family: var(--font);
}

.security-callout p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.security-callout p:last-child {
  margin-bottom: 0;
}

.security-callout p strong {
  color: var(--text-primary);
  font-weight: 700;
}

.security-callout .callout-footer {
  margin-top: 16px;
  font-style: italic;
  color: var(--accent-amber);
  font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .security-callout {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }

  .security-callout .callout-gif {
    width: 120px;
    height: 120px;
  }
}

/* =============================================================================
   Mind Map Section — Horizontal Scrolling Timeline
   ============================================================================= */

.mind-map-section {
  padding: var(--section-padding);
  background: var(--bg-deeper);
  position: relative;
  overflow: hidden;
}

/* Map background container */
.map-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.map-bg iframe {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  border: 0;
  filter: saturate(0.3);
  opacity: 0.18;
  pointer-events: none;
}

/* Fade edges of map into section bg */
.map-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    var(--bg-deeper) 0%,
    transparent 12%,
    transparent 85%,
    var(--bg-deeper) 100%
  );
  z-index: 1;
}

/* Ensure all content sits above the map */
.mind-map-section > * {
  position: relative;
  z-index: 2;
}

/* Horizontal Timeline Container */
.story-timeline-container {
  overflow-x: scroll;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 40px 0;
  margin: 0;
}

.story-timeline-container::-webkit-scrollbar {
  height: 10px;
}

.story-timeline-container::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 10px;
  margin: 0 24px;
}

.story-timeline-container::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.story-timeline-container::-webkit-scrollbar-thumb:hover {
  background: var(--accent-amber);
}

.story-timeline {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 32px;
  padding: 0 24px;
  width: max-content;
}

/* Maya's Profile Card (no flip) */
.story-hero {
  flex-shrink: 0;
  width: 360px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  scroll-snap-align: start;
}

.story-hero-profile {
  justify-content: center;
  height: 480px;
}

.story-hero-profile .story-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.story-hero:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  border-color: var(--accent-amber);
}

/* Profile Circle — centered */
.profile-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--accent-amber);
  box-shadow: 0 8px 32px rgba(232, 184, 76, 0.3);
  margin: 0 auto 16px;
}

.profile-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Story Content */
.story-content {
  width: 100%;
}

.story-content h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.profile-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 4px 0;
}

/* Profile Stats */
.profile-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 4px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-amber);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Story Tag */
.story-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-purple);
  background: rgba(175, 82, 222, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* =============================================================================
   Flip Cards — Full-Bleed Image Front, Journal Back
   ============================================================================= */

.flip-card {
  flex-shrink: 0;
  width: 360px;
  height: 480px;
  perspective: 1000px;
  cursor: pointer;
  scroll-snap-align: start;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 24px;
  overflow: hidden;
}

/* Front — full-bleed image */
.flip-card-front {
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
}

.card-front-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--card-overlay-dark) 0%, var(--card-overlay-mid) 40%, transparent 70%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px 28px;
  text-align: left;
}

.card-front-overlay h3 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 16px 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.card-front-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-green);
  letter-spacing: 0.5px;
  min-width: 42px;
}

.meta-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Impression Badge — small sentiment indicator on card fronts */
.impression-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
  align-self: flex-start;
}

.impression-positive {
  background: rgba(52, 199, 89, 0.2);
  color: var(--accent-green);
}

.impression-mixed {
  background: rgba(232, 184, 76, 0.2);
  color: var(--accent-amber);
}

.flip-hint {
  display: block;
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.7;
  font-weight: 500;
}

/* Back — journal entry */
.flip-card-back {
  transform: rotateY(180deg);
  background: var(--card);
  border: 1px solid var(--border);
}

.journal-back {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.journal-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  background: rgba(232, 184, 76, 0.15);
  color: var(--accent-amber);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  align-self: flex-start;
}

.journal-back h4 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 16px 0;
}

.journal-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
  flex: 1;
  margin: 0 0 20px 0;
  border-left: 3px solid var(--accent-amber);
  padding-left: 16px;
}

.journal-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.journal-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-amber);
  margin-bottom: 12px;
}

.journal-stats span {
  background: rgba(232, 184, 76, 0.1);
  padding: 4px 10px;
  border-radius: 8px;
}

/* Favorite Places Frame — detail rows */
.place-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.place-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(175, 82, 222, 0.08);
  border-radius: 8px;
}

.place-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.place-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Books Frame — reading list */
.books-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  margin-bottom: 16px;
}

.book-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(175, 82, 222, 0.06);
  border-radius: 10px;
  border-left: 3px solid var(--border);
}

.book-item:nth-child(1) { border-left-color: var(--accent-green); }
.book-item:nth-child(2) { border-left-color: var(--accent-amber); }
.book-item:nth-child(3) { border-left-color: var(--text-secondary); }

.book-status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

.book-reading { background: rgba(52, 199, 89, 0.15); color: var(--accent-green); }
.book-finished { background: rgba(232, 184, 76, 0.15); color: var(--accent-amber); }
.book-queued { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }

.book-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.book-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-author {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Scroll Hint */
.scroll-hint {
  text-align: center;
  padding: 20px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  opacity: 0.7;
}

.scroll-hint span {
  display: inline-block;
  padding: 8px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
}

/* Mind Map Insight */
.mind-map-insight {
  max-width: 720px;
  margin: 40px auto 0;
  text-align: center;
  padding: 24px 20px;
  background: linear-gradient(135deg, rgba(232, 184, 76, 0.08) 0%, rgba(175, 82, 222, 0.08) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.mind-map-insight p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.mind-map-insight strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* =============================================================================
   About the Developer Section
   ============================================================================= */

.about-developer {
  padding: var(--section-padding);
}

.developer-content {
  max-width: 820px;
  margin: 0 auto;
}

.developer-story {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
}

.developer-story h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--accent-amber);
}

.developer-story p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.developer-story strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Insight Callout */
.insight-callout {
  display: flex;
  gap: 16px;
  background: rgba(232, 184, 76, 0.08);
  border-left: 3px solid var(--accent-amber);
  border-radius: 8px;
  padding: 20px;
  margin: 28px 0;
}

.callout-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.callout-text {
  flex: 1;
}

.callout-text strong {
  display: block;
  color: var(--accent-amber);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.callout-text p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* Frustration Grid */
.frustration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 24px 0 32px;
}

.frustration-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px 20px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}

.frustration-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
}

.frustration-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.frustration-card h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.frustration-card p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* Philosophy Statement */
.philosophy-statement {
  background: linear-gradient(135deg, rgba(232, 184, 76, 0.08) 0%, rgba(175, 82, 222, 0.08) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  margin-top: 32px;
  text-align: center;
}

.philosophy-statement p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-primary);
  font-style: italic;
  margin: 0 0 12px 0;
}

.philosophy-statement cite {
  display: block;
  font-size: 14px;
  color: var(--accent-amber);
  font-weight: 600;
  font-style: normal;
}

/* =============================================================================
   Section Snap Scrolling (Desktop)
   ============================================================================= */

@media (min-width: 769px) {
  html {
    scroll-snap-type: y proximity;
  }

  .hero,
  .features,
  .mind-map-section,
  .screenshots-section,
  .privacy-details,
  .pricing,
  .about-developer {
    scroll-snap-align: start;
  }
}

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

@media (max-width: 600px) {
  /* Disable expensive effects on mobile for better scroll performance */
  html {
    scroll-behavior: auto;
  }

  .nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(17, 17, 19, 0.95);
  }

  /* Reduce shadow complexity on mobile */
  .feature-card:hover,
  .pricing-card:hover,
  .screenshot-img-wrap {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  /* Optimize rendering performance with content-visibility */
  .features,
  .mind-map-section,
  .screenshots-section,
  .privacy-details,
  .pricing,
  .about-developer {
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
  }

  /* Disable map background on mobile for better performance */
  .map-bg iframe {
    display: none;
  }

  /* Slower, smoother animations on mobile with optimized easing */
  .reveal.revealed {
    animation: revealUp 0.7s cubic-bezier(0.25, 0.1, 0.25, 1) forwards,
                cleanWillChange 0s 0.8s forwards;
  }
  .reveal-scale.revealed {
    animation: revealScale 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) forwards,
                cleanWillChange 0s 0.7s forwards;
  }
  .reveal-left.revealed {
    animation: revealLeft 0.7s cubic-bezier(0.25, 0.1, 0.25, 1) forwards,
                cleanWillChange 0s 0.8s forwards;
  }

  /* Reduced stagger complexity - simpler, slower, smoother easing */
  .reveal-stagger.revealed > :nth-child(1) { animation: revealUp 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) 0.00s forwards; opacity: 0; }
  .reveal-stagger.revealed > :nth-child(2) { animation: revealUp 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) 0.10s forwards; opacity: 0; }
  .reveal-stagger.revealed > :nth-child(3) { animation: revealUp 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) 0.20s forwards; opacity: 0; }
  .reveal-stagger.revealed > :nth-child(4) { animation: revealUp 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) 0.30s forwards; opacity: 0; }
  .reveal-stagger.revealed > :nth-child(5) { animation: revealUp 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) 0.40s forwards; opacity: 0; }
  .reveal-stagger.revealed > :nth-child(6) { animation: revealUp 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) 0.50s forwards; opacity: 0; }
  .reveal-stagger.revealed > :nth-child(7) { animation: revealUp 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) 0.60s forwards; opacity: 0; }
  .reveal-stagger.revealed > :nth-child(8) { animation: revealUp 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) 0.70s forwards; opacity: 0; }
  .reveal-stagger.revealed > :nth-child(9) { animation: revealUp 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) 0.80s forwards; opacity: 0; }

  /* Simpler icon animation - no bouncy scale, smoother easing */
  .reveal-stagger.revealed .feature-icon,
  .reveal-stagger.revealed .principle-icon {
    animation: fadeInUp 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
    opacity: 0;
  }
  .reveal-stagger.revealed > :nth-child(1) .feature-icon,
  .reveal-stagger.revealed > :nth-child(1) .principle-icon { animation-delay: 0.05s; }
  .reveal-stagger.revealed > :nth-child(2) .feature-icon,
  .reveal-stagger.revealed > :nth-child(2) .principle-icon { animation-delay: 0.15s; }
  .reveal-stagger.revealed > :nth-child(3) .feature-icon,
  .reveal-stagger.revealed > :nth-child(3) .principle-icon { animation-delay: 0.25s; }
  .reveal-stagger.revealed > :nth-child(4) .feature-icon { animation-delay: 0.35s; }
  .reveal-stagger.revealed > :nth-child(5) .feature-icon { animation-delay: 0.45s; }
  .reveal-stagger.revealed > :nth-child(6) .feature-icon { animation-delay: 0.55s; }

  .hero {
    padding: 100px 20px 40px;
  }

  /* Pricing cards optimizations for mobile */
  .pricing-cards-wrapper {
    margin: 0 -20px;
    padding: 32px 0;
  }

  .pricing-cards {
    padding: 0 20px;
    gap: 16px;
  }

  .pricing-card {
    width: 280px;
    padding: 28px 24px;
  }

  /* Ensure smooth scrolling on mobile */
  .pricing-cards-wrapper::-webkit-scrollbar {
    display: none;
  }

  .form-group {
    flex-direction: column;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .page-card {
    padding: 36px 24px;
  }
  .popup-box {
    padding: 28px 20px;
    max-height: 85vh;
  }
  .multiselect-grid .chip,
  .single-select-grid .chip {
    font-size: 12px;
    padding: 6px 10px;
  }
  .privacy-principles {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
  }
  .principle-card {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-left: 3px solid var(--border);
    border-bottom: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }
  .principle-card:nth-child(1) { border-left-color: var(--accent-amber); border-bottom: none; }
  .principle-card:nth-child(2) { border-left-color: var(--accent-green); border-bottom: none; }
  .principle-card:nth-child(3) { border-left-color: var(--accent-pink); border-bottom: none; }
  .principle-card .principle-icon {
    font-size: 24px;
    margin-bottom: 0;
    flex-shrink: 0;
  }
  .principle-card h3 {
    font-size: 14px;
    margin-bottom: 2px;
  }
  .principle-card p {
    font-size: 12px;
  }
  .privacy-features-grid {
    grid-template-columns: 1fr;
  }
  .broadcast-modes {
    grid-template-columns: 1fr;
  }
  .trust-badges {
    gap: 20px;
  }
  .developer-story {
    padding: 28px 20px;
  }
  .frustration-grid {
    grid-template-columns: 1fr;
  }
  .insight-callout {
    flex-direction: column;
    gap: 12px;
  }
  .philosophy-statement {
    padding: 24px 20px;
  }
  .philosophy-statement p {
    font-size: 15px;
  }
  .story-timeline {
    padding: 0 16px;
  }
  .story-hero {
    width: 300px;
    padding: 32px 24px;
  }
  .story-hero-profile {
    height: 420px;
  }
  .flip-card {
    width: 300px;
    height: 420px;
  }
  .profile-circle {
    width: 140px;
    height: 140px;
  }
  .story-content h3 {
    font-size: 20px;
  }
  .stat-number {
    font-size: 24px;
  }
  .card-front-overlay h3 {
    font-size: 22px;
  }
}

/* =============================================================================
   Theme Toggle Switch
   ============================================================================= */

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

.theme-toggle-track {
  position: relative;
  width: 52px;
  height: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  transition: background 0.3s, border-color 0.3s;
}

.theme-toggle-thumb {
  position: absolute;
  left: 2px;
  width: 22px;
  height: 22px;
  background: var(--accent-amber);
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

/* Light mode (Terrace) — thumb slides right */
.theme-toggle.is-light .theme-toggle-thumb {
  transform: translateX(24px);
}

.theme-toggle-icon {
  position: absolute;
  font-size: 14px;
  line-height: 1;
  transition: opacity 0.2s;
}

.theme-icon-dark {
  left: 6px;
  opacity: 1;
}

.theme-icon-light {
  right: 6px;
  opacity: 0.4;
}

.theme-toggle.is-light .theme-icon-dark {
  opacity: 0.4;
}

.theme-toggle.is-light .theme-icon-light {
  opacity: 1;
}

/* Terrace theme overrides for toggle */
[data-theme="terrace"] .theme-toggle-track {
  background: var(--card);
  border-color: var(--border);
}

[data-theme="terrace"] .theme-toggle-thumb {
  background: var(--accent-amber);
}

/* =============================================================================
   Screenshots Gallery Section
   ============================================================================= */

.screenshots-section {
  padding: var(--section-padding);
}

.screenshot-group {
  margin-bottom: 48px;
}

.screenshot-group:last-child {
  margin-bottom: 0;
}

.screenshot-group-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.screenshot-group-sub {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 28px;
}

/* 4-column grid for themed screenshots */
.screenshot-themes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.screenshot-card {
  text-align: center;
}

.screenshot-img-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 9 / 19.5;
}

.screenshot-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.screenshot-card:hover .screenshot-img-wrap {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
}

.screenshot-label {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

/* 3-column grid for feature screenshots */
.screenshot-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.screenshot-card-feature .screenshot-img-wrap {
  aspect-ratio: 9 / 19.5;
  margin-bottom: 4px;
}

.screenshot-feature-info {
  padding: 8px 4px;
}

.screenshot-feature-info .screenshot-label {
  display: block;
  margin-top: 0;
  font-size: 15px;
  color: var(--text-primary);
}

.screenshot-feature-info .screenshot-desc {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}

/* 2-column grid for chat screenshots */
.screenshot-chat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 520px;
  margin: 0 auto;
}

/* Powered by Claude badge */
.powered-by-claude {
  text-align: center;
  margin-top: 20px;
}

.claude-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--card);
  border: 1px solid var(--border);
  letter-spacing: 0.2px;
}

[data-theme="terrace"] .claude-badge {
  color: #5C5C5C;
}

/* Responsive — screenshots */
@media (max-width: 768px) {
  .screenshot-themes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .screenshot-features-grid {
    grid-template-columns: 1fr;
    max-width: 300px;
    gap: 20px;
  }
  .screenshot-chat-grid {
    gap: 12px;
    max-width: 400px;
  }
}

@media (max-width: 480px) {
  .screenshot-themes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .screenshot-chat-grid {
    gap: 10px;
    max-width: 320px;
  }
}
