/* ============================================================
   Club Atlético Nueva Chicago — landing "Próximamente"
   HTML + CSS + JS vanilla. Sin frameworks.
   ============================================================ */

/* ------------------------------------------------------------
   1. VARIABLES
   ------------------------------------------------------------ */
:root {
  --black: #050505;
  /* Verde institucional. Centralizado para reemplazo fácil:
     cambiar este valor actualiza toda la página. */
  --green: #0e9a3d;
  --green-bright: #21c25b;   /* acento / hover / brillo */
  --white: #f5f5f5;
  --gray: #8a8a8a;
  --line: rgba(255, 255, 255, 0.1);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: 'Anton', 'Arial Narrow', 'Impact', 'Franklin Gothic Bold', sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --pad: clamp(20px, 4vw, 56px);
}

/* ------------------------------------------------------------
   2. RESET / BASE
   ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ------------------------------------------------------------
   3. LAYOUT
   ------------------------------------------------------------ */
.stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "top"
    "headline"
    "bottom";
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--pad);
  isolation: isolate;
}

.topbar {
  grid-area: top;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  z-index: 4;
}

.headline-block {
  grid-area: headline;
  align-self: end;
  position: relative;
  z-index: 4;
  max-width: 62%;
  padding-bottom: clamp(8px, 2vh, 24px);
}

.bottombar {
  grid-area: bottom;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 4;
}

/* ------------------------------------------------------------
   4. BACKGROUND GRAPHICS
   ------------------------------------------------------------ */
.bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 120px 120px;
}

.bg-word {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.82;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--white);
  user-select: none;
  pointer-events: none;
  will-change: transform;
}

.bg-word--mataderos {
  top: -0.06em;
  left: 50%;
  transform: translateX(-50%) translate3d(var(--tx, 0px), var(--ty, 0px), 0);
  font-size: clamp(6rem, 17vw, 20rem);
  letter-spacing: 0.02em;
  opacity: 0.04;
}

.bg-word--year {
  right: -0.02em;
  bottom: -0.14em;
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0);
  font-size: clamp(8rem, 26vw, 32rem);
  letter-spacing: -0.02em;
  opacity: 0.05;
}

.pitch-circle {
  position: absolute;
  top: 40%;
  left: 74%;
  width: min(56vmin, 540px);
  height: min(56vmin, 540px);
  transform: translate(-50%, -50%) translate3d(var(--tx, 0px), var(--ty, 0px), 0);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  z-index: 1;
  will-change: transform;
}

.stripe {
  position: absolute;
  top: 40%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0);
  z-index: 2;
  will-change: transform;
}

.stripe__line {
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--green) 14%,
    var(--green-bright) 50%,
    var(--green) 86%,
    transparent
  );
  box-shadow: 0 0 18px rgba(14, 154, 61, 0.5);
  transform-origin: left center;
}

.border {
  position: absolute;
  background: var(--line);
  z-index: 3;
  pointer-events: none;
}

.border--v {
  top: 0;
  bottom: 0;
  right: clamp(14px, 2vw, 24px);
  width: 1px;
}

.border--h {
  left: 0;
  right: 0;
  bottom: clamp(14px, 2vw, 24px);
  height: 1px;
}

.monogram {
  position: absolute;
  left: clamp(12px, 1.6vw, 22px);
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gray);
  z-index: 3;
  pointer-events: none;
}

.grain {
  position: absolute;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.04;
  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.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}

/* ------------------------------------------------------------
   5. HERO / ESCUDO
   ------------------------------------------------------------ */
.escudo-wrap {
  position: absolute;
  top: 40%;
  left: 74%;
  transform: translate(-50%, -50%) translate3d(var(--tx, 0px), var(--ty, 0px), 0);
  width: clamp(130px, 16vw, 220px);
  z-index: 3;
  will-change: transform;
}

.escudo {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.08)) drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55));
}

/* ------------------------------------------------------------
   6. TYPOGRAPHY
   ------------------------------------------------------------ */
.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  line-height: 1.1;
  letter-spacing: 0.16em;
}

.wordmark span {
  display: block;
}

.headline {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.75rem, 7.5vw, 8.5rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
}

.line-mask {
  display: block;
  overflow: hidden;
}

.line-mask__inner {
  display: block;
  will-change: transform;
}

.accent {
  color: var(--green);
}

