/* ===== ROOT & RESET ===== */
:root {
  --bg-deep: #060b18;
  --bg-section: #0a1128;
  --bg-card: #0f1a36;
  --bg-card-hover: #142044;
  --gold: #c9a84c;
  --gold-light: #e8d48b;
  --gold-dim: #8a7233;
  --blue-light: #4a7fb5;
  --blue-mid: #1e3a5f;
  --text-primary: #e8e4dc;
  --text-secondary: #9aa3b8;
  --text-dim: #5a6478;
  --border: rgba(201, 168, 76, 0.12);
  --border-light: rgba(255,255,255,0.06);
  --font-display: 'Ma Shan Zheng', 'ZCOOL XiaoWei', cursive;
  --font-serif: 'Noto Serif SC', 'Georgia', serif;
  --font-sans: 'Noto Sans SC', 'PingFang SC', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; }

/* ===== NAVIGATION ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 2rem;
  background: rgba(6, 11, 24, 0);
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition: all 0.5s var(--ease-out);
}
.nav.scrolled {
  background: rgba(6, 11, 24, 0.85);
  backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav-logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-serif); font-size: 1.1rem; font-weight: 600;
  color: var(--gold);
}
.nav-logo-icon { width: 28px; height: 28px; color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-size: 0.88rem; color: var(--text-secondary);
  transition: color 0.3s;
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--bg-deep) !important;
  padding: 0.5rem 1.2rem; border-radius: 6px;
  font-weight: 500; font-size: 0.85rem !important;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s !important;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(201,168,76,0.3); }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#riverCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 80%, transparent 20%, var(--bg-deep) 70%);
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center; padding: 2rem;
  margin-top: -4rem;
}
.hero-tagline {
  font-family: var(--font-serif);
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  color: var(--gold-dim);
  letter-spacing: 0.35em;
  font-weight: 300;
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeInUp 1s var(--ease-out) 0.1s forwards;
  background: linear-gradient(90deg, transparent 0%, rgba(201,168,76,0.15) 50%, transparent 100%);
  display: inline-block;
  padding: 0.4rem 2rem;
  border-left: 1px solid rgba(201,168,76,0.25);
  border-right: 1px solid rgba(201,168,76,0.25);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 14vw, 10rem);
  font-weight: 400;
  line-height: 1.05;
  color: transparent;
  background: linear-gradient(180deg, #f5edd4 0%, var(--gold) 45%, var(--gold-dim) 100%);
  -webkit-background-clip: text; background-clip: text;
  margin-bottom: 1.8rem;
  letter-spacing: 0.12em;
}
.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px);
  animation: charReveal 0.9s var(--ease-out) calc(0.3s + var(--i) * 0.14s) forwards;
}
@keyframes charReveal {
  to { opacity: 1; transform: translateY(0); }
}
.hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 0.18em;
  opacity: 0; animation: fadeInUp 1s var(--ease-out) 1s forwards;
}
.hero-actions {
  margin-top: 3.5rem;
  display: flex; gap: 1rem; justify-content: center;
  opacity: 0; animation: fadeInUp 1s var(--ease-out) 1.3s forwards;
}
.btn-primary {
  display: inline-flex; align-items: center;
  background: linear-gradient(135deg, var(--gold), #a8872e);
  color: var(--bg-deep); font-weight: 600;
  padding: 1rem 2.8rem; border-radius: 8px;
  font-size: 1.05rem; letter-spacing: 0.06em;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
  font-family: var(--font-sans);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(201,168,76,0.35); }
.btn-large { padding: 1.1rem 3rem; font-size: 1.1rem; }
.btn-ghost {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.9rem 2.4rem; border-radius: 8px;
  font-size: 1rem; letter-spacing: 0.05em;
  transition: all 0.3s;
  font-family: var(--font-sans);
}
.btn-ghost:hover { border-color: var(--gold-dim); color: var(--gold-light); }

.hero-scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 2;
  opacity: 0; animation: fadeInUp 1s var(--ease-out) 2s forwards;
}
.hero-scroll-hint svg {
  width: 28px; height: 28px;
  color: rgba(201,168,76,0.3);
  animation: bobDown 2.5s ease-in-out infinite;
}
@keyframes bobDown { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(6px); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

/* ===== SECTION COMMON ===== */
.section-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
section { padding: 8rem 0; position: relative; }
.section-header { text-align: center; margin-bottom: 5rem; }
.section-label {
  display: inline-block;
  font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--border);
  padding: 0.3rem 1rem; border-radius: 100px;
  margin-bottom: 1.5rem;
  font-family: var(--font-sans);
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}
.section-desc {
  margin-top: 1.2rem;
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px; margin-left: auto; margin-right: auto;
  line-height: 1.8;
}

