/* Edgar Vázquez — home del portafolio */
/* tipografía propia del home */
@font-face { font-family: "Bricolage Grotesque"; src: url(../fonts/bricolage-grotesque-wght.woff2) format("woff2"); font-style: normal; font-weight: 200 800; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(../fonts/ibm-plex-mono-500.woff2) format("woff2"); font-style: normal; font-weight: 500; font-display: swap; }
/* tipografías de cada sitio, solo para su tarjeta */
@font-face { font-family: "Nord"; src: url(../fonts/nord-medium.woff2) format("woff2"); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url(../fonts/inter-tight-wght.woff2) format("woff2"); font-style: normal; font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(../fonts/instrument-serif-normal.woff2) format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(../fonts/instrument-serif-italic.woff2) format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(../fonts/jetbrains-mono-normal.woff2) format("woff2"); font-style: normal; font-weight: 400 500; font-display: swap; }

:root {
  --bg: #0a0b0d;
  --bg-2: #14161a;
  --ink: #eef0f3;
  --muted: #8b9099;
  --line: rgba(238, 240, 243, 0.1);
  --card: rgba(238, 240, 243, 0.03);
  --warm: #c8f031; /* acento lima del home */
  --rose: #c8f031;
  --serif: "Bricolage Grotesque", system-ui, sans-serif;
  --sans: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --pad: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--warm); color: var(--bg); }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: 8px; }
.skip:focus { left: 8px; }