.subtext {
  margin-top: clamp(16px, 2.5vh, 32px);
  max-width: 36ch;
  color: var(--gray);
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  line-height: 1.55;
}

/* ------------------------------------------------------------
   7. DECORATIVE DETAILS / UI
   ------------------------------------------------------------ */
.meta {
  text-align: right;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gray);
}

.meta__row {
  display: block;
  line-height: 1.9;
}

.meta__row--dim {
  opacity: 0.55;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--white);
}

.status__dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(14, 154, 61, 0.8);
}

.location {
  margin-top: 10px;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray);
  line-height: 1.9;
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
}

.social a {
  position: relative;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  padding-bottom: 4px;
  transition: color 0.25s var(--ease-out);
}

.social a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease);
}

.social a:hover,
.social a:focus-visible {
  color: var(--green);
}

.social a:hover::after,
.social a:focus-visible::after {
  transform: scaleX(1);
}

.social__arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease), color 0.25s;
}

.social a:hover .social__arrow,
.social a:focus-visible .social__arrow {
  transform: translate(2px, -2px);
}

/* ------------------------------------------------------------
   8. ANIMATION
   ------------------------------------------------------------ */

/* Reveal genérico (opacity + translateY). Gated por .js. */
.js [data-reveal] {
  animation: reveal 0.6s var(--ease) both;
}

.js .wordmark { animation-delay: 0.5s; }
.js .meta { animation-delay: 0.95s; }
.js .subtext { animation-delay: 1.0s; }
.js .status { animation-delay: 1.08s; }
.js .location { animation-delay: 1.12s; }
.js .social { animation-delay: 1.16s; }

/* Headline: máscara por línea. */
.js .line-mask__inner {
  transform: translateY(110%);
  animation: rise 0.7s var(--ease) both;
}

.js .line-mask:nth-child(1) .line-mask__inner { animation-delay: 0.64s; }
.js .line-mask:nth-child(2) .line-mask__inner { animation-delay: 0.76s; }
.js .line-mask:nth-child(3) .line-mask__inner { animation-delay: 0.88s; }

/* Franja verde: barrido. */
.js .stripe__line {
  animation: sweep 0.6s var(--ease) both;
  animation-delay: 0.05s;
}

/* Escudo: entrada. */
.js .escudo-inner {
  animation: escudoIn 0.7s var(--ease) both;
  animation-delay: 0.3s;
}

/* Escudo: respiración sutil (loop). */
.escudo {
  animation: escudoPulse 6s ease-in-out infinite;
}

/* Punto de estado: pulso. */
.status__dot {
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@keyframes rise {
  from { transform: translateY(110%); }
  to   { transform: translateY(0); }
}

@keyframes sweep {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes escudoIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes escudoPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.015); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.8); }
  50%      { opacity: 1; transform: scale(1.15); }
}

/* ------------------------------------------------------------
   9. RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .stage {
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
      "top"
      "escudo"
      "headline"
      "bottom";
  }

  .escudo-wrap {
    position: static;
    grid-area: escudo;
    justify-self: center;
    align-self: center;
    transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0);
    width: clamp(120px, 40vw, 180px);
    margin: 5vh 0 3vh;
    z-index: 3;
  }

  .stripe {
    position: static;
    grid-area: escudo;
    align-self: center;
    height: 2px;
    transform: none;
    z-index: 2;
  }

  .pitch-circle {
    position: static;
    grid-area: escudo;
    align-self: center;
    justify-self: center;
    transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0);
    width: min(58vmin, 300px);
    height: min(58vmin, 300px);
    z-index: 1;
  }

  .headline-block {
    max-width: 100%;
    align-self: end;
  }

  .headline {
    font-size: clamp(2.6rem, 12.5vw, 4.25rem);
    line-height: 0.92;
  }

  .bg-word--mataderos { font-size: clamp(4.5rem, 19vw, 8rem); }
  .bg-word--year { font-size: clamp(6rem, 30vw, 14rem); }

  .monogram { display: none; }

  .bottombar { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .social { gap: 1.4rem; }
}

@media (max-width: 480px) {
  .meta { display: none; }
  .border--v { display: none; }
}

/* ------------------------------------------------------------
   10. REDUCED MOTION
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js [data-reveal],
  .js .line-mask__inner,
  .js .stripe__line,
  .js .escudo-inner {
    opacity: 1 !important;
    transform: none !important;
  }

  .escudo,
  .status__dot {
    animation: none !important;
  }
}
