/* EIDARA — Global Styles */
/* Palette: ink #1A1525, plum #5B4A8A, lilac #A78BFA, gold #D4A855, snow #F8F6FB, cream #F0EDF5 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --ink: #1A1525;
  --plum: #5B4A8A;
  --lilac: #A78BFA;
  --gold: #D4A855;
  --snow: #F8F6FB;
  --cream: #F0EDF5;
  --bg: #0F0B1A;
  --text: #F0EDF5;
  --text-muted: rgba(240,237,245,0.6);
  --border: rgba(91,74,138,0.25);
  --card-bg: rgba(91,74,138,0.08);
}

html { scroll-behavior: smooth; font-size: 16px; }
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); letter-spacing: -0.01em; margin-bottom: 1.2rem; }
h3 { font-size: 1.25rem; }

a { color: var(--gold); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

code, pre { font-family: 'JetBrains Mono', monospace; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ---- NAV ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15,11,26,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 1.5rem;
}
.nav-logo img { height: 32px; width: auto; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); opacity: 1; }
.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  width: 28px; height: 20px; position: relative;
}
.hamburger span {
  display: block; width: 100%; height: 2px; background: var(--text);
  position: absolute; left: 0; transition: all 0.3s;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 18px; }
.hamburger.open span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { top: 9px; transform: rotate(-45deg); }

.mobile-menu {
  display: none; position: fixed; top: 57px; left: 0; right: 0; bottom: 0;
  background: rgba(15,11,26,0.97); backdrop-filter: blur(20px);
  z-index: 99; padding: 2rem;
}
.mobile-menu.open { display: flex; flex-direction: column; gap: 1.5rem; }
.mobile-menu a {
  color: var(--text); font-size: 1.2rem; font-weight: 500;
  font-family: 'Space Grotesk', sans-serif;
}

/* ---- SECTIONS ---- */
section { padding: 6rem 0; }
.section-dark { background: var(--bg); }
.section-subtle { background: rgba(91,74,138,0.04); }

/* ---- HERO ---- */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding-top: 5rem; position: relative; overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(91,74,138,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91,74,138,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, black 30%, transparent 100%);
}
.hero-content { position: relative; z-index: 1; text-align: center; max-width: 750px; margin: 0 auto; }
.hero-mark {
  width: 100px; height: 100px; margin: 0 auto 2rem;
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero-mark .node-gold { animation: pulse-node 3s ease-in-out infinite; }
@keyframes pulse-node { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
.hero h1 { margin-bottom: 1.5rem; }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted); line-height: 1.8; margin-bottom: 2.5rem;
}
.hero-sub strong { color: var(--text); font-weight: 500; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.8rem; border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.95rem;
  transition: all 0.25s; cursor: pointer; border: none;
}
.btn-primary {
  background: var(--gold); color: var(--ink);
  box-shadow: 0 0 0 0 rgba(212,168,85,0);
}
.btn-primary:hover {
  background: #e0b45e; color: var(--ink); opacity: 1;
  box-shadow: 0 0 20px rgba(212,168,85,0.3);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--lilac); color: var(--lilac); opacity: 1; }
.btn-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---- CARDS ---- */
.card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 2rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(167,139,250,0.15); display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem; color: var(--lilac); font-size: 1.2rem;
}
.card h3 { margin-bottom: 0.6rem; color: var(--text); }
.card p { color: var(--text-muted); font-size: 0.95rem; }

.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem; align-items: stretch;
}
.cards-grid .card { display: flex; flex-direction: column; height: 100%; }
.cards-grid .card p { flex: 1; }

/* ---- CODE BLOCKS ---- */
.code-block {
  background: var(--ink); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.5rem; overflow-x: auto; font-size: 0.9rem;
  line-height: 1.6;
}
.code-block code { color: var(--cream); }
.code-block .comment { color: var(--text-muted); }
.code-block .keyword { color: var(--lilac); }
.code-block .string { color: var(--gold); }

/* ---- FLOW DIAGRAM ---- */
.flow {
  display: flex; align-items: center; justify-content: center;
  gap: 0; padding: 2rem 0; flex-wrap: wrap;
}
.flow-box {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.5rem 2rem; text-align: center; min-width: 160px;
  transition: border-color 0.3s;
}
.flow-box:hover { border-color: var(--lilac); }
.flow-box h4 { color: var(--lilac); margin-bottom: 0.3rem; font-size: 1rem; letter-spacing: 0.05em; }
.flow-box .mono { font-family: 'JetBrains Mono', monospace; color: var(--gold); font-size: 0.85rem; }
.flow-box p { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.5rem; }
.flow-arrow {
  color: var(--gold); font-size: 1.5rem; padding: 0 1rem;
  animation: arrow-pulse 2s ease-in-out infinite;
}
@keyframes arrow-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---- STATS CALLOUT ---- */
.stats-box {
  background: linear-gradient(135deg, rgba(91,74,138,0.15), rgba(167,139,250,0.08));
  border: 1px solid rgba(167,139,250,0.25); border-radius: 16px;
  padding: 3rem; text-align: center;
}
.stats-number {
  font-family: 'Space Grotesk', sans-serif; font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700; color: var(--gold); line-height: 1;
}
.stats-label { color: var(--text-muted); font-size: 1.1rem; margin-top: 0.5rem; }
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem; margin-top: 2rem;
}
.stat-item { text-align: center; }
.stat-value {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem;
  font-weight: 700; color: var(--text);
}
.stat-desc { color: var(--text-muted); font-size: 0.85rem; }