/* ===== FEATURES ===== */
.features { background: var(--bg-section); }
.features::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 200px;
  background: linear-gradient(to bottom, var(--bg-deep), var(--bg-section));
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px; padding: 2.2rem;
  transition: all 0.4s var(--ease-out);
  position: relative; overflow: hidden;
  opacity: 0; transform: translateY(30px);
}
.feature-card.visible { opacity: 1; transform: translateY(0); transition-delay: calc(var(--delay) * 0.1s); }
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
  opacity: 0; transition: opacity 0.4s;
}
.feature-card:hover { border-color: var(--border); transform: translateY(-4px); background: var(--bg-card-hover); }
.feature-card:hover::before { opacity: 1; }
.feature-card--wide { grid-column: span 1; }
.feature-icon { width: 48px; height: 48px; color: var(--gold); margin-bottom: 1.2rem; }
.feature-icon svg { width: 100%; height: 100%; }
.feature-number {
  font-family: var(--font-serif);
  font-size: 0.75rem; color: var(--text-dim);
  letter-spacing: 0.1em; margin-bottom: 0.8rem;
}
.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem; font-weight: 600;
  margin-bottom: 0.8rem;
}
.feature-card p {
  font-size: 0.92rem; color: var(--text-secondary);
  line-height: 1.7;
}
.feature-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.2rem; }
.feature-tags span {
  font-size: 0.72rem; padding: 0.25rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 100px; color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ===== DEMO / PHONE MOCKUP ===== */
.demo { background: var(--bg-deep); overflow: hidden; }
.demo-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.demo-text .section-label { margin-bottom: 1rem; }
.demo-text .section-title { text-align: left; }
.demo-text .section-desc { text-align: left; margin: 1rem 0 0 0; }
.demo-steps { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1rem; }
.demo-step {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem 1.2rem; border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer; transition: all 0.3s var(--ease-out);
}
.demo-step:hover { background: rgba(255,255,255,0.02); }
.demo-step.active { background: var(--bg-card); border-color: var(--border); }
.demo-step-num {
  width: 28px; height: 28px; min-width: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 0.8rem; font-weight: 600;
  background: var(--bg-section); color: var(--text-dim);
  border: 1px solid var(--border-light);
  transition: all 0.3s;
}
.demo-step.active .demo-step-num { background: var(--gold); color: var(--bg-deep); border-color: var(--gold); }
.demo-step div:last-child { display: flex; flex-direction: column; gap: 0.2rem; }
.demo-step strong { font-size: 0.95rem; font-family: var(--font-serif); }
.demo-step span { font-size: 0.82rem; color: var(--text-dim); }

.demo-phone-wrapper { display: flex; justify-content: center; position: relative; }
.demo-phone {
  width: 280px; height: 560px;
  background: #111827;
  border-radius: 36px;
  border: 3px solid #1f2937;
  padding: 12px;
  position: relative;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 25px 80px rgba(0,0,0,0.6);
  overflow: hidden;
}
.demo-phone-glow {
  position: absolute;
  width: 300px; height: 300px;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(201,168,76,0.1), transparent 70%);
  pointer-events: none; z-index: -1;
}
.phone-notch {
  width: 120px; height: 28px;
  background: #111827;
  border-radius: 0 0 16px 16px;
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  z-index: 10;
}
.phone-screens { position: relative; width: 100%; height: 100%; border-radius: 24px; overflow: hidden; }
.phone-screen {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #0c1a30, #0a1222);
  display: flex; flex-direction: column;
  opacity: 0; transform: translateX(20px);
  transition: all 0.4s var(--ease-out);
  pointer-events: none;
}
.phone-screen.active { opacity: 1; transform: translateX(0); pointer-events: auto; }

.ps-header {
  display: flex; justify-content: center; align-items: center;
  padding: 2.2rem 1rem 0.8rem;
  position: relative;
}
.ps-time { position: absolute; left: 1rem; font-size: 0.7rem; color: var(--text-dim); }
.ps-title { font-family: var(--font-serif); font-size: 0.85rem; color: var(--text-primary); }

.ps-content { flex: 1; padding: 0.8rem 1rem; overflow: hidden; }
.ps-date { font-size: 0.7rem; color: var(--text-dim); margin-bottom: 0.8rem; }
.ps-textarea {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-light);
  border-radius: 12px; padding: 0.8rem;
  min-height: 80px; font-size: 0.8rem;
  color: var(--text-secondary); line-height: 1.6;
  position: relative;
}
.ps-cursor {
  display: inline-block; width: 1.5px; height: 1em;
  background: var(--gold); animation: blink 1s step-end infinite;
  vertical-align: text-bottom; margin-left: 1px;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.ps-typed { font-size: 0.8rem; }
.ps-media-bar { display: flex; gap: 0.6rem; margin-top: 0.8rem; }
.ps-media-btn {
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0.4rem 0.7rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-light);
  border-radius: 8px; font-size: 0.65rem;
  color: var(--text-dim);
}
.ps-media-btn svg { width: 14px; height: 14px; }
.ps-photo-preview { margin-top: 0.8rem; }
.ps-photo {
  width: 100%; height: 80px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.ps-bottom-bar { padding: 0.8rem 1rem 1.2rem; }
.ps-send-btn {
  width: 100%; text-align: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--bg-deep); font-weight: 600;
  padding: 0.7rem; border-radius: 10px;
  font-size: 0.8rem;
}

/* Phone screen 2 - tributaries */
.ps-hint { font-size: 0.78rem; color: var(--text-dim); text-align: center; margin-bottom: 1rem; }
.ps-tributary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
.ps-trib {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  padding: 1rem 0.5rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  transition: all 0.3s;
}
.ps-trib.selected { border-color: var(--tc); background: rgba(255,255,255,0.06); box-shadow: 0 0 20px rgba(255,107,107,0.15); }
.ps-trib-icon { font-size: 1.4rem; }
.ps-trib span { font-size: 0.75rem; color: var(--text-secondary); }

