/* ---------------------------------------------------
   UTDR Castellano — tokens
--------------------------------------------------- */
@font-face {
  font-family: 'UTFont';
  src: url('utfont.ttf') format('truetype');
  font-size: 20px;
}

:root {
  --bg: #0b0b10;
  --bg-panel: #131319;
  --bg-panel-2: #17171f;
  --fg: #f2f0e6;
  --muted: #9995a3;
  --border: #f2f0e6;
  --border-dim: #38363f;

  --soul: #ff3b5c;
  --dark-world: #8c6dff;
  --gold: #ffcb47;

  --radius: 14px;
  --radius-sm: 8px;

  --font-display: "UTFont", "Silkscreen", monospace;
  --font-body: "UTFont", "Inter", system-ui, sans-serif;

  --max-width: 1080px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.25;
  font-weight: 400;
  margin: 0 0 0.6em;
}

h2 { font-size: 1.6rem; letter-spacing: 0.02em; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1em; color: var(--fg); }

a {
  color: var(--gold);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: #111;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow {
  max-width: 760px;
}

/* ---------------------------------------------------
   Header
--------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 11, 16, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-dim);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
}
.brand:hover { text-decoration: none; }

.brand-soul {
  width: 14px;
  height: 14px;
  background: var(--soul);
  transform: rotate(45deg);
  border-radius: 3px;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.brand-name-accent { color: var(--gold); }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.primary-nav a {
  color: var(--fg);
  font-size: 0.92rem;
}
.primary-nav a:hover { color: var(--gold); text-decoration: none; }

.nav-cta {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  color: var(--fg) !important;
}
.nav-cta:hover { border-color: var(--gold); color: var(--gold) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--fg);
}

/* ---------------------------------------------------
   Hero
--------------------------------------------------- */
.hero {
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--border-dim);
  background:
    radial-gradient(ellipse at 20% -10%, rgba(140, 109, 255, 0.16), transparent 55%),
    radial-gradient(ellipse at 85% 10%, rgba(255, 59, 92, 0.12), transparent 50%);
}

.hero-inner {
  text-align: left;
  max-width: 680px;
}

.dialogue-line {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 0.95rem;
}
.dialogue-line::before {
  content: "*";
  position: absolute;
  left: 4px;
  color: var(--gold);
}

#heroEyebrow {
  min-height: 1.4em;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid var(--gold);
  width: 0;
  animation: type-in 1.8s steps(38, end) forwards, caret-blink 0.8s step-end infinite;
}

@keyframes type-in {
  from { width: 0; }
  to { width: 43ch; }
}
@keyframes caret-blink {
  50% { border-color: transparent; }
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 0.3em 0 0.35em;
}
.hero-title span { color: var(--dark-world); }

.hero-subtitle {
  color: var(--fg);
  font-size: 1.05rem;
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 20px;
}

.hero-continue {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 20px;
}

/* ---------------------------------------------------
   Buttons
--------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--soul);
  color: #fff;
}
.btn-primary:hover { transform: translateY(-2px); }

.btn-ghost {
  border-color: var(--border);
  background: rgb(76, 96, 168);
  color: #fff
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn-small {
  padding: 9px 16px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  color: var(--fg);
}
.btn-small:hover { border-color: var(--gold); color: var(--gold); }

/* ---------------------------------------------------
   Sections
--------------------------------------------------- */
.section {
  padding: 72px 0;
}
.section-alt {
  background: var(--bg-panel);
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
}

.section-intro {
  max-width: 56ch;
  margin-bottom: 40px;
}

.section-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}

.stat-box {
  display: grid;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin: 0;
  background: var(--bg-panel-2);
}
.stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px dashed var(--border-dim);
  padding-bottom: 14px;
}
.stat:last-child { border-bottom: none; padding-bottom: 0; }
.stat dt { color: var(--muted); font-size: 0.85rem; }
.stat dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold);
}

/* ---------------------------------------------------
   Game cards
--------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.game-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--bg);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.game-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
}

.game-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.game-card-head h3 { margin: 0; }

.badge {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-done { background: rgba(54, 208, 11, 0.16); color: rgb(54, 208, 11); }
.badge-progress { background: rgba(255, 203, 71, 0.16); color: var(--gold); }
.badge-open { background: rgba(255, 255, 255, 0.08); color: var(--muted); }

.hp-bar {
  height: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 18px;
  background: var(--bg-panel);
}
.hp-fill {
  height: 100%;
  background: var(--soul);
}
.hp-bar-muted .hp-fill { background: var(--muted); }

/* ---------------------------------------------------
   Team
--------------------------------------------------- */
.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}
.role-card {
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 20px;
}
.role-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.team-cta { color: var(--muted); }

/* ---------------------------------------------------
   FAQ accordion
--------------------------------------------------- */
.accordion-item {
  border-bottom: 1px solid var(--border-dim);
}
.accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 18px 28px 18px 0;
  position: relative;
  cursor: pointer;
}
.accordion-trigger::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 16px;
  font-family: var(--font-display);
  color: var(--gold);
  transition: transform 0.15s ease;
}
.accordion-trigger[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
}
.accordion-panel p {
  color: var(--muted);
  padding-bottom: 18px;
  margin: 0;
}

/* ---------------------------------------------------
   Footer
--------------------------------------------------- */
.site-footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border-dim);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}
.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.footer-brand p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.85rem;
}
.footer-brand span {
  font-family: var(--font-body);
  color: var(--muted);
  font-size: 0.78rem;
}
.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links a { color: var(--fg); font-size: 0.88rem; }
.footer-links a:hover { color: var(--gold); }

.footer-disclaimer {
  color: var(--muted);
  font-size: 0.78rem;
  max-width: 70ch;
  margin: 0;
}

/* ---------------------------------------------------
   Responsive
--------------------------------------------------- */
@media (max-width: 860px) {
  .section-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-dim);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
  }
  .primary-nav.is-open { max-height: 320px; }
  .primary-nav a {
    width: 100%;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-dim);
  }
  .nav-cta { border: none; margin: 0; }

  .role-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 48px; }
}
