/* ══════════════════════════════════════════
   VERTEX MODERN UI - DESIGN SYSTEM
   ══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ──── BASE ──── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: #07070f;
  color: #eeeef8;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

[data-theme="light"] body {
  background: #f7f7fb;
  color: #0f1220;
}

/* ──── GRAIN OVERLAY ──── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.028;
}

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at center, rgba(255, 36, 91, 0.12) 0%, rgba(255, 36, 91, 0.05) 35%, transparent 72%);
  filter: blur(20px);
  opacity: 0.85;
  mix-blend-mode: screen;
  transition: opacity 0.35s ease;
}

[data-theme="light"] .cursor-glow {
  background: radial-gradient(circle at center, rgba(255, 36, 91, 0.18) 0%, rgba(255, 36, 91, 0.06) 38%, transparent 72%);
  mix-blend-mode: multiply;
  opacity: 0.55;
}

.cursor-glow.is-idle {
  opacity: 0.45;
}

.interactive-lift {
  will-change: transform;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.interactive-lift:hover {
  box-shadow: 0 14px 34px rgba(255, 36, 91, 0.14);
}

/* ──── HERO GLOW ──── */
.hero-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 36, 91, 0.13) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ──── SCROLL REVEAL ──── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ──── NAVBAR ──── */
#navbar {
  background: rgba(7, 7, 15, 0.5);
  backdrop-filter: blur(10px);
  transition: backdrop-filter 0.3s, background 0.3s, border-color 0.3s;
}
#navbar.scrolled {
  backdrop-filter: blur(10px);
  background: rgba(7, 7, 15, 0.5);
  border-color: rgba(238, 238, 248, 0.07);
}

[data-theme="light"] #navbar {
  background: rgba(247, 247, 251, 0.75);
  border-color: rgba(15, 18, 32, 0.08);
}

[data-theme="light"] #navbar.scrolled {
  background: rgba(247, 247, 251, 0.92);
  border-color: rgba(15, 18, 32, 0.12);
}

#mobile-menu {
  background: rgba(7, 7, 15, 0.5);
  backdrop-filter: blur(10px);
}

#mobile-menu.is-open {
  display: block;
}

[data-theme="light"] #mobile-menu {
  background: rgba(247, 247, 251, 0.95);
}

/* ──── ANIMATIONS ──── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: #ff245b;
  border-radius: 1px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}
.pulse {
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes count-fade {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
.count-anim {
  animation: count-fade 0.5s ease forwards;
}

/* ──── GRID SYSTEM ──── */
.ruled {
  display: grid;
  gap: 1px;
  background: rgba(238, 238, 248, 0.06);
}
.ruled > * {
  background: #07070f;
}

/* ──── HOVER EFFECTS ──── */
.card-h {
  transition: border-color 0.2s, background 0.2s;
}
.card-h:hover {
  border-color: rgba(238, 238, 248, 0.14) !important;
  background: #0c0c1a;
}

/* ──── CTA GLOW ──── */
@keyframes border-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 36, 91, 0); }
  50% { box-shadow: 0 0 24px 0 rgba(255, 36, 91, 0.18); }
}
.cta-block {
  animation: border-glow 4s ease-in-out infinite;
}

/* ──── SCROLLBAR ──── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #07070f; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* ──── TYPOGRAPHY ──── */
.num {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
}

/* ──── UTILITY CLASSES ──── */
.z-10 { position: relative; z-index: 10; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { inset: 0; }
.inset-x-0 { inset-inline: 0; }
.top-0 { top: 0; }
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-inline: auto; }
.px-6 { padding-inline: 1.5rem; }
.py-16 { padding-block: 4rem; }
.py-20 { padding-block: 5rem; }
.py-28 { padding-block: 7rem; }
.border { border: 1px solid; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.flex { display: flex; }
.grid { display: grid; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.opacity-0 { opacity: 0; }
.opacity-1 { opacity: 1; }
.transition-all { transition: all 0.3s ease; }
.transition-colors { transition: color 0.2s ease, background-color 0.2s ease; }
.hover\:brightness-110:hover { filter: brightness(1.1); }
.hover\:underline:hover { text-decoration: underline; }

/* ──── FORM STYLES ──── */
.cta-form {
  display: grid;
  gap: 1rem;
}

.cta-field {
  position: relative;
}

.cta-field-label {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240, 240, 248, 0.72);
}

.cta-field-hint {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: rgba(240, 240, 248, 0.38);
}

.cta-field-input {
  font-family: inherit;
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgba(238, 238, 248, 0.10);
  background: linear-gradient(180deg, rgba(10, 9, 25, 0.94), rgba(10, 9, 25, 0.82));
  color: #eeeef8;
  padding: 0.95rem 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, background 0.2s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
}

.cta-field:focus-within .cta-field-label {
  color: #ff6b8a;
}

.cta-field:focus-within .cta-field-input {
  border-color: rgba(255, 36, 91, 0.65);
  box-shadow: 0 0 0 4px rgba(255, 36, 91, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(14, 12, 30, 0.98), rgba(10, 9, 25, 0.92));
}

.cta-field-input::placeholder {
  color: rgba(238, 238, 248, 0.38);
}

.cta-field-input:focus::placeholder {
  color: rgba(238, 238, 248, 0.24);
}

[data-theme="light"] .cta-field-label {
  color: rgba(15, 18, 32, 0.72);
}

[data-theme="light"] .cta-field-hint {
  color: rgba(15, 18, 32, 0.5);
}

[data-theme="light"] .cta-field-input {
  border-color: rgba(15, 18, 32, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 247, 251, 0.92));
  color: #0f1220;
  box-shadow: inset 0 1px 0 rgba(15, 18, 32, 0.04);
}

[data-theme="light"] .cta-field:focus-within .cta-field-input {
  border-color: rgba(255, 36, 91, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 36, 91, 0.12), inset 0 1px 0 rgba(15, 18, 32, 0.05);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(242, 244, 250, 0.96));
}

[data-theme="light"] .cta-field-input::placeholder {
  color: rgba(15, 18, 32, 0.4);
}

.cta-field-textarea {
  min-height: 9rem;
  resize: vertical;
}

.cta-submit {
  box-shadow: 0 12px 30px rgba(255, 36, 91, 0.2);
}

.cta-submit:hover {
  box-shadow: 0 16px 36px rgba(255, 36, 91, 0.26);
  transform: translateY(-1px);
}

/* ──── RESPONSIVE ──── */
@media (max-width: 768px) {
  /* Mobile menu: hide desktop nav items, show hamburger */
  #navbar nav.md\:flex { display: none !important; }
  a[href="/contact"].hidden.md\:inline-block { display: none !important; }
  #mobile-menu-toggle.md\:hidden { display: inline-flex !important; }

  /* Canvas sizing */
  #agent-canvas {
    width: 100% !important;
    height: auto !important;
    max-width: 340px;
    aspect-ratio: 1/1;
  }

  /* Typography clamp-down */
  .text-5xl { font-size: clamp(2.2rem, 8vw, 3.5rem) !important; }
  .text-4xl { font-size: clamp(2rem, 6vw, 2.75rem) !important; }
  .text-3xl { font-size: clamp(1.6rem, 5vw, 2rem) !important; }

  /* Prevent table overflow */
  .overflow-x-auto { overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