/* Phone screen 3 - river view */
.ps-river-view { display: flex; flex-direction: column; align-items: center; }
.ps-river-svg { width: 100%; }
.ps-river-svg svg { width: 100%; }
.river-path-anim {
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
  animation: drawRiver 2s ease-out forwards;
}
@keyframes drawRiver { to { stroke-dashoffset: 0; } }
.ps-river-stats {
  display: flex; gap: 1.5rem; margin-top: 0.5rem;
}
.ps-river-stats div { text-align: center; }
.ps-river-stats strong { display: block; font-size: 1.1rem; color: var(--gold); font-family: var(--font-serif); }
.ps-river-stats span { font-size: 0.65rem; color: var(--text-dim); }

/* ===== TRIBUTARIES VISUALIZATION ===== */
.tributaries { background: var(--bg-section); }
.trib-visual {
  position: relative;
  width: 100%; max-width: 800px; margin: 0 auto;
  height: 500px;
}
#tribCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.trib-labels { position: absolute; inset: 0; pointer-events: none; }
.trib-label {
  position: absolute;
  left: var(--x); top: var(--y);
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
  transform: translate(-50%, -50%);
}
.trib-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--tc);
  box-shadow: 0 0 12px var(--tc), 0 0 30px var(--tc);
  margin-bottom: 0.3rem;
}
.trib-label span { font-family: var(--font-serif); font-size: 1.1rem; color: var(--text-primary); font-weight: 600; }
.trib-label small { font-size: 0.7rem; color: var(--text-dim); letter-spacing: 0.1em; }
.trib-center-label {
  position: absolute;
  bottom: 5%; left: 50%; transform: translateX(-50%);
  text-align: center;
  display: flex; flex-direction: column; gap: 0.2rem;
}
.trib-center-label span { font-size: 0.8rem; color: var(--text-dim); }
.trib-center-label strong {
  font-family: var(--font-serif);
  font-size: 1.4rem; color: var(--gold);
}

/* ===== OCEAN / ANNUAL MAP ===== */
.ocean { background: var(--bg-deep); }
.ocean-preview { display: flex; flex-direction: column; align-items: center; }
.ocean-card {
  width: 100%; max-width: 700px;
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  position: relative;
}
.ocean-card-inner { position: relative; }
.ocean-card-bg { position: absolute; inset: 0; opacity: 0.3; }
#oceanCanvas { width: 100%; height: 100%; }
.ocean-card-content { position: relative; z-index: 2; padding: 3rem; }
.ocean-card-year {
  font-family: var(--font-serif);
  font-size: 4rem; font-weight: 200;
  color: var(--gold); opacity: 0.4;
  line-height: 1;
}
.ocean-card-name {
  font-family: var(--font-serif);
  font-size: 1.5rem; font-weight: 600;
  margin: 0.5rem 0 2rem;
}
.ocean-card-stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem; margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}
.ocean-stat-num { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 600; color: var(--gold-light); }
.ocean-stat-label { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.2rem; }
.ocean-card-rivers { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 2rem; }
.ocean-river {
  display: flex; justify-content: space-between; align-items: center;
  position: relative; padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
}
.ocean-river::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--w);
  background: var(--c);
  opacity: 0.12;
  border-radius: 6px;
  transition: width 1s var(--ease-out);
}
.ocean-river span:first-child { position: relative; z-index: 1; color: var(--text-primary); }
.ocean-river span:last-child { position: relative; z-index: 1; color: var(--text-dim); font-size: 0.8rem; }
.ocean-card-quote {
  font-family: var(--font-serif);
  font-style: italic; font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 1.5rem 0; margin-bottom: 1rem;
  border-top: 1px solid var(--border-light);
  line-height: 1.7;
}
.ocean-card-footer {
  display: flex; justify-content: space-between;
  font-size: 0.72rem; color: var(--text-dim);
  letter-spacing: 0.05em;
}
.ocean-badge {
  margin-top: 1.5rem;
  font-size: 0.82rem; color: var(--gold-dim);
  letter-spacing: 0.1em;
}

/* ===== TESTIMONIALS ===== */
.testimonials { background: var(--bg-section); }
.testimonial-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px; padding: 2rem;
  transition: all 0.4s var(--ease-out);
  opacity: 0; transform: translateY(30px);
}
.testimonial-card.visible { opacity: 1; transform: translateY(0); transition-delay: calc(var(--delay) * 0.1s); }
.testimonial-card:hover { border-color: var(--border); transform: translateY(-2px); }
.testimonial-quote {
  font-family: var(--font-serif);
  font-size: 0.95rem; line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
}
.testimonial-author { display: flex; align-items: center; gap: 0.8rem; }
.testimonial-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); color: white;
  font-size: 0.9rem; font-weight: 600;
}
.testimonial-author strong { display: block; font-size: 0.9rem; font-family: var(--font-serif); }
.testimonial-author span { font-size: 0.75rem; color: var(--text-dim); }

