:root {
  --bg: #fdfbf7;
  --bg-dark: #121212;
  --text: #171717;
  --text-light: #fdfbf7;
  --muted: #8a857d;
  --muted-dark: #888888;
  --accent-yellow: #f4c542;
  --accent-red: #d9463b;
  --accent-blue: #4287f5;
  --accent-green: #34a853;
}

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

html {
  scroll-behavior: smooth;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.hero-title {
  font-size: clamp(2.5rem, 10vw, 8rem);
  background: linear-gradient(135deg, #171717 0%, #4a4a4a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: clamp(2rem, 8vw, 5.5rem);
  margin-bottom: 1.5rem;
}

.subtitle {
  font-size: clamp(1rem, 4vw, 1.8rem);
  color: var(--muted);
  font-weight: 500;
  max-width: 30ch;
  line-height: 1.4;
}

.section-deployment .subtitle {
  max-width: 65ch;
}

/* Layout */
.section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 8vw;
  position: relative;
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 1000px;
  isolation: isolate;
}

.section-center {
  align-items: center;
  text-align: center;
}

/* Visuals */
.orb {
  position: absolute;
  border-radius: 50%;
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
  will-change: transform;
  animation: float 32s ease-in-out infinite alternate;
  contain: paint;
}

.orb-1 {
  width: 54vw;
  height: 54vw;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(244, 197, 66, 0.34) 0%,
    rgba(244, 197, 66, 0.18) 42%,
    rgba(244, 197, 66, 0.06) 64%,
    transparent 74%
  );
  top: -10vw;
  right: -10vw;
}

.orb-2 {
  width: 36vw;
  height: 36vw;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(217, 70, 59, 0.3) 0%,
    rgba(217, 70, 59, 0.16) 42%,
    rgba(217, 70, 59, 0.06) 64%,
    transparent 74%
  );
  bottom: -10vw;
  left: -10vw;
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-5%, 5%) scale(1.1); }
  100% { transform: translate(5%, -5%) scale(0.9); }
}

/* Bento Grid (Domains) */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(260px, auto);
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
  margin: 4rem auto 0;
}

.bento-card {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  isolation: isolate;
  content-visibility: auto;
  contain-intrinsic-size: 300px;
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Backgrounds (PPT-like rich visuals) */
.bento-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.15;
  transition: opacity 0.3s ease, transform 0.5s ease;
}

.bento-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.3;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.bento-card:hover .bento-bg {
  opacity: 0.25;
  transform: scale(1.05);
}

/* Specific Backgrounds using Mesh Gradients */
.bg-health { background: radial-gradient(at 0% 0%, hsla(353,100%,73%,1) 0, transparent 60%), radial-gradient(at 100% 100%, hsla(339,49%,40%,1) 0, transparent 60%); }
.bg-finance { background: radial-gradient(at 0% 0%, hsla(40,100%,74%,1) 0, transparent 60%), radial-gradient(at 100% 100%, hsla(22,100%,60%,1) 0, transparent 60%); }
.bg-learning { background: radial-gradient(at 100% 100%, hsla(240,100%,70%,1) 0, transparent 60%), radial-gradient(at 0% 0%, hsla(200,100%,70%,1) 0, transparent 60%); }
.bg-efficiency { background: radial-gradient(at 0% 100%, hsla(140,100%,70%,1) 0, transparent 60%), radial-gradient(at 100% 0%, hsla(100,100%,70%,1) 0, transparent 60%); }
.bg-creation { background: radial-gradient(at 100% 0%, hsla(280,100%,70%,1) 0, transparent 60%), radial-gradient(at 0% 100%, hsla(320,100%,70%,1) 0, transparent 60%); }
.bg-smarthome { background: radial-gradient(at 50% 50%, hsla(210,20%,60%,1) 0, transparent 60%), radial-gradient(at 100% 100%, hsla(210,50%,40%,1) 0, transparent 60%); }

/* Grid Spans */
.bento-2x2 { grid-column: span 2; grid-row: span 2; }
.bento-1x2 { grid-column: span 1; grid-row: span 2; }
.bento-2x1 { grid-column: span 2; grid-row: span 1; }
.bento-1x1 { grid-column: span 1; grid-row: span 1; }

/* Content Styling */
.bento-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.bento-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  flex-shrink: 0;
}
.bento-icon svg { width: 22px; height: 22px; }

.bento-header h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin: 0;
}

.bento-content h4 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--text);
}

.bento-2x2 .bento-content h4 { font-size: 2.5rem; }

.bento-content p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 90%;
}

.bento-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.bento-tag {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.4rem 0.8rem;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@media (max-width: 992px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .bento-2x2, .bento-1x2, .bento-2x1, .bento-1x1 {
    grid-column: span 1;
    grid-row: span 1;
  }
  .bento-card {
    padding: 2rem;
  }
  .bento-content h4 {
    font-size: 1.8rem !important;
  }
}

/* Secure Section (Infrastructure) */
.section-secure {
  background: #F0F9FF;
  color: #0C4A6E;
}

.section-secure .subtitle {
  color: #0284C7;
  max-width: 60ch;
  margin-bottom: 4rem;
}

.section-secure .orb-1 {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(3, 105, 161, 0.26) 0%,
    rgba(3, 105, 161, 0.12) 42%,
    rgba(3, 105, 161, 0.05) 64%,
    transparent 74%
  );
}
.section-secure .orb-2 {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(34, 197, 94, 0.22) 0%,
    rgba(34, 197, 94, 0.1) 42%,
    rgba(34, 197, 94, 0.04) 64%,
    transparent 74%
  );
}

