:root {
  --bg: #0a0e1a;
  --bg-alt: #0e1424;
  --card: #131a2e;
  --card-hi: #18203a;
  --text: #e7ecf6;
  --muted: #97a3bd;
  --line: #222c44;
  --brand1: #7c3aed;
  --brand2: #06b6d4;
  --grad: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  --radius: 16px;
  --maxw: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .brand { font-family: 'Space Grotesk', system-ui, sans-serif; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(124,58,237,.35); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand2); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,14,26,.8); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 66px; }
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 9px; font-size: 22px; font-weight: 700; }
.brand-mark { width: 26px; height: 26px; flex-shrink: 0; }
.brand-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { justify-self: center; display: flex; gap: 28px; }
.nav-links a { color: var(--muted); font-size: 15px; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { justify-self: end; display: flex; align-items: center; gap: 12px; }
.lang-toggle {
  background: transparent; border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .2s;
}
.lang-toggle:hover { border-color: var(--brand2); }
.lang-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-color: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%2397a3bd'%20stroke-width='3'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolyline%20points='6%209%2012%2015%2018%209'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 11px;
  border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 8px 34px 8px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: border-color .2s; font-family: inherit;
}
.lang-select:hover { border-color: var(--brand2); }
.lang-select:focus { outline: none; border-color: var(--brand2); }
.lang-select option { background: var(--bg); color: var(--text); }

