/* ============================================
   WaveCode Landing — Light Theme
   ============================================ */

:root {
  --bg: #ffffff;
  --bg-2: #f8f8fa;
  --surface: #f1f1f4;
  --border: #e4e4e8;
  --border-light: #ededf0;
  --text: #111113;
  --text-2: #55555e;
  --text-3: #8b8b96;
  --accent: #111113;
  --brand: #111113;
  --brand-light: #333338;
  --brand-bg: #f1f1f4;
  --green: #16a34a;
  --green-bg: #ecfdf5;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --amber-bg: #fffbeb;
  --amber: #d97706;
  --radius: 14px;
  --radius-sm: 8px;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'DM Mono', 'SF Mono', monospace;
  --max-w: 1080px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* --- FULL PAGE COMPRESSION EFFECT --- */
.fp-word {
  display: inline;
  transition: all 0.3s ease;
}
.fp-word.fp-compressed {
  background: #111113;
  color: transparent;
  border-radius: 3px;
  padding: 1px 4px;
  margin: 0 1px;
}

/* --- NAV --- */
nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 2rem;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em;
}
.logo-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--text); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
}
.nav-links { display: flex; align-items: center; gap: 1.8rem; }
.nav-links a { font-size: 0.88rem; font-weight: 500; color: var(--text-2); transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.btn-nav {
  background: var(--text) !important; color: #fff !important;
  padding: 7px 16px !important; border-radius: var(--radius-sm);
  font-weight: 600 !important; font-size: 0.85rem !important;
  transition: opacity 0.15s !important;
}
.btn-nav:hover { opacity: 0.8; }
.btn-nav-outline {
  padding: 7px 16px !important; border-radius: var(--radius-sm);
  font-weight: 600 !important; font-size: 0.85rem !important;
  border: 1px solid var(--border) !important; color: var(--text) !important;
  transition: all 0.15s !important;
}
.btn-nav-outline:hover { border-color: var(--text-3) !important; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 600;
  transition: all 0.15s;
}
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { opacity: 0.85; }
.btn-outline { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--text-3); color: var(--text); }
.btn-sm { padding: 10px 20px; font-size: 0.88rem; }

/* --- HERO --- */
.hero {
  padding: 10rem 2rem 5rem;
  text-align: center;
}
.hero-content { max-width: 640px; margin: 0 auto; }
.hero-pill {
  display: inline-block;
  background: var(--brand-bg); color: var(--brand);
  padding: 5px 14px; border-radius: 100px;
  font-size: 0.8rem; font-weight: 600;
  margin-bottom: 2rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 3.8rem);
  font-weight: 700; letter-spacing: -0.04em;
  line-height: 1.1; margin-bottom: 1.2rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--brand);
}
.hero-sub {
  font-size: 1.1rem; color: var(--text-2);
  line-height: 1.7; margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* --- METRICS --- */
.metrics {
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 3.5rem 2rem;
}
.metrics-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  gap: 3.5rem; flex-wrap: wrap;
}
.metric { text-align: center; }
.metric-val {
  display: block; font-size: 2.8rem; font-weight: 700;
  letter-spacing: -0.04em; line-height: 1;
}
.metric-label {
  display: block; font-size: 0.85rem; color: var(--text-3);
  margin-top: 6px; font-weight: 500;
}
.metric-sep { width: 1px; height: 40px; background: var(--border); }

/* --- SECTION HEADERS --- */
.section-header { text-align: center; margin-bottom: 3rem; }
.tag {
  display: inline-block;
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--brand); margin-bottom: 0.8rem;
}
.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700; letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
}
.section-header p {
  font-size: 1rem; color: var(--text-2);
  max-width: 480px; margin: 0 auto;
}

