/* ============================================================
   ZANE AUTOMATION — Design System & Styles
   Premium AI Automation Portfolio
   ============================================================ */

/* ---------- CSS Variables (Design Tokens) ---------- */
:root {
  /* Colors */
  --bg-primary: #060611;
  --bg-secondary: #0c0c1d;
  --bg-card: rgba(15, 15, 35, 0.7);
  --bg-glass: rgba(15, 15, 35, 0.5);
  --border-glass: rgba(100, 180, 255, 0.1);
  --border-glow: rgba(0, 212, 255, 0.3);

  --text-primary: #f0f0f5;
  --text-secondary: rgba(200, 210, 230, 0.75);
  --text-muted: rgba(160, 170, 190, 0.5);

  --accent-cyan: #00d4ff;
  --accent-blue: #0ea5e9;
  --accent-purple: #8b5cf6;
  --accent-magenta: #d946ef;

  --gradient-primary: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  --gradient-bg: linear-gradient(180deg, #060611 0%, #0c0c1d 50%, #0a0a1a 100%);
  --gradient-card: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(139, 92, 246, 0.05));

  --glow-cyan: 0 0 30px rgba(0, 212, 255, 0.15);
  --glow-purple: 0 0 30px rgba(139, 92, 246, 0.15);

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-padding: 120px 0;
  --container-width: 1200px;
  --container-padding: 0 24px;

  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection {
  background: rgba(0, 212, 255, 0.3);
  color: #fff;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--accent-purple); }

img { max-width: 100%; display: block; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 680px;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

section {
  padding: var(--section-padding);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 72px;
}

.section-header .label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-cyan);
  margin-bottom: 16px;
  display: block;
}

.section-header h2 {
  margin-bottom: 20px;
}

.section-header p {
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 25px rgba(0, 212, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(0, 212, 255, 0.35);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-glow);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.btn-arrow::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* ---------- Cards ---------- */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  padding: 36px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.glass-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--glow-cyan);
  transform: translateY(-4px);
}

.glass-card:hover::before {
  opacity: 0.6;
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: rgba(6, 6, 17, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  padding: 12px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-logo span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-base);
  border-radius: 2px;
}

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

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  padding: 10px 24px !important;
  font-size: 0.85rem !important;
}

/* Hamburger */
.nav-hamburger {
  background: none;
  border: 0;
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-base);
  border-radius: 2px;
}

.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 80px;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, transparent 0%, var(--bg-primary) 75%);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 50px;
  border: 1px solid var(--border-glow);
  background: rgba(0, 212, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  margin-bottom: 28px;
  letter-spacing: 0.05em;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(0, 212, 255, 0); }
}

.hero h1 {
  margin-bottom: 24px;
  line-height: 1.1;
}

.hero h1 .line-break {
  display: block;
}

.hero-description {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 600px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

.hero-glow--cyan {
  background: var(--accent-cyan);
  top: 10%;
  right: -10%;
}

.hero-glow--purple {
  background: var(--accent-purple);
  bottom: -20%;
  left: -10%;
}

/* ---------- WHAT WE BUILD ---------- */
.services {
  background: var(--bg-secondary);
  position: relative;
}

.services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  text-align: center;
  padding: 44px 32px;
}

.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border-radius: var(--radius-md);
  background: var(--gradient-card);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: all var(--transition-base);
}

.service-card:hover .service-icon {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.2);
  transform: scale(1.1);
}

.service-card h3 {
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.service-card p {
  font-size: 0.95rem;
  text-align: center;
  margin: 0 auto;
}

/* ---------- HOW WE WORK ---------- */
.process {
  position: relative;
}

.process-timeline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.process-timeline::before {
  content: '';
  position: absolute;
  top: 36px;
  left: 50px;
  right: 50px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  opacity: 0.3;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 160px;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 20px;
  transition: all var(--transition-base);
  position: relative;
}

.step-number::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--transition-base);
}

.process-step:hover .step-number {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.process-step:hover .step-number::after {
  opacity: 0.15;
}

.step-label {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- PROJECTS ---------- */
.projects {
  background: var(--bg-secondary);
  position: relative;
}

.projects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

.project-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
}

.project-preview {
  height: 220px;
  background: var(--gradient-card);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.project-preview-placeholder .icon {
  font-size: 3rem;
  opacity: 0.5;
}

.project-demo-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 5px 14px;
  border-radius: 50px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-purple);
}

