/* ============================================================
   THE SÁEZ — En construcción / Elite Premium
   ============================================================ */

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --fg: #f5f5f7;
  --fg-dim: #86868b;
  --fg-mute: #6e6e73;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --glass: rgba(255, 255, 255, 0.04);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --live: #30d158;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino,
    Georgia, serif;
  --font-ui: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif;
  --font: var(--font-ui);
  --nav-h: 56px;
  --pad-x: clamp(20px, 5vw, 80px);
  --max: 980px;
  --mx: 50vw;
  --my: 40vh;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

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

button,
input {
  font: inherit;
  color: inherit;
}

.visuallyHidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   BACKGROUND: GRID + AURORA + GRAIN + SPOTLIGHT
   ============================================================ */
.bgGrid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}

.bgAurora {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  filter: blur(80px);
  background:
    radial-gradient(ellipse 45% 40% at 20% 30%, rgba(41, 151, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 40% 35% at 80% 60%, rgba(175, 82, 222, 0.12), transparent 55%),
    radial-gradient(ellipse 35% 30% at 50% 80%, rgba(48, 209, 88, 0.06), transparent 50%);
  animation: aurora 24s var(--ease) infinite alternate;
  will-change: transform;
}

@keyframes aurora {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(3%, -2%) scale(1.05);
  }
  100% {
    transform: translate(-2%, 3%) scale(1.02);
  }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
  animation: grainShift 0.5s steps(8) infinite;
}

@keyframes grainShift {
  0% {
    transform: translate(0, 0);
  }
  12.5% {
    transform: translate(-1%, 1%);
  }
  25% {
    transform: translate(1%, -1%);
  }
  37.5% {
    transform: translate(-1%, -1%);
  }
  50% {
    transform: translate(1%, 1%);
  }
  62.5% {
    transform: translate(-1%, 0);
  }
  75% {
    transform: translate(0, 1%);
  }
  87.5% {
    transform: translate(1%, 0);
  }
  100% {
    transform: translate(0, 0);
  }
}

.spotlight {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--mx) var(--my),
    rgba(255, 255, 255, 0.06),
    transparent 55%
  );
  transition: opacity 0.4s var(--ease);
}

/* Content above background */
.loader,
.nav,
.hero,
.pillars,
.access,
.footer,
.skipLink {
  position: relative;
  z-index: 3;
}

.nav {
  z-index: 100;
}

.loader {
  z-index: 200;
}

.skipLink {
  z-index: 300;
}

/* ---- Skip ---- */
.skipLink {
  position: fixed;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  background: var(--fg);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  border-radius: 980px;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}

.skipLink:focus {
  transform: none;
}

/* ============================================================
   LOADER
   ============================================================ */
.loader {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: var(--bg);
  transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease);
}

.loaderDone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loaderBar {
  width: 120px;
  height: 2px;
  background: var(--line-strong);
  border-radius: 2px;
  overflow: hidden;
}

.loaderBar span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--fg);
  transform-origin: left;
  animation: load 0.9s var(--ease-out);
}

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

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad-x);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.nav.scrolled {
  border-bottom-color: var(--line);
}

.navBrand {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.navLinks {
  display: flex;
  gap: 28px;
}

.navLinks a {
  font-size: 12px;
  font-weight: 400;
  color: var(--fg-dim);
  letter-spacing: 0.01em;
  transition: color 0.2s var(--ease);
}

.navLinks a:hover {
  color: var(--fg);
}

.navCta {
  font-size: 12px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 980px;
  background: var(--fg);
  color: var(--bg);
  letter-spacing: 0.01em;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.navCta:hover {
  opacity: 0.88;
}

.navCta:active {
  transform: scale(0.97);
}

/* ============================================================
   SHARED SECTION
   ============================================================ */
.sectionHead {
  text-align: center;
  margin-bottom: clamp(40px, 6vh, 72px);
}

.sectionEyebrow {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.sectionTitle {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 48px) var(--pad-x) 100px;
  position: relative;
}

.statusBadge,
.heroTitle,
.heroSub,
.countdown,
.marquee {
  opacity: 0;
}

/* Status badge with pulsing dot */
.statusBadge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 32px;
  padding: 7px 14px 7px 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 980px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.statusDot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.55);
  animation: pulse 2s var(--ease) infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(48, 209, 88, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(48, 209, 88, 0);
  }
}

