/* =========================================================
   LAS PAMPAS — "Under construction" gate
   Self-contained (no Tailwind). Only active while js/gate.js
   adds `lp-gate-on` to <html>. To open the site, set
   GATE_ENABLED = false at the top of js/gate.js.
   ========================================================= */

html.lp-gate-on,
html.lp-gate-on body { overflow: hidden !important; height: 100%; }
/* hide the site completely (no flash, no tabbing into it) */
html.lp-gate-on body > *:not(#lp-gate) { visibility: hidden !important; }
html.lp-gate-on body { background: #0d0a08; }

#lp-gate {
  --gold: #b88a38;
  --gold-light: #e0bc75;
  --gold-dark: #8a6218;
  --linen: #f1e8da;
  --beige: #d8c6aa;
  --muted: #a39081;
  --ink: #0d0a08;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  position: fixed;
  inset: 0;
  z-index: 2147483000;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: #0d0a08;
  color: #e8e0d5;
  font-family: Montserrat, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
}
#lp-gate *, #lp-gate *::before, #lp-gate *::after { box-sizing: border-box; }

/* ---------- Background layers ---------- */
.lpg-bg {
  position: fixed; inset: -4%;
  z-index: -5;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 1.2s var(--ease);
}
.lpg-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: saturate(0.85) contrast(1.05) brightness(0.7);
  animation: lpgFadeIn 2.4s var(--ease) 0.2s forwards, lpgKenBurns 28s ease-in-out 0.2s infinite alternate;
}
.lpg-shade {
  position: fixed; inset: 0; z-index: -4; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 70% at 50% 45%, rgba(13,10,8,0.35) 0%, rgba(13,10,8,0.85) 70%, #0d0a08 100%),
    linear-gradient(to bottom, rgba(13,10,8,0.6), rgba(13,10,8,0.2) 40%, rgba(13,10,8,0.9));
}
.lpg-glow {
  position: fixed; left: 50%; bottom: -35vh; z-index: -3; pointer-events: none;
  width: 140vmax; height: 70vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255,120,30,0.38) 0%, rgba(217,119,6,0.16) 35%, transparent 70%);
  filter: blur(10px);
  animation: lpgFlicker 5s ease-in-out infinite;
}
.lpg-embers {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  width: 100%; height: 100%;
}
.lpg-grain {
  position: fixed; inset: -50%; z-index: -1; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: lpgGrain 1.2s steps(6) infinite;
}

/* gold frame that draws itself in */
.lpg-frame { position: fixed; inset: 18px; z-index: 0; pointer-events: none; }
.lpg-frame i { position: absolute; background: linear-gradient(90deg, transparent, rgba(184,138,56,0.55), transparent); }
.lpg-frame i:nth-child(1), .lpg-frame i:nth-child(2) { left: 0; right: 0; height: 1px; transform: scaleX(0); animation: lpgDrawX 1.8s var(--ease) 0.4s forwards; }
.lpg-frame i:nth-child(1) { top: 0; }
.lpg-frame i:nth-child(2) { bottom: 0; }
.lpg-frame i:nth-child(3), .lpg-frame i:nth-child(4) { top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, rgba(184,138,56,0.55), transparent); transform: scaleY(0); animation: lpgDrawY 1.8s var(--ease) 0.6s forwards; }
.lpg-frame i:nth-child(3) { left: 0; }
.lpg-frame i:nth-child(4) { right: 0; }
.lpg-corner { position: absolute; width: 22px; height: 22px; border-color: var(--gold); border-style: solid; opacity: 0; animation: lpgFadeIn 1s ease 1.6s forwards; }
.lpg-corner.tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.lpg-corner.tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.lpg-corner.bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.lpg-corner.br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

/* ---------- Content ---------- */
.lpg-inner {
  position: relative; z-index: 1;
  min-height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 56px 28px 48px;
  max-width: 860px;
  margin: 0 auto;
}

.lpg-reveal { opacity: 0; transform: translateY(26px); filter: blur(6px); animation: lpgRise 1.3s var(--ease) forwards; animation-delay: var(--d, 0s); }