/* Plugin Cards */
.plugins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
}

.plugin-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  padding: 2.5rem;
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
  box-shadow: 0 8px 26px rgba(3, 105, 161, 0.06);
  display: flex;
  flex-direction: column;
  content-visibility: auto;
  contain-intrinsic-size: 260px;
}

.plugin-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 36px rgba(3, 105, 161, 0.12);
}

.plugin-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.plugin-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-shield { background: rgba(3, 105, 161, 0.1); color: #0369A1; }
.icon-brain { background: rgba(139, 92, 246, 0.1); color: #8B5CF6; }
.icon-heal { background: rgba(34, 197, 94, 0.1); color: #22C55E; }
.icon-observe { background: rgba(245, 158, 11, 0.1); color: #F59E0B; }
.icon-mesh { background: rgba(225, 29, 72, 0.1); color: #E11D48; }
.icon-data { background: rgba(79, 70, 229, 0.1); color: #4F46E5; }

.plugin-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0;
  color: #0C4A6E;
  line-height: 1.2;
}

.plugin-card p {
  font-size: 1.05rem;
  color: #0284C7;
  line-height: 1.6;
}

/* Deployment Section */
.section-deployment {
  background: #ffffff;
  color: var(--text);
}

.deployment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  width: 100%;
  max-width: 1200px;
  margin: 4rem auto 0;
}

.deploy-card {
  padding: 3rem 2.5rem;
  background: #fafafa;
  border-radius: 32px;
  border: 1px solid rgba(0,0,0,0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  content-visibility: auto;
  contain-intrinsic-size: 260px;
}

.deploy-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
  background: #ffffff;
}

.deploy-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.deploy-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #171717 0%, #4a4a4a 100%);
  color: #ffffff;
  flex-shrink: 0;
}

.deploy-card h3 {
  font-size: 1.6rem;
  margin-bottom: 0;
  color: #171717;
  line-height: 1.2;
}

.deploy-card p {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
}

.deploy-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.deploy-tag {
  background: #f1f5f9;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-size: 0.85rem;
  color: #475569;
  font-weight: 500;
}

.formula-box {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(0,0,0,0.03);
  border-radius: 12px;
  font-family: monospace;
  font-size: 0.95rem;
  color: #4a4a4a;
  line-height: 1.5;
}

/* CTA Section (Echo Hero) */
.section-cta {
  background: #FFCB05; /* Pikachu Yellow */
  color: #171717;
  min-height: 70vh;
  padding: 8rem 4vw;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.section-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
  width: 100%;
  padding: 4rem 2rem;
}

.cta-logo {
  height: 128px;
  width: auto;
  margin: 0 auto 0.5rem;
  display: block;
  filter: brightness(0); /* Make logo pure black for contrast */
}

.section-cta .hero-title {
  color: #000000;
  margin-bottom: 1.5rem;
  font-size: clamp(3rem, 6vw, 4.5rem);
  letter-spacing: -0.02em;
}

.section-cta .subtitle {
  color: #333333;
  margin: 0 auto 3.5rem;
  max-width: 48ch;
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 500;
}

.cta-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2.5rem;
  border-radius: 100px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

.section-cta .btn-primary {
  background: #000000;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.section-cta .btn-primary:hover {
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
  transform: translateY(-2px);
}

.section-cta .btn-secondary {
  background: transparent;
  color: #000000;
  border: 2px solid #000000;
}

.section-cta .btn-secondary:hover {
  background: rgba(0,0,0,0.05);
  transform: translateY(-2px);
}

/* CTA decorative orbs (override default orb-1/orb-2 gradients) */
.section-cta .orb-cta--primary {
  background: radial-gradient(circle, rgba(3, 105, 161, 0.38) 0%, transparent 70%);
  top: -10%;
  right: -5%;
  width: 52vw;
  height: 52vw;
  filter: blur(72px);
}

.section-cta .orb-cta--secondary {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.28) 0%, transparent 70%);
  bottom: -10%;
  left: -5%;
  width: 44vw;
  height: 44vw;
  filter: blur(72px);
  animation-delay: -10s;
}

/* Nav */
nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 4vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  color: var(--text);
  transition: color 0.3s;
}

.logo-img {
  height: 72px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.5));
}

/* Footer */
footer {
  background: #ffffff;
  color: #475569;
  padding: 2rem 4vw;
  font-size: 0.95rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

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

.footer-brand img {
  height: 24px;
  width: auto;
  filter: brightness(0);
  display: block;
}

.footer-copyright {
  color: #475569;
  font-size: 0.85rem;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.85rem;
}

.footer-right a {
  color: #475569;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-right a:hover {
  color: #171717;
}

@media (max-width: 768px) {
  .section {
    padding: 6rem 5vw 4rem;
  }

  nav {
    padding: 1rem 5vw;
  }

  .logo-img {
    height: 48px;
  }

  .bento-card {
    padding: 1.5rem;
    border-radius: 24px;
  }

  .plugins-grid, .deployment-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .plugin-card, .deploy-card {
    padding: 2rem 1.5rem;
  }

  .section-cta {
    padding: 6rem 5vw;
  }

  .cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .orb-1, .orb-cta--primary {
    width: 80vw;
    height: 80vw;
    top: -20vw;
    right: -20vw;
  }

  .orb-2, .orb-cta--secondary {
    width: 60vw;
    height: 60vw;
    bottom: -20vw;
    left: -20vw;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .footer-left {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .orb,
  .domain-row,
  .plugin-card,
  .deploy-card {
    animation: none;
    transition: none;
  }
}
