/* ===========================================
   HAIKU — Premium AI API Access
   WHITE EDITION. Clean. Editorial.
   =========================================== */

@property --glow-x {
  syntax: '<percentage>';
  initial-value: 50%;
  inherits: false;
}

@property --glow-y {
  syntax: '<percentage>';
  initial-value: 50%;
  inherits: false;
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: #555;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Editorial serif for display headings */
.display-mega,
.display-lg,
.section-label {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

body {
  overflow-x: hidden;
  background: #ffffff;
}

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

/* ─── Layout ─── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Nav ─── */
.top-nav {
  height: 64px;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px) saturate(180%);
  z-index: 100;
  animation: navSlideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes navSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.nav-container {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #ddd;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s;
}

.brand:hover .brand-logo {
  transform: scale(1.15) rotate(5deg);
  border-color: #bbb;
}

.brand-text {
  font-size: 16px;
  font-weight: 600;
  color: #111;
  letter-spacing: -0.3px;
}

.nav-menu {
  display: flex;
  gap: 28px;
}

.nav-menu a {
  font-size: 13px;
  font-weight: 500;
  color: #888;
  position: relative;
  transition: color 0.25s;
  padding: 4px 0;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: #111;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-menu a:hover {
  color: #111;
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ─── Buttons ─── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  height: 38px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease;
  isolation: isolate;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    rgba(0,0,0,0.08),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 0;
  pointer-events: none;
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: #111;
  color: #fff;
  box-shadow: 0 0 0 0 rgba(0,0,0,0);
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.15),
              0 2px 8px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.96) translateY(0);
}

.btn-secondary {
  background: transparent;
  color: #111;
  border: 1px solid #ccc;
}

.btn-secondary:hover {
  border-color: #999;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: #888;
  padding: 8px 12px;
  transition: color 0.2s;
}

.btn-ghost:hover {
  color: #111;
}

.btn-large {
  height: 48px;
  padding: 12px 28px;
  font-size: 14px;
}

/* Ripple */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(0,0,0,0.12);
  transform: scale(0);
  animation: rippleAnim 0.6s linear;
  pointer-events: none;
  z-index: 1;
}

@keyframes rippleAnim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ─── Hero ─── */
.hero-band {
  padding: 140px 0 100px;
  text-align: center;
  background: #ffffff;
  position: relative;
}

.hero-band::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.03) 0%, transparent 65%);
  pointer-events: none;
}

.hero-content {
  position: relative;
}

