/* ================================================================
   STUDIOLINK v3 — v1 Design System + v2 Content
   ================================================================ */

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

:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --surface-2: #16161f;
  --surface-3: #1e1e2a;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);

  --text: #f0f0f8;
  --text-2: #a0a0b8;
  --text-3: #6a6a80;

  --accent: #6c5fff;
  --accent-2: #a78bfa;
  --accent-3: #7c3aed;
  --accent-glow: rgba(108, 95, 255, 0.35);

  --teal: #00d4b4;
  --teal-dim: rgba(0, 212, 180, 0.12);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Fraunces', Georgia, serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Typography ────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
}
h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 700; }
em { font-style: normal; color: var(--accent-2); font-family: var(--font-serif); font-weight: 600; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.22s var(--ease-out);
  white-space: nowrap;
  padding: 10px 20px;
}
.btn--full { width: 100%; justify-content: center; }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn--primary:hover {
  background: #7d70ff;
  box-shadow: 0 0 0 8px var(--accent-glow), 0 8px 30px rgba(108,95,255,0.4);
  transform: translateY(-1px);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-strong);
}
.btn--ghost:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--accent);
}

.btn--text {
  background: transparent;
  color: var(--text-3);
  border: none;
  padding: 10px 14px;
}
.btn--text:hover {
  color: var(--text);
  background: var(--surface-3);
}

/* ── Section Shared ────────────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(108, 95, 255, 0.12);
  border: 1px solid rgba(108, 95, 255, 0.25);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 640px;
}

/* ================================================================
   NAV
   ================================================================ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
#nav.scrolled {
  background: rgba(10,10,15,0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
  color: var(--text);
}

.nav-logo-dot {
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 7px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.nav-logo-dot::before,
.nav-logo-dot::after {
  content: '';
  position: absolute;
  background: rgba(255,255,255,0.5);
  border-radius: 2px;
}
.nav-logo-dot::before { width: 10px; height: 10px; top: 5px; left: 5px; }
.nav-logo-dot::after  { width: 6px; height: 6px; bottom: 5px; right: 5px; background: #fff; }

.nav-links {
  display: flex;
  gap: 6px;
  flex: 1;
  justify-content: flex-end;
  align-items: center;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 64px 24px 24px;
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(10,10,15,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 99;
}
.nav-drawer.open { display: flex; }

.nav-drawer-close {
  position: absolute;
  top: 16px; right: 20px;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.2s;
}
.nav-drawer-close:hover { color: var(--text); }

.nav-drawer .btn {
  font-size: 1rem;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* grid overlay */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent);
}

/* accent orb */
.hero-bg::after {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(108,95,255,0.45) 0%, transparent 70%);
  top: -100px; left: -100px;
  border-radius: 50%;
  filter: blur(80px);
  animation: drift1 18s ease-in-out infinite alternate;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0.35;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-dim);
  border: 1px solid rgba(0, 212, 180, 0.25);
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 32px;
  animation: fadeUp 0.8s var(--ease-out) both;
}
.hero-badge::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--teal);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
  flex-shrink: 0;
}

.hero-title {
  animation: fadeUp 0.8s 0.1s var(--ease-out) both;
}

.hero-subtitle {
  max-width: 600px;
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-top: 24px;
  animation: fadeUp 0.8s 0.2s var(--ease-out) both;
}

.hero-cta {
  display: flex;
  gap: 14px;
  margin-top: 40px;
  flex-wrap: wrap;
  animation: fadeUp 0.8s 0.3s var(--ease-out) both;
}

.hero-proof {
  margin-top: 48px;
  font-size: 0.85rem;
  color: var(--text-3);
  animation: fadeUp 0.8s 0.4s var(--ease-out) both;
}

/* ── Keyframes ─────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes drift1 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(60px, 40px) scale(1.1); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

/* ================================================================
   SERVICES
   ================================================================ */
#services { padding: 120px 0; }