/* logo with rotating rings */
.lpg-logo { position: relative; width: 148px; height: 148px; margin-bottom: 30px; }
.lpg-logo img {
  position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px);
  border-radius: 50%;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.7));
  opacity: 0; transform: scale(0.82); animation: lpgLogo 1.6s var(--ease) 0.5s forwards;
}
.lpg-ring { position: absolute; inset: 0; border-radius: 50%; }
.lpg-ring--sweep {
  background: conic-gradient(from 0deg, transparent 0 62%, rgba(224,188,117,0.15) 70%, var(--gold-light) 88%, transparent 92%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  opacity: 0;
  animation: lpgSpin 6s linear infinite, lpgFadeIn 1.4s ease 1s forwards;
}
.lpg-ring--dash {
  inset: 7px;
  border: 1px dashed rgba(184,138,56,0.45);
  animation: lpgSpin 40s linear infinite reverse;
}
.lpg-ring--halo {
  inset: 10px;
  box-shadow: 0 0 60px 6px rgba(255,120,30,0.18), 0 0 0 1px rgba(184,138,56,0.15) inset;
  animation: lpgHalo 4s ease-in-out infinite;
}

.lpg-eyebrow {
  margin: 0 0 22px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--gold-light);
}
.lpg-eyebrow span { opacity: 0.55; margin: 0 0.6em; }

.lpg-title {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.lpg-title .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 0.04em 0.08em; }
.lpg-title .w > span { display: inline-block; transform: translateY(105%); animation: lpgWord 1.2s var(--ease) forwards; animation-delay: var(--d, 0s); }
.lpg-title em {
  font-style: italic;
  background: linear-gradient(100deg, #8a6218 0%, #e0bc75 30%, #fff1cf 45%, #e0bc75 60%, #8a6218 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: lpgShimmer 6s linear infinite;
}

.lpg-divider { display: flex; align-items: center; gap: 14px; margin: 30px 0 26px; color: var(--gold); font-size: 12px; }
.lpg-divider span { display: block; height: 1px; width: 90px; transform: scaleX(0); animation: lpgDrawX 1.4s var(--ease) forwards; animation-delay: var(--d, 0s); }
.lpg-divider span:first-child { background: linear-gradient(90deg, transparent, var(--gold)); transform-origin: right; }
.lpg-divider span:last-child { background: linear-gradient(90deg, var(--gold), transparent); transform-origin: left; }

.lpg-lede {
  margin: 0 auto 30px; max-width: 590px;
  font-size: clamp(0.98rem, 2.2vw, 1.12rem); line-height: 1.8; font-weight: 500;
  color: #c9bcae;
}
.lpg-lede strong { color: #f5f2eb; font-weight: 600; }

/* "under construction" status with indeterminate bar */
.lpg-status {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 10px 18px; margin-bottom: 34px;
  border: 1px solid rgba(184,138,56,0.25); border-radius: 999px;
  background: rgba(26,20,16,0.55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 10px; font-weight: 700; letter-spacing: 0.28em; text-transform: uppercase; color: var(--beige);
}
.lpg-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff8a2a; box-shadow: 0 0 0 0 rgba(255,138,42,0.6); animation: lpgPing 2s ease-out infinite; flex: none; }
.lpg-bar { position: relative; width: 74px; height: 2px; background: rgba(255,255,255,0.12); overflow: hidden; border-radius: 2px; flex: none; }
.lpg-bar::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--gold-light), transparent); animation: lpgSlide 1.8s ease-in-out infinite; }

/* buttons */
.lpg-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-bottom: 22px; }
.lpg-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-width: 230px; padding: 19px 30px;
  border-radius: 2px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), background-color 0.3s, color 0.3s, border-color 0.3s;
  will-change: transform;
}
.lpg-btn svg { width: 18px; height: 18px; flex: none; }
.lpg-btn--primary {
  color: var(--ink);
  background: linear-gradient(135deg, #b88a38 0%, #e0bc75 45%, #c99a45 70%, #8a6218 100%);
  box-shadow: 0 14px 40px -10px rgba(184,138,56,0.55), 0 0 0 1px rgba(255,241,207,0.25) inset;
}
.lpg-btn--primary::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-20deg);
  animation: lpgShine 4.5s ease-in-out 2.4s infinite;
}
.lpg-btn--primary:hover { box-shadow: 0 22px 50px -10px rgba(224,188,117,0.65), 0 0 0 1px rgba(255,241,207,0.45) inset; }
.lpg-btn--ghost {
  color: var(--linen);
  background: rgba(26,20,16,0.45);
  border: 1px solid rgba(216,198,170,0.35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.lpg-btn--ghost:hover { border-color: var(--gold-light); color: var(--gold-light); background: rgba(26,20,16,0.7); }
.lpg-btn:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; }

.lpg-note { margin: 0 0 36px; font-size: 13px; color: var(--muted); font-weight: 500; }
.lpg-note a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }

.lpg-meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted);
}
.lpg-meta span { display: inline-flex; align-items: center; gap: 8px; }
.lpg-meta svg { width: 14px; height: 14px; color: var(--gold); }
.lpg-meta a { color: inherit; text-decoration: none; }
.lpg-meta a:hover { color: var(--gold-light); }

