:root {
  --bg: #0b0d10; --bg2: #11151a; --card: #151a21; --line: #232a33;
  --text: #e8ecf1; --muted: #8f9aa8; --accent: #ffd300; --accent-ink: #141100;
  --r: 16px; --max: 1120px;
  --f-body: "Inter", system-ui, sans-serif; --f-head: "Space Grotesk", "Inter", sans-serif;
}
:root[data-theme="light"] {
  --bg: #fafaf7; --bg2: #f1f1ec; --card: #fff; --line: #e3e3dc;
  --text: #15181c; --muted: #5d6671; --accent: #f2c400;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font: 400 1rem/1.65 var(--f-body); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--max), 100% - 2rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: color-mix(in srgb, var(--bg) 80%, transparent); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-color: var(--line); }
.nav__in { display: flex; align-items: center; gap: 1rem; height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; font: 700 1.1rem var(--f-head); text-decoration: none; margin-right: auto; }
.brand__mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); }
.menu { display: flex; align-items: center; gap: 1.6rem; }
.menu a { text-decoration: none; font-size: .95rem; color: var(--muted); transition: color .2s; }
.menu a:hover { color: var(--text); }
.theme, .burger { background: none; border: 1px solid var(--line); color: var(--text); width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 1.1rem; }
.burger { display: none; position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: currentColor; transition: .25s; }
.burger span:first-child { top: 14px; } .burger span:last-child { top: 22px; }
.burger[aria-expanded="true"] span:first-child { top: 18px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 18px; transform: rotate(-45deg); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .9rem 1.5rem; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink) !important; font: 600 .95rem var(--f-body); text-decoration: none; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--accent); }
.btn--sm { padding: .5rem 1.1rem; }
.btn--ghost { background: transparent; color: var(--text) !important; border-color: var(--line); }
.btn--ghost:hover { border-color: var(--text); box-shadow: none; }

/* hero */
.hero { position: relative; padding: clamp(4rem, 12vw, 9rem) 0 clamp(3rem, 8vw, 6rem); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 620px; height: 620px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 28%, transparent), transparent 65%); filter: blur(40px); z-index: -1; }
.hero h1 em { font-style: normal; color: var(--accent); }
.eyebrow { color: var(--accent); font: 600 .8rem var(--f-body); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.lead { max-width: 60ch; font-size: 1.15rem; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0 3.5rem; }
.stats { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 1.5rem 0 0; margin: 0; border-top: 1px solid var(--line); }
.stats strong { display: block; font: 700 1.3rem var(--f-head); }
.stats span { color: var(--muted); font-size: .9rem; }

/* sections */
.sec { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.sec--alt { background: var(--bg2); }
.sec__head { max-width: 640px; margin-bottom: 2.5rem; }
.grid { display: grid; gap: 1.2rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.8rem; transition: transform .25s, border-color .25s; }
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card p { color: var(--muted); margin: 0; }
.ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); font-size: 1.3rem; margin-bottom: 1rem; }

/* project */
.project { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 1.5rem; margin-bottom: 1.2rem; }
.project__img { border-radius: var(--r); overflow: hidden; display: block; }
.project__img img { aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: transform .5s; }
.project__img:hover img { transform: scale(1.04); }
.project__body { padding: .5rem 1rem 1rem 0; }
.tag { color: var(--accent); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .4rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0 0 1.4rem; }
.chips li, .skills li { border: 1px solid var(--line); border-radius: 999px; padding: .3rem .9rem; font-size: .85rem; color: var(--muted); }
.link { color: var(--accent); font-weight: 600; text-decoration: none; } .link:hover { text-decoration: underline; }
.soon .card { opacity: .75; border-style: dashed; }

/* steps */
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; padding: 0; margin: 0; }
.steps li { border-top: 2px solid var(--line); padding-top: 1.2rem; }
.steps li span { font: 700 .9rem var(--f-head); color: var(--accent); }
.steps h3 { margin-top: .4rem; } .steps p { color: var(--muted); }

/* about + contact */
.about, .contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: start; }
.about p { color: var(--muted); max-width: 56ch; }
.skills { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; margin: 0; align-content: flex-start; }
.skills li { font-size: .95rem; color: var(--text); background: var(--card); }
.info { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; }
.info li { display: grid; gap: .1rem; } .info span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.info a { text-decoration: none; font-weight: 600; } .info a:hover { color: var(--accent); }
.form { display: grid; gap: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 1.8rem; }
.form label { display: grid; gap: .35rem; font-size: .88rem; font-weight: 500; }
.form input:not([type="checkbox"]), .form textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; width: 100%; transition: border-color .2s; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.form .invalid { border-color: #ff5d5d !important; }
.check { display: flex !important; align-items: center; gap: .6rem; font-weight: 400 !important; color: var(--muted); }
.hp { position: absolute; left: -9999px; }
.status { margin: 0; min-height: 1.4em; font-size: .92rem; } .status.ok { color: #4cd38a; } .status.err { color: #ff6b6b; }

.foot { border-top: 1px solid var(--line); padding: 1.8rem 0; color: var(--muted); font-size: .9rem; }
.foot__in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.wa { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; background: #25d366; color: #052b14; font-weight: 700; font-size: .9rem; padding: .75rem 1.2rem; border-radius: 999px; text-decoration: none; box-shadow: 0 10px 30px -8px #25d36688; transition: transform .2s; }
.wa:hover { transform: scale(1.05); }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } .js .reveal { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .project, .about, .contact { grid-template-columns: 1fr; gap: 1.5rem; }
  .project__body { padding: 0 .5rem .5rem; }
}
@media (max-width: 720px) {
  .burger { display: block; }
  .menu { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem 1rem 1rem; transform: translateY(-120%); transition: transform .3s; z-index: -1; }
  .menu.open { transform: none; }
  .menu a { padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .menu .btn { margin-top: 1rem; border: 0; }
  .grid--3, .grid--2, .steps, .stats { grid-template-columns: 1fr; }
}

/* páginas legales */
.legal { max-width: 760px; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal h2 { font-size: 1.25rem; margin-top: 2rem; }
.legal p, .legal address { color: var(--muted); }
.legal a { color: var(--accent); }
.legal .upd { font-size: .9rem; }
.legal address { font-style: normal; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 1.2rem 1.4rem; line-height: 1.9; }
.legal address strong { color: var(--text); }