.mono { font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.display { font: 700 clamp(44px, 6.4vw, 104px)/0.95 var(--serif); letter-spacing: -0.045em; margin: 0; }
.display em { font-style: normal; font-weight: 300; color: var(--warm); }

/* fondo: luz fría y retícula tenue, todo en CSS (sin imágenes) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55vmax 45vmax at 85% 0%, rgba(200, 240, 49, 0.07), transparent 60%),
    radial-gradient(60vmax 50vmax at 0% 100%, rgba(90, 120, 255, 0.07), transparent 60%),
    linear-gradient(rgba(238, 240, 243, 0.025) 1px, transparent 1px) 0 0 / 100% 64px;
}

/* ---------- navegación ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px var(--pad); transition: background 0.4s, padding 0.4s; }
.nav.is-solid { padding-top: 12px; padding-bottom: 12px; background: rgba(10, 11, 13, 0.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav__logo { font: 700 21px/1 var(--serif); letter-spacing: -0.04em; margin: 0; }
.nav__logo em { font-style: normal; font-weight: 300; color: var(--warm); }
.nav__links { display: flex; gap: 28px; }
.nav__links a { font-size: 13px; font-weight: 500; color: #c3c8d0; position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--warm); transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 500; transition: border-color 0.3s, color 0.3s; }
.pill:hover { border-color: var(--warm); color: var(--warm); }

/* ---------- hero y mundos ---------- */
.hero { min-height: 100vh; min-height: 100svh; padding: 104px var(--pad) 32px; display: grid; grid-template-rows: auto 1fr auto; gap: 28px; }
.hero__head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px 40px; }
.hero__kicker { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.15); }
.hero__title { font-size: clamp(50px, 8vw, 132px); }
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.05em; }
.hero__title .line > span { display: inline-block; transform: translateY(105%); animation: rise 1.2s var(--ease) forwards; }
.hero__title .line:nth-child(2) > span { animation-delay: 0.12s; }
.hero__lead { margin: 0 0 10px; max-width: 26ch; color: #bfc4cc; font-size: clamp(15px, 1.3vw, 19px); opacity: 0; animation: fade 1s 0.5s var(--ease) forwards; }
@keyframes rise { to { transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.worlds { display: flex; gap: 14px; min-height: 420px; }
.world {
  position: relative; flex: 1 1 0; min-width: 0; border-radius: 26px; overflow: hidden; isolation: isolate;
  border: 1px solid var(--line); background: var(--bg-2); cursor: none;
  transition: flex-grow 0.9s var(--ease), border-color 0.6s, filter 0.6s;
  opacity: 0; animation: fade 1.1s var(--ease) forwards;
}
.world:nth-child(1) { animation-delay: 0.25s; }
.world:nth-child(2) { animation-delay: 0.38s; }
.world:nth-child(3) { animation-delay: 0.51s; }
.world:nth-child(4) { animation-delay: 0.64s; }
.world:nth-child(5) { animation-delay: 0.77s; }
.world__media, .world__video { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.world__media img, .world__video { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease), opacity 0.6s; }
.world__video { opacity: 0; }
.world.is-playing .world__video { opacity: 1; }
.world__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 7, 10, 0.25) 0%, rgba(8, 7, 10, 0) 35%, rgba(8, 7, 10, 0.85) 100%), radial-gradient(80% 60% at 50% 110%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%); transition: opacity 0.6s; }
.world__top { position: absolute; top: 20px; left: 22px; right: 22px; display: flex; justify-content: space-between; color: #e9e0e5; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tags i { font-style: normal; padding: 6px 10px; border-radius: 999px; background: rgba(8, 7, 10, 0.45); border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.world__body { position: absolute; left: 24px; right: 24px; bottom: 24px; display: grid; gap: 10px; }
.world__name { font: 400 clamp(38px, 4.6vw, 76px)/0.95 var(--serif); letter-spacing: -0.02em; }
.world__name em { color: var(--accent-2); }
.world__desc { max-width: 38ch; color: #d6ccd2; font-size: 14px; opacity: 0.85; }
.world__cta { display: inline-flex; align-items: center; gap: 10px; width: max-content; margin-top: 6px; padding: 11px 18px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 500; transform: translateY(8px); opacity: 0; transition: transform 0.6s var(--ease), opacity 0.6s; }

/* cada tarjeta usa la tipografía de su propio sitio */
.world[data-world="bozz"] { font-family: "Inter Tight", system-ui, sans-serif; }
.world[data-world="bozz"] .world__top { font: 600 10.5px/1.4 "Inter Tight", system-ui, sans-serif; letter-spacing: 0.1em; }
.world[data-world="bozz"] .world__name { display: flex; align-items: center; gap: 0.22em; font: 700 clamp(38px, 4.4vw, 72px)/1 "Inter Tight", system-ui, sans-serif; letter-spacing: -0.045em; }
.world[data-world="bozz"] .world__name em { font-size: 0.36em; letter-spacing: 0.02em; padding: 0.26em 0.42em 0.22em; border-radius: 0.3em; color: #fff; background: linear-gradient(180deg, #ff3358, #c90e33); box-shadow: 0 0 34px rgba(229, 23, 63, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.world[data-world="bozz"] .world__desc { color: rgba(244, 244, 246, 0.6); opacity: 1; }
.world[data-world="bozz"] .world__cta { font-weight: 700; background: linear-gradient(180deg, #ff3358, #e5173f); box-shadow: 0 0 22px rgba(229, 23, 63, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25); }

.world[data-world="quepa"] { font-family: "Inter Tight", system-ui, sans-serif; }
.world[data-world="quepa"] .world__top { font-family: "JetBrains Mono", ui-monospace, monospace; color: #f3ece6; }
.world[data-world="quepa"] .world__name { font-family: "Instrument Serif", Georgia, serif; }
.world[data-world="quepa"] .world__name em { font-style: italic; }
.world[data-world="quepa"] .world__desc { color: #d6ccd2; }
.world[data-world="nubeli"] .world__name { font: 600 clamp(38px, 4.4vw, 72px)/1 var(--serif); letter-spacing: -0.02em; }
.world[data-world="nubeli"] .world__name em { display: block; margin-top: 0.12em; font: italic 400 0.42em/1 "Instrument Serif", Georgia, serif; }
.world[data-world="nubeli"] .world__desc { color: #f1e3d6; }
.world[data-world="nubeli"] .world__shade { background: linear-gradient(180deg, rgba(8, 7, 10, 0.2) 0%, rgba(8, 7, 10, 0) 30%, rgba(20, 10, 6, 0.92) 100%), radial-gradient(80% 60% at 50% 110%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%); }
.world[data-world="chronos"] .world__name { font: 500 clamp(30px, 3.2vw, 54px)/1 "Nord", "Inter Tight", sans-serif; letter-spacing: 0.04em; }
.world[data-world="chronos"] .world__name em { display: block; margin-top: 0.3em; font: italic 400 0.5em/1 "Instrument Serif", Georgia, serif; letter-spacing: 0; color: var(--accent-2); }
.world[data-world="chronos"] .world__desc { color: #c9ccd6; }
.world[data-world="chronos"] .world__shade { background: linear-gradient(180deg, rgba(7, 9, 15, 0.25) 0%, rgba(7, 9, 15, 0.1) 28%, rgba(7, 9, 15, 0.94) 100%), radial-gradient(80% 60% at 50% 110%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 70%); }
.world[data-world="chronos"] .world__cta { color: #1a1206; font-weight: 600; background: linear-gradient(180deg, #e3c18e, #ba8e59); }
.world[data-world="human"] .world__name { font: 700 clamp(32px, 3.6vw, 60px)/1 "Inter Tight", system-ui, sans-serif; letter-spacing: -0.035em; }
.world[data-world="human"] .world__name em { display: block; margin-top: 0.3em; font: italic 400 0.48em/1 "Instrument Serif", Georgia, serif; letter-spacing: 0; color: var(--accent-2); }
.world[data-world="human"] .world__desc { color: #c4d3dc; }
.world[data-world="human"] .world__shade { background: linear-gradient(180deg, rgba(11, 17, 23, 0.25) 0%, rgba(11, 17, 23, 0.05) 30%, rgba(11, 17, 23, 0.94) 100%), radial-gradient(80% 60% at 50% 110%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 70%); }
.world[data-world="human"] .world__cta { color: #06181a; font-weight: 600; background: linear-gradient(180deg, #8fe3e8, #3fc1c9); }
.world:hover .world__cta, .world:focus-visible .world__cta { transform: none; opacity: 1; }
.world:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (hover: hover) {
  .worlds:hover .world { flex-grow: 0.7; filter: saturate(0.6) brightness(0.7); }
  .worlds:hover .world:hover { flex-grow: 1.6; filter: none; border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
  .world:hover .world__media img, .world:hover .world__video { transform: scale(1.04); }
}
.hero__hint { text-align: center; }

/* cursor "Entrar" sobre los mundos */
.cursor { position: fixed; left: 0; top: 0; z-index: 60; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font: 500 12px/1 var(--sans); pointer-events: none; transform: scale(0); transition: transform 0.35s var(--ease); will-change: transform, translate; }
.cursor.is-on { transform: scale(1); }

/* cortina de transición al entrar a un sitio */
.curtain { position: fixed; inset: 0; z-index: 100; pointer-events: none; background: var(--c, var(--bg)); clip-path: inset(var(--t, 50%) var(--r, 50%) var(--b, 50%) var(--l, 50%) round 26px); opacity: 0; }
.curtain.is-on { opacity: 1; transition: clip-path 0.75s var(--ease); }

/* ---------- sobre mí ---------- */
.about { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: center; padding: 18vh var(--pad) 12vh; max-width: 1400px; margin: 0 auto; }
.about__photo { margin: 0; position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 1; border: 1px solid var(--line); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10, 11, 13, 0.55)); }
.about__copy { display: grid; gap: 22px; }
.about__text { margin: 0; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.55; color: #cdd1d8; max-width: 46ch; }
.about__text b { color: var(--ink); font-weight: 500; }
.services { list-style: none; margin: 6px 0 0; padding: 0; border-top: 1px solid var(--line); }
.services li { display: flex; gap: 18px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.services .mono { color: var(--warm); }
.stats { display: flex; gap: 48px; margin: 8px 0 0; }
.stats dt { font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 6px 0 0; font: 700 clamp(40px, 4.6vw, 66px)/1 var(--serif); letter-spacing: -0.045em; }
.stats dd em { font-style: normal; font-weight: 300; color: var(--warm); }
.stats sup { font-size: 0.5em; color: var(--warm); }

/* ---------- herramientas ---------- */
.tools { padding: 12vh var(--pad); max-width: 1400px; margin: 0 auto; }
.section-head { display: grid; gap: 18px; margin-bottom: 48px; }
.tools__label { margin: 40px 0 16px; }
.logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.logo { --c: var(--ink); display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 500; transition: border-color 0.35s, background 0.35s, transform 0.35s var(--ease); }
.logo svg, .logo .mark { width: 26px; height: 26px; flex: none; color: var(--c); }
.logo .mark { display: grid; place-items: center; border-radius: 6px; background: color-mix(in srgb, var(--c) 18%, #0b0c0e); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); font: 600 11px/1 var(--sans); }
.logo:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 60%, transparent); background: color-mix(in srgb, var(--c) 9%, transparent); }
.logos--code .logo { padding: 12px 16px; font-size: 13px; }
.logos--code .logo svg, .logos--code .logo .mark { width: 22px; height: 22px; }

/* ---------- contacto ---------- */
.contact { padding: 16vh var(--pad) 14vh; text-align: center; display: grid; justify-items: center; gap: 22px; }
.contact__title { font-size: clamp(44px, 7.4vw, 120px); max-width: 14ch; }
.contact__text { margin: 0; max-width: 44ch; color: #bfc4cc; font-size: 17px; }
.btn-wa { display: inline-flex; align-items: center; gap: 12px; height: 56px; padding: 0 28px; border-radius: 999px; background: #25d366; color: #062b14; font-weight: 600; box-shadow: 0 18px 50px -18px rgba(37, 211, 102, 0.7); transition: transform 0.35s var(--ease); }
.btn-wa:hover { transform: translateY(-3px); }
.btn-wa svg { width: 22px; height: 22px; }
.contact__phone { color: var(--ink); }

.footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 32px calc(var(--pad) + 64px) 40px var(--pad); border-top: 1px solid var(--line); }

.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 12px 30px -10px rgba(37, 211, 102, 0.8); transition: transform 0.35s var(--ease); }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 26px; height: 26px; }

/* aparición al hacer scroll (la activa home.js) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsivo ---------- */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .hero__head { grid-template-columns: 1fr; }
  .worlds { flex-direction: column; }
  .world { min-height: 340px; cursor: pointer; }
  .world__cta { transform: none; opacity: 1; }
  .hero__hint { display: none; }
  .about { grid-template-columns: 1fr; padding-top: 12vh; }
  .about__photo { max-width: 420px; }
}
@media (hover: none) { .cursor { display: none; } .world { cursor: pointer; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