/* ---- Hero ---- */
.hero { position: relative; padding: 90px 0 80px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 600px; background: radial-gradient(circle, rgba(124,58,237,.22), transparent 60%); pointer-events: none;
}
.hero-inner { position: relative; max-width: 820px; text-align: center; margin: 0 auto; }
.eyebrow { color: var(--brand2); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.1; font-weight: 700; }
.hero-sub { color: var(--muted); font-size: clamp(16px, 2vw, 19px); margin: 22px auto 0; max-width: 640px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.hero-trust { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-top: 40px; color: var(--muted); font-size: 14px; }

/* ---- Sections ---- */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-title { font-size: clamp(26px, 3.5vw, 38px); text-align: center; font-weight: 700; }
.section-sub { color: var(--muted); text-align: center; max-width: 560px; margin: 14px auto 0; font-size: 17px; }

/* ---- Cards / pricing ---- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 48px; }
.card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 26px; display: flex; flex-direction: column;
}
.card-featured { border-color: var(--brand1); background: var(--card-hi); box-shadow: 0 12px 40px rgba(124,58,237,.18); }
.badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-size: 12px; font-weight: 600;
  padding: 5px 14px; border-radius: 999px; white-space: nowrap;
}
.card h3 { font-size: 21px; margin-bottom: 10px; }
.price { font-size: 38px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.price .per { font-size: 16px; color: var(--muted); font-weight: 500; }
.price-note { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.card-foot { font-size: 12px; color: var(--muted); margin: -14px 0 16px; }
.card ul { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-bottom: 26px; flex: 1; }
.card li { padding-left: 26px; position: relative; color: #cdd5e6; font-size: 15px; }
.card li::before { content: "✓"; position: absolute; left: 0; color: var(--brand2); font-weight: 700; }
.services-foot { text-align: center; margin-top: 34px; color: var(--muted); }
.services-foot a { color: var(--brand2); font-weight: 600; }

/* ---- Custom package band ---- */
.custom-band {
  margin-top: 30px;
  background: linear-gradient(135deg, rgba(124,58,237,.14), rgba(6,182,212,.10));
  border: 1px solid var(--brand1);
  border-radius: var(--radius);
  padding: 30px 34px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.custom-tag { display: inline-block; background: var(--grad); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; }
.custom-text h3 { font-size: 23px; margin-bottom: 6px; }
.custom-text p { color: var(--muted); max-width: 620px; }

/* ---- Add-ons ---- */
.addons { margin-top: 64px; }
.addons-title { text-align: center; font-size: 25px; }
.addons-sub { text-align: center; color: var(--muted); margin: 8px 0 28px; }
.addon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.addon { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; transition: border-color .2s, transform .15s; }
.addon:hover { border-color: var(--brand2); transform: translateY(-2px); }
.addon-ico { font-size: 24px; line-height: 1; }
.addon-info { display: flex; flex-direction: column; }
.addon-info strong { font-size: 15px; font-weight: 600; }
.addon-price { color: var(--brand2); font-size: 14px; font-weight: 600; }

/* ---- Demo ---- */
.demo-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.demo-text .section-title, .demo-text .section-sub { text-align: left; margin-left: 0; }
.demo-points { list-style: none; margin: 24px 0 30px; display: flex; flex-direction: column; gap: 10px; color: #cdd5e6; }
.demo-preview { display: flex; justify-content: center; }
.chat-preview { width: 100%; max-width: 360px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.chat-head { background: var(--grad); color: #fff; padding: 14px 18px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.chat-head .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #4ade80; margin-right: 6px; }
.chat-head button { background: transparent; border: none; color: #fff; font-size: 16px; cursor: pointer; }
.chat-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.msg { padding: 10px 14px; border-radius: 14px; max-width: 85%; font-size: 14px; }
.msg.bot { background: var(--card-hi); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--grad); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }

/* ---- Features ---- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 48px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.feat-ico { font-size: 28px; }
.feature h4 { margin: 14px 0 8px; font-size: 18px; }
.feature p { color: var(--muted); font-size: 15px; }

/* ---- AI automation ---- */
.auto-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; }
.auto-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: border-color .25s ease, transform .2s ease; }
.auto-ico { font-size: 30px; line-height: 1; }
.auto-card h4 { margin: 14px 0 8px; font-size: 18px; }
.auto-card p { color: var(--muted); font-size: 15px; }
.auto-cta { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 40px; flex-wrap: wrap; }
.auto-price { font-weight: 600; color: var(--text); font-size: 17px; }

/* ---- Steps ---- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 48px; }
.step { text-align: center; }
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; border-radius: 50%; background: var(--grad); color: #fff;
  font-weight: 700; font-size: 20px; font-family: 'Space Grotesk', sans-serif; margin-bottom: 14px;
}
.step h4 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 15px; }

/* ---- Contact ---- */
.contact-inner { max-width: 620px; margin: 0 auto; text-align: center; }
.contact-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 32px 0; }
.contact-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.contact-form input, .contact-form textarea {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; color: var(--text); font-family: inherit; font-size: 15px; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--brand2); }
.form-status { margin-top: 4px; font-size: 14px; min-height: 1.1em; color: var(--brand2); }

/* Email updates capture */
.updates { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.updates-lead { color: var(--muted); margin-bottom: 16px; }
.updates-form { display: flex; gap: 10px; }
.updates-form input { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--text); font-family: inherit; font-size: 15px; }
.updates-form input:focus { outline: none; border-color: var(--brand2); }
@media (max-width: 520px) { .updates-form { flex-direction: column; } }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner { text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* ---- Chat widget ---- */
.chat-bubble {
  position: fixed; bottom: 24px; right: 24px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--grad); color: #fff; font-size: 26px; box-shadow: 0 10px 30px rgba(124,58,237,.45);
  transition: transform .15s;
}
.chat-bubble:hover { transform: scale(1.08); }
.chat-window {
  position: fixed; bottom: 96px; right: 24px; z-index: 60;
  width: 340px; max-width: calc(100vw - 48px); height: 460px; max-height: calc(100vh - 140px);
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.chat-window[hidden] { display: none; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-log .msg { animation: pop .2s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; color: var(--text); font-family: inherit; }
.chat-input input:focus { outline: none; border-color: var(--brand2); }
.chat-input button { background: var(--grad); border: none; color: #fff; width: 42px; border-radius: 50%; cursor: pointer; font-size: 16px; }

/* ---- Responsive ---- */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .features, .steps { grid-template-columns: 1fr; }
  .demo-inner { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .addon-grid { grid-template-columns: 1fr 1fr; }
  .auto-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .features, .steps, .addon-grid, .auto-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Animations  (only active when motion is allowed — see the
   inline <head> script that adds .js, and the media query below)
   ========================================================= */

/* --- Scroll reveal: hidden starting state --- */
.js .section-title,
.js .section-sub,
.js .card,
.js .feature,
.js .addon,
.js .auto-card,
.js .custom-band,
.js .demo-text,
.js .chat-preview {
  opacity: 0;
  transform: translateY(28px);
}
.js .section-title,
.js .section-sub,
.js .feature,
.js .custom-band,
.js .demo-text,
.js .chat-preview {
  transition: opacity .7s cubic-bezier(.16,.84,.44,1), transform .6s cubic-bezier(.16,.84,.44,1);
}
.js .card {
  transition: opacity .7s ease, transform .4s cubic-bezier(.16,.84,.44,1), box-shadow .3s ease, border-color .3s ease;
}
.js .addon {
  transition: opacity .6s ease, transform .35s cubic-bezier(.16,.84,.44,1), border-color .25s ease;
}
.js .auto-card {
  transition: opacity .6s ease, transform .4s cubic-bezier(.16,.84,.44,1), border-color .25s ease;
}

/* --- Directional reveal variants (must come before is-visible) --- */
.js .reveal-left  { transform: translateX(-40px); }
.js .reveal-right { transform: translateX(40px); }

/* --- Revealed state (after the above so it wins the cascade) --- */
.js .is-visible { opacity: 1; transform: none; }

/* --- Hover lifts (after is-visible so they win on hover) --- */
.card:hover { transform: translateY(-6px); border-color: var(--brand2); box-shadow: 0 18px 50px rgba(6,182,212,.18); }
.addon:hover { transform: translateY(-3px); border-color: var(--brand2); }
.auto-card:hover { transform: translateY(-4px); border-color: var(--brand2); }

/* --- Ambient motion (respects reduced-motion preference) --- */
@media (prefers-reduced-motion: no-preference) {
  /* Hero staggered entrance */
  .js .hero .eyebrow,
  .js .hero h1,
  .js .hero-sub,
  .js .hero-rotator,
  .js .hero-cta,
  .js .hero-trust { opacity: 0; animation: heroUp .85s cubic-bezier(.16,.84,.44,1) forwards; }
  .js .hero .eyebrow { animation-delay: .05s; }
  .js .hero h1       { animation-delay: .18s; }
  .js .hero-sub      { animation-delay: .34s; }
  .js .hero-rotator  { animation-delay: .44s; }
  .js .hero-cta      { animation-delay: .56s; }
  .js .hero-trust    { animation-delay: .70s; }

  /* Slowly drifting aurora glow behind the hero */
  .hero::before { animation: aurora 16s ease-in-out infinite alternate; }

  /* Shimmering brand wordmark */
  .brand-text {
    background-image: linear-gradient(90deg, #a78bfa, #22d3ee, #a78bfa);
    background-size: 200% auto;
    animation: shimmer 5s linear infinite;
  }

  /* Pulsing ring on the chat bubble to draw the eye */
  .chat-bubble::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
    box-shadow: 0 0 0 0 rgba(124, 58, 237, .55);
    animation: ring 2.6s ease-out infinite;
  }
}

@keyframes heroUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes aurora {
  0%   { transform: translateX(-50%) translateY(0)    scale(1);    opacity: .85; }
  50%  { transform: translateX(-46%) translateY(24px) scale(1.14); opacity: 1; }
  100% { transform: translateX(-54%) translateY(-12px) scale(1.06); opacity: .8; }
}
@keyframes shimmer { to { background-position: 200% center; } }
@keyframes ring {
  0%   { box-shadow: 0 0 0 0  rgba(124, 58, 237, .55); }
  70%  { box-shadow: 0 0 0 20px rgba(124, 58, 237, 0); }
  100% { box-shadow: 0 0 0 0  rgba(124, 58, 237, 0); }
}

/* =========================================================
   Extra flair
   ========================================================= */

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  background: var(--grad); transform: scaleX(0); transform-origin: 0 50%;
  z-index: 100; transition: transform .1s linear;
}

/* Nav: shadow + solid background once scrolled */
.nav { transition: box-shadow .3s ease, background .3s ease; }
.nav.scrolled { box-shadow: 0 6px 24px rgba(0,0,0,.35); background: rgba(10,14,26,.94); }

/* Animated underline on nav links */
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 100%;
  background: var(--grad); transform: scaleX(0); transform-origin: 0 50%; transition: transform .25s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }

/* 3D tilt setup for package cards */
.cards { perspective: 1000px; }
.card { transform-style: preserve-3d; }

/* Shine sweep across primary buttons */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.btn-primary:hover::after { left: 140%; }

/* Hero rotating words */
.hero-rotator {
  margin-top: 16px; color: var(--muted); font-size: 17px;
  display: flex; justify-content: center; align-items: baseline; gap: 7px; flex-wrap: wrap;
}
.rotator {
  display: inline-block; font-weight: 600;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: opacity .3s ease, transform .3s ease;
}

/* Icon bounce on hover */
.feature:hover .feat-ico,
.addon:hover .addon-ico { display: inline-block; animation: bounce .5s ease; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-7px); } 60% { transform: translateY(-2px); } }

/* Pulsing glow on the featured package (ambient) */
@media (prefers-reduced-motion: no-preference) {
  .card-featured { animation: featuredGlow 3.4s ease-in-out infinite; }
  .card-featured:hover { animation-play-state: paused; }
}
@keyframes featuredGlow {
  0%, 100% { box-shadow: 0 12px 40px rgba(124, 58, 237, .18); }
  50%      { box-shadow: 0 16px 52px rgba(6, 182, 212, .30); }
}

/* =========================================================
   Pinned process timeline ("Cum lucrăm") — implera-style
   ========================================================= */
.process-section { position: relative; }
.process-sticky { padding: 60px 0; }

/* Step cards (visible by default for no-JS / reduced motion) */
.process-section .steps { margin-top: 28px; }
.process-section .step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px;
}