/* ===== PRICING ===== */
.pricing { background: var(--bg-deep); }
.pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; align-items: start;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px; padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.4s var(--ease-out);
  opacity: 0; transform: translateY(30px);
  position: relative;
}
.pricing-card.visible { opacity: 1; transform: translateY(0); transition-delay: calc(var(--delay) * 0.1s); }
.pricing-card:hover { border-color: var(--border); transform: translateY(-4px); }
.pricing-card--featured {
  border-color: var(--gold-dim);
  background: linear-gradient(180deg, var(--bg-card), rgba(201,168,76,0.05));
  transform: scale(1.04);
}
.pricing-card--featured.visible { transform: scale(1.04) translateY(0); }
.pricing-card--featured:hover { transform: scale(1.04) translateY(-4px); }
.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--bg-deep); font-size: 0.72rem; font-weight: 600;
  padding: 0.3rem 1rem; border-radius: 100px;
  letter-spacing: 0.05em;
}
.pricing-tier { font-size: 0.75rem; color: var(--text-dim); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 0.5rem; }
.pricing-name { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; }
.pricing-price { margin-bottom: 2rem; }
.pricing-currency { font-size: 1.2rem; color: var(--gold); vertical-align: super; }
.pricing-price { font-family: var(--font-serif); font-size: 3rem; font-weight: 700; color: var(--text-primary); }
.pricing-period { font-size: 0.85rem; color: var(--text-dim); font-weight: 400; }
.pricing-features {
  text-align: left; margin-bottom: 2rem;
  display: flex; flex-direction: column; gap: 0.7rem;
}
.pricing-features li {
  font-size: 0.88rem; color: var(--text-secondary);
  padding-left: 1.4rem; position: relative;
}
.pricing-features li::before {
  content: '';
  position: absolute; left: 0; top: 0.45em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-dim);
}
.pricing-btn {
  display: block; width: 100%;
  padding: 0.8rem; border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.9rem; color: var(--text-secondary);
  text-align: center;
  transition: all 0.3s;
  font-family: var(--font-sans);
}
.pricing-btn:hover { border-color: var(--gold-dim); color: var(--gold); }
.pricing-btn--primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--bg-deep); border-color: var(--gold); font-weight: 600;
}
.pricing-btn--primary:hover { box-shadow: 0 4px 20px rgba(201,168,76,0.3); transform: translateY(-1px); }

/* ===== FINAL CTA ===== */
.final-cta {
  background: linear-gradient(180deg, var(--bg-deep), #0a0f1e);
  padding: 8rem 0; text-align: center;
  position: relative;
}
.final-cta::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 1px; height: 80px;
  background: linear-gradient(to bottom, transparent, var(--gold-dim));
}
.final-cta h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600; margin-bottom: 1rem;
}
.final-cta p {
  font-size: 1.05rem; color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-family: var(--font-serif);
}

/* ===== FOOTER ===== */
.footer {
  background: #050810;
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-light);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem; margin-bottom: 3rem;
}
.footer-logo { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.8rem; }
.footer-logo .nav-logo-icon { width: 24px; height: 24px; color: var(--gold-dim); }
.footer-logo span { font-family: var(--font-serif); font-size: 1rem; color: var(--gold-dim); }
.footer-slogan { font-size: 0.85rem; color: var(--text-dim); font-family: var(--font-serif); }
.footer-links h4 { font-family: var(--font-serif); font-size: 0.9rem; margin-bottom: 1rem; color: var(--text-secondary); }
.footer-links a { display: block; font-size: 0.82rem; color: var(--text-dim); padding: 0.3rem 0; transition: color 0.3s; }
.footer-links a:hover { color: var(--text-secondary); }
.footer-bottom {
  display: flex; justify-content: space-between;
  padding-top: 2rem; border-top: 1px solid var(--border-light);
  font-size: 0.75rem; color: var(--text-dim);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-card--wide { grid-column: span 1; }
  .demo-layout { grid-template-columns: 1fr; gap: 3rem; }
  .demo-text { text-align: center; }
  .demo-text .section-title, .demo-text .section-desc { text-align: center; margin-left: auto; margin-right: auto; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
  .pricing-card--featured { transform: none; }
  .pricing-card--featured.visible { transform: translateY(0); }
  .pricing-card--featured:hover { transform: translateY(-4px); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .ocean-card-stats-row { grid-template-columns: repeat(2, 1fr); }
  .trib-visual { height: 400px; }
}
@media (max-width: 600px) {
  section { padding: 5rem 0; }
  .section-container { padding: 0 1.2rem; }
  .features-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.nav-cta) { /* handled by hamburger now */ }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .ocean-card-content { padding: 2rem 1.5rem; }
  .ocean-card-stats-row { grid-template-columns: repeat(2, 1fr); }
  .trib-visual { height: 350px; }
  .trib-label span { font-size: 0.9rem; }
}

/* ============================================================
   APP OVERLAY — Full Functional Application
   ============================================================ */
.app-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg-deep);
  display: none; /* toggled by JS */
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.app-overlay.open { display: flex; }
.app-overlay.visible { opacity: 1; }

.app-container {
  display: flex; width: 100%; height: 100%;
}

/* --- Sidebar --- */
.app-sidebar {
  width: 220px; min-width: 220px;
  background: #080e1e;
  border-right: 1px solid var(--border-light);
  display: flex; flex-direction: column;
  padding: 1.5rem 0;
}
.app-sidebar-logo {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1rem;
  color: var(--gold);
}
.app-sidebar-logo svg { width: 24px; height: 24px; }
.app-sidebar-logo span { font-family: var(--font-serif); font-size: 0.95rem; font-weight: 600; }

