/* ==========================================================================
   HANDSAPP — AI & SOFTWARE HOUSE | RESPONSIVE & LIGHT/DARK DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Raw Light / Dark palette values */
  --bg-deep-light: #f8fafc;
  --bg-deep-dark: #040711;

  --bg-surface-light: #ffffff;
  --bg-surface-dark: #091024;

  --bg-card-light: rgba(255, 255, 255, 0.88);
  --bg-card-dark: rgba(13, 22, 46, 0.72);

  --bg-header-light: rgba(248, 250, 252, 0.78);
  --bg-header-dark: rgba(4, 7, 17, 0.65);

  --bg-header-shrunk-light: rgba(255, 255, 255, 0.94);
  --bg-header-shrunk-dark: rgba(4, 7, 17, 0.92);

  --border-subtle-light: rgba(29, 78, 216, 0.14);
  --border-subtle-dark: rgba(56, 189, 248, 0.16);

  --border-bright-light: rgba(37, 99, 235, 0.45);
  --border-bright-dark: rgba(56, 189, 248, 0.45);

  --text-main-light: #0f172a;
  --text-main-dark: #f8fafc;

  --text-muted-light: #475569;
  --text-muted-dark: #94a3b8;

  --surface-pill-light: rgba(226, 232, 240, 0.75);
  --surface-pill-dark: rgba(15, 23, 42, 0.78);

  --tag-text-light: #1d4ed8;
  --tag-text-dark: #bae6fd;

  --input-bg-light: #ffffff;
  --input-bg-dark: rgba(4, 7, 17, 0.85);

  --shadow-card-light: 0 20px 45px -15px rgba(15, 23, 42, 0.09);
  --shadow-card-dark: 0 24px 50px -12px rgba(0, 0, 0, 0.72);

  /* Brand Accent Constants */
  --blue-royal: #1d4ed8;
  --blue-electric: #2563eb;
  --cyan-ai: #0284c7;
  --cyan-glow: #38bdf8;
  --coral-ai: #f97316;
  --coral-light: #fb923c;
  --emerald-ok: #10b981;

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', Menlo, monospace;

  /* Default fallback tokens (Light) */
  --bg-deep: var(--bg-deep-light);
  --bg-surface: var(--bg-surface-light);
  --bg-card: var(--bg-card-light);
  --bg-header: var(--bg-header-light);
  --bg-header-shrunk: var(--bg-header-shrunk-light);
  --border-subtle: var(--border-subtle-light);
  --border-bright: var(--border-bright-light);
  --text-main: var(--text-main-light);
  --text-muted: var(--text-muted-light);
  --surface-pill: var(--surface-pill-light);
  --tag-text: var(--tag-text-light);
  --input-bg: var(--input-bg-light);
  --shadow-card: var(--shadow-card-light);

  /* MANDATORY (dark-mode): Fallback for browsers without light-dark() support */
  @media (prefers-color-scheme: dark) {
    --bg-deep: var(--bg-deep-dark);
    --bg-surface: var(--bg-surface-dark);
    --bg-card: var(--bg-card-dark);
    --bg-header: var(--bg-header-dark);
    --bg-header-shrunk: var(--bg-header-shrunk-dark);
    --border-subtle: var(--border-subtle-dark);
    --border-bright: var(--border-bright-dark);
    --text-main: var(--text-main-dark);
    --text-muted: var(--text-muted-dark);
    --surface-pill: var(--surface-pill-dark);
    --tag-text: var(--tag-text-dark);
    --input-bg: var(--input-bg-dark);
    --shadow-card: var(--shadow-card-dark);
    --cyan-ai: #38bdf8;
  }

  /* Modern CSS light-dark() tokens */
  @supports (color: light-dark(white, black)) {
    --bg-deep: light-dark(var(--bg-deep-light), var(--bg-deep-dark));
    --bg-surface: light-dark(var(--bg-surface-light), var(--bg-surface-dark));
    --bg-card: light-dark(var(--bg-card-light), var(--bg-card-dark));
    --bg-header: light-dark(var(--bg-header-light), var(--bg-header-dark));
    --bg-header-shrunk: light-dark(var(--bg-header-shrunk-light), var(--bg-header-shrunk-dark));
    --border-subtle: light-dark(var(--border-subtle-light), var(--border-subtle-dark));
    --border-bright: light-dark(var(--border-bright-light), var(--border-bright-dark));
    --text-main: light-dark(var(--text-main-light), var(--text-main-dark));
    --text-muted: light-dark(var(--text-muted-light), var(--text-muted-dark));
    --surface-pill: light-dark(var(--surface-pill-light), var(--surface-pill-dark));
    --tag-text: light-dark(var(--tag-text-light), var(--tag-text-dark));
    --input-bg: light-dark(var(--input-bg-light), var(--input-bg-dark));
    --cyan-ai: light-dark(#0284c7, #38bdf8);
  }

  /* MANDATORY (dark-mode & dark-mode-toggle): Map <meta name="color-scheme"> back to :root */
  color-scheme: light dark;
  accent-color: light-dark(#1d4ed8, #38bdf8);

  &:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
    --shadow-card: var(--shadow-card-dark);
  }

  &:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
    --shadow-card: var(--shadow-card-light);
  }
}

