/* =========================================================
   GAEL ACEVAL · Portafolio privado
   Base compartida por todas las páginas (cada proyecto
   cambia colores y tipografías con sus propias variables)
   ========================================================= */

:root {
  --bg: #040509;
  --bg-2: #0a0c14;
  --card: rgba(255, 255, 255, .035);
  --line: rgba(255, 255, 255, .09);
  --text: #f4f6fb;
  --muted: #8d93a3;
  --accent: #277fff;          /* azul Gael (del CV) */
  --accent-2: #7fb2ff;
  --accent-ink: #ffffff;
  --radius: 22px;
  --radius-sm: 14px;
  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: var(--font);
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 500; letter-spacing: -.035em; line-height: 1.02; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.muted { color: var(--muted); }

/* ---------- Etiqueta tipo «LIVE PREVIEW» ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before, .eyebrow::after { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, currentColor); opacity: .6; }
.eyebrow::after { transform: scaleX(-1); }
.eyebrow.left::before { display: none; }
.eyebrow.left::after { display: none; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px;
  border: 1px solid var(--line); background: rgba(255,255,255,.03); backdrop-filter: blur(10px);
  font-size: 12.5px; color: var(--muted); white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* ---------- Botones ---------- */
.btn {
  --b: var(--text); --c: #05060a;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 24px; border-radius: 99px; background: var(--b); color: var(--c);
  font-weight: 500; font-size: 15px; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .4s var(--ease), background .3s, box-shadow .4s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -12px var(--glow, rgba(39,127,255,.6)); }
.btn svg { width: 16px; height: 16px; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn.ghost { --b: rgba(255,255,255,.04); --c: var(--text); border: 1px solid var(--line); backdrop-filter: blur(12px); }
.btn.ghost:hover { --b: rgba(255,255,255,.08); }
.btn.accent { --b: var(--accent); --c: var(--accent-ink); }
.btn.sm { height: 40px; padding: 0 18px; font-size: 14px; }

/* ---------- Barra superior ---------- */
.nav {
  position: fixed; inset: 14px 0 auto; z-index: 50; pointer-events: none;
}
.nav-in {
  pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: calc(var(--wrap) - 2 * var(--gutter) + 24px); margin: 0 auto; width: calc(100% - 2 * var(--gutter));
  height: 60px; padding: 0 10px 0 18px; border-radius: 99px;
  background: rgba(8, 10, 18, .45); border: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  transition: background .4s;
}
.nav.scrolled .nav-in { background: rgba(8, 10, 18, .78); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 500; font-size: 15px; letter-spacing: -.01em; }
.brand .g { width: 24px; height: 24px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 14px; border-radius: 99px; font-size: 14px; color: var(--muted); transition: color .25s, background .25s; }
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.05); }
@media (max-width: 860px) { .nav-links { display: none; } }

/* Logo G (sin sombra, cambia de color con currentColor) */
.g {
  display: inline-block; aspect-ratio: 1; background: currentColor;
  -webkit-mask: url(/assets/marcas/gael-g.svg) center / contain no-repeat;
  mask: url(/assets/marcas/gael-g.svg) center / contain no-repeat;
}
.g.blue { color: var(--accent); }

/* ---------- Tarjetas de video ---------- */
.v {
  position: relative; display: block; width: 100%; overflow: hidden; isolation: isolate;
  border-radius: var(--radius); background: #0c0e16; aspect-ratio: var(--r, 9 / 16);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset;
  cursor: pointer; text-align: left;
}
.v[data-r="h"] { --r: 16 / 9; }
.v[data-r="w"] { --r: 3 / 2; }
.v[data-r="s"] { --r: 4 / 5; }
.v > video, .v > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .6s; }
.v:hover > video, .v:hover > img { transform: scale(1.035); }
.v::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.55)); pointer-events: none; z-index: 1; }
.v-play {
  position: absolute; z-index: 2; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 14px 0 6px; border-radius: 99px; font-size: 13px; font-weight: 500; color: #fff;
  background: rgba(10,12,20,.45); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(12px);
  transition: background .3s, transform .4s var(--ease);
}
.v-play i { width: 26px; height: 26px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.v-play i::before { content: ""; margin-left: 2px; border-left: 8px solid #05060a; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.v:hover .v-play { background: var(--accent); border-color: transparent; transform: translateY(-2px); }
.v[data-nolabel] .v-play span { display: none; }
.v[data-nolabel] .v-play { padding-right: 6px; }
.v-tag { position: absolute; z-index: 2; top: 12px; left: 12px; }
.v-tag.pill { background: rgba(10,12,20,.45); color: #fff; border-color: rgba(255,255,255,.14); font-size: 11.5px; padding: 5px 11px; }

/* ---------- Visor de video (lightbox) ---------- */
.lb {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 64px 16px 24px;
  background: rgba(3, 4, 8, .86); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
}
.lb.open { opacity: 1; visibility: visible; }
.lb video { max-width: min(100%, 1400px); max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px); border-radius: 18px; background: #000; box-shadow: 0 40px 120px -20px rgba(0,0,0,.8); transform: scale(.96); transition: transform .5s var(--ease); }
.lb.open video { transform: none; }
.lb-close {
  position: absolute; top: 16px; right: 16px; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); display: grid; place-items: center;
}
.lb-close::before, .lb-close::after { content: ""; position: absolute; width: 16px; height: 1.5px; background: #fff; transform: rotate(45deg); }
.lb-close::after { transform: rotate(-45deg); }
.lb-title { position: absolute; top: 28px; left: 24px; right: 80px; font-size: 14px; color: rgba(255,255,255,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Encabezados de sección ---------- */
.sec { padding-block: clamp(80px, 12vw, 150px); position: relative; }
.sec-head { display: grid; gap: 18px; justify-items: center; text-align: center; margin-bottom: clamp(40px, 6vw, 70px); }
.sec-head h2 { font-size: clamp(34px, 5.4vw, 64px); }
.sec-head p { max-width: 560px; color: var(--muted); font-size: clamp(15px, 1.4vw, 17px); }
.sec-head.left { justify-items: start; text-align: left; }

/* ---------- Pie de página común de proyecto ---------- */
.back {
  display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); transition: color .3s;
}
.back:hover { color: var(--text); }
.back svg { width: 16px; height: 16px; }

.foot-credit {
  border-top: 1px solid var(--line); padding-block: 28px; font-size: 13px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center;
}
.foot-credit a { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.foot-credit .g { width: 18px; height: 18px; }
.foot-credit a.inline { display: inline; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.25); }
.foot-credit a.inline:hover { color: var(--text); }
.center { display: flex; justify-content: center; }
@media (max-width: 560px) { .hide-sm { display: none; } }
@media (max-width: 560px) {
  .eyebrow { letter-spacing: .18em; font-size: 10.5px; gap: 8px; }
  .eyebrow::before, .eyebrow::after { width: 18px; }
}