/* Kinetic title */
.heroTitle {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.06em;
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 104px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.98;
  max-width: 14ch;
}

.kLine {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}

.kWord {
  display: inline-block;
  will-change: transform;
}

.heroSub {
  margin: 28px 0 0;
  font-size: clamp(15px, 1.8vw, 19px);
  font-weight: 400;
  color: var(--fg-dim);
  letter-spacing: -0.01em;
  max-width: 36ch;
  line-height: 1.45;
}

/* ============================================================
   COUNTDOWN
   ============================================================ */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 44px;
  width: 100%;
  max-width: 420px;
  background: var(--glass);
  border: 1px solid transparent;
  border-radius: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

/* Animated conic border */
.countdown::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--angle),
    transparent 0%,
    rgba(255, 255, 255, 0.55) 10%,
    transparent 22%,
    transparent 50%,
    rgba(255, 255, 255, 0.2) 60%,
    transparent 72%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: spinAngle 8s linear infinite;
  pointer-events: none;
  z-index: 1;
}

/* Cursor spotlight edge on countdown */
.countdown::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    500px circle at var(--mx) var(--my),
    rgba(255, 255, 255, 0.35),
    transparent 40%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
  opacity: 0.7;
}

@keyframes spinAngle {
  to {
    --angle: 360deg;
  }
}

.cdUnit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 10px;
  position: relative;
  z-index: 3;
}

.cdUnit:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: var(--line);
}

.cdValue {
  font-size: clamp(24px, 3.8vw, 36px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  color: var(--fg);
}

.cdLabel {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  position: absolute;
  bottom: 72px;
  left: 0;
  right: 0;
  overflow: hidden;
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 12%,
    #000 88%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 12%,
    #000 88%,
    transparent 100%
  );
}

.marqueeTrack {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: marqueeScroll 28s linear infinite;
  will-change: transform;
}

.marqueeTrack span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-mute);
  white-space: nowrap;
}

.marqueeDot {
  color: var(--fg-mute);
  opacity: 0.5;
}

@keyframes marqueeScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.scrollCue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}

.scrollCueDot {
  width: 3px;
  height: 7px;
  border-radius: 4px;
  background: var(--fg-dim);
  animation: cue 1.6s var(--ease) infinite;
}

@keyframes cue {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  70% {
    transform: translateY(10px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 0;
  }
}

/* ============================================================
   PILLARS
   ============================================================ */
.pillars {
  padding: clamp(80px, 14vh, 140px) var(--pad-x);
  max-width: calc(var(--max) + var(--pad-x) * 2);
  margin: 0 auto;
}

.pillarsGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.pillar {
  padding: 36px 28px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--glass);
  border: 1px solid transparent;
  border-radius: 22px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  transition: background 0.35s var(--ease), transform 0.35s var(--ease);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.pillar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--angle),
    transparent 0%,
    rgba(255, 255, 255, 0.4) 8%,
    transparent 20%,
    transparent 55%,
    rgba(255, 255, 255, 0.15) 65%,
    transparent 78%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: spinAngle 10s linear infinite;
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
}

.pillar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    420px circle at var(--mx) var(--my),
    rgba(255, 255, 255, 0.45),
    transparent 40%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

.pillar:hover {
  background: var(--glass-hover);
  transform: translateY(-3px);
}

.pillar:hover::before {
  opacity: 0.9;
}

.pillarNum,
.pillarTitle,
.pillarDesc {
  position: relative;
  z-index: 3;
}

.pillarNum {
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-mute);
  letter-spacing: 0.1em;
}

