/* ==========================================================================
   Saeko Official Website (saeko.cl) — Dark Elegant Static Theme
   Zero external dependencies, 100% responsive, Cloudflare Pages ready
   ========================================================================== */

:root {
  --bg: #0B0D12;
  --bg-elev: #141821;
  --bg-card: #161B26;
  --bg-card-hover: #1B2130;
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(139, 123, 255, 0.35);
  --text: #F2F4F8;
  --text-muted: #9AA3B5;
  --text-soft: #C5CCDA;
  --accent: #7C6CF6;
  --accent-hover: #8F82FF;
  --accent-soft: rgba(124, 108, 246, 0.14);
  --indigo: #6366F1;
  --success: #34D399;
  --radius: 14px;
  --radius-sm: 10px;
  --max-w: 1140px;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 460px at 50% -120px, rgba(124, 108, 246, 0.16), transparent 65%),
    radial-gradient(600px 380px at 85% 20%, rgba(99, 102, 241, 0.09), transparent 60%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(124, 108, 246, 0.12);
  color: #C4BCFF;
  padding: 0.15em 0.45em;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(139, 123, 255, 0.25), rgba(99, 102, 241, 0.15));
  border: 1px solid var(--border-accent);
  color: #FFFFFF;
  font-weight: 800;
}

.brand-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: #C4BCFF;
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(139, 123, 255, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.lang-btn.active {
  background: var(--accent);
  color: #FFFFFF;
}

.mobile-menu-btn {
  display: none;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.1rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.94rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--indigo));
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(124, 108, 246, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  box-shadow: 0 10px 28px rgba(124, 108, 246, 0.4);
}

.btn-secondary {
  background: var(--bg-elev);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-patreon {
  background: rgba(124, 108, 246, 0.12);
  color: #D5CEFF;
  border-color: rgba(139, 123, 255, 0.35);
}

.btn-patreon:hover {
  background: rgba(124, 108, 246, 0.22);
  border-color: rgba(139, 123, 255, 0.55);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.85rem;
}

/* --- Hero --- */
.hero {
  padding: 82px 0 64px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border-accent);
  color: #D0C9FF;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 22px;
}

.hero h1 {
  margin: 0 auto 18px;
  max-width: 780px;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.gradient-text {
  background: linear-gradient(135deg, #FFFFFF 15%, #B8AEFF 65%, #7C6CF6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 0 auto 32px;
  max-width: 680px;
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.14rem);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 42px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 820px;
  margin: 0 auto;
}

.stat-box {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Sections --- */
section {
  padding: 64px 0;
}

.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #A89DFF;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
}

/* --- RPG Feature Panel --- */
.rpg-banner {
  background: linear-gradient(180deg, rgba(22, 27, 38, 0.96), rgba(16, 20, 29, 0.98));
  border: 1px solid var(--border-accent);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.zero-p2w-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 24px;
}

.zero-p2w-bar strong {
  color: #6EE7B7;
}

.zero-p2w-bar span {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.classes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.class-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-soft);
}

/* --- Cards Grid --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.card:hover {
  border-color: rgba(139, 123, 255, 0.3);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  border: 1px solid rgba(139, 123, 255, 0.22);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  margin-bottom: 14px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* --- Interactive Commands Guide --- */
.cmd-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.cmd-tab {
  background: var(--bg-elev);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.cmd-tab:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

.cmd-tab.active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

.cmd-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.cmd-info {
  min-width: 0;
}

.cmd-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.94rem;
  font-weight: 700;
  color: #C8C1FF;
  margin-bottom: 4px;
}

.cmd-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.copy-btn {
  flex-shrink: 0;
  background: var(--bg-elev);
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.copy-btn:hover {
  border-color: var(--border-accent);
  color: #FFFFFF;
}

.copy-btn.copied {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.45);
  color: #6EE7B7;
}

/* --- Legal Pages (terms.html / privacy.html) --- */
.legal-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 20px 80px;
}

.legal-header {
  margin-bottom: 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.legal-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.85rem, 3.6vw, 2.5rem);
  letter-spacing: -0.025em;
}

.legal-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 18px;
}

.legal-card h2 {
  margin: 0 0 10px;
  font-size: 1.18rem;
  color: #FFFFFF;
}

.legal-card p, .legal-card li {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.legal-card ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.legal-card li {
  margin-bottom: 6px;
}

/* --- Footer --- */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: rgba(11, 13, 18, 0.9);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand small {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: #FFFFFF;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cmd-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(11, 13, 18, 0.97);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 20px;
    gap: 14px;
  }
  .nav-links.open {
    display: flex;
  }
  .mobile-menu-btn {
    display: inline-grid;
    place-items: center;
  }
  .nav-invite {
    display: none;
  }
  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 56px 0 42px;
  }
  .legal-card {
    padding: 20px;
  }
}
