
html {
  background: #fd8aaa;
}

@font-face {
  font-family: "BebasNeue";
  src: url("../fonts/bebasneue.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: "Outreque";
  src: url("../fonts/outreque.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: "CLMRallye";
  src: url("../fonts/clm.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}

:root {
  --bg: #f0d5c8;
  --ink: #000000;
  --pink: #ff3773;
  --cream: #ffd9ba;
  --pad: 2rem;
}

* {
    margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--pink) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: var(--pink);
  border-radius: 999px;
}

/* ── FONDO MESH ANIMADO ── */
body {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: "Outreque", sans-serif;
  color: var(--pink);
  position: relative;
}

/* gradiente mesh */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
    background:
    radial-gradient(ellipse 140% 120% at -10% 10%, #ff8c3a 0%, transparent 50%),
    radial-gradient(ellipse 120% 100% at 110% -10%, #ffb8c8 0%, transparent 50%),
    radial-gradient(ellipse 130% 110% at 20% 110%, #fd6a90 0%, transparent 50%),
    radial-gradient(ellipse 120% 130% at 110% 90%, #fd5e96 0%, transparent 50%),
    radial-gradient(ellipse 110% 150% at -10% 80%, #ff6a1a 0%, transparent 50%),
    radial-gradient(ellipse 100% 120% at 60% 40%, #fd7145 0%, transparent 55%),
    #fd8aaa;
  background-size:
    200% 200%,
    180% 180%,
    200% 200%,
    170% 170%,
    190% 190%,
    100%;
  animation: meshMove 10s ease infinite;
}

@keyframes meshMove {
  0% {
    background-position:
      0% 0%,
      100% 0%,
      50% 100%,
      100% 100%,
      0% 50%,
      0 0;
  }
  25% {
    background-position:
      50% 30%,
      0% 50%,
      100% 50%,
      50% 0%,
      100% 80%,
      0 0;
  }
  50% {
    background-position:
      100% 60%,
      50% 100%,
      0% 0%,
      0% 60%,
      50% 20%,
      0 0;
  }
  75% {
    background-position:
      30% 90%,
      100% 20%,
      80% 80%,
      20% 100%,
      80% 50%,
      0 0;
  }
  100% {
    background-position:
      0% 0%,
      100% 0%,
      50% 100%,
      100% 100%,
      0% 50%,
      0 0;
  }
}

/* grain estático */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 182px;
  opacity: 0.5;
}

/* ── HEADER ── */
header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem var(--pad);
  position: relative;
}

header > a {
  font-family: "CLMRallye", sans-serif;
  font-size: clamp(1rem, 2vw, 1.6rem);
  color: var(--cream);
  text-decoration: none;
}

nav {
  display: flex;
  gap: 2.5rem;
}

nav a {
  font-family: "Outreque", sans-serif;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 1.2rem;
}

nav a:hover {
  color: var(--pink);
}

nav a.active {
  color: var(--pink);
}

/* ── HAMBURGUESA ── */

#menu-toggle {
  display: none;
  border: none;
  background: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--cream);
  padding: 0;
}

/* ── MOBILE ── */

@media (max-width: 1024px) {
  #menu-toggle {
    display: block;
  }

  #main-nav {
    position: absolute;
    top: 100%;
    right: var(--pad);

    display: flex;
    flex-direction: column;
    gap: 1rem;

    background: var(--cream);
    padding: 1rem 1.25rem;
    border-radius: 10px;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);

    transition: all 0.2s ease;
    z-index: 1000;
  }

  #main-nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  #main-nav a {
    white-space: nowrap;
  }
}

/* ── BANDA CREMA ── */
.top-band {
  flex-shrink: 0;
  height: clamp(60px, 8vw, 130px);
  background: var(--cream);
  border-bottom: 1.5px solid rgba(0, 0, 0, 0.08);
}

/* ── MAIN ── */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vh, 16px);
  padding: clamp(6px, 1vh, 16px) var(--pad);
  min-height: 0;
  overflow: hidden;
}

/* ── FILAS ── */
.row {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: visible;
  gap: 0.03em;
  padding: 0 0.01em;
  min-height: 0;
}

.row span {
  font-family: "BebasNeue", sans-serif;
  font-size: clamp(2.5rem, min(24vw, 28vh), 16rem);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--pink);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* ── IMÁGENES ── */
.img-wrap {
  flex-shrink: 0;
  height: 75%;
  aspect-ratio: 4/3;
  align-self: center;
  overflow: hidden;
  border-radius: 10px;
  position: relative;
  margin: 0 0.3em;
}

.img-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* ── CÁMARA ── */
#cam-wrap {
  isolation: isolate;
  z-index: 1;
  flex-shrink: 0;
  height: 100%;
  aspect-ratio: 4/3;
  align-self: center;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  margin: 0 0.3em;
  background: #ff3773;
}

#cam-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.5;
}