.app-nav { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; padding: 0.5rem 0.6rem; }
.app-nav-btn {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid transparent; background: transparent;
  border-radius: 10px; cursor: pointer;
  color: var(--text-dim); font-size: 0.88rem;
  font-family: var(--font-sans);
  transition: all 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.app-nav-btn svg { width: 20px; height: 20px; min-width: 20px; pointer-events: none; }
.app-nav-btn span { pointer-events: none; }
.app-nav-btn:hover { color: var(--text-secondary); background: rgba(255,255,255,0.03); }
.app-nav-btn.active {
  color: var(--gold); background: rgba(201,168,76,0.08);
  border-color: rgba(201,168,76,0.15);
}

.app-close-btn {
  display: flex; align-items: center; gap: 0.6rem;
  margin: 0 0.6rem; padding: 0.7rem 0.8rem;
  border: 1px solid var(--border-light);
  background: transparent; border-radius: 10px;
  cursor: pointer; color: var(--text-dim);
  font-size: 0.82rem; font-family: var(--font-sans);
  transition: all 0.25s;
}
.app-close-btn svg { width: 18px; height: 18px; }
.app-close-btn:hover { color: var(--text-secondary); border-color: var(--border); }

/* --- Main content --- */
.app-main {
  flex: 1; overflow-y: auto; padding: 2.5rem 3rem;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.app-view { display: none; max-width: 760px; }
.app-view.active { display: block; animation: viewFadeIn 0.35s var(--ease-out); }
@keyframes viewFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.app-view-header { margin-bottom: 2rem; }
.app-view-header h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem; font-weight: 600;
  color: var(--text-primary);
}
.app-view-subtitle { font-size: 0.88rem; color: var(--text-dim); margin-top: 0.3rem; }

/* --- Record View --- */
.record-form { display: flex; flex-direction: column; gap: 1.5rem; }
.record-textarea {
  width: 100%; min-height: 160px; max-height: 300px;
  resize: vertical;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px; padding: 1.2rem;
  font-family: var(--font-serif); font-size: 1rem;
  color: var(--text-primary); line-height: 1.8;
  transition: border-color 0.3s;
  outline: none;
}
.record-textarea::placeholder { color: var(--text-dim); }
.record-textarea:focus { border-color: var(--gold-dim); }

.record-photo-area { position: relative; }
.record-photo-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.6rem; padding: 2rem;
  border: 1.5px dashed var(--border);
  border-radius: 14px; cursor: pointer;
  color: var(--text-dim);
  transition: all 0.3s;
}
.record-photo-placeholder svg { width: 36px; height: 36px; }
.record-photo-placeholder span { font-size: 0.85rem; }
.record-photo-placeholder:hover { border-color: var(--gold-dim); color: var(--text-secondary); }
.record-photo-preview {
  position: relative; border-radius: 14px; overflow: hidden;
  max-height: 300px;
}
.record-photo-preview img { width: 100%; height: auto; display: block; border-radius: 14px; }
.record-photo-remove {
  position: absolute; top: 0.5rem; right: 0.5rem;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0,0,0,0.6); border: none; color: white;
  font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.record-tributary-select {}
.record-trib-label { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 0.8rem; }
.record-trib-options { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.record-trib-opt {
  display: flex; align-items: center;
  cursor: pointer;
}
.record-trib-opt input { display: none; }
.record-trib-opt span {
  display: inline-block;
  padding: 0.5rem 1rem; border-radius: 100px;
  border: 1px solid var(--border-light);
  font-size: 0.85rem; color: var(--text-dim);
  transition: all 0.25s;
}
.record-trib-opt:hover span { border-color: var(--tc); color: var(--text-secondary); }
.record-trib-opt input:checked + span {
  background: var(--tc);
  color: var(--bg-deep);
  border-color: var(--tc);
  font-weight: 500;
  box-shadow: 0 0 16px color-mix(in srgb, var(--tc) 30%, transparent);
}

.record-submit {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 1rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--bg-deep); font-weight: 600;
  border: none; border-radius: 12px;
  font-size: 1rem; cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.3s var(--ease-spring);
}
.record-submit svg { width: 20px; height: 20px; }
.record-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(201,168,76,0.35); }
.record-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.record-success {
  text-align: center; padding: 4rem 2rem;
  animation: viewFadeIn 0.4s var(--ease-out);
}
.record-success-icon { color: var(--gold); margin-bottom: 1rem; }
.record-success-icon svg { width: 64px; height: 64px; }
.record-success p { font-family: var(--font-serif); font-size: 1.4rem; margin-bottom: 0.3rem; }
.record-success-hint { font-size: 0.88rem; color: var(--text-dim); display: block; margin-bottom: 2rem; }
.record-another {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-secondary); padding: 0.7rem 1.5rem;
  border-radius: 10px; cursor: pointer; font-family: var(--font-sans);
  font-size: 0.9rem; transition: all 0.25s;
}
.record-another:hover { border-color: var(--gold-dim); color: var(--gold); }

/* --- Timeline View --- */
.timeline-filters {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem;
}
.tl-filter {
  padding: 0.4rem 1rem; border-radius: 100px;
  border: 1px solid var(--border-light);
  background: transparent; color: var(--text-dim);
  font-size: 0.8rem; cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.25s;
}
.tl-filter:hover { border-color: var(--border); color: var(--text-secondary); }
.tl-filter.active { background: var(--gold); color: var(--bg-deep); border-color: var(--gold); font-weight: 500; }
.tl-filter[data-filter]:not([data-filter="all"]).active {
  background: var(--fc); border-color: var(--fc);
}

.timeline-list { display: flex; flex-direction: column; gap: 0; }
.timeline-empty {
  text-align: center; padding: 4rem 2rem; color: var(--text-dim);
}
.timeline-empty svg { width: 64px; height: 64px; margin-bottom: 1rem; opacity: 0.3; }
.timeline-empty p { font-family: var(--font-serif); font-size: 1.1rem; margin-bottom: 0.3rem; color: var(--text-secondary); }
.timeline-empty span { font-size: 0.85rem; }

