:root {
  --blue: #3b82f6;
  --violet: #7c3aed;
  --magenta: #ec2fa0;
  --grad: linear-gradient(100deg, #3b82f6, #7c3aed, #ec2fa0);
  --bg: #0f0f12;
  --bg-2: #17171b;
  --bg-3: #1e1e24;
  --card: #17171c;
  --line: #2a2a32;
  --text: #eef0f4;
  --muted: #a2a6b3;
  --white: #fff;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 20px 50px rgba(0,0,0,0.4);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; font-family: "Inter", system-ui, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: "Space Grotesk", system-ui, sans-serif; margin: 0; color: var(--white); line-height: 1.15; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 22px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--magenta); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15,15,18,0.8);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 38px; height: 38px; object-fit: contain; }
.brand-name { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--white); }
.main-nav { display: flex; align-items: center; gap: 6px; }
.nav-link { font-size: 0.92rem; font-weight: 500; color: var(--muted); padding: 8px 14px; border-radius: 8px; transition: color 0.15s var(--ease), background 0.15s var(--ease); }
.nav-link:hover { color: var(--white); background: var(--bg-3); }
.nav-link.active { color: var(--white); }
.btn-cta {
  background: var(--grad); color: #fff; font-weight: 600; font-size: 0.92rem;
  padding: 10px 20px; border: none; border-radius: 999px; cursor: pointer;
  transition: transform 0.12s var(--ease), box-shadow 0.2s var(--ease);
  box-shadow: 0 6px 18px rgba(124,58,237,0.35);
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(236,47,160,0.4); }
.btn-cta.big { padding: 14px 30px; font-size: 1rem; }
.btn-cta.full { width: 100%; }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: transparent; font-weight: 600; font-size: 1rem; padding: 13px 28px; border-radius: 999px; cursor: pointer; transition: border-color 0.15s var(--ease), background 0.15s var(--ease); }
.btn-ghost:hover { border-color: var(--violet); background: var(--bg-3); }
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }
.mobile-nav { display: none; flex-direction: column; padding: 8px 22px 16px; border-top: 1px solid var(--line); background: var(--bg-2); }
.mobile-link { padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--text); font-weight: 500; }
.mobile-link.cta { color: var(--magenta); font-weight: 700; border-bottom: none; }

