/* ===========================================================
   ImperiumAO - Preview site
   Paleta negro + dorado. Estilo epico, moderno, minimal.
   =========================================================== */

:root {
  --bg-0: #050505;
  --bg-1: #0b0a08;
  --bg-2: #141008;
  --ink: #f6efe1;
  --ink-soft: #c9c0ad;
  --ink-muted: #8a8270;

  --gold-50:  #fff7df;
  --gold-100: #f7e9b8;
  --gold-200: #ecd185;
  --gold-300: #e0b85b;
  --gold-400: #d4a437;
  --gold-500: #c8911f;
  --gold-600: #a3730f;
  --gold-700: #7a5409;

  --line: rgba(212, 164, 55, 0.18);
  --line-strong: rgba(212, 164, 55, 0.45);

  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.55);
  --shadow-gold: 0 0 40px rgba(212, 164, 55, 0.25);

  --radius: 14px;
  --radius-sm: 10px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 800px at 50% -10%, #1a1306 0%, var(--bg-0) 55%) no-repeat,
              var(--bg-0);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ----- Fondos / Atmosfera ----- */

#bg-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

.vignette {
  position: fixed; inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% 0%, transparent 40%, rgba(0,0,0,0.65) 100%),
    radial-gradient(80% 60% at 50% 110%, rgba(0,0,0,0.85) 0%, transparent 60%);
}

.grain {
  position: fixed; inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* ----- Layout base ----- */

.site-header,
.hero,
.features,
.beta-section,
.site-footer {
  position: relative;
  z-index: 3;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 18px;
}
.brand-mark {
  color: var(--gold-300);
  font-size: 20px;
  text-shadow: 0 0 10px rgba(212, 164, 55, 0.5);
}
.brand-name { color: var(--ink); }
.brand-accent {
  background: linear-gradient(180deg, var(--gold-100), var(--gold-400) 60%, var(--gold-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  gap: 26px;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
  transition: color 0.2s var(--ease-out);
  position: relative;
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease-out);
}
.site-nav a:hover { color: var(--gold-100); }
.site-nav a:hover::after { transform: scaleX(1); }

.beta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-100);
  background: rgba(212, 164, 55, 0.06);
}
.beta-pill .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold-300);
  box-shadow: 0 0 10px var(--gold-400);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.25); }
}

/* ----- Hero ----- */

.hero {
  position: relative;
  min-height: calc(100vh - 86px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(60px, 10vh, 120px) clamp(20px, 6vw, 72px);
  text-align: center;
}

.hero-inner {
  max-width: 920px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 22px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: rgba(255,255,255,0.02);
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: clamp(44px, 8.5vw, 104px);
  line-height: 0.98;
  letter-spacing: 0.01em;
  margin: 0 0 28px;
}
.hero-title .line {
  display: block;
  opacity: 0;
  transform: translateY(20px);
  animation: rise 0.9s var(--ease-out) forwards;
}
.hero-title .line:nth-child(1) { animation-delay: 0.05s; }
.hero-title .line:nth-child(2) { animation-delay: 0.2s; }
.hero-title .line:nth-child(3) { animation-delay: 0.35s; }

.hero-title .gold {
  background: linear-gradient(180deg, #fff3c4 0%, var(--gold-300) 45%, var(--gold-600) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 24px rgba(212, 164, 55, 0.25));
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 680px;
  margin: 0 auto 36px;
  opacity: 0;
  animation: rise 0.9s var(--ease-out) 0.55s forwards;
}

.cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
  opacity: 0;
  animation: rise 0.9s var(--ease-out) 0.7s forwards;
}

.hero-meta {
  list-style: none;
  display: flex;
  gap: clamp(20px, 4vw, 56px);
  justify-content: center;
  flex-wrap: wrap;
  padding: 22px clamp(16px, 4vw, 40px);
  margin: 0 auto;
  max-width: 760px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  animation: rise 0.9s var(--ease-out) 0.85s forwards;
}
.hero-meta li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.hero-meta strong {
  font-family: 'Cinzel', serif;
  color: var(--gold-100);
  font-size: 16px;
  letter-spacing: 0.06em;
}
.hero-meta span {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Resplandor radial detras del hero */
.hero-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: min(900px, 90vw);
  height: min(900px, 90vw);
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(212, 164, 55, 0.18), transparent 70%);
  filter: blur(20px);
  z-index: 1;
  pointer-events: none;
  animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.06); }
}