.display-mega {
  font-size: clamp(36px, 8vw, 72px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -2.5px;
  color: #111;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.claude-brand {
  font-weight: 500;
  display: inline;
  color: #D97757;
}

.claude-icon {
  height: 28px;
  width: auto;
  vertical-align: middle;
  margin-left: 10px;
}

.hero-subhead {
  font-size: 17px;
  color: #888;
  max-width: 460px;
  margin: 24px auto 36px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.7s 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-cta {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.6s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Sections ─── */
.section {
  padding: 100px 0;
  background: #ffffff;
}

.section-dark {
  background: #f9f9f9;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 14px;
}

.display-lg {
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -1px;
  color: #111;
}

/* ─── Models Table ─── */
.models-table-wrap {
  margin-top: 56px;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.models-table-wrap.visible {
  opacity: 1;
  transform: translateY(0);
}

.models-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.models-table th {
  text-align: left;
  padding: 14px 18px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #bbb;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}

.models-table td {
  padding: 16px 18px;
  color: #555;
  border-bottom: 1px solid #f0f0f0;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s, background 0.2s;
}

.models-table tr {
  transition: background 0.2s;
}

.models-table tr:hover {
  background: #fafafa;
}

.models-table tr:hover td {
  color: #111;
}

.models-table tbody tr:last-child td {
  border-bottom: none;
}

.model-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.dot-ind {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

tr:hover .dot-ind {
  transform: scale(1.4);
}

.dot-ind.claude { background: #dfa88f; box-shadow: 0 0 8px rgba(223,168,143,0.3); }
.dot-ind.gpt    { background: #9fbbe0; box-shadow: 0 0 8px rgba(159,187,224,0.3); }
.dot-ind.gemini { background: #9fc9a2; box-shadow: 0 0 8px rgba(159,201,162,0.3); }

.latency-good { color: #2d8a5e; font-weight: 500; }
.latency-mid  { color: #b8860b; font-weight: 500; }

.price-tag {
  font-weight: 600;
  color: #111;
}

/* ─── Features ─── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 56px;
  margin-top: 52px;
}

.feature-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-item h3 {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.feature-item p {
  font-size: 14px;
  color: #888;
  line-height: 1.55;
}

/* ─── Pricing ─── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 52px;
}

.pricing-card {
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  padding: 32px;
  background: #fff;
  transition: border-color 0.3s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s;
  opacity: 0;
  transform: translateY(20px);
}

.pricing-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.pricing-card:hover {
  border-color: #ccc;
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}

.pricing-card.featured {
  border-color: #ddd;
  position: relative;
}

.pricing-card.featured::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  padding: 1px;
  background: linear-gradient(180deg, rgba(0,0,0,0.08), transparent 40%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.pricing-card.featured:hover::before {
  opacity: 1;
}

.badge {
  display: inline-block;
  background: #111;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.pricing-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  margin-bottom: 4px;
}

.price {
  font-size: 32px;
  font-weight: 400;
  color: #111;
  letter-spacing: -1px;
  margin: 8px 0 24px;
}

.price span {
  font-size: 14px;
  color: #999;
  font-weight: 400;
  letter-spacing: 0;
}

.pricing-card ul {
  margin-bottom: 28px;
}

.pricing-card li {
  font-size: 13px;
  color: #888;
  padding: 6px 0;
  padding-left: 16px;
  position: relative;
}

.pricing-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ddd;
}

/* ─── CTA ─── */
.cta-band {
  padding: 120px 0;
  text-align: center;
  background: #f9f9f9;
  border-top: 1px solid #eee;
  position: relative;
}

.cta-band::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.02) 0%, transparent 65%);
  pointer-events: none;
}

.cta-band .display-lg {
  margin-bottom: 28px;
  position: relative;
}

/* ─── Footer ─── */
.footer {
  border-top: 1px solid #eee;
  padding: 48px 0 32px;
  background: #ffffff;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

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

.footer-brand img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  opacity: 0.8;
}

.footer-brand span {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  letter-spacing: -0.2px;
}

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

.footer-links a {
  font-size: 13px;
  color: #bbb;
  transition: color 0.2s;
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #111;
  transition: width 0.25s ease;
}

.footer-links a:hover {
  color: #111;
}

.footer-links a:hover::after {
  width: 100%;
}

.copyright {
  font-size: 12px;
  color: #ccc;
}

/* ─── Magnetic Button Effect (JS-driven) ─── */
.btn-magnetic {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}


/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Theme Toggle ─── */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e5e5e5;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.theme-toggle:hover {
  border-color: #ccc;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.theme-toggle .icon-moon {
  display: none;
}

.theme-toggle .icon-sun {
  display: block;
  color: #555;
}

/* ─── Dark Theme ─── */
html[data-theme="dark"] {
  color: #a09c92;
  background: #000000;
}

html[data-theme="dark"] body {
  background: #000000;
}

html[data-theme="dark"] .theme-toggle {
  border-color: #333;
  background: #111;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

html[data-theme="dark"] .theme-toggle:hover {
  border-color: #555;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

html[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
  color: #aaa;
}

html[data-theme="dark"] .top-nav {
  background: rgba(5, 5, 5, 0.85);
  border-bottom-color: #1a1a1a;
}

html[data-theme="dark"] .brand-logo {
  border-color: #333;
}

html[data-theme="dark"] .brand:hover .brand-logo {
  border-color: #555;
}

html[data-theme="dark"] .brand-text,
html[data-theme="dark"] .nav-menu a:hover,
html[data-theme="dark"] .display-mega,
html[data-theme="dark"] .display-lg,
html[data-theme="dark"] .feature-item h3,
html[data-theme="dark"] .pricing-card h3,
html[data-theme="dark"] .footer-brand span,
html[data-theme="dark"] .models-table tr:hover td,
html[data-theme="dark"] .price-tag,
html[data-theme="dark"] .footer-links a:hover {
  color: #f7f7f4;
}

html[data-theme="dark"] .nav-menu a,
html[data-theme="dark"] .hero-subhead,
html[data-theme="dark"] .feature-item p,
html[data-theme="dark"] .pricing-card li,
html[data-theme="dark"] .models-table td,
html[data-theme="dark"] .section-subhead,
html[data-theme="dark"] .footer-tagline,
html[data-theme="dark"] .copyright,
html[data-theme="dark"] .btn-ghost,
html[data-theme="dark"] .btn-ghost:hover {
  color: #807d72;
}

html[data-theme="dark"] .btn-ghost:hover {
  color: #f7f7f4;
}

html[data-theme="dark"] .section,
html[data-theme="dark"] .hero-band,
html[data-theme="dark"] .footer {
  background: #000000;
}

html[data-theme="dark"] .section-dark,
html[data-theme="dark"] .cta-band {
  background: #000000;
  border-top-color: #111;
  border-bottom-color: #111;
}

html[data-theme="dark"] .models-table-wrap,
html[data-theme="dark"] .pricing-card {
  background: #0a0a0a;
  border-color: #1a1a1a;
}

html[data-theme="dark"] .pricing-card:hover {
  border-color: #2a2a2a;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

html[data-theme="dark"] .pricing-card.featured {
  border-color: #2a2a2a;
}

html[data-theme="dark"] .models-table th {
  background: #0d0d0d;
  color: #555;
  border-bottom-color: #1a1a1a;
}

html[data-theme="dark"] .models-table td {
  color: #a09c92;
  border-bottom-color: #111;
}

html[data-theme="dark"] .models-table tr:hover {
  background: #0e0e0e;
}

html[data-theme="dark"] .dot-ind.claude {
  background: #dfa88f;
  box-shadow: 0 0 8px rgba(223,168,143,0.3);
}

html[data-theme="dark"] .dot-ind.gpt {
  background: #9fbbe0;
  box-shadow: 0 0 8px rgba(159,187,224,0.3);
}

html[data-theme="dark"] .dot-ind.gemini {
  background: #9fc9a2;
  box-shadow: 0 0 8px rgba(159,201,162,0.3);
}

html[data-theme="dark"] .btn-primary {
  background: #ffffff;
  color: #050505;
}

html[data-theme="dark"] .btn-primary:hover {
  background: #e8e8e8;
  box-shadow: 0 0 30px rgba(255,255,255,0.12);
}

html[data-theme="dark"] .btn-secondary {
  color: #f7f7f4;
  border-color: #333;
}

html[data-theme="dark"] .btn-secondary:hover {
  border-color: #666;
  box-shadow: 0 0 20px rgba(255,255,255,0.04);
}

html[data-theme="dark"] .badge {
  background: #f7f7f4;
  color: #050505;
}

html[data-theme="dark"] .footer {
  border-top-color: #111;
}

html[data-theme="dark"] .footer-links a {
  color: #555;
}

html[data-theme="dark"] .footer-links a:hover {
  color: #f7f7f4;
}

html[data-theme="dark"] .footer-links a::after {
  background: #f7f7f4;
}

html[data-theme="dark"] .section-label {
  color: #444;
}

html[data-theme="dark"] .hero-band::before {
  background: none;
}

html[data-theme="dark"] .cta-band::before {
  background: none;
}

html[data-theme="dark"] .latency-good {
  color: #6bb08a;
}

html[data-theme="dark"] .latency-mid {
  color: #c9a66b;
}

html[data-theme="dark"] .price {
  color: #f7f7f4;
}

html[data-theme="dark"] .price span {
  color: #666;
}

html[data-theme="dark"] .pricing-card li::before {
  background: #444;
}

html[data-theme="dark"] .models-table-wrap {
  border-color: #161616;
}


html[data-theme="dark"] .copyright {
  color: #333;
}

html[data-theme="dark"] .nav-menu a::after {
  background: #f7f7f4;
}

/* ─── Docs Code Block ─── */
.code-block {
  display: block;
  background: #f4f4f4;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 12px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #333;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.code-wide {
  padding: 20px 24px;
  line-height: 1.7;
}

html[data-theme="dark"] .code-block {
  background: #0d0d0d;
  border-color: #1a1a1a;
  color: #c8c4ba;
}

html[data-theme="dark"] .docs-example h3 {
  color: #f7f7f4;
}

.scatter-word {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
}

.scatter-letter {
  display: inline-block;
  will-change: transform;
}

html[data-theme="dark"] .claude-brand {
  color: #E8956A;
}

html[data-theme="dark"] .scatter-word {
  color: #f7f7f4;
}
@media (max-width: 768px) {
  .feature-grid { grid-template-columns: 1fr; gap: 32px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .nav-menu { display: none; }
  .footer-row { flex-direction: column; gap: 20px; align-items: flex-start; }
  .models-table { font-size: 12px; }
  .models-table th, .models-table td { padding: 10px 12px; }
  .cursor-glow { display: none; }
}