.project-demo-badge.badge-live {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.project-demo-badge.badge-soon {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.project-card:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

.modal-note {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.project-body {
  padding: 32px;
}

.project-body h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.project-body > p {
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.project-tag {
  padding: 4px 12px;
  border-radius: 50px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
  font-size: 0.78rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.project-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.project-btn:hover {
  gap: 12px;
  color: var(--text-primary);
}

/* Project Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 17, 0.9);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  padding: 24px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.98);
  transition: transform var(--transition-base);
  position: relative;
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.modal-header {
  padding: 48px 48px 0;
}

.modal-header .project-demo-badge {
  position: static;
  display: inline-block;
  margin-bottom: 16px;
}

.modal-header h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.modal-header p {
  font-size: 1.05rem;
}

.modal-body {
  padding: 36px 48px 48px;
}

.modal-section {
  margin-bottom: 32px;
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-section h4 {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

.modal-section p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.modal-section ul {
  list-style: none;
  padding: 0;
}

.modal-section ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.modal-section ul li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}

.modal-placeholder {
  background: var(--bg-card);
  border: 1px dashed var(--border-glass);
  border-radius: var(--radius-md);
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- WHY ZANE AUTOMATION ---------- */
.why {
  position: relative;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.why-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 36px;
}

.why-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: var(--radius-sm);
  background: var(--gradient-card);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: all var(--transition-base);
}

.why-card:hover .why-icon {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

.why-content h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.why-content p {
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ---------- CTA SECTION ---------- */
.cta-section {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(139, 92, 246, 0.08) 100%);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  margin-bottom: 20px;
}

.cta-section p {
  margin: 0 auto 40px;
  font-size: 1.1rem;
}

.cta-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.08;
  pointer-events: none;
}

.cta-glow--1 {
  background: var(--accent-cyan);
  top: -50%;
  left: -10%;
}

.cta-glow--2 {
  background: var(--accent-purple);
  bottom: -50%;
  right: -10%;
}

/* ---------- ABOUT / CONTACT / PRIVACY ---------- */
.about {
  padding: var(--section-padding);
}

.about-inner {
  max-width: 720px;
  text-align: center;
}

.about-inner h2 {
  margin-bottom: 20px;
}

.about-inner p {
  margin-bottom: 16px;
}

.about-note {
  color: var(--text-muted);
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.cta-section .contact-small {
  margin: 0 auto;
  font-size: 0.95rem;
}

.contact-small a {
  color: var(--accent-cyan);
  text-decoration: underline;
}

.privacy {
  padding: 48px 0;
  border-top: 1px solid var(--border-glass);
}

.privacy-inner {
  max-width: 720px;
}

.privacy h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.privacy p {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

/* ---------- FOOTER ---------- */
.footer {
  padding: 60px 0 32px;
  border-top: 1px solid var(--border-glass);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand h4 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.footer-brand h4 span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links h5 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links ul a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------- Scroll Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.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; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ---------- RESPONSIVE ---------- */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --section-padding: 80px 0;
  }

  .process-timeline {
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
  }

  .process-timeline::before {
    display: none;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --section-padding: 64px 0;
    --container-padding: 0 20px;
  }

  /* Mobile Nav */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(6, 6, 17, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    gap: 28px;
    transition: right var(--transition-base);
    border-left: 1px solid var(--border-glass);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-hamburger {
    display: flex;
  }

  /* Hero */
  .hero {
    padding-top: 100px;
    min-height: auto;
    padding-bottom: 60px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Sections */
  .section-header {
    margin-bottom: 48px;
  }

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

  .process-timeline {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .process-step {
    max-width: 260px;
  }

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

  .why-card {
    padding: 28px;
  }

  /* Modal */
  .modal-header {
    padding: 32px 24px 0;
  }

  .modal-body {
    padding: 24px;
  }

  .modal-header h2 {
    font-size: 1.5rem;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .glass-card {
    padding: 24px;
  }

  .service-card {
    padding: 32px 24px;
  }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 180, 255, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 180, 255, 0.3);
}

/* ---------- Loading State ---------- */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-ring {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-glass);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- LIVE LEAD QUALIFICATION AGENT (modal) ---------- */
.lead-agent .la-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .lead-agent .la-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; } }
.la-panel { background: var(--bg-card); border: 1px solid var(--border-glass); border-radius: var(--radius-md); min-width: 0; }
.la-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border-glass); font-size: 0.85rem; }
.la-count { margin-left: auto; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }
.la-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-cyan); flex: none; box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.45); animation: la-pulse 2.4s ease-out infinite; }
@keyframes la-pulse { 70% { box-shadow: 0 0 0 7px rgba(0, 212, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); } }
.la-thread { padding: 16px; display: flex; flex-direction: column; gap: 14px; height: 320px; max-height: 50vh; overflow-y: auto; overscroll-behavior: contain; }
.la-turn { display: flex; gap: 10px; min-width: 0; }
.la-who { flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.6rem; border: 1px solid var(--border-glass); color: var(--text-secondary); }
.la-turn.agent .la-who { color: var(--accent-cyan); border-color: var(--border-glow); }
.la-say { min-width: 0; padding-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.92rem; line-height: 1.55; color: var(--text-primary); }
.la-turn.you .la-say { color: var(--text-secondary); }
.la-say.thinking { color: var(--text-muted); font-style: italic; }
.la-say.thinking::after { content: ''; animation: la-dots 1.4s steps(4, end) infinite; }
@keyframes la-dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.la-composer { display: flex; gap: 10px; align-items: flex-end; padding: 12px 16px; border-top: 1px solid var(--border-glass); }
.la-composer textarea { flex: 1; min-width: 0; resize: none; max-height: 120px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-glass); border-radius: var(--radius-sm); color: var(--text-primary); font: inherit; font-size: 0.92rem; padding: 9px 11px; }
.la-composer textarea:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 1px; }
.la-send { padding: 9px 18px; font-size: 0.85rem; }
.la-send:disabled { opacity: 0.45; cursor: default; }
.la-record { margin: 0; padding: 6px 16px 12px; }
.la-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-glass); }
.la-row:last-child { border-bottom: 0; }
.la-row dt { font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-muted); padding-top: 2px; }
.la-row.filled dt { color: var(--text-secondary); }
.la-row dd { margin: 0; min-width: 0; font-size: 0.88rem; overflow-wrap: anywhere; color: var(--text-primary); }
.la-row dd.empty { color: var(--text-muted); }
.la-row.just-filled dd { animation: la-land 0.5s ease-out; }
@keyframes la-land { from { color: var(--accent-cyan); } }
.la-verdict { margin: 4px 16px 14px; padding: 13px 15px; border: 1px solid var(--border-glass); border-radius: var(--radius-md); }
.la-verdict h5 { margin: 0 0 6px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.la-verdict p { margin: 0; font-size: 0.89rem; line-height: 1.6; }
.la-verdict.strong { border-color: rgba(52, 211, 153, 0.4); } .la-verdict.strong h5 { color: #34d399; }
.la-verdict.possible { border-color: rgba(251, 191, 36, 0.4); } .la-verdict.possible h5 { color: #fbbf24; }
.la-handoff { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 16px 14px; }
.la-handoff .btn { padding: 9px 15px; font-size: 0.82rem; }
.la-fallback-copy { width: 100%; height: 110px; margin-top: 8px; background: rgba(255, 255, 255, 0.04); color: var(--text-primary); border: 1px solid var(--border-glass); border-radius: var(--radius-sm); padding: 8px; font: inherit; font-size: 0.8rem; }
.la-note { margin: 0 16px 16px; font-size: 0.76rem; line-height: 1.5; color: var(--text-muted); }
.la-offline { margin-top: 12px; padding: 14px 16px; border: 1px dashed var(--border-glow); border-radius: var(--radius-md); color: var(--text-secondary); font-size: 0.88rem; grid-column: 1 / -1; }
.la-offline strong { color: var(--text-primary); }
@media (prefers-reduced-motion: reduce) { .la-pulse, .la-say.thinking::after, .la-row.just-filled dd { animation: none; } }

/* Embedded live demo */
.demo-frame {
  width: 100%;
  height: 640px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: transparent;
}

@media (max-width: 768px) {
  .demo-frame { height: 560px; }
}