.lpg-social { display: flex; justify-content: center; gap: 14px; margin-top: 26px; }
.lpg-social a {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--beige); border: 1px solid rgba(216,198,170,0.3); background: rgba(26,20,16,0.5);
  transition: color 0.3s, border-color 0.3s, background-color 0.3s, transform 0.45s var(--ease);
}
.lpg-social a:hover { color: var(--ink); background: var(--gold-light); border-color: var(--gold-light); transform: translateY(-3px); }
.lpg-social svg { width: 18px; height: 18px; }

/* ---------- Keyframes ---------- */
@keyframes lpgFadeIn { to { opacity: 1; } }
@keyframes lpgKenBurns { 0% { transform: scale(1.18) translate3d(-1.5%, -1%, 0); } 100% { transform: scale(1.04) translate3d(1.5%, 1%, 0); } }
@keyframes lpgFlicker { 0%,100% { opacity: 0.85; } 18% { opacity: 1; } 32% { opacity: 0.7; } 47% { opacity: 0.95; } 63% { opacity: 0.75; } 80% { opacity: 1; } }
@keyframes lpgGrain { 0% { transform: translate(0,0); } 20% { transform: translate(-5%,3%); } 40% { transform: translate(3%,-4%); } 60% { transform: translate(-3%,5%); } 80% { transform: translate(5%,-2%); } 100% { transform: translate(0,0); } }
@keyframes lpgDrawX { to { transform: scaleX(1); } }
@keyframes lpgDrawY { to { transform: scaleY(1); } }
@keyframes lpgRise { to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes lpgLogo { to { opacity: 1; transform: scale(1); } }
@keyframes lpgSpin { to { transform: rotate(360deg); } }
@keyframes lpgHalo { 0%,100% { opacity: 0.6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes lpgWord { to { transform: translateY(0); } }
@keyframes lpgShimmer { 0% { background-position: 120% 0; } 100% { background-position: -130% 0; } }
@keyframes lpgPing { 0% { box-shadow: 0 0 0 0 rgba(255,138,42,0.6); } 80%,100% { box-shadow: 0 0 0 10px rgba(255,138,42,0); } }
@keyframes lpgSlide { 0% { left: -40%; } 100% { left: 100%; } }
@keyframes lpgShine { 0% { left: -60%; } 30%,100% { left: 130%; } }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .lpg-frame { inset: 10px; }
  .lpg-inner { padding: 34px 22px 36px; justify-content: flex-start; }
  .lpg-logo { width: 96px; height: 96px; margin-bottom: 18px; }
  .lpg-logo img { inset: 11px; width: calc(100% - 22px); height: calc(100% - 22px); }
  .lpg-eyebrow { font-size: 9px; letter-spacing: 0.28em; margin-bottom: 14px; }
  .lpg-title { font-size: clamp(2.3rem, 11vw, 3.2rem); }
  .lpg-lede { font-size: 0.92rem; line-height: 1.65; margin-bottom: 20px; }
  .lpg-status { margin-bottom: 22px; }
  .lpg-note { margin-bottom: 26px; }
  .lpg-eyebrow span { margin: 0 0.35em; }
  .lpg-divider { margin: 18px 0 16px; }
  .lpg-divider span { width: 60px; }
  .lpg-actions { flex-direction: column; width: 100%; max-width: 360px; }
  .lpg-btn { width: 100%; min-width: 0; padding: 18px 22px; }
  .lpg-status { gap: 10px; padding: 9px 14px; font-size: 9px; letter-spacing: 0.2em; }
  .lpg-bar { width: 44px; }
  .lpg-meta { flex-direction: column; align-items: center; }
}
@media (max-height: 940px) and (min-width: 641px) {
  .lpg-inner { padding-top: 44px; padding-bottom: 44px; }
  .lpg-logo { width: 128px; height: 128px; margin-bottom: 22px; }
  .lpg-logo img { inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); }
  .lpg-eyebrow { margin-bottom: 16px; }
  .lpg-divider { margin: 22px 0 20px; }
  .lpg-lede { margin-bottom: 22px; }
  .lpg-status { margin-bottom: 26px; }
  .lpg-note { margin-bottom: 20px; }
  .lpg-social { margin-top: 18px; }
}
@media (max-height: 640px) and (min-width: 641px) {
  .lpg-logo { width: 104px; height: 104px; margin-bottom: 18px; }
  .lpg-divider { margin: 18px 0; }
  .lpg-lede { margin-bottom: 20px; }
  .lpg-status { margin-bottom: 22px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  #lp-gate *, #lp-gate *::before, #lp-gate *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important;
  }
  .lpg-reveal, .lpg-logo img, .lpg-bg img, .lpg-ring--sweep { opacity: 1; transform: none; filter: none; }
  .lpg-title .w > span { transform: none; }
  .lpg-embers, .lpg-grain { display: none; }
}
