/* ============ BRUTO · Teaser =================
   Single-screen. Atmósfera. Misterio.
   Fade-in elegante. Grain CSS. A11y.
============================================== */

:root {
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255, 255, 255, 0.55);
  --kraft: #b59a6a;
  --line: rgba(255, 255, 255, 0.18);
  --display: "Anton", "Archivo Black", Impact, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --edge: clamp(20px, 3.6vw, 48px);
  --safe: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

html, body { height: 100%; }

img { display: block; max-width: 100%; height: auto; }

/* ============ STAGE ============ */

.stage {
  position: relative;
  width: 100vw;
  height: 100dvh;
  min-height: 600px;
  overflow: hidden;
  isolation: isolate;
}

.stage__bg {
  position: absolute;
  inset: 0;
  background: #000 url("assets/hero-grid.png") center/cover no-repeat;
  filter: grayscale(35%) contrast(1.08) brightness(0.78);
  transform: scale(1.04);
  animation: slowZoom 28s ease-in-out infinite alternate;
}

@keyframes slowZoom {
  from { transform: scale(1.04); }
  to   { transform: scale(1.12); }
}

.stage__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.78) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.92) 100%);
  pointer-events: none;
}

/* grain sutil hecho con SVG inline, mejora la textura */
.stage__grain {
  position: absolute;
  inset: -10%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.34 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>");
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
  animation: grainShift 1.2s steps(4) infinite;
}

@keyframes grainShift {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-6px, 4px); }
  50%  { transform: translate(4px, -6px); }
  75%  { transform: translate(-4px, -2px); }
  100% { transform: translate(0,0); }
}

/* ============ TOP & BOTTOM BARS ============ */

.topbar,
.bottombar {
  position: absolute;
  left: 0;
  right: 0;
  padding: var(--edge) var(--edge);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 2;
}

.topbar { top: 0; }
.bottombar { bottom: 0; padding-bottom: calc(var(--edge) + var(--safe)); }

.topbar__left {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.topbar__left img {
  height: clamp(38px, 4.4vw, 56px);
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}
.topbar__right { color: var(--kraft); }

.bottombar__claim {
  color: var(--fg);
  font-family: var(--display);
  font-size: clamp(1rem, 1.6vw, 1.4rem);
  letter-spacing: 0.18em;
  line-height: 1;
}

.bottombar__social {
  display: flex;
  gap: 14px;
  align-items: center;
}

.bottombar__social .ig {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-family: var(--body);
  font-weight: 500;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 8px 4px;
  transition: color 0.2s ease, gap 0.2s ease;
}

.bottombar__social .ig svg {
  width: clamp(22px, 2.4vw, 28px);
  height: clamp(22px, 2.4vw, 28px);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.bottombar__social .ig:hover {
  color: var(--fg);
  gap: 16px;
}

.bottombar__social .ig:hover svg {
  color: var(--kraft);
  transform: scale(1.05);
}

.bottombar__social .ig:focus-visible {
  outline: 1px solid var(--kraft);
  outline-offset: 6px;
  color: var(--fg);
}

/* ============ CENTRO ============ */

.center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px var(--edge);
  z-index: 1;
}

.center__logo {
  width: clamp(140px, 18vw, 220px);
  margin-bottom: clamp(48px, 8vh, 96px);
  filter: drop-shadow(0 4px 18px rgba(0,0,0,0.4));
}

.center__teaser {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(4.5rem, 14vw, 11rem);
  line-height: 0.92;
  letter-spacing: -0.005em;
  margin: 0;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 0.02em;
}

.center__teaser .line { display: block; }
.center__teaser .line--2 { color: var(--kraft); }

.center__sub {
  font-family: var(--body);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin: clamp(28px, 4vh, 56px) 0 0;
}

/* ============ SIGNUP · card box con botón sólido ============
   Diseño nuevo: card centrada, input + botón claros, sin ambigüedad
   de área clicable. El input ES un input normal, el botón ES un botón
   sólido. Cero trucos JS de focus expandido.
============================================================ */

.signup {
  margin-top: clamp(40px, 6vh, 72px);
  width: min(560px, 92vw);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.signup__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.36em;
  color: var(--kraft);
  text-transform: uppercase;
  margin: 0 0 14px;
}

.signup__title {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  letter-spacing: 0.01em;
  margin: 0 0 8px;
  text-transform: uppercase;
  line-height: 1;
}

.signup__lead {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  margin: 0 0 22px;
}

.signup__box {
  display: flex;
  width: 100%;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, background 0.2s ease;
  overflow: hidden;
}

.signup__box:hover {
  border-color: rgba(255,255,255,0.4);
}

.signup__box:focus-within {
  border-color: var(--kraft);
  background: rgba(0,0,0,0.6);
}

.signup__box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  margin: 0;
  padding: 16px 20px;
  color: var(--fg);
  font-family: var(--body);
  font-size: 1rem;
  letter-spacing: 0.01em;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  height: 54px;
}

