/* ============================================================
   MAINDED MEDIA — Landing / Portafolio
   Estética: brutalismo ochentero (ver brand board v1)
   ============================================================ */

/* ---------- Tipografías locales ---------- */
@font-face {
  font-family: 'Disket Mono';
  src: url('../assets/fonts/Disket-Mono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Disket Mono';
  src: url('../assets/fonts/Disket-Mono-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Handelson Three';
  src: url('../assets/fonts/handelson-three.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

/* ---------- Tokens de marca ---------- */
:root {
  --ink: #25261f;
  --cream: #faf7f0;
  --magenta: #fc71ea;
  --violet: #633af8;
  --lime: #daff7e;
  --lilac: #ca7ffe;
  --lilac-soft: #dfb2fe;
  --white: #ffffff;

  --font-display: 'Erica One', 'Space Grotesk', sans-serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'Disket Mono', 'Anonymous Pro', monospace;
  --font-mono-alt: 'Anonymous Pro', monospace;
  --font-script: 'Handelson Three', cursive;

  --bw: 3px;
  --bw-thin: 2px;
  --shadow: 8px 8px 0 var(--ink);
  --shadow-sm: 5px 5px 0 var(--ink);
  --maxw: 1180px;
  --pad: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 78px; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Utilidades ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.stamp {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: var(--bw-thin) solid var(--ink);
  padding: 5px 11px;
  display: inline-block;
  background: var(--white);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}
.section-label .num {
  background: var(--ink);
  color: var(--lime);
  padding: 4px 10px;
}
.section-label::after {
  content: "";
  flex: 1;
  height: var(--bw-thin);
  background: var(--ink);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 0.98; margin: 0; }
h2 { font-size: clamp(30px, 4.6vw, 46px); letter-spacing: -0.005em; }
h3 { font-size: clamp(20px, 2.4vw, 26px); }

.script { font-family: var(--font-script); color: var(--magenta); }

.btn {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  padding: 14px 26px;
  border: var(--bw) solid var(--ink);
  background: var(--lime);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease;
  cursor: pointer;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn--magenta { background: var(--magenta); }
.btn--ghost { background: var(--white); }

section { padding: 88px 0; position: relative; }
section + section { border-top: var(--bw) solid var(--ink); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  border-bottom: var(--bw) solid var(--ink);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav__logo { display: flex; align-items: center; }
.nav__logo img { height: 40px; width: auto; }
.nav__links { display: flex; gap: 28px; align-items: center; }
.nav__links a {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: var(--bw-thin) solid transparent;
}
.nav__links a:hover { color: var(--lime); border-bottom-color: var(--lime); }
.nav__links .btn {
  color: var(--ink);
  box-shadow: none;
  padding: 10px 18px;
  border-bottom-color: var(--ink);
}
/* El botón no sigue la regla de arriba: cambia de fondo, no de color de letra */
.nav__links .btn:hover {
  background: var(--magenta);
  color: var(--ink);
  border-color: var(--ink);
}
.nav__toggle {
  display: none;
  background: var(--lime);
  border: var(--bw-thin) solid var(--lime);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 14px;
  cursor: pointer;
  text-transform: uppercase;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--ink);
  color: var(--cream);
  padding: 72px 0 84px;
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(250, 247, 240, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250, 247, 240, .06) 1px, transparent 1px);
  background-size: 34px 34px;
}
.hero__deco {
  position: absolute;
  pointer-events: none;
  user-select: none;
}
.hero__deco--grid { top: -60px; right: -80px; width: 380px; opacity: .5; transform: rotate(-8deg); }
.hero__deco--star { bottom: 40px; left: -30px; width: 150px; opacity: .35; }

.hero__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 52px;
  position: relative;
}
.hero__top .stamp { background: transparent; color: var(--lime); border-color: var(--lime); }

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(46px, 9vw, 104px);
  line-height: 0.9;
  letter-spacing: -0.015em;
  margin: 0 0 28px;
  position: relative;
  max-width: 15ch;
}
.hero__title em { font-style: normal; color: var(--lime); }

.hero__sub {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
  max-width: 52ch;
  margin: 0 0 20px;
  opacity: .92;
  position: relative;
}
.hero__tag {
  font-family: var(--font-script);
  color: var(--magenta);
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.1;
  margin: 0 0 38px;
  position: relative;
}
.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; position: relative; }

.hero__meta {
  margin-top: 60px;
  padding-top: 26px;
  border-top: var(--bw-thin) solid rgba(250, 247, 240, .25);
  display: flex;
  gap: 10px 22px;
  flex-wrap: wrap;
  font-family: var(--font-mono-alt);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: .8;
  position: relative;
}

/* ============================================================
   SERVICIOS
   ============================================================ */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--bw);
  border: var(--bw) solid var(--ink);
  background: var(--ink);
}
.service {
  background: var(--white);
  padding: 30px 26px 34px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background .15s ease, color .15s ease;
}
.service:hover { background: var(--lime); }
.service__num {
  font-family: var(--font-mono-alt);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--violet);
}
.service h3 { font-size: 21px; line-height: 1.05; }
.service p { margin: 0; font-size: 15px; line-height: 1.55; opacity: .82; }

