/* ===================================================================
   NICO MEGA — Creative Strategist & Senior Copywriter
   Tokens
   - ink:     #131315  texto principal
   - paper:   #FFFFFF  fondo base — sitio claro
   - paper-2: #F4F2ED  fondo levemente cálido para tarjetas/tiras
   - accent:  #71ADDA  el azul real de tu logo (logo-nicomega-cv-07.svg,
              clase .st25) — mismo color en el CV y en la web
   - mute:    #6E6E6C  texto secundario
   El hero es la única zona oscura del sitio: es donde vive el video.
   Tipografía — Montserrat en todo el sitio
   - Peso 800/900 y mayúsculas ajustadas → titulares
   - Peso 600 + tracking amplio         → eyebrows, labels, slug-lines
   - Peso 400/500                       → cuerpo de texto
   =================================================================== */

:root{
  --ink: #131315;
  --paper: #FFFFFF;
  --paper-2: #F4F2ED;
  --accent: #71ADDA;
  --accent-deep: #3E6E9C;
  --mute: #6E6E6C;
  --mute-dark: #55544f;
  --line-light: rgba(19,19,21,0.12);

  /* el hero es oscuro (video) — variables propias para esa zona */
  --hero-bg: #101012;
  --hero-fg: #FBF8F2;
  --hero-mute: #cfcac0;
  --line-dark: rgba(251,248,242,0.18);

  --f-display: "Montserrat", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Montserrat", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-body: "Montserrat", -apple-system, "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.16,.84,.32,1);
  --nav-h: 88px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
}

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; margin: 0; padding: 0; }
button{ font: inherit; background: none; border: 0; color: inherit; cursor: pointer; }

.mono{
  font-family: var(--f-mono);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 11px;
}

/* -------------------------------------------------- grain / textura */
.grain{
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  opacity: .04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%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");
}

/* -------------------------------------------------- marcas de edición */
.redline{
  position: relative;
  white-space: normal;
}
.redline::after{
  content: "";
  position: absolute;
  left: -2px; right: -2px; bottom: -.02em;
  height: .08em;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform .9s var(--ease);
}
.reveal.is-visible .redline::after,
.is-visible .redline::after{ transform: scaleX(1); }

.mark{ color: var(--accent-deep); }
.mark--dot{ display: inline-block; }
.mark--arrow{ display: inline-block; transition: transform .3s var(--ease); }
a:hover .mark--arrow{ transform: translateX(6px); }

/* -------------------------------------------------- reveal on scroll */
.reveal{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible{ opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity: 1; transform: none; transition: none; }
}

/* ====================================================================
   NAV
   ==================================================================== */
.nav{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px clamp(20px, 4vw, 56px);
  color: #fff;
  mix-blend-mode: difference;
}
.nav__mark{
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .06em;
}
.nav__mark span{ color: var(--accent); mix-blend-mode: normal; }