.signup__box input::placeholder {
  color: rgba(255,255,255,0.32);
}

.signup__btn {
  background: var(--fg);
  color: var(--bg);
  border: 0;
  margin: 0;
  padding: 0 26px;
  height: 54px;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, gap 0.2s ease;
  flex-shrink: 0;
}

.signup__btn svg {
  transition: transform 0.2s ease;
}

.signup__btn:hover {
  background: var(--kraft);
  color: var(--bg);
  gap: 16px;
}

.signup__btn:hover svg {
  transform: translateX(3px);
}

.signup__btn:disabled {
  background: rgba(255,255,255,0.5);
  cursor: not-allowed;
}

.signup__btn:focus-visible {
  outline: 2px solid var(--kraft);
  outline-offset: 2px;
}

.signup__hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 18px 0 0;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.signup__hint[data-state="error"]   { color: #e87979; }
.signup__hint[data-state="ok"]      { color: var(--kraft); }
.signup__hint[data-state="loading"] { color: rgba(255,255,255,0.85); }

.signup.is-success .signup__box {
  border-color: var(--kraft);
  opacity: 0.7;
}

@media (max-width: 540px) {
  .signup__box {
    flex-direction: column;
  }
  .signup__btn {
    width: 100%;
    justify-content: center;
    border-top: 1px solid rgba(255,255,255,0.15);
  }
}

/* ============ SIGNAL · legacy, mantenido por si algún ref lo usa ============ */

.signal {
  margin-top: clamp(40px, 6vh, 72px);
  width: min(560px, 90vw);
  text-align: left;
  padding: 12px 0;
  cursor: text;
}

.signal__label {
  display: block;
  font-family: var(--body);
  font-size: 0.95rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--kraft);
  margin: 0 0 18px;
  cursor: pointer;
}

/* CAJA DEL EMAIL · estructura mínima.
   Input y botón hermanos en flex row. Sin labels envolventes.
   El input ocupa flex:1, su área visible ES la zona clicable nativa. */

.signal__row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease;
}

.signal__row:focus-within {
  border-color: var(--fg);
}

.signal__row input {
  flex: 1;
  min-width: 0;
  display: block;
  width: 100%;
  height: 62px;
  background: transparent;
  border: 0;
  margin: 0;
  padding: 0 12px 0 4px;
  color: var(--fg);
  font-family: var(--body);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  line-height: 62px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  cursor: text;
}

.signal__row input::placeholder {
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.01em;
  text-transform: lowercase;
}