/* ============================================================
   PORTAFOLIO
   ============================================================ */
.portfolio { background: var(--cream); }
.portfolio__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.portfolio__head p { margin: 10px 0 0; max-width: 46ch; font-size: 16px; opacity: .82; }

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 34px;
  padding-bottom: 26px;
  border-bottom: var(--bw) solid var(--ink);
}
.filter {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 10px 16px;
  border: var(--bw-thin) solid var(--ink);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: background .12s ease, transform .12s ease;
}
.filter:hover { background: var(--lilac); }
.filter[aria-pressed="true"] {
  background: var(--ink);
  color: var(--lime);
  box-shadow: 4px 4px 0 var(--magenta);
}

/* Grilla masonry por columnas */
.gallery { columns: 3; column-gap: 18px; }
.card {
  break-inside: avoid;
  margin-bottom: 18px;
  border: var(--bw) solid var(--ink);
  background: var(--white);
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: transform .14s ease, box-shadow .14s ease;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-sm); }
.card.is-hidden { display: none; }
.card__media { position: relative; background: var(--cream); }
.card__media img { width: 100%; height: auto; display: block; }
.card__media video { width: 100%; height: auto; display: block; object-fit: cover; background: #f1ecdf; }
/* placeholder mientras no hay imágenes reales */
.card__media--empty {
  aspect-ratio: var(--ar, 4 / 5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(37, 38, 31, .55);
  text-align: center;
  padding: 20px;
  background-color: #f1ecdf;
  background-image:
    repeating-linear-gradient(45deg, rgba(37,38,31,.05) 0 9px, transparent 9px 18px);
}
.card__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--lime);
  padding: 4px 9px;
}
.card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--magenta);
  border: var(--bw-thin) solid var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  padding: 3px 8px;
}
.card__foot {
  border-top: var(--bw) solid var(--ink);
  padding: 14px 16px;
}
.card__foot strong { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 400; }
.card__foot span { font-family: var(--font-mono-alt); font-size: 12.5px; opacity: .7; }

.gallery__empty {
  border: var(--bw) dashed var(--ink);
  padding: 40px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(37, 38, 31, .94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}
.lightbox[open], .lightbox.is-open { display: flex; }
.lightbox__inner {
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  border: var(--bw) solid var(--cream);
  background: var(--ink);
  display: flex;
  flex-direction: column;
}
.lightbox__media {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.lightbox__media img, .lightbox__media video { max-height: 74vh; width: auto; max-width: 100%; }
/* Reproductor de YouTube: manda la proporción del video, no una altura fija.
   Con height fijo, en pantallas angostas un video horizontal quedaba metido
   en una caja vertical, con bandas negras enormes arriba y abajo. */
.lightbox__yt { width: 100%; max-height: 74vh; }
.lightbox__yt iframe { width: 100%; height: 100%; border: 0; display: block; }
.lightbox__bar {
  border-top: var(--bw) solid var(--cream);
  padding: 14px 18px;
  color: var(--cream);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono-alt);
  font-size: 13px;
}
.lightbox__nav { display: flex; gap: 8px; }
.lightbox__nav button, .lightbox__close {
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--lime);
  border: var(--bw-thin) solid var(--ink);
  padding: 7px 13px;
  cursor: pointer;
  font-size: 13px;
}
.lightbox__close { position: absolute; top: 20px; right: 20px; background: var(--magenta); }

/* ============================================================
   EQUIPO
   ============================================================ */
.team { background: var(--ink); color: var(--cream); }
.team .section-label { color: var(--cream); }
.team .section-label::after { background: var(--cream); }
.team .section-label .num { background: var(--lime); color: var(--ink); }

.team__grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 46px;
  align-items: start;
}
/* Dos fotos en collage: la de trabajo manda, el retrato la acompaña */
.team__photos { position: relative; }
.team__photo {
  border: var(--bw) solid var(--cream);
  margin: 0;
  background: var(--ink);
}
.team__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.team__photo--main { position: relative; z-index: 1; }
.team__photo--alt {
  position: relative;
  z-index: 2;
  width: 64%;
  margin: -76px 0 0 auto;
  margin-right: -14px;
  border-color: var(--lime);
  box-shadow: -10px -10px 0 rgba(37, 38, 31, .55);
}
.team h2 { margin-bottom: 20px; }
.team h2 em { font-style: normal; color: var(--magenta); }
.team p { font-size: 16.5px; line-height: 1.65; opacity: .9; }
.team p + p { margin-top: 14px; }