.nav__menu{
  display: flex;
  gap: clamp(18px, 3vw, 40px);
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.nav__menu a{
  position: relative;
  padding-bottom: 3px;
}
.nav__menu a::after{
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav__menu a:hover::after{ transform: scaleX(1); transform-origin: left; }

/* Botón hamburguesa / cerrar --------------------------------------- */
.nav__toggle{
  display: none;
  width: 28px; height: 18px;
  position: relative;
  z-index: 210;
  flex-shrink: 0;
}
.nav__toggle span{
  position: absolute; left: 0; right: 0; height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform .35s var(--ease), opacity .25s var(--ease), top .35s var(--ease);
}
.nav__toggle span:first-child{ top: 0; }
.nav__toggle span:last-child{ top: 16px; }

@media (max-width: 720px){
  .nav__toggle{ display: block; }
  .nav__menu{
    position: fixed;
    inset: 0;
    z-index: 190;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 28px;
    gap: 22px;
    background: var(--ink);
    font-size: 24px;
    text-transform: none;
    transform: translateY(-100%);
    transition: transform .5s var(--ease);
  }
  .nav__menu.is-open{ transform: translateY(0); }

  /* Con el menú abierto, el nav deja el truco de "difference" (no hace
     falta: el fondo ya es sólido) y el botón se dibuja siempre blanco
     y sólido, así la X de cerrar se ve clarísima. */
  .nav.is-menu-open{ mix-blend-mode: normal; }
  .nav.is-menu-open .nav__toggle span{ background: #fff; mix-blend-mode: normal; }
  .nav.is-menu-open .nav__mark{ mix-blend-mode: normal; }

  .nav__toggle[aria-expanded="true"] span:first-child{
    top: 8px; transform: rotate(45deg);
  }
  .nav__toggle[aria-expanded="true"] span:last-child{
    top: 8px; transform: rotate(-45deg);
  }
}

/* ====================================================================
   HERO — video de fondo a pleno, wordmark centrado
   ==================================================================== */
.hero{
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(20px, 4vw, 56px) clamp(28px, 5vh, 64px);
  overflow: hidden;
  background: linear-gradient(160deg, #1a1611 0%, #0c0c0e 60%, #0a0a0c 100%);
  color: var(--hero-fg);
}
.hero__media{ position: absolute; inset: 0; z-index: 0; }
.hero__video{
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
}
/* Capa de color sobre el video, tal como se pidió: #8e8e8e al 18% */
.hero__tint{
  position: absolute; inset: 0;
  background: rgba(142,142,142,.18);
}
.hero__scrim{
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 46%, rgba(10,10,11,.12) 0%, rgba(10,10,11,.48) 62%, rgba(10,10,11,.8) 100%),
    linear-gradient(0deg, rgba(10,10,11,.85) 0%, rgba(10,10,11,0) 30%, rgba(10,10,11,0) 72%, rgba(10,10,11,.72) 100%);
}

.hero__center{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(14px, 2.4vh, 22px);
}

.hero__logo{
  width: clamp(280px, 58vw, 780px);
  height: auto;
}
.hero__logo--mobile{ display: none; }

@media (max-width: 720px){
  .hero__logo--desktop{ display: none; }
  .hero__logo--mobile{
    display: block;
    width: clamp(220px, 62vw, 340px);
  }
}

.hero__tags{
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-weight: 100;
  font-style: italic;
  font-size: clamp(13px, 1.6vw, 16px);
  letter-spacing: .04em;
  text-transform: none;
  color: var(--hero-fg);
  white-space: nowrap;
}
.hero__tags .dot{ color: var(--hero-mute); font-style: normal; }

@media (max-width: 720px){
  .hero__tags{
    gap: 6px;
    font-size: 11px;
    letter-spacing: 0;
    color: #fff;
  }
}
@media (max-width: 380px){
  .hero__tags{ font-size: 9.5px; }
}

.hero__role{
  position: relative; z-index: 1;
  margin: 0;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: clamp(12px, 1.6vw, 16px);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--hero-fg);
}
.hero__role .amp{ color: var(--accent); font-weight: 800; }

.hero__scroll{
  position: absolute;
  right: clamp(20px, 4vw, 56px);
  bottom: clamp(28px, 5vh, 64px);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--hero-mute);
}
.hero__scroll i{
  width: 1px; height: 34px;
  background: var(--hero-mute);
  position: relative;
  overflow: hidden;
}
.hero__scroll i::after{
  content: "";
  position: absolute; left: 0; top: -100%;
  width: 100%; height: 100%;
  background: var(--accent);
  animation: scrollLine 2.2s ease-in-out infinite;
}
@keyframes scrollLine{
  0%{ top: -100%; }
  60%{ top: 100%; }
  100%{ top: 100%; }
}
@media (prefers-reduced-motion: reduce){
  .hero__scroll i::after{ animation: none; top: 0; }
}

/* ====================================================================
   STATEMENT
   ==================================================================== */
.statement{
  background: var(--paper);
  color: var(--ink);
  padding: clamp(90px, 16vh, 200px) clamp(20px, 8vw, 140px);
  text-align: center;
}
.statement__text{
  margin: 0 auto;
  max-width: 18ch;
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -.01em;
  font-size: clamp(28px, 5vw, 56px);
  line-height: 1.2;
  text-transform: uppercase;
}
.statement__sub{
  margin: 26px auto 0;
  max-width: 58ch;
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--mute-dark);
}

/* ====================================================================
   WORK — tiras horizontales, blanco y negro que colorean al pasar
   ==================================================================== */
.work{
  background: var(--paper);
  padding: clamp(70px, 10vh, 120px) clamp(20px, 4vw, 56px) clamp(60px, 10vh, 120px);
}
.work__head{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(30px, 5vh, 54px);
}
.work__head h2{
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -.01em;
  text-transform: uppercase;
  font-size: clamp(32px, 5.2vw, 62px);
  line-height: 1;
}


.work__list{
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line-light);
}

.strip{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 32px);
  padding: clamp(20px, 3vw, 30px) 4px;
  border-bottom: 1px solid var(--line-light);
  transition: padding .35s var(--ease);
}
.strip:hover{ padding-left: 14px; padding-right: 0; }

.strip__text{
  display: flex;
  align-items: baseline;
  gap: clamp(14px, 2.4vw, 26px);
  min-width: 0;
  flex: 1;
}
.strip__index{
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent-deep);
  flex-shrink: 0;
}
.strip__title{
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(17px, 2.6vw, 28px);
  line-height: 1.2;
  color: var(--ink);
  min-width: 0;
}
.strip__client{
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--mute);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  padding-right: 18px;
}

