/* ============================================================
   ZenDepth — Design System
   Matches iOS app "Liquid Glass" aesthetic exactly
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --zen-deep:       #000814;
  --zen-cyan:       #00B4D8;
  --zen-gold:       #FFD700;
  --glass-bg:       rgba(255, 255, 255, 0.05);
  --glass-border:   rgba(255, 255, 255, 0.12);
  --glass-blur:     blur(20px);
  --radius:         24px;
  --radius-sm:      16px;
  --radius-pill:    999px;
  --font:           -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  --font-mono:      'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  --transition:     0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width:      1100px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--zen-deep);
  color: rgba(255, 255, 255, 0.85);
  overflow-x: hidden;
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ── Glass Card ─────────────────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

.glass-sm {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

/* ── Button ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-cyan {
  background: rgba(0, 180, 216, 0.15);
  border: 1.5px solid rgba(0, 180, 216, 0.5);
  color: #fff;
  box-shadow: 0 0 20px rgba(0, 180, 216, 0.15);
}

.btn-cyan:hover {
  background: rgba(0, 180, 216, 0.25);
  border-color: rgba(0, 180, 216, 0.7);
  box-shadow: 0 0 30px rgba(0, 180, 216, 0.3);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Animated Background ────────────────────────────────────── */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--zen-deep);
}

.bg-mesh::before {
  content: '';
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(0, 180, 216, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 35% at 75% 25%, rgba(0, 180, 216, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 30% 25% at 20% 70%, rgba(0, 180, 216, 0.04) 0%, transparent 50%);
  animation: meshPulse 12s ease-in-out infinite alternate;
}

@keyframes meshPulse {
  0%   { transform: translate(0,   0)   scale(1); }
  33%  { transform: translate(2%,  3%)  scale(1.04); }
  66%  { transform: translate(-3%, 1%)  scale(0.98); }
  100% { transform: translate(1%,  -2%) scale(1.03); }
}

/* Canvas overlay for particles */
#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Caustic rays */
.caustics {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.caustic-ray {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 180, 216, 0.08) 0%, transparent 70%);
  animation: rayDrift var(--dur, 18s) ease-in-out infinite alternate;
  transform-origin: center;
}

.caustic-ray:nth-child(1)  { width: 120px; height: 320px; top: 10%; left: 20%; --dur: 16s; transform: rotate(15deg); }
.caustic-ray:nth-child(2)  { width: 80px;  height: 240px; top: 30%; left: 60%; --dur: 21s; transform: rotate(-10deg); }
.caustic-ray:nth-child(3)  { width: 100px; height: 280px; top: 5%;  left: 80%; --dur: 14s; transform: rotate(30deg); }
.caustic-ray:nth-child(4)  { width: 70px;  height: 200px; top: 50%; left: 10%; --dur: 19s; transform: rotate(-20deg); }
.caustic-ray:nth-child(5)  { width: 90px;  height: 260px; top: 70%; left: 45%; --dur: 17s; transform: rotate(8deg); }
.caustic-ray:nth-child(6)  { width: 60px;  height: 180px; top: 20%; left: 35%; --dur: 23s; transform: rotate(-35deg); }

@keyframes rayDrift {
  0%   { transform: translateY(0)   rotate(var(--rot, 15deg)) scaleX(1); opacity: 0.6; }
  50%  { transform: translateY(-30px) rotate(calc(var(--rot, 15deg) + 5deg)) scaleX(1.1); opacity: 1; }
  100% { transform: translateY(20px) rotate(calc(var(--rot, 15deg) - 3deg)) scaleX(0.9); opacity: 0.5; }
}

/* ── Layout Shell ───────────────────────────────────────────── */
.site-content {
  position: relative;
  z-index: 10;
}

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

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

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

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

.nav-logo {
  font-size: 20px;
  font-weight: 200;
  letter-spacing: 0.2em;
  color: #fff;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
}

.hero-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  margin: 0 auto 32px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 180, 216, 0.25);
}

.hero-icon.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-title {
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 200;
  letter-spacing: 0.15em;
  color: #fff;
  margin-bottom: 20px;
  overflow: hidden;
}

.hero-title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-title .char.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-tagline {
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s;
}

.hero-tagline.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease 0.7s, transform 0.6s ease 0.7s;
}