/* Branching for Dual Logo & Theme Button Icons (dark-mode-toggle) */
.logo-for-dark,
.theme-option-when-dark {
  display: none;
}
.logo-for-light,
.theme-option-when-light {
  display: inline-flex;
}

@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) {
    .logo-for-dark,
    .theme-option-when-dark {
      display: inline-flex;
    }
    .logo-for-light,
    .theme-option-when-light {
      display: none;
    }
  }
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) {
  .logo-for-dark,
  .theme-option-when-dark {
    display: inline-flex;
  }
  .logo-for-light,
  .theme-option-when-light {
    display: none;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  max-width: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
  padding-top: 96px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ==========================================================================
   1. SCROLL PROGRESS INDICATOR (Modern Web Guidance: scroll-progress-indicator)
   ========================================================================== */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 9999;
  background: linear-gradient(90deg, var(--blue-electric) 0%, var(--cyan-glow) 60%, var(--coral-ai) 100%);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.7), 0 0 28px rgba(249, 115, 22, 0.5);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    @keyframes grow-progress {
      from {
        transform: scaleX(0);
      }
      to {
        transform: scaleX(1);
      }
    }

    #scroll-progress {
      animation: grow-progress auto linear;
      animation-timeline: scroll(block root);
    }
  }
}

/* ==========================================================================
   2. SHRINKING HEADER & RESPONSIVE NAVBAR (Modern Web Guidance: navbar)
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 96px;
  z-index: 1000;
  display: flex;
  align-items: center;
  background: var(--bg-header);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
    @keyframes shrink-header {
      to {
        height: 76px;
        background-color: var(--bg-header-shrunk);
        box-shadow: 0 10px 32px -10px rgba(0, 0, 0, 0.35);
      }
    }

    .site-header {
      animation: shrink-header auto linear both;
      animation-timeline: scroll(block root);
      animation-range: 0px 140px;
    }
  }
}

.header-inner {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.header-inner > * {
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-main);
  padding: 4px 0;
}

.brand-logo-img {
  height: 60px;
  width: auto;
  max-width: 245px;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(37, 99, 235, 0.24));
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), filter 0.25s ease;
}

.brand-link:hover .brand-logo-img {
  transform: scale(1.04);
  filter: drop-shadow(0 6px 22px rgba(56, 189, 248, 0.45));
}

/* Narrow Layout (Default): Popover Navigation */
.site-nav {
  order: 3;
}

.menu-button {
  anchor-name: --menu-button;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface-pill);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.site-menu {
  position: fixed;
  inset: auto;
  /* Fallback offset before anchor() as required by navbar guide */
  inset-block-start: 4.75rem;
  inset-block-start: anchor(--menu-button bottom);
  inset-inline-end: 1rem;
  inline-size: min(84dvw, 22rem);
  max-inline-size: calc(100dvw - 2rem);
  block-size: fit-content;
  max-block-size: calc(100dvh - 6rem);
  margin-block-start: 0.5rem;
  overflow: auto;
  padding: 18px;
  border-radius: 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  list-style: none;
}

