/* EZ-Input Design System v1 */
/* Shared variables, layout, and components for the dark soul-journey theme. */

:root {
  --bg: #0B0C10;
  --bg-elevated: #1F2833;
  --panel: rgba(31, 40, 51, 0.78);
  --panel-strong: rgba(31, 40, 51, 0.92);
  --gold: #D4AF37;
  --gold-soft: rgba(212, 175, 55, 0.14);
  --crimson: #8B0000;
  --crimson-soft: rgba(139, 0, 0, 0.12);
  --silver: #C0C0C0;
  --silver-soft: rgba(192, 192, 192, 0.12);
  --text: #C5C6C7;
  --muted: rgba(197, 198, 199, 0.55);
  --faint: rgba(197, 198, 199, 0.18);
  --border: rgba(212, 175, 55, 0.12);
  --border-hover: rgba(212, 175, 55, 0.28);
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 60px rgba(212, 175, 55, 0.12);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --font-display: 'Cinzel', serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.65;
  min-height: 100vh;
}

/* Animated cosmic background */
.ez-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 50% 0%, var(--gold-soft), transparent 55%),
    radial-gradient(circle at 15% 85%, var(--cyan-soft), transparent 45%),
    radial-gradient(circle at 85% 80%, var(--violet-soft), transparent 45%),
    linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 60%, #05050a 100%);
}

.ez-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, transparent 0%, rgba(0,0,0,0.55) 65%, rgba(0,0,0,0.92) 100%);
  pointer-events: none;
}

.ez-vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, transparent 0%, rgba(0,0,0,0.55) 70%, rgba(0,0,0,0.9) 100%);
}

#particleCanvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

/* Top navigation */
.ez-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(3, 3, 5, 0.55);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.ez-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 0.85rem; letter-spacing: 0.12em;
  color: var(--gold); text-decoration: none;
}
.ez-brand img { width: 28px; height: 28px; border-radius: 6px; }

.ez-nav { display: flex; align-items: center; gap: 22px; list-style: none; }
.ez-nav a {
  font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.65); text-decoration: none; transition: color 0.3s;
}
.ez-nav a:hover, .ez-nav a.active { color: var(--gold); }

/* Hero */
.ez-hero {
  position: relative;
  width: 100%;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 140px 24px 80px;
  text-align: center;
}

.ez-eyebrow {
  font-family: var(--font-display);
  font-size: 0.65rem; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 20px;
}

.ez-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.1;
  margin-bottom: 18px;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.78) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: var(--shadow-glow);
}

.ez-subtitle {
  font-size: clamp(0.95rem, 1.7vw, 1.15rem);
  color: var(--muted);
  max-width: 640px;
}

/* Section */
.ez-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

.ez-section-header {
  margin-bottom: 36px;
}

.ez-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px;
}

.ez-section-desc {
  color: var(--muted);
  max-width: 720px;
  font-size: 0.92rem;
}

/* Grid */
.ez-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

@media (max-width: 640px) {
  .ez-grid { grid-template-columns: 1fr; }
  .ez-topbar { padding: 14px 18px; }
}

/* Card */
.ez-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  backdrop-filter: blur(20px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ez-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent 40%, transparent 60%, rgba(255,255,255,0.06));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.6;
  pointer-events: none;
}

.ez-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-soft), 0 0 40px rgba(251,191,36,0.08);
}

.ez-card:hover::before {
  opacity: 1;
}

.ez-card-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  margin-bottom: 4px;
}

.ez-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem; letter-spacing: 0.08em;
}

.ez-card-meta {
  font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.ez-card-desc {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.55;
  flex: 1;
}

.ez-card-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: auto;
}

/* Buttons */
.ez-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
}

.ez-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--border-hover);
}

.ez-btn-primary {
  background: linear-gradient(135deg, var(--gold), #d97706);
  border-color: transparent;
  color: #030305;
  font-weight: 700;
}

.ez-btn-primary:hover {
  box-shadow: 0 8px 24px rgba(251,191,36,0.28);
  transform: translateY(-1px);
}

/* Tags */
.ez-tags {
  display: flex; gap: 8px; flex-wrap: wrap;
}

.ez-tag {
  font-size: 0.55rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: rgba(255,255,255,0.6);
}

/* Footer */
.ez-footer {
  text-align: center;
  padding: 48px 24px;
  color: rgba(255,255,255,0.35);
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
}

/* Gate overlay */
.ez-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 3, 5, 0.92);
  backdrop-filter: blur(20px);
}

.ez-gate-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 42px 36px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.ez-gate-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 22px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.ez-gate-title {
  font-family: var(--font-display);
  font-size: 1.4rem; letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.ez-gate-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
  line-height: 1.55;
}

