:root{
  --bg: #0B0B0B;
  --accent: #8B0F23;
  --text: #EDEDED;
  --muted: #9A9A9A;
  --line: rgba(255,255,255,0.06);
  --shadow: rgba(139, 15, 35, 0.35);
  --focus: rgba(139, 15, 35, 0.55);
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  background: radial-gradient(1200px 800px at 50% -10%, rgba(139,15,35,0.20), transparent 60%),
              radial-gradient(900px 700px at 20% 90%, rgba(139,15,35,0.10), transparent 55%),
              var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Entrance animation --- */
@keyframes softReveal {
  from { opacity: 0; transform: translateY(12px); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0);  filter: blur(0); }
}

.reveal{
  opacity: 0;
  animation: softReveal 1s ease forwards;
}

/* --- Layout --- */
.wrap{
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: calc(22px + env(safe-area-inset-top)) 16px calc(22px + env(safe-area-inset-bottom));
}

.card{
  width: 100%;
  max-width: 420px;
  padding: 44px 24px 28px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  position: relative;
  overflow: hidden;
}

/* subtle top glow */
.card::before{
  content:"";
  position:absolute;
  inset:-2px -2px auto -2px;
  height: 140px;
  background: radial-gradient(600px 140px at 50% 0%, rgba(139,15,35,0.22), transparent 60%);
  pointer-events:none;
}

.header{
  text-align: center;
  margin-bottom: 26px;
  position: relative;
  z-index: 1;
}

/* Mobile-responsive sizing */
.logo{
  width: clamp(110px, 30vw, 128px);
  height: clamp(110px, 30vw, 128px);
  object-fit: contain;
  display: block;
  margin: 0 auto 26px;
  filter: drop-shadow(0 16px 34px rgba(0,0,0,0.6));
}

.brand-name{
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: clamp(28px, 7vw, 34px);
  line-height: 1.08;
  margin: 0 0 10px;
  letter-spacing: 0.2px;
}

.tagline{
  margin: 0 auto 22px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: none;
  font-style: italic;
  color: rgba(255,255,255,0.55);
}

.divider{
  height: 1px;
  background: var(--line);
  margin: 18px 0 22px;
}

/* --- Buttons --- */
.links{
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.link-btn{
  width: 100%;
  padding: 14px 18px;
  min-height: 50px; /* thumb-friendly */
  border-radius: 14px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  text-align: center;
  font-size: 15px;
  line-height: 1.1;
  letter-spacing: 0.8px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: transform .35s ease, box-shadow .35s ease, background .35s ease, color .35s ease, border-color .35s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Only apply hover effects when device actually supports hover */
@media (hover: hover) and (pointer: fine){
  .link-btn:hover{
    background: var(--accent);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px var(--shadow);
  }

  .link-btn.primary:hover{
    background: #A1122B;
    border-color: #A1122B;
    box-shadow: 0 16px 34px rgba(161, 18, 43, 0.45);
  }

  .link-btn.secondary:hover{
    background: rgba(255,255,255,0.03);
    color: var(--text);
    border-color: rgba(139,15,35,0.55);
    box-shadow: none;
    transform: translateY(-2px);
  }

  .link-btn.primary.with-icon:hover .btn-icon{
    opacity: 1;
    transform: translateX(2px);
    filter: brightness(0) invert(1) sepia(1) saturate(6) hue-rotate(-10deg);
  }
}

.link-btn:active{
  transform: scale(0.985);
}

/* keyboard focus */
.link-btn:focus-visible{
  box-shadow: 0 0 0 3px rgba(0,0,0,0.35), 0 0 0 5px var(--focus);
}

.link-btn.primary{
  background: var(--accent);
  border-color: var(--accent);
}

.link-btn.secondary{
  border-color: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.72);
}

/* Ícono */
.btn-icon{
  width: 18px;
  height: 18px;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  transition: opacity .35s ease, transform .35s ease, filter .35s ease;
}

/* --- Stagger (buttons + header) --- */
.header *{
  opacity: 0;
  animation: softReveal 1s ease forwards;
}
.header .logo{ animation-delay: 0.05s; }
.header .brand-name{ animation-delay: 0.18s; }
.header .tagline{ animation-delay: 0.30s; }

.links .link-btn{
  opacity: 0;
  animation: softReveal 0.9s ease forwards;
}
.links .link-btn:nth-child(1){ animation-delay: 0.42s; }
.links .link-btn:nth-child(2){ animation-delay: 0.57s; }
.links .link-btn:nth-child(3){ animation-delay: 0.72s; }
.links .link-btn:nth-child(4){ animation-delay: 0.87s; }

/* --- Footer --- */
.footer{
  margin-top: 22px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.mini{
  margin-top: 14px;
  font-size: 11px;
  color: rgba(255,255,255,0.28);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  line-height: 1.35;
  word-break: break-word; /* evita overflow en pantallas muy estrechas */
}

/* --- Mobile-specific polish --- */
@media (max-width: 380px){
  .card{
    padding: 36px 18px 24px;
    border-radius: 20px;
  }
  .divider{
    margin: 16px 0 20px;
  }
  .links{
    gap: 12px;
  }
  .link-btn{
    padding: 14px 16px;
    border-radius: 13px;
    letter-spacing: 0.6px;
  }
  .tagline{
    margin-bottom: 18px;
  }
}

/* Short screens (small-height phones) */
@media (max-height: 680px){
  .wrap{ place-items: start center; }
  .card{ margin-top: 10px; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce){
  *{
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .reveal{ opacity: 1; }
}

/* --- Optional: "disabled" feel for pending CTA (keeps it elegant) --- */
.link-btn.is-disabled{
  cursor: default;
  opacity: 0.65;
}
@media (hover: hover) and (pointer: fine){
  .link-btn.is-disabled:hover{
    transform: none;
    box-shadow: none;
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
  }
}