.person {
  border-left: var(--bw) solid var(--lime);
  padding-left: 20px;
  margin-top: 28px;
}
.person__name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .07em;
  text-transform: uppercase;
  background: var(--lime);
  color: var(--ink);
  display: inline-block;
  padding: 3px 9px;
  margin-bottom: 9px;
}
.person p { font-size: 15.5px; margin: 0; }
.person b { color: var(--lime); font-weight: 700; }

/* ============================================================
   DIFERENCIADORES
   ============================================================ */
.values__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.value {
  border: var(--bw) solid var(--ink);
  background: var(--white);
  padding: 26px 26px 28px;
  box-shadow: var(--shadow-sm);
}
.value:nth-child(2n) { background: var(--lilac-soft); }
.value h3 { margin-bottom: 8px; }
.value p { margin: 0; font-size: 15.5px; line-height: 1.55; }

/* ============================================================
   CTA / CONTACTO
   ============================================================ */
.contact { background: var(--violet); color: var(--cream); }
.contact .section-label { color: var(--cream); }
.contact .section-label::after { background: var(--cream); }
.contact .section-label .num { background: var(--lime); color: var(--ink); }

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: start;
}
.contact h2 { font-size: clamp(34px, 5.4vw, 60px); margin-bottom: 16px; }
.contact h2 em { font-style: normal; color: var(--lime); }
.contact__lead { font-size: 17px; line-height: 1.6; max-width: 42ch; margin: 0 0 30px; }

.contact__direct { display: flex; flex-direction: column; gap: 12px; }
.contact__direct a {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .04em;
  text-decoration: none;
  color: var(--ink);
  background: var(--cream);
  border: var(--bw) solid var(--ink);
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background .12s ease, transform .12s ease;
}
.contact__direct a:hover { background: var(--lime); transform: translateX(4px); }
.contact__direct .ico {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--magenta);
}

.form {
  border: var(--bw) solid var(--ink);
  background: var(--cream);
  color: var(--ink);
  padding: 28px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: var(--white);
  border: var(--bw-thin) solid var(--ink);
  padding: 11px 13px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 3px 3px 0 var(--magenta);
}
.form .btn { width: 100%; text-align: center; }
.form__note {
  font-family: var(--font-mono-alt);
  font-size: 12px;
  opacity: .7;
  margin: 12px 0 0;
  text-align: center;
}
/* Confirmación de envío: tiene que verse de inmediato, para que nadie
   apriete "Enviar" tres veces creyendo que no pasó nada. */
.form__note--ok,
.form__note--error {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.45;
  opacity: 1;
  margin-top: 16px;
  padding: 14px 16px;
  border: var(--bw) solid var(--ink);
  box-shadow: var(--shadow-sm);
}
.form__note--ok { background: var(--lime); color: var(--ink); }
.form__note--error { background: var(--magenta); color: var(--ink); }

/* El botón queda fuera de juego una vez enviado */
.btn:disabled {
  cursor: default;
  opacity: .55;
  transform: none;
  box-shadow: none;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--ink);
  color: var(--cream);
  border-top: var(--bw) solid var(--ink);
  padding: 46px 0 34px;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer img.logo { height: 54px; width: auto; }
.footer__links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: none;
}
.footer__links a:hover { color: var(--lime); }
.footer__legal {
  margin-top: 28px;
  padding-top: 20px;
  border-top: var(--bw-thin) solid rgba(250,247,240,.2);
  font-family: var(--font-mono-alt);
  font-size: 12px;
  opacity: .6;
  text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { columns: 2; }
  .team__grid, .contact__grid { grid-template-columns: 1fr; gap: 32px; }
  .team__photo--alt { width: 58%; margin-top: -60px; margin-right: 0; }
}

@media (max-width: 720px) {
  :root { --pad: 20px; }
  section { padding: 60px 0; }
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--ink);
    border-bottom: var(--bw) solid var(--lime);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 13px 0; border-bottom: 1px solid rgba(250,247,240,.15); }
  .nav__links .btn { margin-top: 12px; text-align: center; }
  .services__grid { grid-template-columns: 1fr; }
  .gallery { columns: 1; }
  .team__photo--alt { width: 66%; margin-top: -44px; box-shadow: -7px -7px 0 rgba(37, 38, 31, .55); }
  .values__grid { grid-template-columns: 1fr; }
  .hero { padding: 52px 0 62px; }
  .hero__deco--grid { width: 220px; right: -70px; }
  .hero__deco--star { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
