/* =============================================================
   0. Reset
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; height: 100%; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-y: none;
  background: var(--bg);
  color: var(--cream);
  min-height: 100%;
  width: 100%;
}
/* Grid/flex children default to min-width:auto and can force overflow
   once the container is resized (e.g. artifact fullscreen transition) */
.wrap, .hero .wrap, .stats-grid > *, .trio-grid > *, .about-grid > *,
.chip-row, .hero-actions, .yt-actions, footer { min-width: 0; }
img { max-width: 100%; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.02em; }
ul { list-style: none; padding: 0; }
::selection { background: var(--gold); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--cream); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #0a0810;
  --bg-2: #100c18;
  --panel: #14101d;
  --line: rgba(201, 169, 97, 0.16);
  --line-soft: rgba(243, 237, 224, 0.08);
  --cream: #f3ede0;
  --cream-dim: rgba(243, 237, 224, 0.62);
  --cream-faint: rgba(243, 237, 224, 0.4);
  --gold: #c9a961;
  --gold-bright: #e6c77e;
  --gold-dim: rgba(201, 169, 97, 0.5);
  --violet: #7c5cff;
  --cyan: #4fd1e8;

  --serif: "Fraunces", "Georgia", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --gutter: clamp(1.5rem, 6vw, 4rem);
  --nav-h: 76px;
}

.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section { position: relative; }

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--gold);
  display: inline-block;
}

/* =============================================================
   2. Nav
   ============================================================= */
.masthead {
  position: fixed; inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex; align-items: center;
  background: rgba(10, 8, 16, 0.4);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease-out), border-color .4s var(--ease-out);
}
.masthead.is-scrolled {
  background: rgba(10, 8, 16, 0.78);
  border-bottom-color: var(--line);
}
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
}
.brand-mark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: .01em;
  display: flex; align-items: center; gap: .5rem;
  flex-shrink: 0;
  white-space: nowrap;
}
.brand-mark .dot { color: var(--gold); }

.nav-links {
  display: none;
  gap: 2rem;
  font-size: .88rem;
  color: var(--cream-dim);
  flex-shrink: 0;
  white-space: nowrap;
}
.nav-links a { transition: color .3s var(--ease-out); position: relative; }
.nav-links a:hover { color: var(--cream); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1px;
  background: var(--gold); transition: right .35s var(--ease-out);
}
.nav-links a:hover::after { right: 0; }

.nav-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1.15rem;
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gold-bright);
  transition: border-color .3s var(--ease-out), background .3s var(--ease-out), color .3s var(--ease-out);
}
.nav-cta:hover { background: var(--gold); color: var(--bg); border-color: var(--gold); }

.social-row { display: flex; align-items: center; gap: .5rem; }
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  color: var(--cream-dim);
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out), transform .3s var(--ease-soft), background .3s var(--ease-out);
}
.social-link svg { width: 16px; height: 16px; }
.social-link:hover {
  color: var(--gold-bright);
  border-color: var(--gold-dim);
  background: rgba(201, 169, 97, 0.08);
  transform: translateY(-2px);
}
.social-row-mobile { margin-top: .6rem; }
.social-row-mobile .social-link { width: 42px; height: 42px; }
.social-row-mobile .social-link svg { width: 19px; height: 19px; }
.social-row-footer .social-link { width: 30px; height: 30px; }
.social-row-footer .social-link svg { width: 14px; height: 14px; }
.social-row-nav { display: none; }
@media (min-width: 900px) {
  .social-row-nav { display: flex; }
}

.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  padding: .4rem;
}
.nav-toggle span { width: 22px; height: 1.5px; background: var(--cream); transition: transform .3s var(--ease-out), opacity .3s var(--ease-out); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0;
  background: rgba(10, 8, 16, 0.98);
  backdrop-filter: blur(20px);
  z-index: 99;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
  opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out), visibility 0s linear .35s;
}
.mobile-menu.is-open {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.mobile-menu a { font-family: var(--serif); font-size: 1.6rem; color: var(--cream); }
.mobile-menu .nav-cta { margin-top: 1rem; }

/* =============================================================
   3. Reactive background mesh
   ============================================================= */
.mesh-bg {
  position: fixed; inset: 0; z-index: -1;
  width: 100vw; height: 100vh; height: 100dvh;
  background:
    radial-gradient(circle 640px at var(--mx, 50%) var(--my, 32%),
      rgba(201, 169, 97, 0.16) 0%, transparent 55%),
    radial-gradient(circle 760px at calc(var(--mx, 50%) + 18%) calc(var(--my, 32%) - 12%),
      rgba(124, 92, 255, 0.10) 0%, transparent 55%),
    radial-gradient(circle 620px at calc(var(--mx, 50%) - 16%) calc(var(--my, 32%) + 18%),
      rgba(79, 209, 232, 0.07) 0%, transparent 55%),
    var(--bg);
  filter: blur(20px);
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =============================================================
   4. Hero
   ============================================================= */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; align-items: center;
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: 4rem;
}
.hero-wrap { text-align: center; }
.hero-wrap .eyebrow { justify-content: center; }
.hero-wrap .eyebrow::before { display: none; }

/* Name split around the avatar, like a portrait breaking through the type */
.hero-name {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: clamp(.3rem, 2vw, 1.6rem);
  margin-top: 1.6rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 10vw, 7.4rem);
  line-height: 1;
  color: var(--cream);
}
.name-part { white-space: nowrap; min-width: 0; }
.name-left { text-align: right; }
.name-right { text-align: left; }
.name-right .accent { color: var(--gold); font-style: italic; }