.site-menu:not(:is(:popover-open, .\:popover-open)) {
  display: none;
}

.site-menu:is(:popover-open, .\:popover-open) {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-menu a:hover,
.site-menu a[aria-current="page"] {
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan-ai);
}

.desktop-only {
  display: none !important;
}

/* Wide Layout: Inline Navigation (.site-header.is-wide) */
.site-header.is-wide {
  .site-nav {
    order: 0;
  }

  .menu-button {
    display: none;
  }

  .mobile-only-cta {
    display: none;
  }

  .desktop-only {
    display: inline-flex !important;
  }

  .site-menu {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    inline-size: auto;
    max-inline-size: none;
    block-size: auto;
    max-block-size: none;
    overflow: visible;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .site-menu::backdrop {
    display: none;
  }
}

.site-header.is-measuring,
.site-header.is-measuring * {
  transition: none !important;
}

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

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border-radius: 10px;
  background: var(--surface-pill);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--cyan-glow);
  transform: translateY(-1px);
}

.theme-option-when-dark,
.theme-option-when-light {
  align-items: center;
  gap: 6px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.32);
  font-size: 0.76rem;
  font-weight: 700;
  color: #10b981;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.65;
  }
}

/* ==========================================================================
   3. INTERACTIVE BACKGROUND: CANVAS NEURAL MESH + CYBER AURORA
   ========================================================================== */
#neural-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.78;
}

.aurora-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(115px);
  opacity: light-dark(0.16, 0.34);
  animation: float-orb 18s ease-in-out infinite alternate;
}

.orb-blue {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #2563eb 0%, transparent 70%);
  top: -180px;
  left: -120px;
}

.orb-cyan {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #38bdf8 0%, transparent 70%);
  top: 12%;
  right: -140px;
  animation-delay: -6s;
}

.orb-coral {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #f97316 0%, transparent 70%);
  bottom: 8%;
  left: 22%;
  opacity: light-dark(0.12, 0.22);
  animation-delay: -11s;
}

@keyframes float-orb {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(35px, -30px, 0) scale(1.1);
  }
}

.cyber-grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(56, 189, 248, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 65% at 50% 25%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 25%, black 30%, transparent 100%);
}

main,
footer {
  position: relative;
  z-index: 2;
}

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   4. BUTTONS & INTERACTIVE CONTROLS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, background 0.22s ease;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-royal) 0%, var(--blue-electric) 50%, #0ea5e9 100%);
  color: #ffffff !important;
  box-shadow: 0 10px 28px -6px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -6px rgba(37, 99, 235, 0.75);
}

.btn-coral {
  background: linear-gradient(135deg, #ea580c 0%, var(--coral-ai) 55%, var(--coral-light) 100%);
  color: #ffffff !important;
  box-shadow: 0 10px 26px -6px rgba(249, 115, 22, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-coral:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -6px rgba(249, 115, 22, 0.75);
}

.btn-glass {
  background: var(--surface-pill);
  color: var(--text-main);
  border: 1px solid var(--border-bright);
  backdrop-filter: blur(12px);
}

.btn-glass:hover {
  border-color: var(--cyan-glow);
  transform: translateY(-2px);
}

/* ==========================================================================
   5. HERO SECTION: AI & SOFTWARE HOUSE + LIVE CODE-TO-APP ENGINE
   ========================================================================== */
.hero-section {
  padding: 54px 0 84px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 48px;
  align-items: center;
}

.hero-copy,
.antigravity-stage {
  min-width: 0;
  max-width: 100%;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.14), rgba(56, 189, 248, 0.12), rgba(249, 115, 22, 0.14));
  border: 1px solid var(--border-bright);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan-ai);
  margin-bottom: 22px;
  max-width: 100%;
}

.ai-badge-spark {
  color: var(--coral-ai);
  font-size: 1.05rem;
  flex-shrink: 0;
  animation: spin-pulse 4s ease-in-out infinite;
}