.tl-item {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border-light);
  animation: viewFadeIn 0.3s var(--ease-out);
  position: relative;
}
.tl-item:last-child { border-bottom: none; }
.tl-dot-col { display: flex; flex-direction: column; align-items: center; min-width: 20px; padding-top: 0.3rem; }
.tl-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--dot-color, var(--gold-dim));
  box-shadow: 0 0 8px color-mix(in srgb, var(--dot-color, var(--gold-dim)) 40%, transparent);
}
.tl-line { flex: 1; width: 1px; background: var(--border-light); margin-top: 0.5rem; }
.tl-content { flex: 1; }
.tl-meta { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; }
.tl-date { font-size: 0.75rem; color: var(--text-dim); }
.tl-trib-tag {
  font-size: 0.68rem; padding: 0.15rem 0.5rem;
  border-radius: 100px; background: rgba(255,255,255,0.05);
  color: var(--tag-color, var(--text-dim));
  border: 1px solid color-mix(in srgb, var(--tag-color, var(--text-dim)) 30%, transparent);
}
.tl-text {
  font-family: var(--font-serif);
  font-size: 0.95rem; line-height: 1.7;
  color: var(--text-primary);
}
.tl-photo { margin-top: 0.6rem; border-radius: 10px; overflow: hidden; max-width: 300px; }
.tl-photo img { width: 100%; display: block; }
.tl-delete {
  position: relative; z-index: 2;
  flex-shrink: 0;
  background: none; border: 1px solid transparent; cursor: pointer;
  color: var(--text-dim); opacity: 0.45; transition: all 0.25s;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  min-width: 34px; min-height: 34px;
}
.tl-delete svg { pointer-events: none; width: 16px; height: 16px; }
.tl-item:hover .tl-delete { opacity: 0.75; }
.tl-delete:hover { opacity: 1 !important; color: #ff6b6b; background: rgba(255,107,107,0.1); border-color: rgba(255,107,107,0.2); }

/* --- Confirm Dialog --- */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: all 0.3s var(--ease-out);
}
.confirm-overlay.show {
  opacity: 1; visibility: visible; pointer-events: auto;
}
.confirm-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem 2.5rem;
  max-width: 360px; width: 90%;
  text-align: center;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.35s var(--ease-spring);
}
.confirm-overlay.show .confirm-dialog {
  transform: translateY(0) scale(1);
}
.confirm-dialog-icon {
  color: #ff6b6b;
  margin-bottom: 1rem;
}
.confirm-dialog-icon svg { width: 40px; height: 40px; }
.confirm-dialog h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem; font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.confirm-dialog p {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 1.8rem;
  line-height: 1.6;
}
.confirm-dialog-actions {
  display: flex; gap: 0.8rem; justify-content: center;
}
.confirm-btn {
  padding: 0.6rem 1.5rem; border-radius: 10px;
  font-size: 0.88rem; cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.25s;
  border: none;
}
.confirm-btn--cancel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.confirm-btn--cancel:hover { border-color: var(--text-dim); color: var(--text-primary); }
.confirm-btn--danger {
  background: rgba(255,107,107,0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255,107,107,0.2);
}
.confirm-btn--danger:hover { background: rgba(255,107,107,0.25); }

/* --- Clear All Button --- */
.tl-clear-all {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: none; border: 1px solid var(--border-light);
  color: var(--text-dim); padding: 0.35rem 0.8rem;
  border-radius: 100px; font-size: 0.75rem;
  cursor: pointer; font-family: var(--font-sans);
  transition: all 0.25s;
  margin-left: auto;
}
.tl-clear-all svg { width: 14px; height: 14px; }
.tl-clear-all:hover { border-color: rgba(255,107,107,0.3); color: #ff6b6b; }

/* --- Tributaries Stats View --- */
.trib-stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
.trib-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px; padding: 1.5rem;
  transition: all 0.3s;
  position: relative; overflow: hidden;
}
.trib-stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--tc);
  opacity: 0.6;
}
.trib-stat-card:hover { border-color: var(--tc); }
.trib-stat-emoji { font-size: 1.8rem; margin-bottom: 0.5rem; }
.trib-stat-name { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 600; margin-bottom: 0.2rem; }
.trib-stat-en { font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.1em; margin-bottom: 1rem; }
.trib-stat-count { font-family: var(--font-serif); font-size: 2rem; color: var(--tc); font-weight: 700; }
.trib-stat-count-label { font-size: 0.78rem; color: var(--text-dim); }
.trib-stat-bar { margin-top: 1rem; height: 4px; background: rgba(255,255,255,0.05); border-radius: 2px; overflow: hidden; }
.trib-stat-bar-fill { height: 100%; background: var(--tc); border-radius: 2px; transition: width 0.6s var(--ease-out); }
.trib-stat-latest { margin-top: 0.8rem; font-size: 0.78rem; color: var(--text-dim); font-family: var(--font-serif); line-height: 1.5; }
.trib-stat-latest em {
  display: block; color: var(--text-secondary);
  font-style: normal;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* --- AI Review View --- */
.ai-actions { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 2rem; }
.ai-action-btn {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.2rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px; cursor: pointer;
  color: var(--text-primary); text-align: left;
  font-family: var(--font-sans);
  transition: all 0.3s;
}
.ai-action-btn svg { width: 28px; height: 28px; min-width: 28px; color: var(--gold); }
.ai-action-btn div { display: flex; flex-direction: column; gap: 0.15rem; }
.ai-action-btn strong { font-family: var(--font-serif); font-size: 1rem; }
.ai-action-btn span { font-size: 0.8rem; color: var(--text-dim); }
.ai-action-btn:hover { border-color: var(--gold-dim); transform: translateY(-2px); }

.ai-result-area {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  animation: viewFadeIn 0.4s var(--ease-out);
}
.ai-result-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
}
.ai-result-header span { font-family: var(--font-serif); font-size: 1rem; color: var(--gold); }
.ai-result-close {
  background: none; border: none; color: var(--text-dim);
  font-size: 1.3rem; cursor: pointer; padding: 0.3rem;
}
.ai-result-body {
  padding: 1.5rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--text-secondary);
}
.ai-result-body .ai-field { margin-bottom: 1.2rem; }
.ai-result-body .ai-field-label { font-size: 0.75rem; color: var(--gold-dim); letter-spacing: 0.1em; margin-bottom: 0.3rem; text-transform: uppercase; font-family: var(--font-sans); }
.ai-result-body .ai-field-value { color: var(--text-primary); }
.ai-result-body .ai-poetry { font-style: italic; color: var(--gold-light); font-size: 1.1rem; padding: 1rem 0; border-top: 1px solid var(--border-light); margin-top: 1rem; }