#cam-wrap canvas {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  filter: grayscale(100%) contrast(1.3) brightness(0.85);
  mix-blend-mode: multiply;
}


/* ── FOOTER ── */
footer {
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem var(--pad);
  display: flex;
  justify-content: space-between;
  font-family: "Outreque", sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cream);
}

/* ── CAM HINT ── */
#cam-hint {
  position: fixed;
  bottom: 1.5rem;
  right: 2rem;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 215, 186, 0.4);
  z-index: 10;
  pointer-events: none;
}

.interior body {
  height: auto;
  overflow: auto;
  color: var(--ink);
}

@media (max-width: 768px) {
  body {
    height: 100dvh;
  }

  header {
    padding: 0.6rem var(--pad);
  }

  .top-band {
    height: clamp(40px, 6vw, 80px);
  }

  main {
    padding: clamp(4px, 1vw, 8px) 0;
    gap: clamp(3px, 0.5vh, 8px);
  }

  .row {
    gap: 0.02em;
    padding: 0;
  }

  .row span {
    font-size: clamp(2rem, min(20vw, 22vh), 10rem);
    letter-spacing: 0;
  }

  /* ocultar segunda foto en fila 1 */
  .row:nth-child(1) .img-wrap:nth-of-type(2) {
    display: none;
  }

  .img-wrap {
    height: 70%;
    margin: 0 0.15em;
    border-radius: 6px;
  }

  #cam-wrap {
    height: 80%;
    margin: 0 0.15em;
    border-radius: 6px;
  }
}

@media (max-width: 480px) {
  .row span {
    font-size: clamp(1.8rem, min(22vw, 20vh), 8rem);
  }

  .img-wrap {
    height: 60%;
    border-radius: 4px;
  }
  #cam-wrap {
    height: 65%;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .top-band {
    height: 30px;
  }
  header {
    padding: 0.3rem var(--pad);
  }
  main {
    gap: 2px;
    padding: 2px 0;
  }
  .row span {
    font-size: clamp(1.5rem, 18vh, 8rem);
  }
  .img-wrap,
  #cam-wrap {
    height: 75%;
  }
}

@media (max-width: 768px) {
  body {
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
  }

  main {
    flex-direction: column;
    gap: 0;
    padding: 0 1rem;
    overflow: visible;
    height: auto;
  }

  .row {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    overflow: visible;
    gap: 0;
    padding: 0;
    min-height: 0;
  }

  .row .word-row {
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .row span {
    font-size: clamp(3.5rem, 20vw, 7rem);
    letter-spacing: -0.01em;
    line-height: 1;
    width: auto;
    justify-content: flex-start;
  }

  .img-wrap {
    width: 65%;
    height: auto;
    aspect-ratio: 4/3;
    align-self: flex-start;
    margin: 0.3rem 0;
    border-radius: 8px;
  }

  .img-hide-mobile {
    display: none;
  }

  #cam-wrap {
    width: 65%;
    height: auto;
    aspect-ratio: 4/3;
    align-self: flex-end;
    margin: 0.3rem 0;
    border-radius: 8px;
  }

  .row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .row:nth-child(1) {
    flex-direction: column;
    align-items: flex-start;
  }
  .row:nth-child(1)::before {
    content: "PARKUIR";
    font-family: "BebasNeue", sans-serif;
    font-size: clamp(6rem, 20vw, 7rem);
    color: var(--pink);
    line-height: 1;
    letter-spacing: -0.01em;
  }
  .row:nth-child(1) span {
    display: none;
  }

  .row:nth-child(2) {
    flex-direction: column;
    align-items: flex-end;
  }
  .row:nth-child(2)::before {
    content: "DEPORTE";
    font-family: "BebasNeue", sans-serif;
    font-size: clamp(6rem, 20vw, 7rem);
    color: var(--pink);
    line-height: 1;
    letter-spacing: -0.01em;
  }
  .row:nth-child(2) span {
    display: none;
  }

  .row:nth-child(3) {
    flex-direction: column;
    align-items: flex-start;
  }
  .row:nth-child(3)::before {
    content: "SUBVERSIVO";
    font-family: "BebasNeue", sans-serif;
    font-size: clamp(6rem, 20vw, 7rem);
    color: var(--pink);
    line-height: 1;
    letter-spacing: -0.01em;
  }
  .row:nth-child(3) span {
    display: none;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  body {
    height: auto;
    overflow-y: auto;
  }
  main {
    flex-direction: column;
    height: auto;
    overflow: visible;
    padding: 0 0.5rem;
    gap: 0.5rem;
  }
  .row {
    flex-direction: row;
    height: auto;
    align-items: center;
    flex-wrap: nowrap;
  }
  .row span {
    display: flex;
    font-size: clamp(2rem, 12vh, 5rem);
  }
  .row::before {
    display: none;
  }
  .img-wrap,
  #cam-wrap {
    height: 60%;
    width: auto;
  }
  .img-hide-mobile {
    display: flex;
  }
}
