:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Default: Liquid Glass (Apple HIG) */
  --bg-canvas:
    radial-gradient(ellipse 65% 55% at 15% 10%, rgba(10, 132, 255, 0.24), transparent 58%),
    radial-gradient(ellipse 55% 50% at 88% 16%, rgba(94, 92, 230, 0.2), transparent 56%),
    radial-gradient(ellipse 60% 45% at 50% 95%, rgba(100, 210, 255, 0.12), transparent 58%),
    #05070d;
  --surface-nav: rgba(18, 18, 24, 0.72);
  --surface-card: linear-gradient(165deg, rgba(36, 36, 44, 0.62) 0%, rgba(22, 22, 28, 0.72) 100%);
  --surface-elevated: linear-gradient(155deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.06) 100%);
  --surface-pill: rgba(120, 120, 128, 0.24);
  --surface-pill-hover: rgba(120, 120, 128, 0.36);
  --surface-code: rgba(8, 11, 18, 0.88);
  --border-hairline: rgba(255, 255, 255, 0.16);
  --shadow-glass:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.22),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.1),
    0 20px 50px rgba(0, 0, 0, 0.45);
  --accent-gradient: linear-gradient(180deg, #339cff 0%, #0a84ff 100%);
  --accent-solid: #409cff;
  --accent-soft: rgba(10, 132, 255, 0.18);
  --accent-border: rgba(10, 132, 255, 0.38);
  --accent-fg: #ffffff;
  --text-primary: #ffffff;
  --text-secondary: rgba(235, 235, 245, 0.74);
  --text-muted: rgba(235, 235, 245, 0.54);
  --blur: blur(36px) saturate(210%);
}

html[data-theme="whatsapp"] {
  --bg-canvas: #0b141a;
  --surface-nav: rgba(17, 27, 33, 0.94);
  --surface-card: #111b21;
  --surface-elevated: #202c33;
  --surface-pill: #2a3942;
  --surface-pill-hover: #3b4a54;
  --surface-code: #0b141a;
  --border-hairline: #2a3942;
  --shadow-glass: 0 16px 40px rgba(0, 0, 0, 0.45);
  --accent-gradient: #00a884;
  --accent-solid: #00a884;
  --accent-soft: rgba(0, 168, 132, 0.16);
  --accent-border: rgba(0, 168, 132, 0.4);
  --accent-fg: #111b21;
  --text-primary: #e9edef;
  --text-secondary: #aebac1;
  --text-muted: #8696a0;
  --blur: none;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--bg-canvas);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

html[data-theme="whatsapp"] body {
  background-color: #0b141a;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.035' stroke-width='1.3'%3E%3Cpath d='M18 24c0-5 5-9 11-9s11 4 11 9-5 9-11 9c-2 0-4-.4-5.7-1.1L18 35l1.4-4.7C18.5 28.6 18 26.4 18 24z'/%3E%3Ccircle cx='88' cy='28' r='8'/%3E%3Cpath d='M84 28h8M88 24v8'/%3E%3Cpath d='M25 84l6-10 6 10h-12z'/%3E%3Cpath d='M78 88c3-6 12-6 15 0'/%3E%3Ccircle cx='85' cy='76' r='3'/%3E%3Cpath d='M55 52l4 4 7-8'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 160px 160px;
}

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--surface-nav);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border-hairline);
}

.nav-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--accent-gradient);
  color: var(--accent-fg);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border-hairline);
  background: var(--surface-elevated);
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.14s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn:hover {
  background: var(--surface-pill-hover);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--accent-fg);
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 22px rgba(10, 132, 255, 0.28);
}

.btn-primary:hover {
  background: var(--accent-gradient);
  filter: brightness(1.06);
}

.btn-lg {
  padding: 11px 22px;
  font-size: 14px;
}

/* Main Sections */
.main-content {
  padding: 44px 0 64px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.hero {
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-hairline);
  color: var(--accent-solid);
  font-size: 12px;
  font-weight: 600;
}

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 4.4vw, 48px);
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0;
  max-width: 650px;
  font-size: 15px;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding-top: 6px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.section-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.accent-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-solid);
}

.accent-link:hover {
  text-decoration: underline;
}

/* Desktop Screenshot Frames */
.desktop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.window-card {
  margin: 0;
  border-radius: 20px;
  background: var(--surface-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-glass);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.16s ease;
}

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

.window-bar {
  padding: 10px 14px;
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.traffic-lights {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}
.dot-red { background: #ff5f57; }
.dot-amber { background: #febc2e; }
.dot-green { background: #28c840; }

.window-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.window-card img {
  display: block;
  width: 100%;
  height: auto;
}

/* Mobile Screenshot Frames */
.mobile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 780px;
  margin: 26px auto 0;
}

.phone-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.phone-bezel {
  width: 100%;
  max-width: 310px;
  padding: 10px;
  border-radius: 36px;
  background: var(--surface-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-glass);
  cursor: zoom-in;
  transition: transform 0.16s ease;
}

.phone-bezel:hover {
  transform: translateY(-2px);
}

.phone-notch {
  width: 82px;
  height: 18px;
  border-radius: 999px;
  background: #000000;
  margin: 0 auto 8px;
}

.phone-screen {
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--border-hairline);
}

.phone-screen img {
  display: block;
  width: 100%;
  height: auto;
}

.phone-caption {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Capability & Spec Cards */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cards-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card {
  padding: 20px;
  border-radius: 20px;
  background: var(--surface-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-glass);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}

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

.icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-solid);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.spec-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-solid);
  margin-bottom: 10px;
}

.spec-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spec-list strong {
  color: var(--text-primary);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--surface-pill);
  color: var(--text-primary);
}

.arch-diagram {
  margin: 16px 0 0;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-code);
  border: 1px solid var(--border-hairline);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  overflow-x: auto;
}

.schema-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.schema-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-hairline);
}

.schema-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-solid);
}

.schema-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

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

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(4, 6, 12, 0.86);
  backdrop-filter: blur(18px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 20px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-hairline);
  background: var(--surface-nav);
  padding: 22px 0;
  font-size: 12px;
  color: var(--text-muted);
}

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

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

.footer-links a:hover {
  color: var(--text-primary);
}

@media (max-width: 900px) {
  .cards-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .desktop-grid,
  .mobile-grid,
  .cards-3,
  .cards-2,
  .schema-grid {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 28px 0 48px;
    gap: 40px;
  }

  .nav-hide-sm {
    display: none;
  }
}