/* AI Chat */
.ai-chat-area {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column;
  height: 500px;
  animation: viewFadeIn 0.4s var(--ease-out);
}
.ai-chat-messages {
  flex: 1; overflow-y: auto; padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.ai-chat-msg {
  max-width: 80%;
  padding: 0.8rem 1.2rem;
  border-radius: 14px;
  font-size: 0.9rem; line-height: 1.7;
  animation: viewFadeIn 0.3s var(--ease-out);
}
.ai-chat-msg.user {
  align-self: flex-end;
  background: rgba(201,168,76,0.15);
  color: var(--text-primary);
  border-bottom-right-radius: 4px;
}
.ai-chat-msg.ai {
  align-self: flex-start;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  border-bottom-left-radius: 4px;
  font-family: var(--font-serif);
}
.ai-chat-input-row {
  display: flex; gap: 0.5rem; padding: 1rem;
  border-top: 1px solid var(--border-light);
}
.ai-chat-input {
  flex: 1; padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-light);
  border-radius: 10px; color: var(--text-primary);
  font-family: var(--font-sans); font-size: 0.9rem;
  outline: none;
}
.ai-chat-input:focus { border-color: var(--gold-dim); }
.ai-chat-send {
  width: 42px; height: 42px;
  background: var(--gold); border: none; border-radius: 10px;
  color: var(--bg-deep); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s;
}
.ai-chat-send svg { width: 18px; height: 18px; }
.ai-chat-send:hover { transform: scale(1.05); }

.ai-loading {
  text-align: center; padding: 3rem;
  animation: viewFadeIn 0.3s var(--ease-out);
}
.ai-loading p { font-family: var(--font-serif); font-size: 0.95rem; color: var(--text-dim); margin-top: 1rem; }
.ai-loading-dots { display: flex; gap: 0.4rem; justify-content: center; }
.ai-loading-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  animation: dotPulse 1.4s ease-in-out infinite;
}
.ai-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse { 0%,80%,100%{opacity:0.2;transform:scale(0.8)} 40%{opacity:1;transform:scale(1.2)} }

/* --- Ocean Map View --- */
.ocean-generate-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  width: 100%; padding: 1.2rem;
  background: linear-gradient(135deg, var(--blue-mid), #0f2847);
  border: 1px solid var(--border);
  border-radius: 14px; cursor: pointer;
  color: var(--gold-light); font-size: 1rem;
  font-family: var(--font-serif); font-weight: 500;
  transition: all 0.3s;
}
.ocean-generate-btn svg { width: 24px; height: 24px; }
.ocean-generate-btn:hover { border-color: var(--gold-dim); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }

.ocean-map-result {
  margin-top: 2rem;
  animation: viewFadeIn 0.5s var(--ease-out);
}
.ocean-gen-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden;
  padding: 2.5rem;
}
.ocean-gen-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold-light);
  margin-bottom: 0.3rem;
}
.ocean-gen-subtitle { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 2rem; }
.ocean-gen-overview {
  font-family: var(--font-serif);
  font-size: 1rem; line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}
.ocean-gen-tribs { margin-bottom: 2rem; }
.ocean-gen-trib-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.7rem 0;
}
.ocean-gen-trib-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; }
.ocean-gen-trib-fill { height: 100%; border-radius: 3px; }
.ocean-gen-trib-name { min-width: 50px; font-size: 0.85rem; color: var(--text-secondary); }
.ocean-gen-trib-pct { min-width: 35px; text-align: right; font-size: 0.8rem; color: var(--text-dim); }
.ocean-gen-trib-hl { font-size: 0.78rem; color: var(--text-dim); min-width: 120px; }
.ocean-gen-impact {
  background: rgba(201,168,76,0.06);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 1.2rem;
  margin-bottom: 1.5rem;
}
.ocean-gen-impact-label { font-size: 0.72rem; color: var(--gold-dim); letter-spacing: 0.1em; margin-bottom: 0.4rem; font-family: var(--font-sans); }
.ocean-gen-impact-text { font-family: var(--font-serif); color: var(--text-primary); line-height: 1.7; }
.ocean-gen-quote {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold);
  text-align: center;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-light);
  margin-top: 1rem;
}
.ocean-gen-keywords { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 1rem; }
.ocean-gen-kw {
  padding: 0.3rem 0.8rem; border-radius: 100px;
  border: 1px solid var(--border);
  font-size: 0.78rem; color: var(--text-dim);
}