.ez-gate-form {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.ez-gate-input {
  flex: 1;
  padding: 14px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.ez-gate-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
}

.ez-gate-btn {
  padding: 14px 26px;
  border-radius: var(--radius-full);
  border: none;
  background: linear-gradient(135deg, var(--gold), #d97706);
  color: #030305;
  font-family: var(--font-display);
  font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.ez-gate-btn:hover {
  box-shadow: 0 8px 24px rgba(251,191,36,0.28);
  transform: translateY(-1px);
}

.ez-gate-error {
  color: var(--rose);
  font-size: 0.8rem;
  min-height: 1.2em;
}

.ez-gate-hint {
  margin-top: 18px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
}

/* Utilities */
.ez-text-gradient {
  background: linear-gradient(90deg, var(--gold), var(--cyan), var(--violet));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ez-glow-gold { box-shadow: 0 0 30px rgba(251,191,36,0.15); }
.ez-glow-cyan { box-shadow: 0 0 30px rgba(34,211,238,0.15); }
.ez-glow-violet { box-shadow: 0 0 30px rgba(192,132,252,0.15); }
.ez-glow-rose { box-shadow: 0 0 30px rgba(251,113,133,0.15); }

/* =========================================================
   Home Page / Layout Redesign Additions
   These will be generalized into the shared layout system
   in Phase 1, but are introduced here for the home page.
   ========================================================= */

/* Hero layout variations */
.ez-hero-home {
  min-height: 92vh;
  padding: 160px 24px 100px;
  text-align: center;
}

.ez-hero-home .ez-title {
  font-size: clamp(2.6rem, 8vw, 6rem);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.ez-hero-home .ez-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 680px;
}

/* CTA row */
.ez-cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 36px;
}

.ez-cta-row .ez-btn {
  padding: 14px 28px;
  font-size: 0.7rem;
}

/* Feature strip under hero */
.ez-feature-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  max-width: 1000px;
  margin: 60px auto 0;
}

.ez-feature-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  backdrop-filter: blur(16px);
  font-size: 0.85rem;
  color: var(--text);
}

.ez-feature-pill span {
  font-size: 1.3rem;
}

/* Section variations */
.ez-section-home {
  padding: 90px 24px;
}

.ez-section-home .ez-section-header {
  text-align: center;
  margin-bottom: 48px;
}

.ez-section-home .ez-section-title {
  justify-content: center;
}

.ez-section-home .ez-section-desc {
  margin-left: auto;
  margin-right: auto;
}

/* Scroll reveal */
.ez-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.ez-reveal.ez-reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

.ez-reveal-delay-1 { transition-delay: 0.1s; }
.ez-reveal-delay-2 { transition-delay: 0.2s; }
.ez-reveal-delay-3 { transition-delay: 0.3s; }
.ez-reveal-delay-4 { transition-delay: 0.4s; }
.ez-reveal-delay-5 { transition-delay: 0.5s; }

/* Hero entrance animation */
.ez-hero-entrance > * {
  opacity: 0;
  transform: translateY(24px);
  animation: ezFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ez-hero-entrance > *:nth-child(1) { animation-delay: 0.1s; }
.ez-hero-entrance > *:nth-child(2) { animation-delay: 0.25s; }
.ez-hero-entrance > *:nth-child(3) { animation-delay: 0.4s; }
.ez-hero-entrance > *:nth-child(4) { animation-delay: 0.55s; }
.ez-hero-entrance > *:nth-child(5) { animation-delay: 0.7s; }

@keyframes ezFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile nav overlay */
.ez-menu-toggle {
  display: block;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.6rem;
  cursor: pointer;
}

.ez-topbar nav {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: rgba(3, 3, 5, 0.96);
  backdrop-filter: blur(24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.ez-topbar nav.open {
  opacity: 1;
  pointer-events: auto;
}

.ez-nav {
  flex-direction: column;
  gap: 22px;
}

.ez-nav a { font-size: 0.9rem; }

.lang-selector { position: absolute; top: 24px; right: 24px; }

@media (min-width: 861px) {
  .ez-menu-toggle { display: none; }
  .ez-topbar nav {
    position: static;
    inset: auto;
    display: block;
    background: transparent;
    backdrop-filter: none;
    opacity: 1;
    pointer-events: auto;
  }
  .ez-topbar nav.open {
    opacity: 1;
    pointer-events: auto;
  }
  .ez-nav {
    flex-direction: row;
    gap: 22px;
  }
  .ez-nav a { font-size: 0.6rem; }
  .lang-selector { position: static; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  #particleCanvas { display: none; }
}