.signal__btn {
  flex: 0 0 auto;
  height: 62px;
  min-width: 56px;
  background: transparent;
  border: 0;
  margin: 0;
  color: var(--fg);
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
  padding: 0 8px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.signal__btn:hover {
  opacity: 1;
  transform: translateX(6px);
  color: var(--kraft);
}

.signal__btn:focus-visible {
  outline: 1px solid var(--kraft);
  outline-offset: 6px;
  opacity: 1;
}

.signal__hint {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 18px 0 0;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.signal__hint[data-state="error"]   { color: #e87979; }
.signal__hint[data-state="ok"]      { color: var(--kraft); }
.signal__hint[data-state="loading"] { color: rgba(255,255,255,0.85); }

.signal.is-success .signal__row {
  border-color: var(--kraft);
}
.signal__btn:disabled {
  cursor: default;
  opacity: 1;
  color: var(--kraft);
}

/* ============ FADE-IN ============ */

html.is-loading .stage > * {
  opacity: 0;
  transform: translateY(8px);
}

html.is-ready .stage__bg,
html.is-ready .stage__vignette,
html.is-ready .stage__grain {
  opacity: 1;
  transform: scale(1.04) translateY(0);
  transition: opacity 1.2s ease;
}

html.is-ready .topbar { animation: fadeUp 1s 0.25s ease both; }
html.is-ready .center__logo { animation: fadeUp 1s 0.55s ease both; }
html.is-ready .center__teaser .line--1 { animation: fadeUp 1.1s 0.95s ease both; }
html.is-ready .center__teaser .line--2 { animation: fadeUp 1.1s 1.15s ease both; }
html.is-ready .center__sub { animation: fadeUp 1s 1.6s ease both; }
html.is-ready .signal { animation: fadeUp 1s 1.95s ease both; }
html.is-ready .bottombar { animation: fadeUp 1s 2.2s ease both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Respeta prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .stage__bg { animation: none; }
  .stage__grain { animation: none; opacity: 0.04; }
  html.is-ready .stage > *,
  html.is-ready .topbar,
  html.is-ready .center__logo,
  html.is-ready .center__teaser .line,
  html.is-ready .center__sub,
  html.is-ready .signal,
  html.is-ready .bottombar {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ============ RESPONSIVE ============ */

@media (max-width: 900px) {
  /* Imagen de fondo: en portrait la grid 3x2 horizontal se ve recortada.
     Forzamos posición central + zoom mayor para llenar y mostrar acción. */
  .stage__bg {
    background-position: 60% center;
    transform: scale(1.18);
    animation: slowZoomMobile 32s ease-in-out infinite alternate;
  }
  @keyframes slowZoomMobile {
    from { transform: scale(1.18); }
    to   { transform: scale(1.28); }
  }

  /* Overlay más denso para contraste en móvil */
  .stage__vignette {
    background:
      radial-gradient(ellipse at center, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.88) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.55) 40%, rgba(0,0,0,0.98) 100%);
  }
}

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

  /* Topbar más compacta y discreta */
  .topbar { padding: 18px var(--edge); }
  .topbar__left img { height: 30px; }
  .topbar__right { font-size: 0.6rem; letter-spacing: 0.26em; }

  /* Centro: padding adaptado a screen real */
  .center {
    padding: 84px 22px 180px;
    justify-content: center;
  }
  .center__logo {
    width: clamp(110px, 32vw, 170px);
    margin-bottom: clamp(24px, 4vh, 40px);
  }
  .center__teaser {
    font-size: clamp(3.4rem, 16vw, 5.4rem);
    line-height: 0.95;
  }
  .center__sub {
    font-size: 0.7rem;
    letter-spacing: 0.26em;
    margin-top: 18px;
  }

  /* Form más compacto */
  .signal {
    margin-top: clamp(28px, 4vh, 48px);
    width: 100%;
    padding: 8px 0;
  }
  .signal__label {
    font-size: 0.78rem;
    letter-spacing: 0.3em;
    margin: 0 0 12px;
  }
  .signal__row input {
    height: 54px;
    line-height: 54px;
    font-size: 1.1rem;
  }
  .signal__btn {
    height: 54px;
    font-size: 1.75rem;
    min-width: 48px;
  }
  .signal__hint {
    font-size: 0.78rem;
    margin-top: 12px;
  }

  /* Bottombar en columna, más respiro */
  .bottombar {
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
    padding: var(--edge) var(--edge) calc(var(--edge) + var(--safe));
  }
  .bottombar__claim {
    font-size: 1rem;
    letter-spacing: 0.16em;
  }
  .bottombar__social .ig {
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    gap: 10px;
  }
  .bottombar__social .ig svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 420px) {
  .center__teaser { font-size: 3rem; }
  .center__logo { width: 100px; margin-bottom: 22px; }
  .center__sub { font-size: 0.66rem; }
  .signal__label { font-size: 0.72rem; }
  .signal__row input { height: 50px; line-height: 50px; font-size: 1rem; }
  .signal__btn { height: 50px; font-size: 1.6rem; min-width: 44px; }
  .bottombar__claim { font-size: 0.9rem; }
  .bottombar__social .ig { font-size: 0.7rem; }
}

/* Landscape móvil: comprimir aún más para no cortar contenido */
@media (max-height: 580px) and (orientation: landscape) {
  .center { padding: 60px 24px 100px; }
  .center__logo { width: 80px; margin-bottom: 12px; }
  .center__teaser { font-size: clamp(2.4rem, 7vw, 3.6rem); }
  .center__sub { margin-top: 8px; }
  .signal { margin-top: 16px; }
  .signal__label { margin-bottom: 8px; }
  .signal__row input { height: 44px; line-height: 44px; }
  .signal__btn { height: 44px; }
}

@media (max-width: 480px) {
  .topbar__right { display: none; }
  .center__logo { margin-bottom: 40px; }
  .signal { width: 100%; }
}

/* ============ SCROLL LOCK ============ */
@media (min-height: 700px) {
  body { overflow: hidden; }
}