.services-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 72px;
}
.services-header .section-subtitle { margin: 0 auto; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: border-color 0.3s, transform 0.3s var(--ease-out), box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 200px 200px at var(--mx, 50%) var(--my, 50%), rgba(108,95,255,0.07), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.service-card:hover::before { opacity: 1; }
.service-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.service-icon {
  width: 52px; height: 52px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.service-card h3 { margin-bottom: 12px; }
.service-card p  { color: var(--text-2); font-size: 0.95rem; line-height: 1.7; }

/* ================================================================
   HOW IT WORKS
   ================================================================ */
#how {
  padding: 120px 0;
  background: linear-gradient(180deg, var(--bg) 0%, #0b0b15 100%);
}

#how .container > .section-label,
#how .container > .section-title {
  display: block;
  text-align: center;
}
#how .container > .section-title { margin-bottom: 56px; }

.how-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.step-card {
  background: var(--surface);
  padding: 48px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
  transition: background 0.3s;
}
.step-card:hover { background: var(--surface-2); }

.step-number {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: rgba(108,95,255,0.15);
  line-height: 1;
  flex-shrink: 0;
  font-family: var(--font-serif);
  transition: color 0.3s;
}
.step-card:hover .step-number { color: rgba(108,95,255,0.4); }

.step-card h3 { margin-bottom: 10px; font-size: 1.1rem; }
.step-card p  { color: var(--text-2); font-size: 0.92rem; line-height: 1.7; }

/* ================================================================
   WORK
   ================================================================ */
#work {
  padding: 120px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

#work .container > .section-label,
#work .container > .section-title,
#work .container > .section-subtitle {
  display: block;
  text-align: center;
}
#work .container > .section-subtitle { margin: 0 auto 56px; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.work-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, border-color 0.3s;
}
.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 70px rgba(0,0,0,0.5);
  border-color: var(--border-strong);
}

.work-visual {
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.work-visual--terracotta { background: linear-gradient(135deg, #1a0f0a, #2a1508); }
.work-visual--purple     { background: linear-gradient(135deg, #0f0a1a, #160a28); }

.work-visual-label {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

.work-card-body { padding: 32px; }
.work-card-body h3 { margin-bottom: 12px; }

.work-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  background: rgba(108,95,255,0.1);
  border: 1px solid rgba(108,95,255,0.2);
  padding: 4px 12px;
  border-radius: 100px;
}

.work-built  { font-size: 0.88rem; color: var(--text-3); margin-bottom: 6px; }
.work-result { font-size: 0.88rem; color: var(--teal); margin-bottom: 20px; font-weight: 600; }

/* ================================================================
   PRICING
   ================================================================ */
#pricing { padding: 120px 0; }

#pricing .container > .section-label,
#pricing .container > .section-title,
#pricing .container > .section-subtitle {
  display: block;
  text-align: center;
}
#pricing .container > .section-subtitle { margin: 0 auto; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
  align-items: start;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: border-color 0.3s, transform 0.3s var(--ease-out), box-shadow 0.3s;
  position: relative;
}
.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.pricing-card--popular {
  border-color: rgba(108,95,255,0.4);
  background: linear-gradient(135deg, #0f0f1a 0%, #131325 100%);
  box-shadow: 0 0 40px rgba(108,95,255,0.12);
}
.pricing-card--popular:hover {
  border-color: var(--accent);
  box-shadow: 0 0 60px rgba(108,95,255,0.22);
}

.pricing-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(108,95,255,0.15);
  border: 1px solid rgba(108,95,255,0.3);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.pricing-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.pricing-price {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 12px;
}
.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-3);
  font-family: var(--font-sans);
}

.pricing-desc {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 24px;
}

.pricing-features {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-2);
}
.pricing-features li::before {
  content: '✓';
  color: var(--accent-2);
  font-weight: 700;
  flex-shrink: 0;
}

/* ================================================================
   SPLIT CTA
   ================================================================ */
#cta {
  padding: 120px 0;
  background: linear-gradient(180deg, var(--bg) 0%, #0c0a1a 100%);
  position: relative;
  overflow: hidden;
}
#cta::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(108,95,255,0.25), transparent 70%);
  bottom: -100px; right: -100px;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

#cta .container > .section-label,
#cta .container > .section-title {
  display: block;
  text-align: center;
}
#cta .container > .section-title { margin-bottom: 48px; }

.cta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}