.hero-cta.visible {
  opacity: 1;
  transform: translateY(0);
}

.appstore-badge {
  height: 48px;
  width: auto;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.appstore-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 180, 216, 0.3);
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0;
  animation: scrollFadeIn 1s ease 1.2s forwards;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(0, 180, 216, 0.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.6; }
  50%       { transform: scaleY(1.3); opacity: 1; }
}

@keyframes scrollFadeIn {
  to { opacity: 1; }
}

/* ── Sections ───────────────────────────────────────────────── */
section {
  padding: 100px 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: rgba(0, 180, 216, 0.7);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 200;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 16px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
  max-width: 560px;
}

/* ── Disciplines ────────────────────────────────────────────── */
.disciplines {
  text-align: center;
}

.disciplines .section-subtitle {
  margin: 0 auto 48px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.pill {
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
  transition: border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.pill:hover {
  border-color: rgba(0, 180, 216, 0.5);
  color: #fff;
  box-shadow: 0 0 16px rgba(0, 180, 216, 0.12);
}

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

.feature-card {
  padding: 36px 28px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 180, 216, 0.35);
  box-shadow: 0 0 30px rgba(0, 180, 216, 0.08);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(0, 180, 216, 0.1);
  border: 1px solid rgba(0, 180, 216, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 22px;
}

.feature-title {
  font-size: 19px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.feature-body {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
}

/* ── Pull Quote ─────────────────────────────────────────────── */
.quote-section {
  text-align: center;
  padding: 80px 24px;
}

.quote-mark {
  font-size: 80px;
  font-weight: 200;
  color: rgba(0, 180, 216, 0.25);
  line-height: 0.8;
  margin-bottom: 20px;
}

.quote-text {
  font-size: clamp(22px, 3.5vw, 34px);
  font-weight: 200;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  max-width: 680px;
  margin: 0 auto 20px;
}

.quote-attribution {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.08em;
}

/* ── Pricing ────────────────────────────────────────────────── */
.pricing {
  text-align: center;
}

.pricing .section-subtitle {
  margin: 0 auto 56px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}

.pricing-card {
  padding: 32px 24px;
  position: relative;
  text-align: left;
  transition: transform var(--transition);
}

.pricing-card:hover {
  transform: translateY(-3px);
}

.pricing-card.featured {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.06);
}

/* Shimmer border on yearly card */
.pricing-card.featured::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: calc(var(--radius) + 1.5px);
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.8),
    rgba(255, 215, 0, 0.2),
    rgba(255, 215, 0, 0.8),
    rgba(255, 215, 0, 0.2),
    rgba(255, 215, 0, 0.8)
  );
  background-size: 300% 300%;
  animation: shimmerGold 3s linear infinite;
  z-index: -1;
}

@keyframes shimmerGold {
  0%   { background-position: 0%   50%; }
  100% { background-position: 300% 50%; }
}

.pricing-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 215, 0, 0.9);
  background: rgba(255, 215, 0, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.pricing-tier {
  font-size: 20px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 6px;
}

.pricing-sub {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 24px;
}

.pricing-price {
  font-size: 30px;
  font-weight: 200;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.pricing-card.featured .pricing-price {
  color: rgba(255, 215, 0, 0.9);
}

.pricing-period {
  font-size: 12px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 28px;
}

.pricing-cta {
  width: 100%;
  text-align: center;
  padding: 12px 20px;
  font-size: 14px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  padding: 48px 0;
  border-top: 1px solid rgba(0, 180, 216, 0.12);
}

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

.footer-logo {
  font-size: 18px;
  font-weight: 200;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.6);
}

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

.footer-links a {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.4);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.75);
}

.footer-copy {
  font-size: 12px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.25);
}

/* ── Scroll Animation Classes ───────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.fade-in {
  opacity: 0;
  transition: opacity 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
}

/* Stagger children — JS adds visible class sequentially */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-children > *.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.08), transparent);
  margin: 0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
}

@media (max-width: 640px) {
  section { padding: 72px 0; }

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

  .nav { padding: 16px 0; }

  .hero-cta { flex-direction: column; align-items: center; }

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

  .pill-row { gap: 8px; }
  .pill { font-size: 14px; padding: 8px 18px; }
}
