/* Endworld · Immortal Path - Landing Page Stylesheet
   Adhering to Endworld Design System Tokens
*/
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Noto+Serif+Display:ital,wght@0,500;0,600;0,700;0,800;0,900;1,500;1,600;1,700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --font-sans: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Noto Serif Display', 'Be Vietnam Pro', serif;
  --font-display: 'Noto Serif Display', 'Be Vietnam Pro', serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-full: 9999px;
  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--surface-0, #0d1014);
  color: var(--text-primary, #ece6d6);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  background: radial-gradient(circle at 50% 20%, rgba(21, 26, 32, 0.85) 0%, #0d1014 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background canvas sits behind content */
#ew-qi-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(13, 16, 20, 0.85);
  border-bottom: 1px solid var(--border, rgba(214, 178, 94, 0.16));
  height: 72px;
  display: flex;
  align-items: center;
}

.navbar .nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary, #ece6d6);
  transition: transform var(--transition-fast);
}

.navbar-brand:hover {
  transform: translateY(-1px);
}

.navbar-brand img {
  height: 40px;
  width: 40px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.navbar-brand .brand-text {
  font-family: var(--font-display, 'Noto Serif Display', serif);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.12em;
  color: #ece6d6;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.navbar-brand .brand-sub {
  font-family: var(--font-sans, 'Be Vietnam Pro', sans-serif);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--gold, #d6b25e);
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary, #b0aa98);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold, #d6b25e);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: var(--radius-sm, 4px);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-sizing: border-box;
}

.btn-gold {
  background: linear-gradient(135deg, #e3c472 0%, #d6b25e 60%, #b8892c 100%);
  color: var(--on-gold, #17130a);
  border: 1px solid rgba(255, 235, 175, 0.4);
  box-shadow: 0 4px 16px rgba(214, 178, 94, 0.25);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(214, 178, 94, 0.4);
  background: linear-gradient(135deg, #ebd082 0%, #dfbe69 60%, #c49635 100%);
  color: #0d0a04;
}

.btn-outline {
  background: rgba(21, 26, 32, 0.6);
  color: var(--text-primary, #ece6d6);
  border: 1px solid var(--border-strong, rgba(214, 178, 94, 0.34));
}

.btn-outline:hover {
  background: rgba(28, 35, 43, 0.9);
  border-color: var(--gold, #d6b25e);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(214, 178, 94, 0.2);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

/* Hero Section */
.hero {
  padding: 96px 0 64px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(47, 174, 156, 0.12);
  border: 1px solid var(--border-accent, #2fae9c);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  color: var(--text-accent, #6fd6c4);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--text-accent, #6fd6c4);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--text-accent, #6fd6c4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 52px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #ece6d6 50%, #d6b25e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 24px rgba(214, 178, 94, 0.15);
}

.hero-subtitle {
  font-size: 18px;
  max-width: 760px;
  margin: 0 auto 36px;
  color: var(--text-secondary, #b0aa98);
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

/* Stats Ribbon */
.stats-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: var(--surface-1, #151a20);
  border: 1px solid var(--border, rgba(214, 178, 94, 0.16));
  border-radius: var(--radius-md, 6px);
  padding: 24px;
  box-shadow: var(--shadow-panel, 0 10px 28px rgba(0,0,0,.5));
  position: relative;
}

.stat-item {
  text-align: center;
  padding: 8px 12px;
}

.stat-item:not(:last-child) {
  border-right: 1px solid var(--border, rgba(214, 178, 94, 0.16));
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--gold, #d6b25e);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted, #938e80);
  font-weight: 500;
}

/* Section styling */
section {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-tag {
  color: var(--gold, #d6b25e);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 10px;
  display: block;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary, #ece6d6);
  margin-bottom: 14px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary, #b0aa98);
}

/* Card Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ew-card {
  background: var(--surface-1, #151a20);
  border: 1px solid var(--border, rgba(214, 178, 94, 0.16));
  border-radius: var(--radius-md, 6px);
  padding: 32px 24px;
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.ew-card::before,
.ew-card::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
}

.ew-card::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--gold, #d6b25e);
  border-left: 2px solid var(--gold, #d6b25e);
}

.ew-card::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid var(--gold, #d6b25e);
  border-right: 2px solid var(--gold, #d6b25e);
}

.ew-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong, rgba(214, 178, 94, 0.34));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 16px rgba(214, 178, 94, 0.15);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(214, 178, 94, 0.1);
  border: 1px solid var(--border-strong, rgba(214, 178, 94, 0.34));
  border-radius: var(--radius-sm, 4px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--gold, #d6b25e);
}

.card-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary, #ece6d6);
}

.card-text {
  font-size: 14px;
  color: var(--text-secondary, #b0aa98);
  line-height: 1.65;
}

/* Auth Spotlight Box (For Google OAuth Verification) */
.auth-spotlight {
  background: linear-gradient(135deg, rgba(21, 26, 32, 0.95) 0%, rgba(28, 35, 43, 0.95) 100%);
  border: 1px solid var(--border-strong, rgba(214, 178, 94, 0.34));
  border-radius: var(--radius-md, 6px);
  padding: 40px;
  margin: 40px 0;
  box-shadow: var(--shadow-panel, 0 10px 28px rgba(0,0,0,.5));
  position: relative;
}

.auth-spotlight::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #d6b25e 50%, transparent 100%);
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.auth-info h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--gold, #d6b25e);
  margin-bottom: 14px;
}

.auth-info p {
  color: var(--text-secondary, #b0aa98);
  font-size: 15px;
  margin-bottom: 16px;
}

.auth-list {
  list-style: none;
}

.auth-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-primary, #ece6d6);
}

.auth-list li svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--text-success, #a6d16a);
}

.auth-action-box {
  background: var(--surface-0, #0d1014);
  border: 1px solid var(--border, rgba(214, 178, 94, 0.16));
  border-radius: var(--radius-sm, 4px);
  padding: 28px;
  text-align: center;
}

.auth-action-box h4 {
  font-size: 16px;
  color: var(--text-primary, #ece6d6);
  margin-bottom: 8px;
}

.auth-action-box p {
  font-size: 13px;
  color: var(--text-muted, #938e80);
  margin-bottom: 20px;
}

/* Legal / Privacy document page styles */
.doc-page {
  padding: 64px 0 96px;
  max-width: 860px;
  margin: 0 auto;
}

.doc-header {
  border-bottom: 1px solid var(--border, rgba(214, 178, 94, 0.16));
  padding-bottom: 24px;
  margin-bottom: 40px;
}

.doc-header h1 {
  font-family: var(--font-serif);
  font-size: 38px;
  color: var(--gold, #d6b25e);
  margin-bottom: 12px;
}

.doc-meta {
  font-size: 14px;
  color: var(--text-muted, #938e80);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.doc-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary, #b0aa98);
}

.doc-body h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--text-primary, #ece6d6);
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(214, 178, 94, 0.12);
}

.doc-body h3 {
  font-size: 17px;
  color: var(--gold, #d6b25e);
  margin: 24px 0 10px;
}

.doc-body p {
  margin-bottom: 16px;
}

.doc-body ul, .doc-body ol {
  margin: 12px 0 20px 24px;
}

.doc-body li {
  margin-bottom: 8px;
}

.doc-box {
  background: var(--surface-1, #151a20);
  border: 1px solid var(--border-strong, rgba(214, 178, 94, 0.34));
  border-radius: var(--radius-sm, 4px);
  padding: 20px;
  margin: 24px 0;
}

.doc-box strong {
  color: var(--gold, #d6b25e);
}

/* Footer */
footer {
  border-top: 1px solid var(--border, rgba(214, 178, 94, 0.16));
  background: var(--surface-0, #0d1014);
  padding: 48px 0 32px;
  position: relative;
  z-index: 1;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand {
  max-width: 380px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted, #938e80);
  margin-top: 12px;
  line-height: 1.6;
}

.footer-col h5 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #ece6d6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  text-decoration: none;
  font-size: 14px;
  color: var(--text-secondary, #b0aa98);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--gold, #d6b25e);
}

.footer-bottom {
  border-top: 1px solid rgba(214, 178, 94, 0.08);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted, #938e80);
}

/* Responsive */
@media (max-width: 992px) {
  .hero-title { font-size: 40px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-ribbon { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .stat-item:nth-child(2) { border-right: none; }
  .auth-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-title { font-size: 32px; }
  .hero-subtitle { font-size: 16px; }
  .cards-grid { grid-template-columns: 1fr; }
  .stats-ribbon { grid-template-columns: 1fr; }
  .stat-item { border-right: none !important; border-bottom: 1px solid var(--border, rgba(214, 178, 94, 0.16)); }
  .stat-item:last-child { border-bottom: none; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
