/* ============================================================
   Epsilon Wash — Landing provisional
   Paleta oficial · tipografía de marca · mobile-first
   ============================================================ */

/* ---------- Fuentes de marca ---------- */
@font-face {
  font-family: 'Bounded';
  src: url('assets/fonts/bounded-variable.ttf') format('truetype-variations'),
       url('assets/fonts/bounded-variable.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}

/* ---------- Tokens ---------- */
:root {
  --bg:           #0A0A0A;
  --surface:      #1F1F1F;
  --text:         #DCDCDC;
  --accent:       #4A7B9D;
  --accent-light: #9CD0F2;

  --text-dim: rgba(220, 220, 220, 0.58);
  --hairline: rgba(220, 220, 220, 0.12);

  --font-display: 'Bounded', 'Avenir Next', sans-serif;
  --font-body: 'Avenir Next', 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(1.5rem, 6vw, 6rem);
  --maxw: 760px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------- Fondo 3D + capas atmosféricas ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

/* halo radial sutil que ancla el centro */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 35%, rgba(74,123,157,0.10) 0%, rgba(10,10,10,0) 45%),
    radial-gradient(140% 120% at 50% 50%, rgba(10,10,10,0) 55%, rgba(10,10,10,0.85) 100%);
}

/* grano fino para textura "cara" no digital */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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");
  animation: grain-shift 8s steps(6) infinite;
}
@keyframes grain-shift {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -2%); }
  60% { transform: translate(-2%, -4%); }
  80% { transform: translate(4%, 2%); }
}

/* ---------- Layout ---------- */
.shell {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(1.5rem, 4vw, 2.75rem) var(--gutter) clamp(1.75rem, 4vw, 2.75rem);
}

.layout {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - clamp(3rem, 8vw, 5.5rem));
  min-height: calc(100svh - clamp(3rem, 8vw, 5.5rem));
}

.content-col {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Logo vertical — oculto en mobile */
.logo-col {
  display: none;
}

.logo--vert {
  display: block;
  width: auto;
  height: 100%;
  max-height: clamp(400px, 50vh, 500px)
  object-fit: contain;
  user-select: none;
  filter:
    drop-shadow(0 0 40px rgba(74,123,157,0.18))
    drop-shadow(0 4px 24px rgba(0,0,0,0.55));
  opacity: 0;
  transform: translateX(16px);
  animation: logo-enter 1.1s var(--ease) 0.5s forwards;
}

@keyframes logo-enter {
  to { opacity: 1; transform: translateX(0); }
}

/* ---------- Masthead ---------- */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  height: clamp(40px, 6vw, 56px);
  width: auto;
  display: block;
  user-select: none;
  filter: drop-shadow(0 2px 18px rgba(0,0,0,0.45));
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(31,31,31,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 0 0 rgba(156,208,242,0.6);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(156,208,242,0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(156,208,242,0); }
  100% { box-shadow: 0 0 0 0 rgba(156,208,242,0); }
}

/* ---------- Hero ---------- */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--maxw);
  padding: clamp(3rem, 10vh, 7rem) 0;
  padding-bottom: 1rem;
}

.eyebrow {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
  opacity: 0.9;
}

.headline {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: #F1F1F1;
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
  text-wrap: balance;
}

.headline em {
  font-style: normal;
  color: var(--accent-light);
  background: linear-gradient(100deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  line-height: 1.62;
  color: var(--text);
  max-width: 56ch;
  font-weight: 400;
}

.divider {
  width: 56px;
  height: 1px;
  margin: clamp(2rem, 5vw, 3rem) 0 clamp(1.5rem, 4vw, 2rem);
  background: linear-gradient(90deg, var(--accent), transparent);
}

.invite {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  color: var(--text-dim);
  max-width: 50ch;
  margin-bottom: 1.5rem;
}

/* ---------- CTA mailto + microinteracción ---------- */
.cta {
  --cta-pad: 0.95rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  align-self: flex-start;
  padding: var(--cta-pad) 1.5rem;
  border: 1px solid var(--accent);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(74,123,157,0.10), rgba(74,123,157,0.02));
  color: var(--accent-light);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.45s var(--ease),
    border-color 0.45s var(--ease),
    color 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}

/* sweep de luz al pasar el mouse */
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(156,208,242,0.16) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}

.cta-label { position: relative; z-index: 1; }

.cta-arrow {
  position: relative;
  z-index: 1;
  display: inline-block;
  transition: transform 0.45s var(--ease);
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent-light);
  color: #EAF6FF;
  box-shadow:
    0 14px 40px -16px rgba(74,123,157,0.65),
    0 0 0 1px rgba(156,208,242,0.25) inset;
  outline: none;
}

.cta:hover::before,
.cta:focus-visible::before { transform: translateX(120%); }

.cta:hover .cta-arrow,
.cta:focus-visible .cta-arrow { transform: translateX(5px); }

.cta:active { transform: translateY(0); }

/* estado "copiado": el borde y el texto confirman la acción */
.cta.is-copied {
  border-color: var(--accent-light);
  color: #EAF6FF;
}
.cta.is-copied .cta-arrow { transform: translateX(5px); }

/* mensaje de confirmación bajo el botón */
.cta-feedback {
  display: block;
  margin-top: 0.85rem;
  min-height: 1.1em;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.cta-feedback:not(:empty) {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.footer-sep { opacity: 0.5; }

/* ---------- Entradas suaves ---------- */
@media (prefers-reduced-motion: no-preference) {
  .eyebrow, .headline, .lede, .divider, .invite, .cta {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.9s var(--ease) forwards;
  }
  .eyebrow  { animation-delay: 0.15s; }
  .headline { animation-delay: 0.28s; }
  .lede     { animation-delay: 0.44s; }
  .divider  { animation-delay: 0.56s; }
  .invite   { animation-delay: 0.64s; }
  .cta      { animation-delay: 0.74s; }
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .status-dot { animation: none; }
  #bg-canvas { opacity: 0.5; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 540px) {
  .masthead { gap: 0.75rem; }
  .cta { align-self: stretch; justify-content: space-between; }
  .footer { font-size: 0.72rem; }
}

@media (min-width: 900px) {
  :root { --maxw: 820px; }

  .layout {
    flex-direction: row;
    align-items: stretch;
    gap: clamp(3rem, 6vw, 7rem);
  }

  .content-col {
    flex: 1 1 0;
    min-width: 0;
  }

  /* Logo vertical: columna derecha fija */
  .logo-col {
    display: flex;
    align-items: flex-start;
    flex: 0 0 auto;
    padding: 12vh;
  }

  .logo--vert {
    width: 100%;
    height: auto;
    max-height: clamp(280px, 50vh, 500px);
  }

  /* Ocultar logo horizontal en masthead */
  .logo--horiz {
    display: none;
  }
}