/* The progress line */
.timeline-bar {
  position: relative; height: 3px; background: var(--line);
  border-radius: 3px; margin: 6px 0 40px; display: none;
}
.timeline-progress {
  height: 100%; width: 0; background: var(--grad); border-radius: 3px;
  box-shadow: 0 0 10px rgba(6, 182, 212, .6); transition: width .12s linear;
}

/* Motion-on: dim the steps and light them up as you scroll */
.js .timeline-bar { display: block; }
.js .process-section .step {
  opacity: .4; transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease, border-color .4s ease, box-shadow .4s ease;
}
.js .process-section .step.lit {
  opacity: 1; transform: translateY(0);
  border-color: rgba(6, 182, 212, .45); box-shadow: 0 18px 40px -24px rgba(6, 182, 212, .5);
}

/* Desktop: pin the section while you scroll through it */
@media (min-width: 821px) {
  .js .process-section { min-height: 240vh; padding: 0; }
  .js .process-sticky {
    position: sticky; top: 0; min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
  }
}

/* Packages: 4 across → 2 → 1 as the screen narrows */
@media (max-width: 1040px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .cards { grid-template-columns: 1fr; } }

/* AI automation section — keep it alive */
.auto-card:hover { box-shadow: 0 16px 44px -22px rgba(6, 182, 212, .45); }
.auto-card:hover .auto-ico { transform: scale(1.18); }
.auto-ico { transition: transform .25s ease; }
@media (prefers-reduced-motion: no-preference) {
  .auto-ico { display: inline-block; animation: floaty 3.6s ease-in-out infinite; }
  .auto-grid .auto-card:nth-child(2) .auto-ico { animation-delay: .3s; }
  .auto-grid .auto-card:nth-child(3) .auto-ico { animation-delay: .6s; }
  .auto-grid .auto-card:nth-child(4) .auto-ico { animation-delay: .9s; }
  .auto-grid .auto-card:nth-child(5) .auto-ico { animation-delay: 1.2s; }
  .auto-grid .auto-card:nth-child(6) .auto-ico { animation-delay: 1.5s; }
  .auto-card:hover .auto-ico { animation: none; }
}
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