@keyframes spin-pulse {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.25) rotate(18deg);
  }
}

.hero-title {
  font-size: clamp(2.1rem, 4.5vw, 4.1rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  overflow-wrap: break-word;
}

.gradient-text-cyan {
  background: linear-gradient(135deg, var(--blue-electric) 0%, #0ea5e9 55%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gradient-text-coral {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 55%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 38px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 26px;
  border-top: 1px solid var(--border-subtle);
}

.metric-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.metric-value span {
  color: var(--cyan-ai);
}

.metric-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Interactive Antigravity Showcase Window */
.antigravity-stage {
  position: relative;
}

.floating-icon-3a {
  position: absolute;
  top: -32px;
  left: -20px;
  width: 74px;
  height: 74px;
  z-index: 10;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 28px rgba(56, 189, 248, 0.55);
  animation: levitate 4.5s ease-in-out infinite;
}

@keyframes levitate {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(3deg);
  }
}

.showcase-window {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(22px);
  overflow: hidden;
  max-width: 100%;
}

.window-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface-pill);
  border-bottom: 1px solid var(--border-subtle);
}

.window-dots {
  display: flex;
  gap: 7px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-amber { background: #f59e0b; }
.dot-green { background: #10b981; }

.window-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  background: var(--bg-deep);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.window-tab {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.window-tab.active {
  background: linear-gradient(135deg, var(--blue-electric), #0ea5e9);
  color: #fff;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}

.window-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Code terminal stays dark in both themes (component-specific-light-dark-theme) */
.code-terminal {
  color-scheme: dark;
  background: #060b19;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: #e2e8f0;
  min-height: 155px;
  max-width: 100%;
  overflow-x: auto;
}

.terminal-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.7rem;
  color: #38bdf8;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.code-line {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
}

.tok-kw { color: #f97316; font-weight: 600; }
.tok-fn { color: #38bdf8; }
.tok-str { color: #34d399; }
.tok-comment { color: #64748b; font-style: italic; }

.live-app-preview {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.preview-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.preview-mini-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
}

.preview-app-title {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--text-main);
}

.preview-app-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.preview-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.kpi-card {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  padding: 10px;
  min-width: 0;
}

.kpi-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.kpi-num {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2px;
}

.kpi-trend {
  font-size: 0.68rem;
  color: #10b981;
  font-weight: 700;
}

.ai-neural-bar {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.14), rgba(249, 115, 22, 0.14));
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
}

/* ==========================================================================
   6. SCROLL ENTRY EFFECTS (Modern Web Guidance: scroll-entry-exit-effects)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-up {
      from {
        opacity: 0.15;
        transform: translateY(36px) scale(0.97);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .reveal-on-scroll {
      animation: reveal-up auto cubic-bezier(0.22, 1, 0.36, 1) both;
      animation-timeline: view();
      animation-range: entry 5% cover 28%;
    }
  }
}

/* ==========================================================================
   7. BENTO GRID: SOLUTIONS & 3D SPOTLIGHT CARDS
   ========================================================================== */
.section {
  padding: 84px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 52px;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cyan-ai);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.85rem, 3.4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 14px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.04rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}

.bento-card {
  grid-column: span 4;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease;
  --mouse-x: 50%;
  --mouse-y: 50%;
}

.bento-card.span-6 {
  grid-column: span 6;
}

.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    480px circle at var(--mouse-x) var(--mouse-y),
    rgba(56, 189, 248, 0.15),
    rgba(249, 115, 22, 0.05) 40%,
    transparent 75%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.bento-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
}

.bento-card:hover::before {
  opacity: 1;
}

.card-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(56, 189, 248, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.card-icon-box.coral {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(251, 146, 60, 0.12));
  border-color: rgba(249, 115, 22, 0.4);
}

.bento-card h3 {
  font-size: 1.32rem;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}

.bento-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.tag-list li {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-pill);
  border: 1px solid var(--border-subtle);
  color: var(--tag-text);
}

/* ==========================================================================
   8. INTERACTIVE HANDSAPP AI ARCHITECT SIMULATOR
   ========================================================================== */
.architect-shell {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
  min-width: 0;
}

.architect-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 26px;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preset-chip {
  background: var(--surface-pill);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.preset-chip:hover,
.preset-chip.active {
  background: linear-gradient(135deg, var(--blue-electric), #0ea5e9);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
}

.architect-input-row {
  display: flex;
  gap: 12px;
}

.architect-input {
  flex: 1;
  min-width: 0;
  background: var(--input-bg);
  border: 1px solid var(--border-bright);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.96rem;
  outline: none;
}

.architect-input:focus {
  border-color: var(--cyan-glow);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.arch-analyzed-line {
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.arch-analyzed-line strong {
  color: var(--text-main);
}

.architect-output {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--border-subtle);
}

.arch-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 20px;
  min-width: 0;
}

.arch-panel h4 {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan-ai);
  margin-bottom: 12px;
}

.arch-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.arch-list li {
  font-size: 0.9rem;
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.arch-list li::before {
  content: '✦';
  color: var(--coral-ai);
  font-weight: bold;
  flex-shrink: 0;
}

.arch-footer-bar {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.14), rgba(249, 115, 22, 0.12));
  border: 1px solid var(--border-bright);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.arch-timeline-label {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.arch-timeline-val {
  color: var(--cyan-ai);
  font-size: 1.08rem;
  margin-left: 6px;
}

/* ==========================================================================
   9. PROCESS TIMELINE
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 2.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue-electric), var(--coral-ai));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
}

.step-card h3 {
  font-size: 1.18rem;
  margin-bottom: 8px;
}

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

/* ==========================================================================
   10. CONTACT & BREVO INTEGRATED FORM SECTION
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: start;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xl);
  padding: 34px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
  min-width: 0;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 7px;
}

.form-control {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 13px 15px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  border-color: var(--cyan-glow);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-feedback {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  display: none;
}

.form-feedback.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
}

/* ==========================================================================
   11. FOOTER
   ========================================================================== */
.site-footer {
  padding: 54px 0 38px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

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

.footer-logo-img {
  height: 54px;
  width: auto;
  filter: drop-shadow(0 4px 14px rgba(37, 99, 235, 0.22));
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.86rem;
}

/* ==========================================================================
   12. TABLET & MOBILE RESPONSIVENESS (320px - 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .bento-card,
  .bento-card.span-6 {
    grid-column: span 12;
  }
  .architect-output {
    grid-template-columns: 1fr;
  }
  .steps-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  body {
    padding-top: 80px;
  }

  .site-header {
    height: 80px;
  }

  .header-inner {
    padding: 0 14px;
    gap: 8px;
  }

  .brand-logo-img {
    height: 46px;
    max-width: 182px;
  }

  .theme-toggle-btn {
    padding: 7px 10px;
    font-size: 0.76rem;
  }

  .menu-button {
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  .container {
    padding: 0 16px;
  }

  .hero-section {
    padding: 28px 0 56px;
  }

  .ai-badge {
    font-size: 0.72rem;
    padding: 6px 12px;
    white-space: normal;
    line-height: 1.35;
  }

  .hero-title {
    font-size: clamp(1.85rem, 8vw, 2.45rem);
  }

  .hero-subtitle {
    font-size: 0.98rem;
    margin-bottom: 24px;
  }

  .hero-cta-group {
    flex-direction: column;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .floating-icon-3a {
    width: 52px;
    height: 52px;
    top: -22px;
    left: 12px;
    right: auto;
  }

  .window-topbar {
    padding: 12px;
  }

  .window-dots {
    display: none;
  }

  .window-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .window-tab {
    flex: 1;
    text-align: center;
    padding: 6px 4px;
    font-size: 0.72rem;
  }

  .preview-kpis {
    grid-template-columns: 1fr;
  }

  .steps-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .architect-input-row {
    flex-direction: column;
  }

  .architect-input-row .btn {
    width: 100%;
  }

  .architect-shell,
  .contact-card,
  .bento-card {
    padding: 22px 18px;
  }

  .arch-footer-bar .arch-cta-btn {
    width: 100%;
  }
}