/* ----- Botones ----- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s var(--ease-out),
              box-shadow 0.25s var(--ease-out),
              border-color 0.25s var(--ease-out),
              color 0.25s var(--ease-out);
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn .btn-icon { width: 18px; height: 18px; }

.btn-primary {
  color: #1a1206;
  background: linear-gradient(180deg, #f3dc94 0%, var(--gold-300) 55%, var(--gold-600) 100%);
  border-color: rgba(255, 220, 130, 0.5);
  box-shadow: 0 8px 24px rgba(212, 164, 55, 0.25), inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(212, 164, 55, 0.45),
              0 0 0 1px rgba(255, 220, 130, 0.8) inset;
}

.btn-ghost {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--line);
}
.btn-ghost:hover:not([disabled]) {
  color: var(--gold-100);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-gold);
}
.btn-ghost[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  color: var(--ink-muted);
  background: repeating-linear-gradient(
    135deg,
    rgba(255,255,255,0.015) 0 8px,
    rgba(255,255,255,0.03) 8px 16px
  );
  filter: grayscale(0.4);
}

.btn-block { width: 100%; justify-content: center; }

.btn-tag {
  margin-left: 6px;
  font-size: 10px;
  letter-spacing: 0.18em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(212, 164, 55, 0.12);
  color: var(--gold-200);
  border: 1px solid var(--line);
}

/* Reflejo dorado animado en botones primarios */
.btn-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease-out);
}
.btn-primary:hover .btn-shine { transform: translateX(120%); }

/* ----- Features ----- */

.features {
  padding: clamp(80px, 12vh, 140px) clamp(20px, 6vw, 72px);
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  margin: 0 0 50px;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.section-title::after {
  content: '';
  display: block;
  width: 80px; height: 2px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.feature-card {
  text-align: left;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 220, 130, 0.04), rgba(0,0,0,0)) ,
    rgba(255, 255, 255, 0.015);
  backdrop-filter: blur(2px);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out),
              box-shadow 0.35s var(--ease-out);
}
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 200px at var(--mx, 50%) var(--my, 0%),
              rgba(212, 164, 55, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  pointer-events: none;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft), var(--shadow-gold);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  font-size: 28px;
  color: var(--gold-300);
  margin-bottom: 12px;
  text-shadow: 0 0 14px rgba(212, 164, 55, 0.5);
}
.feature-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  margin: 0 0 8px;
  letter-spacing: 0.03em;
  color: var(--gold-100);
}
.feature-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

/* ----- Beta section ----- */

.beta-section {
  padding: 40px clamp(20px, 6vw, 72px) 100px;
  display: flex;
  justify-content: center;
}

.beta-card {
  max-width: 720px;
  width: 100%;
  text-align: center;
  padding: 48px clamp(24px, 5vw, 56px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(212, 164, 55, 0.10), transparent 70%),
    linear-gradient(180deg, rgba(20, 16, 8, 0.6), rgba(11, 10, 8, 0.4));
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.beta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg,
    rgba(212, 164, 55, 0.6),
    transparent 30%,
    transparent 70%,
    rgba(212, 164, 55, 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}
.beta-card h2 {
  font-family: 'Cinzel', serif;
  font-size: clamp(26px, 3.4vw, 36px);
  margin: 0 0 14px;
  color: var(--gold-100);
}
.beta-card p {
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 0 0 28px;
}

/* ----- Footer ----- */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px clamp(20px, 5vw, 56px);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
}
.footer-tag { color: var(--gold-200); }

/* ----- Modal ----- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 2, 2, 0.72);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s var(--ease-out);
}

.modal-dialog {
  position: relative;
  width: min(440px, 100%);
  background: linear-gradient(180deg, #15110a, #0a0805);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 40px 32px 32px;
  text-align: center;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(212, 164, 55, 0.15),
    var(--shadow-gold);
  animation: pop 0.4s var(--ease-out);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.modal-close {
  position: absolute;
  top: 10px; right: 14px;
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.modal-close:hover { color: var(--gold-100); transform: rotate(90deg); }

.modal-crest {
  font-size: 30px;
  color: var(--gold-300);
  text-shadow: 0 0 18px rgba(212, 164, 55, 0.6);
  margin-bottom: 6px;
}

.modal-dialog h3 {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  margin: 0 0 10px;
  color: var(--gold-100);
  letter-spacing: 0.04em;
}
.modal-sub {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 22px;
}

#beta-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: rgba(0,0,0,0.5);
  color: var(--ink);
  font-family: 'Inter', monospace;
  font-size: 15px;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  margin-bottom: 14px;
}
#beta-form input::placeholder { color: var(--ink-muted); letter-spacing: 0.22em; }
#beta-form input:focus {
  border-color: var(--gold-300);
  box-shadow: 0 0 0 4px rgba(212, 164, 55, 0.12);
}

.modal-msg {
  min-height: 20px;
  margin: 14px 0 6px;
  font-size: 13px;
  color: var(--ink-muted);
}
.modal-msg.error { color: #ff8a8a; }
.modal-msg.ok    { color: var(--gold-100); }

.modal-foot {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

/* ----- Util ----- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

@media (max-width: 720px) {
  .site-nav { display: none; }
  .site-header { padding: 16px 20px; }
  .hero-title { letter-spacing: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