.avatar-slot { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; }
.avatar-slot .avatar-glow {
  position: absolute; inset: -35% -65%;
  background:
    radial-gradient(circle at 50% 45%, rgba(201,169,97,.30), transparent 60%),
    radial-gradient(circle at 65% 60%, rgba(124,92,255,.20), transparent 55%),
    radial-gradient(circle at 35% 65%, rgba(79,209,232,.16), transparent 55%);
  filter: blur(30px);
  z-index: 0;
}
.avatar-slot .avatar-frame {
  position: relative; z-index: 1;
  height: clamp(9.5rem, 30vw, 30rem);
  width: auto;
  animation: avatar-float 6.5s ease-in-out infinite;
}
.avatar-slot .avatar-frame img { height: 100%; width: auto; display: block; }
@keyframes avatar-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero-roles {
  margin-top: 1.6rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--cream-dim);
  font-weight: 500;
  max-width: 46ch;
  margin-inline: auto;
}
.hero-flagship {
  margin-top: 1.8rem;
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .7rem 1.1rem .7rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .86rem;
  color: var(--cream);
  background: rgba(201, 169, 97, 0.06);
}
.hero-flagship .pip {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(201,169,97,.6);
  animation: pip-pulse 2.4s ease-out infinite;
}
@keyframes pip-pulse {
  0% { box-shadow: 0 0 0 0 rgba(201,169,97,.5); }
  70% { box-shadow: 0 0 0 9px rgba(201,169,97,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,169,97,0); }
}

.hero-actions {
  margin-top: 2.4rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem;
}
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .95rem 1.7rem;
  border-radius: 999px;
  font-size: .92rem; font-weight: 600;
  transition: transform .3s var(--ease-soft), box-shadow .3s var(--ease-out), background .3s var(--ease-out), color .3s var(--ease-out), border-color .3s var(--ease-out);
}
.btn-primary {
  background: var(--gold);
  color: var(--bg);
  box-shadow: 0 8px 30px -10px rgba(201,169,97,.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -10px rgba(201,169,97,.7); }
.btn-ghost {
  border: 1px solid var(--line-soft);
  color: var(--cream);
}
.btn-ghost:hover { border-color: var(--gold-dim); color: var(--gold-bright); }

@media (prefers-reduced-motion: reduce) {
  .avatar-slot .avatar-frame { animation: none; }
  .hero-flagship .pip { animation: none; }
}

/* Narrow screens: not enough width to split the name around the avatar —
   stack S.S / avatar / XD. vertically instead, still striking, no squeeze. */
@media (max-width: 699.98px) {
  .hero-name { grid-template-columns: 1fr; row-gap: .3rem; }
  .name-left, .name-right { text-align: center; }
  .avatar-slot .avatar-frame { height: clamp(8rem, 42vw, 15rem); margin: .3rem 0; }
}

/* =============================================================
   5. Stats band
   ============================================================= */
.stats {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 3.4rem 0;
  background: linear-gradient(180deg, transparent, rgba(201,169,97,.03), transparent);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.2rem 1.4rem;
}
.stat-item { text-align: left; }
.stat-num {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: baseline; gap: .15rem;
}
.stat-num .suffix { font-size: .55em; color: var(--gold); }
.stat-label {
  margin-top: .35rem;
  font-size: .78rem;
  color: var(--cream-faint);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.stat-live-tag {
  display: inline-flex; align-items: center; gap: .35rem;
  margin-top: .3rem;
  font-size: .68rem;
  color: var(--cream-faint);
}
.stat-live-tag .pip { width: 6px; height: 6px; border-radius: 50%; background: #6ee7a0; box-shadow: 0 0 0 0 rgba(110,231,160,.5); animation: pip-pulse 2.2s ease-out infinite; }

@media (min-width: 720px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* =============================================================
   6. About
   ============================================================= */
.about { padding: 7rem 0 5rem; }
.about-grid {
  display: grid; gap: 2.4rem;
}
.about h2 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-top: .8rem;
  max-width: 16ch;
}
.about-text {
  color: var(--cream-dim);
  font-size: 1.05rem;
  max-width: 58ch;
  margin-top: 1.4rem;
}
.about-text + .about-text { margin-top: 1rem; }

@media (min-width: 960px) {
  .about-grid { grid-template-columns: .8fr 1.2fr; align-items: start; }
}

/* =============================================================
   7. Trio "qué hago hoy"
   ============================================================= */
.trio { padding: 4rem 0 6rem; }
.trio-head { max-width: 46ch; margin-bottom: 3rem; }
.trio-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-top: .8rem;
}
.trio-grid {
  display: grid;
  gap: 1.4rem;
}
.trio-card {
  padding: 2rem 1.7rem;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,.02), transparent);
  transition: transform .5s var(--ease-soft), border-color .4s var(--ease-out);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.trio-card:hover { border-color: var(--gold-dim); }
.trio-num {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--gold);
}
.trio-card h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin-top: .9rem;
}
.trio-card p {
  margin-top: .8rem;
  color: var(--cream-dim);
  font-size: .95rem;
}