/* Hero */
.hero { position: relative; padding: 80px 0 70px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; top: -30%; right: -10%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(124,58,237,0.25), transparent 60%);
  filter: blur(40px); z-index: 0;
}
.hero::after {
  content: ""; position: absolute; bottom: -40%; left: -15%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.18), transparent 60%);
  filter: blur(40px); z-index: 0;
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.eyebrow, .section-eyebrow { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--violet); margin-bottom: 14px; }
.section-eyebrow.light { color: #c9b4f5; }
.hero-text h1 { font-size: 3.3rem; margin-bottom: 18px; letter-spacing: -0.01em; }
.hero-text > p { font-size: 1.15rem; color: var(--muted); max-width: 560px; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-badges { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.9rem; color: var(--muted); }
.hero-visual { display: grid; place-items: center; }
.hero-visual img { width: 78%; max-width: 320px; filter: drop-shadow(0 20px 50px rgba(124,58,237,0.4)); animation: float 5s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* Secciones */
.section { padding: 76px 0; position: relative; }
.section-alt { background: var(--bg-2); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head h2 { font-size: 2.2rem; margin-bottom: 10px; }
.section-head p { color: var(--muted); margin: 0; }

/* Cards servicios */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; transition: transform 0.2s var(--ease), border-color 0.2s var(--ease); }
.card:hover { transform: translateY(-5px); border-color: var(--violet); }
.card-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--bg-3); display: grid; place-items: center; font-size: 1.7rem; margin-bottom: 16px; border: 1px solid var(--line); }
.card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card p { font-size: 0.92rem; color: var(--muted); margin: 0; }

/* Portfolio */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.portfolio-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform 0.2s var(--ease), border-color 0.2s var(--ease); }
.portfolio-card:hover { transform: translateY(-5px); border-color: var(--magenta); }
.portfolio-thumb { height: 170px; display: grid; place-items: center; font-size: 4rem; position: relative; }
.portfolio-thumb.pf-1 { background: linear-gradient(135deg, #6b1f2a, #b08d57); }
.portfolio-thumb.pf-2 { background: linear-gradient(135deg, #0a9396, #005f63); }
.portfolio-thumb.pf-3 { background: linear-gradient(135deg, #e63946, #22314a); }
.portfolio-body { padding: 20px 22px 24px; }
.portfolio-tag { display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--violet); background: var(--bg-3); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.portfolio-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.portfolio-card p { font-size: 0.9rem; color: var(--muted); margin: 0; }
.portfolio-note { text-align: center; color: var(--muted); font-size: 0.82rem; margin-top: 24px; }

/* Proceso */
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.process-step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; position: relative; }
.process-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.2rem; margin-bottom: 16px; }
.process-step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.process-step p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* Sobre mí */
.about-inner { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 44px; align-items: center; }
.about-visual { display: grid; place-items: center; }
.about-visual img { width: 100%; max-width: 320px; border-radius: var(--radius); border: 1px solid var(--line); }
.about-text h2 { font-size: 2rem; margin-bottom: 14px; }
.about-text p { color: var(--muted); margin: 0 0 14px; }
.about-text .btn-cta { margin-top: 8px; }

/* Contacto */
.contacto-section { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.contacto-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 46px; align-items: start; }
.contacto-text h2 { font-size: 2.1rem; margin-bottom: 12px; }
.contacto-text > p { color: var(--muted); margin: 0 0 22px; }
.contacto-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.contacto-list a { color: var(--text); }
.contacto-list a:hover { color: var(--magenta); }
.contacto-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contacto-form label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 14px; }
.contacto-form input, .contacto-form textarea { width: 100%; margin-top: 6px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-3); color: var(--text); font-family: "Inter", sans-serif; font-size: 0.92rem; }
.contacto-form input:focus, .contacto-form textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(124,58,237,0.2); }
.check-row { display: flex; align-items: flex-start; gap: 8px; font-weight: 400 !important; font-size: 0.85rem; color: var(--muted) !important; }
.check-row input { width: auto; margin-top: 3px; }
.form-status { font-size: 0.86rem; margin: 12px 0 0; }
.form-status.ok { color: #4ade80; }
.form-status.error { color: #f87171; }
.check-row a { color: var(--violet); text-decoration: underline; }
/* Honeypot anti-spam: nunca visible */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 40px 0 28px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo { width: 42px; height: 42px; object-fit: contain; }
.footer-brand strong { display: block; font-family: "Space Grotesk", sans-serif; color: var(--white); }
.footer-brand span { font-size: 0.82rem; color: var(--muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid var(--line); padding: 16px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); }

/* Volver arriba + toast */
.to-top { position: fixed; right: 20px; bottom: 20px; width: 48px; height: 48px; border: none; border-radius: 50%; background: var(--grad); color: #fff; font-size: 1.2rem; cursor: pointer; box-shadow: var(--shadow); z-index: 60; transition: transform 0.15s var(--ease); }
.to-top:hover { transform: translateY(-3px); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); background: var(--bg-3); border: 1px solid var(--line); color: var(--white); padding: 13px 22px; border-radius: 999px; font-size: 0.88rem; box-shadow: var(--shadow); opacity: 0; pointer-events: none; z-index: 95; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal, .hero-visual img { opacity: 1; transform: none; animation: none; } }

/* Foco accesible */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 6px; }

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-visual img { max-width: 200px; }
  .about-inner, .contacto-inner { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .mobile-nav { display: flex; }
  .hero-text h1 { font-size: 2.3rem; }
  .section { padding: 54px 0; }
  .form-row.two { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}


/* Páginas cortas: empuja el footer al fondo de la pantalla (sticky footer) */
body.page-flex { display: flex; flex-direction: column; min-height: 100vh; }
body.page-flex main { flex: 1 0 auto; }
body.page-flex .site-footer { flex-shrink: 0; }

/* Páginas legales (privacidad) */
.legal { padding-top: 56px; }
.legal-inner { max-width: 760px; }
.legal-back { display: inline-block; color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; transition: color 0.15s var(--ease); }
.legal-back:hover { color: var(--white); }
.legal h1 { font-size: 2.2rem; margin-bottom: 8px; }
.legal h2 { font-size: 1.25rem; color: var(--white); margin: 34px 0 10px; }
.legal-updated { color: var(--muted); font-size: 0.88rem; margin: 0 0 8px; }
.legal p { color: var(--text); }
.legal ul { color: var(--text); padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--violet); text-decoration: underline; }
.legal-foot { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }

/* Página de gracias */
.thanks { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; }
body.page-flex main:has(.thanks) { display: flex; flex-direction: column; }
.thanks-inner { max-width: 620px; margin: 0 auto; text-align: center; }
.thanks-icon { width: 76px; height: 76px; margin: 0 auto 24px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 2.2rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(124,58,237,0.4); }
.thanks h1 { font-size: 2.2rem; margin-bottom: 14px; }
.thanks p { color: var(--muted); font-size: 1.05rem; }
.thanks-sub { font-size: 0.95rem; margin-bottom: 30px; }
.thanks-sub a, .thanks-inner a[href^="mailto"] { color: var(--violet); text-decoration: underline; }
.footer-bottom a { color: var(--muted); text-decoration: underline; }
.footer-bottom a:hover { color: var(--white); }
