/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --teal: #00ADD8;
  --teal-dark: #0090B5;
  --teal-light: #33C4E8;
  --teal-subtle: rgba(0, 173, 216, 0.08);
  --teal-glow: rgba(0, 173, 216, 0.15);
  --dark: #0f1923;
  --dark-2: #162533;
  --dark-3: #1e3044;
  --text: #e0e8ef;
  --text-muted: #8da0b3;
  --white: #ffffff;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: var(--font);
  background: var(--dark);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

a {
  color: var(--teal-light);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--teal);
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 600;
}

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 25, 35, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 173, 216, 0.1);
  transition: background 0.3s;
}
.nav--scrolled {
  background: rgba(15, 25, 35, 0.95);
  border-bottom-color: rgba(0, 173, 216, 0.2);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  font-weight: 700;
  font-size: 1.2rem;
}
.nav__logo img {
  width: 32px;
  height: 32px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
}
.nav__links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav__links a:hover {
  color: var(--white);
}

.nav__btn {
  background: var(--teal);
  color: var(--white) !important;
  padding: 0.45rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s !important;
}
.nav__btn:hover {
  background: var(--teal-dark) !important;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn--primary {
  background: var(--teal);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--teal-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 173, 216, 0.3);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.15);
}
.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn--outline {
  background: transparent;
  color: var(--teal-light);
  border-color: var(--teal);
}
.btn--outline:hover {
  background: rgba(0, 173, 216, 0.1);
  color: var(--teal);
}

.btn--lg {
  padding: 1rem 2.2rem;
  font-size: 1.05rem;
}

/* ===== HERO ===== */
.hero {
  padding: 10rem 2rem 6rem;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 173, 216, 0.12) 0%, transparent 60%),
              var(--dark);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 173, 216, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

/* Hero Mesh Background */
.hero__mesh {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  height: auto;
  pointer-events: none;
  opacity: 0.7;
}

/* Hero Mascot */
.hero__mascot {
  margin-bottom: 2rem;
}
.hero__mascot img {
  width: 180px;
  height: 180px;
  filter: drop-shadow(0 0 40px rgba(0, 173, 216, 0.3));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.hero__accent {
  color: var(--teal);
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

/* Hero Architecture SVG */
.hero__visual {
  margin-top: 2rem;
}

.hero__architecture {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: var(--radius);
  opacity: 0.9;
  transition: opacity 0.3s;
}
.hero__architecture:hover {
  opacity: 1;
}

/* ===== SECTIONS ===== */
.section {
  padding: 6rem 2rem;
}

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--white);
  text-align: center;
  margin-bottom: 1rem;
}

.section__subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* Alternate section backgrounds */
.section--features,
.section--compare,
.section--cta {
  background: var(--dark-2);
}

/* ===== WHY SECTION ===== */
.why__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.why__text p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}
.why__text strong {
  color: var(--white);
}

.why__quote {
  border-left: 3px solid var(--teal);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text);
  font-style: italic;
  font-size: 1.05rem;
  background: var(--teal-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.why__pillars {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.pillar {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}

.pillar__icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
}
.pillar__icon img {
  width: 64px;
  height: 64px;
}

.pillar h3 {
  color: var(--white);
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
}
.pillar p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== FEATURES GRID ===== */
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--dark);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.3s, transform 0.2s;
}
.feature-card:hover {
  border-color: rgba(0, 173, 216, 0.3);
  transform: translateY(-2px);
}

.feature-card__icon {
  color: var(--teal);
  margin-bottom: 1.2rem;
  width: 40px;
  height: 40px;
}

.feature-card h3 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}
.feature-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ===== HOW IT WORKS / LAYERS ===== */
.section--how {
  background: linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 50%, var(--dark) 100%);
}

.layers {
  max-width: 700px;
  margin: 0 auto 3rem;
}

.layer {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--dark-2);
  border: 1px solid rgba(0, 173, 216, 0.1);
  border-radius: var(--radius);
  transition: border-color 0.3s;
}
.layer:hover {
  border-color: var(--teal);
}

.layer__number {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(0, 173, 216, 0.12);
  color: var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.layer__content h3 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.layer__tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--teal);
  background: rgba(0, 173, 216, 0.1);
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.layer__content p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.layer__connector {
  width: 2px;
  height: 24px;
  background: linear-gradient(to bottom, var(--teal), transparent);
  margin: 0 auto;
  opacity: 0.4;
}

.how__cta {
  text-align: center;
}

/* ===== COMPARISON TABLE ===== */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.compare-table th,
.compare-table td {
  padding: 1rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.compare-table thead th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.2);
}

.compare-table__highlight {
  color: var(--teal) !important;
}

.compare-table tbody td:first-child {
  color: var(--white);
  font-weight: 500;
}

.compare-table tbody td:nth-child(2) {
  color: var(--text-muted);
}

.compare-table tbody td:nth-child(3) {
  color: var(--text);
}

.compare-table tbody tr:hover {
  background: rgba(0, 173, 216, 0.04);
}

/* ===== TALK SECTION ===== */
.section--talk {
  background: var(--dark);
}

.talk__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.talk-card {
  background: var(--dark-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.3s, transform 0.2s;
  display: block;
  color: inherit;
}
.talk-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  color: inherit;
}

.talk-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.talk-card__audio {
  opacity: 0.4;
  transition: opacity 0.2s;
}
.talk-card:hover .talk-card__audio {
  opacity: 0.8;
}

.talk-card__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(0, 173, 216, 0.12);
  color: var(--teal);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.95rem;
}

.talk-card h3 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 0.4rem;
}
.talk-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ===== USE CASES ===== */
.usecases__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.usecase {
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  transition: border-color 0.3s;
}
.usecase:hover {
  border-color: rgba(0, 173, 216, 0.3);
}

.usecase__icon {
  margin-bottom: 1.2rem;
  opacity: 0.85;
}

.usecase h3 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.usecase p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== CTA SECTION ===== */
.section--cta {
  text-align: center;
  padding: 5rem 2rem;
  background: linear-gradient(180deg, var(--dark-2) 0%, var(--dark-3) 100%);
}
.section--cta h2 {
  font-size: 2.2rem;
  color: var(--white);
  margin-bottom: 1rem;
}
.section--cta p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.cta__code {
  background: var(--dark);
  border: 1px solid rgba(0, 173, 216, 0.2);
  border-radius: var(--radius-sm);
  padding: 1.2rem 2rem;
  display: inline-block;
  margin-bottom: 2.5rem;
}
.cta__code code {
  color: var(--teal-light);
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.95rem;
  line-height: 1.8;
}

.cta__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4rem 2rem 2rem;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

.footer__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer__col h4 {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.footer__col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.3rem 0;
  transition: color 0.2s;
}
.footer__col a:hover {
  color: var(--white);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.5rem;
}
.footer__bottom p {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .talk__grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .usecases__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }
  .nav__links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(15, 25, 35, 0.98);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(0, 173, 216, 0.1);
  }
  .nav__links.nav__links--open {
    display: flex;
  }

  .hero {
    padding: 8rem 1.5rem 4rem;
  }
  .hero__diagram {
    flex-direction: column;
  }
  .diagram__arrows {
    flex-direction: row;
    transform: rotate(90deg);
  }

  .why__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .features__grid {
    grid-template-columns: 1fr;
  }

  .talk__grid {
    grid-template-columns: 1fr;
  }

  .usecases__grid {
    grid-template-columns: 1fr;
  }

  .footer__links {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 4rem 1.5rem;
  }
}