/* --- DEMO --- */
.demo-section { max-width: var(--max-w); margin: 0 auto; padding: 6rem 2rem; }
.demo-box {
  background: #1e1d22;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.04);
}
.demo-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.demo-label { font-size: 0.8rem; color: rgba(255,255,255,0.35); font-weight: 500; }
.demo-counter { font-size: 0.82rem; color: rgba(255,255,255,0.5); }
.demo-counter strong { color: #fff; font-weight: 700; font-size: 1rem; }
.demo-sep { margin: 0 6px; opacity: 0.3; }
.demo-canvas {
  padding: 2.2rem 2.2rem 1.5rem;
  font-family: var(--mono); font-size: 0.88rem;
  line-height: 2.1; color: rgba(210, 200, 185, 0.8);
  min-height: 200px;
  cursor: crosshair;
  user-select: none;
  position: relative;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.demo-canvas .word {
  display: inline; transition: all 0.25s ease;
  border-radius: 3px; padding: 2px 0;
}
.demo-canvas .word.compressed {
  background: #111114;
  color: transparent;
  border-radius: 4px;
  padding: 2px 6px;
  margin: 0 1px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.demo-canvas .word.kept {
  color: #e8ddd0;
  font-weight: 500;
}
.demo-bar-wrap {
  padding: 0 20px 16px;
}
.demo-bar {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.demo-bar::after {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--bar-width, 0%);
  background: linear-gradient(90deg, #22c55e, #16a34a);
  border-radius: 2px;
  transition: width 0.15s ease;
}

/* --- RESEARCH SECTION --- */
.research-section { max-width: var(--max-w); margin: 0 auto; padding: 6rem 2rem; }
.research-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem; margin-bottom: 3rem;
}
.r-stat {
  background: #1e1d22; border-radius: 12px; padding: 1.5rem;
  text-align: center;
}
.r-val {
  display: block; font-size: 1.8rem; font-weight: 800;
  color: #fff; letter-spacing: -0.03em; line-height: 1;
  font-family: var(--mono);
}
.r-label {
  display: block; font-size: 0.78rem; color: rgba(255,255,255,0.45);
  margin-top: 8px; font-weight: 500;
}
.quote-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.2rem; margin-bottom: 3rem;
}
.press-quote {
  background: var(--bg-2); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 1.5rem;
  border-left: 3px solid var(--text);
}
.press-quote p {
  font-size: 0.95rem; font-style: italic; color: var(--text);
  line-height: 1.6; margin-bottom: 10px;
}
.press-quote cite {
  font-style: normal; font-size: 0.8rem; color: var(--text-3);
}
.press-quote cite a { text-decoration: underline; text-underline-offset: 2px; }
.press-quote cite a:hover { color: var(--text); }
.seen-on { text-align: center; }
.seen-label {
  display: block; font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-3); font-weight: 600;
  margin-bottom: 1rem;
}
.seen-logos { display: flex; align-items: center; justify-content: center; gap: 1.2rem; flex-wrap: wrap; }
.seen-item {
  font-size: 0.88rem; font-weight: 600; color: var(--text-2);
  padding: 8px 18px; border: 1px solid var(--border);
  border-radius: 100px; transition: all 0.15s;
}
.seen-item:hover { border-color: var(--text-3); color: var(--text); }

/* --- KERNEL SECTION --- */
.kernel-section { background: var(--bg-2); padding: 6rem 2rem; }
.kernel-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
  align-items: center;
}
.kernel-text .tag { margin-bottom: 0.8rem; }
.kernel-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700;
  letter-spacing: -0.03em; margin-bottom: 1rem; line-height: 1.2;
}
.kernel-text p { font-size: 0.95rem; color: var(--text-2); line-height: 1.7; margin-bottom: 1.5rem; }
.kernel-params { display: flex; flex-direction: column; gap: 8px; }
.kp {
  font-size: 0.88rem; color: var(--text-2); padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
}
.kp strong {
  font-family: var(--mono); font-size: 1rem;
  color: var(--text); margin-right: 8px;
}
.formula-box {
  background: #1e1d22; border-radius: 12px; padding: 1.5rem;
  text-align: center; margin-bottom: 1.2rem;
}
.formula-label {
  display: block; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: rgba(255,255,255,0.35);
  font-weight: 600; margin-bottom: 10px;
}
.formula-box code {
  font-family: var(--mono); font-size: 1.1rem;
  color: #e8ddd0; font-weight: 500;
}
.savings-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-bottom: 8px;
}
.sg {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 8px; text-align: center;
}
.sg-len { display: block; font-size: 0.72rem; color: var(--text-3); font-weight: 600; }
.sg-val { display: block; font-size: 1.3rem; font-weight: 800; color: var(--text); font-family: var(--mono); }
.savings-note { font-size: 0.75rem; color: var(--text-3); text-align: center; display: block; }

/* --- WHY SECTION --- */
.why-section { max-width: var(--max-w); margin: 0 auto; padding: 6rem 2rem; }
.cards-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--border); transform: translateY(-2px); }
.card-icon {
  width: 40px; height: 40px;
  background: var(--brand-bg);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand); margin-bottom: 1rem;
}
.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; }
.card p { font-size: 0.88rem; color: var(--text-2); line-height: 1.6; }

/* --- PRICING --- */
.pricing-section { padding: 6rem 2rem; background: var(--bg-2); }
.pricing-table-wrap { max-width: 980px; margin: 0 auto; overflow-x: auto; }
.pricing-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.pricing-table th, .pricing-table td {
  padding: 12px 18px; text-align: left;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-light);
}
.pricing-table thead th {
  background: var(--bg);
  padding: 18px;
}
.pricing-table tbody tr:last-child td { border-bottom: none; }
.pricing-table tbody td:first-child { font-weight: 600; color: var(--text); white-space: nowrap; }
.th-brand { display: flex; flex-direction: column; gap: 2px; }
.th-name { font-size: 0.88rem; font-weight: 700; }
.th-price { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.th-price.muted { color: var(--text-3); }
.th-brand.ours .th-price { color: var(--brand); }
td.yes { color: var(--green); font-weight: 600; }
td.no { color: var(--text-3); }
td.mid { color: var(--amber); }

/* --- DOWNLOAD --- */
.download-section { max-width: var(--max-w); margin: 0 auto; padding: 6rem 2rem; text-align: center; }
.dl-grid { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.dl-card {
  background: var(--bg-2); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 1.5rem 2.5rem;
  text-align: center; transition: all 0.2s;
  min-width: 160px;
}
.dl-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(80,70,229,0.08); }
.dl-icon { display: block; font-size: 1.8rem; margin-bottom: 6px; }
.dl-name { display: block; font-size: 1rem; font-weight: 700; }
.dl-ext { display: block; font-size: 0.78rem; color: var(--text-3); margin-top: 2px; }
.dl-status { margin-top: 1rem; font-size: 0.88rem; color: var(--text-3); min-height: 1.4em; }

/* --- FOOTER --- */
footer { border-top: 1px solid var(--border-light); }
.footer-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 1.5rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-brand { font-weight: 700; color: var(--text-3); font-size: 0.9rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.82rem; color: var(--text-3); transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.78rem; color: var(--text-3); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .cards-row { grid-template-columns: 1fr; }
  .metrics-inner { gap: 2rem; }
  .metric-sep { display: none; }
  .nav-links a:not(.btn-nav) { display: none; }
  .hero { padding-top: 7rem; }
  .pricing-table { font-size: 0.8rem; }
  .pricing-table th, .pricing-table td { padding: 10px 10px; }
  .research-stats { grid-template-columns: repeat(2, 1fr); }
  .quote-row { grid-template-columns: 1fr; }
  .kernel-inner { grid-template-columns: 1fr; gap: 2rem; }
}