/* --- Toast --- */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 0.8rem 1.5rem; border-radius: 10px;
  font-size: 0.88rem; color: var(--text-primary);
  z-index: 300; opacity: 0; pointer-events: none;
  transition: all 0.35s var(--ease-out);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

/* --- App responsive --- */
@media (max-width: 700px) {
  .app-sidebar {
    position: fixed; bottom: 0; left: 0; right: 0;
    width: 100%; min-width: 0; height: auto;
    flex-direction: row; padding: 0;
    border-right: none; border-top: 1px solid var(--border-light);
    z-index: 10;
  }
  .app-sidebar-logo { display: none; }
  .app-nav { flex-direction: row; padding: 0.4rem; gap: 0; justify-content: space-around; }
  .app-nav-btn { flex-direction: column; gap: 0.15rem; padding: 0.5rem; font-size: 0.65rem; }
  .app-nav-btn svg { width: 18px; height: 18px; }
  .app-close-btn { display: none; }
  .app-main { padding: 1.5rem 1.2rem 5rem; }
  .trib-stats-grid { grid-template-columns: 1fr; }
}

/* ===== SPLASH SCREEN ===== */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-deep);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.splash.hidden {
  opacity: 0; visibility: hidden; pointer-events: none;
}
.splash-inner {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  animation: splashPulse 1.8s ease-in-out infinite;
}
.splash-icon {
  width: 48px; height: 48px; color: var(--gold);
}
.splash-text {
  font-family: var(--font-serif);
  font-size: 1.2rem; color: var(--gold);
  letter-spacing: 0.3em; font-weight: 300;
}
@keyframes splashPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.97); }
  50% { opacity: 1; transform: scale(1); }
}

/* ===== GRAIN TEXTURE OVERLAY ===== */
.grain-overlay {
  position: fixed; inset: 0; z-index: 150;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

/* ===== MOBILE HAMBURGER NAV ===== */
.nav-hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 0.5rem;
  z-index: 2;
}
.nav-hamburger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--text-secondary);
  transition: all 0.3s var(--ease-out);
  transform-origin: center;
}
.nav-hamburger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(6, 11, 24, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2.5rem;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: all 0.4s var(--ease-out);
  }
  .nav-links.open {
    opacity: 1; visibility: visible; pointer-events: auto;
  }
  .nav-links a { font-size: 1.2rem; }
  .features-grid { grid-template-columns: 1fr; }
  .demo-layout { grid-template-columns: 1fr; gap: 2rem; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .section-title { font-size: clamp(1.8rem, 6vw, 2.8rem); }
  section { padding: 5rem 0; }
  .section-header { margin-bottom: 3rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: clamp(3rem, 18vw, 5rem); }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== WAVE DIVIDERS ===== */
.wave-divider {
  position: relative; z-index: 2;
  margin-top: -1px;
  line-height: 0;
}
.wave-divider svg {
  width: 100%; height: 60px;
  display: block;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem;
  z-index: 180;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(15, 26, 54, 0.85);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  color: var(--gold-dim);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(20px);
  pointer-events: none;
  transition: all 0.4s var(--ease-out);
}
.back-to-top svg { width: 20px; height: 20px; }
.back-to-top.visible {
  opacity: 1; transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  background: rgba(201, 168, 76, 0.15);
  border-color: var(--gold-dim);
  color: var(--gold);
  transform: translateY(-2px);
}

/* ===== BUTTON RIPPLE ===== */
.btn-primary, .pricing-btn, .ocean-generate-btn, .record-submit {
  position: relative; overflow: hidden;
}
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: rippleOut 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes rippleOut {
  to { transform: scale(4); opacity: 0; }
}

/* ===== STAT COUNTER GLOW ===== */
.ocean-stat-num {
  transition: color 0.3s;
}
.ocean-stat:hover .ocean-stat-num {
  color: var(--gold);
  text-shadow: 0 0 20px rgba(201, 168, 76, 0.4);
}

/* ===== ENHANCED FEATURE CARDS ===== */
.feature-card {
  backdrop-filter: blur(4px);
}
.feature-card:hover .feature-icon {
  transform: scale(1.1);
  transition: transform 0.4s var(--ease-spring);
}
.feature-icon {
  transition: transform 0.4s var(--ease-out);
}

/* ===== TESTIMONIAL HOVER ===== */
.testimonial-card {
  transition: all 0.4s var(--ease-out);
}
.testimonial-card:hover {
  transform: translateY(-6px);
  border-color: var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/* ===== PRICING CARD GLOW ON HOVER ===== */
.pricing-card--featured::after {
  content: '';
  position: absolute; inset: -1px;
  border-radius: 21px;
  background: linear-gradient(135deg, var(--gold), transparent 50%, var(--gold-dim));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s;
}
.pricing-card--featured:hover::after {
  opacity: 0.3;
}

/* ===== SMOOTH LINK UNDERLINE ===== */
.nav-links a:not(.nav-cta) {
  position: relative;
}
.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s var(--ease-out);
}
.nav-links a:not(.nav-cta):hover::after {
  transform: scaleX(1);
}
