:root {
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --bg: #0a0b14;
  --bg-2: #10121f;
  --card: #151827;
  --card-2: #1c2032;
  --border: #262a40;
  --text: #e7e9f5;
  --muted: #9aa0c0;
  --radius: 16px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --maxw: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(124, 92, 255, 0.18), transparent 60%),
              radial-gradient(900px 500px at 0% 0%, rgba(34, 211, 238, 0.12), transparent 55%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(10, 11, 20, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: .3px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; font-size: 18px; box-shadow: 0 0 24px rgba(124,92,255,.5);
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-toggle {
  display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--card);
}
.lang-toggle button { background: none; border: none; color: var(--muted); padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 13px; }
.lang-toggle button.active { background: var(--accent); color: #fff; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: none; border-radius: 12px; padding: 12px 20px; font-weight: 700; font-size: 15px;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), #6a4bff); color: #fff; box-shadow: 0 8px 26px rgba(124,92,255,.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(124,92,255,.55); }
.btn-ghost { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 9px 14px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero { padding: 90px 0 70px; text-align: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: rgba(124,92,255,.12); border: 1px solid rgba(124,92,255,.3); color: #cbb8ff;
  font-size: 13px; font-weight: 600; margin-bottom: 24px;
}
.hero h1 { font-size: clamp(34px, 6vw, 60px); line-height: 1.08; font-weight: 900; letter-spacing: -1px; }
.hero h1 .grad { background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { color: var(--muted); font-size: 19px; max-width: 640px; margin: 20px auto 32px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; justify-content: center; margin-top: 56px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-size: 30px; font-weight: 800; background: linear-gradient(120deg,var(--accent),var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats .stat span { color: var(--muted); font-size: 14px; }

/* ---------- Sections ---------- */
section { padding: 60px 0; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -.5px; }
.section-head p { color: var(--muted); margin-top: 10px; font-size: 17px; }

/* Category filters */
.filters { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 38px; }
.filter {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--card);
  color: var(--muted); cursor: pointer; font-weight: 600; font-size: 14px; transition: all .2s;
}
.filter:hover { color: var(--text); }
.filter.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Service grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 12px; transition: transform .2s, border-color .2s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: 0; transition: opacity .2s; }
.card:hover { transform: translateY(-4px); border-color: rgba(124,92,255,.5); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card .icon { width: 52px; height: 52px; border-radius: 13px; background: var(--bg-2); display: grid; place-items: center; font-size: 26px; border: 1px solid var(--border); }
.card h3 { font-size: 19px; font-weight: 700; }
.card p { color: var(--muted); font-size: 15px; flex: 1; }
.card .cat-tag { font-size: 12px; color: var(--accent-2); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.price { font-weight: 800; font-size: 20px; }
.price small { color: var(--muted); font-weight: 500; font-size: 13px; }
.price.quote { color: var(--accent-2); font-size: 16px; }
.featured-tag { position: absolute; top: 16px; right: 16px; background: linear-gradient(135deg,var(--accent),var(--accent-2)); color:#fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }

/* ---------- Proyectos ---------- */
.project-card .project-media { width: 100%; height: 150px; border-radius: 12px; background-size: cover; background-position: center; border: 1px solid var(--border); margin-bottom: 4px; }
.project-media--icon { display: grid; place-items: center; font-size: 54px; background: radial-gradient(circle at 30% 20%, rgba(124,92,255,.25), transparent 60%), var(--bg-2); }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(124,92,255,.12); color: #cbb8ff; border: 1px solid rgba(124,92,255,.25); }

/* ---------- Valoraciones ---------- */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.review-card { background: linear-gradient(180deg, var(--card), var(--card-2)); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 14px; transition: transform .2s, border-color .2s; }
.review-card:hover { transform: translateY(-3px); border-color: rgba(124,92,255,.4); }
.review-stars { color: #ffca28; font-size: 18px; letter-spacing: 3px; }
.review-text { color: var(--text); font-size: 15px; font-style: italic; line-height: 1.7; flex: 1; }
.review-author { display: flex; align-items: center; gap: 12px; }
.review-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 18px; flex-shrink: 0; }
.review-author b { display: block; font-size: 15px; }
.review-author span { color: var(--muted); font-size: 13px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.step .num { width: 40px; height: 40px; border-radius: 11px; background: rgba(124,92,255,.15); color: var(--accent); display: grid; place-items: center; font-weight: 800; margin-bottom: 14px; }
.step h4 { font-size: 17px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14px; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(4,5,12,.75); backdrop-filter: blur(6px); z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--bg-2); border: 1px solid var(--border); border-radius: 20px; width: 100%; max-width: 520px; box-shadow: var(--shadow); max-height: 92vh; overflow-y: auto; }
.modal-head { padding: 22px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-head h3 { font-size: 20px; }
.modal-head .svc-line { color: var(--muted); font-size: 14px; margin-top: 4px; }
.modal-close { background: var(--card); border: 1px solid var(--border); color: var(--muted); width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 18px; flex-shrink: 0; }
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 11px;
  padding: 12px 14px; color: var(--text); font-size: 15px; font-family: inherit; transition: border-color .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 90px; }
.form-msg { font-size: 14px; padding: 10px 14px; border-radius: 10px; display: none; }
.form-msg.error { display: block; background: rgba(237,66,69,.12); color: #ff8a8c; border: 1px solid rgba(237,66,69,.3); }
.form-msg.success { display: block; background: rgba(87,242,135,.1); color: #7ee2a0; border: 1px solid rgba(87,242,135,.3); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; color: var(--muted); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--text); }

/* ---------- Utils ---------- */
.hide { display: none !important; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero { padding: 60px 0 40px; }
  .hero-stats { gap: 26px; }
}