.cta-card {
  background: var(--surface);
  border: 1px solid rgba(108,95,255,0.25);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.cta-card:hover {
  border-color: rgba(108,95,255,0.5);
  box-shadow: 0 0 0 1px rgba(108,95,255,0.15), 0 8px 40px rgba(108,95,255,0.12);
  transform: translateY(-2px);
}

.cta-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.cta-card p {
  color: var(--text-2);
  font-size: 0.97rem;
  line-height: 1.7;
  flex: 1;
  margin: 0;
}

/* ── Inquiry Form ──────────────────────────────────────────────── */
.inquiry-form-wrapper {
  display: none;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.inquiry-form-wrapper.open { display: flex; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.02em;
}

.inquiry-field {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.72rem 1rem;
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  appearance: none;
}
.inquiry-field::placeholder { color: var(--text-3); }
.inquiry-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select.inquiry-field {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236a6a80' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
select.inquiry-field option { background: var(--surface-2); color: var(--text); }
textarea.inquiry-field { resize: vertical; }

.inquiry-success {
  display: none;
  text-align: center;
  padding: 1.75rem 0;
  color: var(--teal);
  font-weight: 600;
  font-size: 1rem;
  gap: 10px;
  align-items: center;
  justify-content: center;
}
.inquiry-success.visible { display: flex; }
.inquiry-success span { font-size: 1.5rem; }

/* ================================================================
   FOOTER
   ================================================================ */
#footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 72px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.footer-logo-dot {
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 7px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.footer-logo-dot::before,
.footer-logo-dot::after {
  content: '';
  position: absolute;
  background: rgba(255,255,255,0.5);
  border-radius: 2px;
}
.footer-logo-dot::before { width: 10px; height: 10px; top: 5px; left: 5px; }
.footer-logo-dot::after  { width: 6px; height: 6px; bottom: 5px; right: 5px; background: #fff; }

.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-3);
  line-height: 1.65;
  margin-bottom: 6px;
}
.footer-location { font-size: 0.78rem; color: var(--text-3); }

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 16px;
}
.footer-col ul  { display: flex; flex-direction: column; gap: 10px; }
.footer-col a,
.footer-col p   { font-size: 0.88rem; color: var(--text-3); transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-contact-email { color: var(--accent-2) !important; }

.footer-bar {
  font-size: 0.8rem;
  color: var(--text-3);
  text-align: center;
}

/* ================================================================
   CHATBOT
   ================================================================ */
.chat-bubble {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 2000;
  width: 60px; height: 60px;
  background: var(--accent);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px var(--accent-glow);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}
.chat-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 36px rgba(108,95,255,0.6);
}
.chat-bubble svg { width: 26px; height: 26px; fill: #fff; }

.chat-panel {
  position: fixed;
  bottom: 100px; right: 28px;
  z-index: 1999;
  width: 380px; height: 520px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 64px rgba(0,0,0,0.6);
  transform-origin: bottom right;
  transform: scale(0.85) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s var(--ease-out), opacity 0.25s;
}
.chat-panel.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface-2);
}
.chat-header-info { display: flex; align-items: center; gap: 0.65rem; }

.chat-avatar {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.chat-header-text h4 { font-size: 0.9rem; font-weight: 700; color: var(--text); margin: 0; }
.chat-header-text span {
  font-size: 0.75rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 0.35em;
}

.online-dot {
  width: 7px; height: 7px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  animation: onlinePulse 2s ease infinite;
}
@keyframes onlinePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.chat-close {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s;
}
.chat-close:hover { color: var(--text); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 2px; }

.msg { display: flex; flex-direction: column; max-width: 82%; }
.msg--bot  { align-self: flex-start; }
.msg--user { align-self: flex-end; }

.msg-bubble {
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.55;
}
.msg--bot  .msg-bubble { background: var(--surface-3); color: var(--text); border-bottom-left-radius: 4px; }
.msg--user .msg-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.7rem 0.9rem;
  background: var(--surface-3);
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}
.typing-dot {
  width: 6px; height: 6px;
  background: var(--text-3);
  border-radius: 50%;
  animation: typingBounce 1.2s ease infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%            { transform: translateY(-5px); }
}

.chat-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface-2);
}

.chat-input {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chat-input::placeholder { color: var(--text-3); }
.chat-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.chat-send {
  width: 38px; height: 38px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s var(--ease-out);
}
.chat-send:hover { background: #7d70ff; }
.chat-send svg { width: 16px; height: 16px; fill: #fff; }

/* ================================================================
   SCROLL REVEAL
   ================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.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; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links     { display: none; }
  .nav-hamburger { display: flex; }

  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }

  #hero { padding: 100px 0 60px; }
  .hero-cta { flex-direction: column; align-items: flex-start; }

  .services-grid { grid-template-columns: 1fr; }
  .how-grid      { grid-template-columns: 1fr; }
  .work-grid     { grid-template-columns: 1fr; }
  .pricing-grid  { grid-template-columns: 1fr; }
  .cta-grid      { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr; gap: 40px; }

  .chat-panel  { width: calc(100vw - 32px); right: 16px; bottom: 90px; }
  .chat-bubble { bottom: 20px; right: 16px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .step-card { padding: 28px; }
}