/* ---- CHECKLIST ---- */
.checklist { list-style: none; padding: 0; }
.checklist li {
  padding: 0.8rem 0; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.8rem;
  color: var(--text-muted); font-size: 1rem;
}
.checklist li::before {
  content: ''; width: 20px; height: 20px; border-radius: 4px;
  border: 2px solid var(--border); flex-shrink: 0;
  transition: all 0.3s;
}
.checklist li:hover::before { border-color: var(--gold); background: rgba(212,168,85,0.15); }
.checklist li:hover { color: var(--text); }

/* ---- QUOTE ---- */
.quote {
  border-left: 3px solid var(--gold); padding: 1.5rem 2rem;
  background: rgba(212,168,85,0.05); border-radius: 0 8px 8px 0;
  margin: 2rem 0; font-style: italic; color: var(--cream);
}
.quote cite { display: block; margin-top: 0.8rem; font-style: normal; color: var(--text-muted); font-size: 0.9rem; }

/* ---- TABLE ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th { text-align: left; color: var(--text-muted); font-weight: 500; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); }
td { padding: 0.8rem 1rem; border-bottom: 1px solid rgba(91,74,138,0.12); color: var(--cream); }
tr:hover td { background: rgba(91,74,138,0.06); }

/* ---- FOOTER ---- */
.footer {
  border-top: 1px solid var(--border); padding: 3rem 0;
  color: var(--text-muted); font-size: 0.85rem;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--gold); }
.footer-links { display: flex; gap: 1.5rem; }

/* ---- SCROLL ANIMATIONS ---- */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ---- PAIN SECTION ---- */
.pain-text {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-muted); line-height: 1.9;
  max-width: 620px; margin: 0 auto; text-align: center;
}
.pain-text em { color: var(--gold); font-style: normal; font-weight: 500; }

/* ---- TIMELINE ---- */
.timeline { position: relative; padding-left: 2.5rem; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--lilac), var(--gold));
}
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -2.65rem; top: 0.4rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--lilac);
}
.timeline-item:last-child::before { border-color: var(--gold); background: var(--gold); }
.timeline-item h3 { color: var(--lilac); margin-bottom: 0.5rem; }
.timeline-item p { color: var(--text-muted); }

/* ---- SECTION HEADER ---- */
.section-header {
  text-align: center; max-width: 650px; margin: 0 auto 3rem;
}
.section-header p { color: var(--text-muted); margin-top: 0.8rem; font-size: 1.05rem; }
.section-tag {
  display: inline-block; font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem; color: var(--gold); letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 0.8rem;
}

/* ---- PAGE HERO (inner pages) ---- */
.page-hero {
  padding: 8rem 0 4rem; text-align: center;
  background: linear-gradient(to bottom, var(--bg), rgba(91,74,138,0.04));
}
.page-hero h1 { margin-bottom: 1rem; }
.page-hero p { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* ---- TWO COLUMNS ---- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }

/* ---- FAQ ---- */
.faq-item { border-bottom: 1px solid var(--border); padding: 1.5rem 0; }
.faq-q {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: 1.05rem; cursor: pointer; display: flex;
  justify-content: space-between; align-items: center;
}
.faq-q::after { content: '+'; color: var(--lilac); font-size: 1.3rem; transition: transform 0.3s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s;
  color: var(--text-muted); font-size: 0.95rem; line-height: 1.7;
}
.faq-item.open .faq-a { max-height: 200px; padding-top: 1rem; }

/* ---- NEWSLETTER FORM ---- */
.newsletter-form {
  display: flex; gap: 0.5rem; max-width: 440px;
}
.newsletter-form input {
  flex: 1; padding: 0.8rem 1rem; border-radius: 8px;
  border: 1px solid var(--border); background: rgba(91,74,138,0.1);
  color: var(--text); font-size: 0.95rem; font-family: 'Inter', sans-serif;
}
.newsletter-form input::placeholder { color: var(--text-muted); }
.newsletter-form input:focus { outline: none; border-color: var(--lilac); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  section { padding: 4rem 0; }
  .hero { min-height: auto; padding: 7rem 0 4rem; }
  .two-col { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr !important; }
  .flow { flex-direction: column; gap: 1rem; }
  .flow-arrow { transform: rotate(90deg); padding: 0.5rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .newsletter-form { flex-direction: column; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .btn-group { flex-direction: column; }
}