@media (min-width: 720px) {
  .trio-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =============================================================
   8. Brand-fit band (categorías, no logos falsos)
   ============================================================= */
.brandfit {
  padding: 4rem 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.brandfit-head { max-width: 50ch; }
.brandfit-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  margin-top: .8rem;
}
.brandfit-head p { margin-top: .8rem; color: var(--cream-dim); }
.chip-row {
  margin-top: 2rem;
  display: flex; flex-wrap: wrap; gap: .8rem;
}
.chip {
  padding: .6rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .84rem;
  color: var(--cream-dim);
  font-family: var(--mono);
}

/* =============================================================
   9. YouTube section
   ============================================================= */
.ytsection { padding: 6rem 0; }
.yt-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1.4rem; margin-bottom: 2.2rem;
}
.yt-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-top: .8rem;
}
.yt-grid {
  display: grid;
  gap: 1.2rem;
}
.yt-embed-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  background: var(--panel);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
}
.yt-embed-wrap iframe { width: 100%; height: 100%; border: 0; }
@media (min-width: 820px) {
  .yt-grid { grid-template-columns: repeat(3, 1fr); }
}
.yt-actions {
  margin-top: 1.6rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem;
}
.yt-subscribe-frame { border: 0; height: 34px; width: 190px; }
.yt-handle {
  font-family: var(--mono); font-size: .84rem; color: var(--cream-faint);
}

/* =============================================================
   10. Contact
   ============================================================= */
.contact {
  padding: 6rem 0 5rem;
  text-align: center;
}
.contact .eyebrow { justify-content: center; }
.contact .eyebrow::before { display: none; }
.contact h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  margin-top: 1rem;
  max-width: 20ch;
  margin-inline: auto;
}
.contact p {
  margin-top: 1rem;
  color: var(--cream-dim);
  max-width: 46ch;
  margin-inline: auto;
}
.contact .hero-actions { justify-content: center; margin-top: 2.2rem; }

/* =============================================================
   11. Footer
   ============================================================= */
footer {
  padding: 2.4rem var(--gutter);
  border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  font-size: .8rem; color: var(--cream-faint);
}
footer a { color: var(--cream-dim); transition: color .3s var(--ease-out); }
footer a:hover { color: var(--gold); }

/* =============================================================
   12. Reveal on scroll
   ============================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

/* =============================================================
   13. Magnetic buttons
   ============================================================= */
.has-magnetic { display: inline-flex; position: relative; isolation: isolate; }
.magnetic-inner { display: inline-flex; align-items: center; gap: .55rem; will-change: transform; }

/* =============================================================
   14. Responsive: nav + breakpoints
   ============================================================= */
@media (min-width: 720px) {
  .nav-toggle { display: none; }
  .nav-links { display: flex; }
}
@media (max-width: 719.98px) {
  .nav-links { display: none; }
}

/* --gutter is already clamped above; .wrap's own max-width + margin:auto
   handles centering, so no extra viewport-remainder math is needed here
   (that previous formula double-counted the max-width and crushed the
   content column on very large screens). */