.pillarTitle {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.pillarDesc {
  margin: 0;
  margin-top: auto;
  font-size: 15px;
  color: var(--fg-dim);
  letter-spacing: -0.01em;
  line-height: 1.4;
}

/* ============================================================
   ACCESS
   ============================================================ */
.access {
  padding: clamp(80px, 14vh, 140px) var(--pad-x);
  display: flex;
  justify-content: center;
}

.accessInner {
  width: 100%;
  max-width: 520px;
  text-align: center;
}

.accessForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.field input {
  width: 100%;
  height: 52px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--glass);
  color: var(--fg);
  font-size: 17px;
  letter-spacing: -0.01em;
  outline: none;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.field input::placeholder {
  color: var(--fg-mute);
}

.field input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: var(--glass-hover);
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

.btn {
  height: 52px;
  border: 0;
  border-radius: 980px;
  background: var(--fg);
  color: var(--bg);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover {
  opacity: 0.88;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.privacyNote {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--fg-mute);
}

.formStatus {
  margin: 0;
  min-height: 1.4em;
  font-size: 13px;
  color: var(--fg-dim);
}

.formStatus.error {
  color: #ff6961;
}

.formStatus.success {
  color: var(--live);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 40px var(--pad-x) 48px;
  border-top: 1px solid var(--line);
}

.footerInner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footerBrand {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footerContact {
  font-size: 13px;
  color: var(--fg-dim);
  transition: color 0.2s var(--ease);
}

.footerContact:hover {
  color: var(--fg);
}

.footerCopy {
  margin: 0;
  font-size: 12px;
  color: var(--fg-mute);
}

/* ============================================================
   REVEAL BASE (GSAP drives these)
   ============================================================ */
[data-reveal] {
  opacity: 0;
  will-change: transform, opacity;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .navLinks {
    display: none;
  }

  .pillarsGrid {
    grid-template-columns: 1fr;
  }

  .pillar {
    min-height: auto;
    padding: 28px 24px;
  }

  .heroTitle {
    max-width: 12ch;
  }
}

@media (max-width: 600px) {
  :root {
    --nav-h: 52px;
  }

  .hero {
    padding-bottom: 96px;
  }

  .heroTitle {
    font-size: clamp(36px, 11vw, 52px);
    max-width: 11ch;
  }

  .countdown {
    grid-template-columns: repeat(2, 1fr);
    max-width: 260px;
    margin-top: 36px;
  }

  .cdUnit {
    padding: 16px 10px;
  }

  .cdUnit:nth-child(2)::after {
    display: none;
  }

  .cdUnit:nth-child(1)::after,
  .cdUnit:nth-child(3)::after {
    display: block;
  }

  .cdUnit:nth-child(3),
  .cdUnit:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .cdValue {
    font-size: 26px;
  }

  .marquee {
    bottom: 64px;
  }

  .marqueeTrack {
    gap: 20px;
  }

  .footerInner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 360px) {
  .heroTitle {
    font-size: 34px;
  }

  .heroSub {
    font-size: 14px;
  }

  .countdown {
    max-width: 240px;
  }

  .statusBadge {
    font-size: 10px;
    padding: 6px 12px 6px 10px;
  }
}

/* Disable spotlight on touch / no-hover devices */
@media (hover: none) {
  .spotlight {
    display: none;
  }

  .countdown::after,
  .pillar::after {
    display: none;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .loader {
    display: none;
  }

  .bgAurora {
    animation: none;
  }

  .grain {
    animation: none;
  }

  .spotlight {
    display: none;
  }

  .statusDot {
    animation: none;
    box-shadow: none;
  }

  .countdown::before,
  .pillar::before {
    animation: none;
    background: var(--line-strong);
  }

  .countdown::after,
  .pillar::after {
    display: none;
  }

  .marqueeTrack {
    animation: none;
  }

  .statusBadge,
  .heroTitle,
  .heroSub,
  .countdown,
  .marquee,
  .pillar,
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .kWord {
    transform: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .pillar:hover {
    transform: none;
  }

  .scrollCueDot {
    animation: none;
  }
}