.strip__img{
  width: clamp(78px, 13vw, 168px);
  aspect-ratio: 16 / 8;
  flex-shrink: 0;
  border-radius: 2px;
  background:
    radial-gradient(120% 140% at 15% 0%, color-mix(in srgb, var(--tint) 55%, transparent) 0%, transparent 55%),
    repeating-linear-gradient(135deg, color-mix(in srgb, var(--tint) 75%, #000) 0 2px, color-mix(in srgb, var(--tint) 45%, #000) 2px 4px),
    var(--tint);
  filter: grayscale(1) contrast(1.05) brightness(.96);
  transition: filter .7s var(--ease), transform .7s var(--ease);
}
.strip:hover .strip__img,
.strip.in-view .strip__img{
  filter: grayscale(0) contrast(1.02) brightness(1);
  transform: scale(1.03);
}

.strip .mark--arrow{ color: var(--accent-deep); flex-shrink: 0; }

@media (max-width: 640px){
  .strip{ flex-wrap: wrap; }
  .strip__text{ flex-wrap: wrap; order: 2; width: 100%; }
  .strip__client{ margin-left: 0; padding-right: 0; order: 3; width: 100%; }
  .strip__img{ order: 1; width: 100%; aspect-ratio: 16/7; }
  .strip .mark--arrow{ display: none; }
  .strip:hover{ padding-left: 4px; }
}

.work__all{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(40px, 6vh, 64px);
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink);
  border-top: 1px solid var(--line-light);
  padding-top: 18px;
}

/* ====================================================================
   ABOUT
   ==================================================================== */
.about{
  position: relative;
  background: var(--paper-2);
  color: var(--ink);
  padding: clamp(90px, 14vh, 160px) clamp(20px, 4vw, 56px);
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: clamp(30px, 6vw, 90px);
  align-items: center;
}

.about__floater{ display: flex; justify-content: center; }
.float-stage{ position: relative; width: min(320px, 78vw); aspect-ratio: 280 / 340; }
.float-shadow{
  position: absolute;
  left: 50%; bottom: 4%;
  width: 62%; height: 8%;
  background: radial-gradient(closest-side, rgba(19,19,21,.28), transparent 75%);
  transform: translateX(-50%) scale(1);
  filter: blur(1px);
  will-change: transform, opacity;
}
.float-object{
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  will-change: transform;
}
.float-object img{
  width: 84%;
  height: auto;
  border-radius: 6px;
  filter: drop-shadow(0 22px 30px rgba(19,19,21,.22));
  -webkit-user-drag: none;
  user-select: none;
}

.about__eyebrow{
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 0 0 18px;
}
.about__lead{
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -.01em;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.3;
  margin: 0 0 22px;
  max-width: 24ch;
  text-transform: uppercase;
}
.about__body{
  font-size: 16px;
  line-height: 1.65;
  color: var(--mute-dark);
  max-width: 52ch;
  margin: 0 0 16px;
}
.about__skills{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 32px;
}
.about__skills li{
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .02em;
  padding: 8px 14px;
  border: 1px solid var(--line-light);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
}
.about__cta{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
}

@media (max-width: 860px){
  .about{ grid-template-columns: 1fr; text-align: left; }
  .about__floater{ margin-bottom: 10px; }
}

/* ====================================================================
   CONTACT / FOOTER
   ==================================================================== */
.contact{
  background: var(--paper);
  color: var(--ink);
  padding: clamp(90px, 15vh, 170px) clamp(20px, 4vw, 56px) 40px;
  text-align: center;
}
.contact__eyebrow{
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 22px;
}
.contact__mail{
  display: inline-block;
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -.01em;
  font-size: clamp(24px, 5.4vw, 64px);
  line-height: 1.15;
  word-break: break-word;
  position: relative;
  padding-bottom: .05em;
  color: var(--ink);
}
.contact__mail::after{
  content: "";
  position: absolute; left: 0; right: 0; bottom: -.02em;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.contact__mail:hover::after{ transform: scaleX(1); }
.contact__mail:hover{ color: var(--accent-deep); }

.contact__row{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(30px, 8vw, 90px);
  margin: clamp(60px, 10vh, 100px) 0 60px;
}
.contact__col span{ color: var(--accent-deep); }
.contact__col p{
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--mute-dark);
}
.contact__col a:hover{ color: var(--accent-deep); }

.contact__bottom{
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.backtotop{ color: var(--mute); font-family: var(--f-mono); font-weight: 600; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.backtotop:hover{ color: var(--accent-deep); }
