/* ============================================================
   Plendarixar — design system
   Theme: dark "tech tree" — nodes, pathways, editor-grid motif
   ============================================================ */

:root{
  --bg: #05070b;
  --bg-elevated: #0b0e15;
  --bg-card: #10141d;
  --bg-card-hover: #141a25;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);
  --text: #e8ecf3;
  --text-dim: #9aa4b6;
  --text-faint: #6b7386;
  --accent: #6ee7f2;
  --accent-2: #a78bfa;
  --accent-3: #f472b6;
  --accent-warm: #facc15;
  --success: #4ade80;
  --danger: #fb7185;
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1180px;
  --shadow-glow: 0 0 0 1px rgba(110,231,242,0.12), 0 20px 60px -20px rgba(110,231,242,0.15);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before{
  content:"";
  position: fixed;
  inset:0;
  z-index:-1;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events:none;
}
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4{ line-height:1.2; margin:0 0 .5em; font-weight:700; letter-spacing:-0.01em; }
p{ margin:0 0 1em; color: var(--text-dim); }
.container{ max-width: var(--maxw); margin:0 auto; padding: 0 24px; }
.section{ padding: 88px 0; }
.section--tight{ padding: 56px 0; }
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-family: var(--font-mono); font-size:12px; letter-spacing:.14em; text-transform:uppercase;
  color: var(--accent); margin-bottom:14px;
}
.eyebrow::before{ content:""; width:6px; height:6px; border-radius:50%; background: var(--accent); box-shadow:0 0 10px var(--accent); }
.section-head{ max-width: 640px; margin-bottom: 44px; }
.section-head h2{ font-size: clamp(28px,4vw,38px); }
.section-head p{ font-size: 17px; }
.center{ text-align:center; margin-left:auto; margin-right:auto; }

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 13px 26px; border-radius: 999px; font-weight:600; font-size:15px;
  border:1px solid transparent; cursor:pointer; transition: all .18s ease; white-space:nowrap;
}
.btn-primary{
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color:#05070b;
}
.btn-primary:hover{ filter:brightness(1.08); transform: translateY(-1px); }
.btn-ghost{
  background: transparent; color: var(--text); border-color: var(--border-strong);
}
.btn-ghost:hover{ background: rgba(255,255,255,0.05); border-color: var(--accent); }
.btn-block{ width:100%; }
.btn[disabled]{ opacity:.5; cursor:not-allowed; }

/* Nav */
.nav{
  position: sticky; top:0; z-index:50;
  background: rgba(5,7,11,0.78); backdrop-filter: blur(12px);
  border-bottom:1px solid var(--border);
}
.nav__inner{ display:flex; align-items:center; justify-content:space-between; padding:16px 24px; max-width: var(--maxw); margin:0 auto; }
.brand{ display:flex; align-items:center; gap:10px; font-weight:800; font-size:18px; letter-spacing:-.01em; }
.brand__mark{ width:26px; height:26px; }
.brand__mark svg{ width:100%; height:100%; }
.nav__links{ display:flex; align-items:center; gap:30px; }
.nav__links a{ font-size:14.5px; color: var(--text-dim); transition: color .15s; }
.nav__links a:hover, .nav__links a.active{ color: var(--text); }
.nav__cta{ display:flex; align-items:center; gap:14px; }
.nav__toggle{ display:none; background:none; border:1px solid var(--border-strong); border-radius:8px; width:40px; height:40px; color:var(--text); cursor:pointer; }

@media (max-width: 880px){
  .nav__links{
    position:absolute; top:100%; left:0; right:0;
    flex-direction:column; align-items:flex-start; gap:0;
    background: var(--bg-elevated); border-bottom:1px solid var(--border);
    padding: 8px 24px; max-height:0; overflow:hidden; transition: max-height .25s ease;
  }
  .nav__links.open{ max-height: 400px; padding: 14px 24px; }
  .nav__links a{ padding: 12px 0; width:100%; border-bottom:1px solid var(--border); }
  .nav__links a:last-child{ border-bottom:none; }
  .nav__toggle{ display:block; }
}

/* Hero */
.hero{
  position:relative; overflow:hidden;
  padding: 90px 0 60px;
  border-bottom:1px solid var(--border);
}
.hero__bg{
  position:absolute; inset:0; z-index:0;
  opacity:.85;
}
.hero__bg img{ width:100%; height:100%; object-fit:cover; }
.hero__bg::after{
  content:""; position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(5,7,11,0.15) 0%, var(--bg) 92%);
}
.hero__inner{ position:relative; z-index:1; max-width: var(--maxw); margin:0 auto; padding:0 24px; text-align:center; }
.hero h1{
  font-size: clamp(34px, 6vw, 62px);
  max-width: 820px; margin: 0 auto 20px;
}
.hero h1 .grad{
  background: linear-gradient(135deg, var(--accent), var(--accent-2) 60%, var(--accent-3));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.hero p.lead{ font-size:18px; max-width:560px; margin:0 auto 34px; }
.hero__actions{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; margin-bottom: 46px; }

/* Animated node hero graphic */
.hero__nodes{ position:relative; max-width: 720px; height:170px; margin:0 auto; }
.hero__nodes svg{ width:100%; height:100%; }
.node-dot{ animation: nodePulse 2.6s ease-in-out infinite; transform-origin: center; }
.node-line{ stroke-dasharray: 6 8; animation: dashFlow 3.2s linear infinite; }
@keyframes nodePulse{ 0%,100%{ opacity:.55; transform:scale(1);} 50%{ opacity:1; transform:scale(1.25);} }
@keyframes dashFlow{ to{ stroke-dashoffset: -140; } }
@media (prefers-reduced-motion: reduce){ .node-dot, .node-line{ animation:none; } }

/* Cards / grid */
.grid{ display:grid; gap:24px; }
.grid--3{ grid-template-columns: repeat(3, 1fr); }
.grid--4{ grid-template-columns: repeat(4, 1fr); }
.grid--2{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px){ .grid--3, .grid--4{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px){ .grid--3, .grid--4, .grid--2{ grid-template-columns: 1fr; } }

.card{
  background: var(--bg-card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  overflow:hidden;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.card:hover{ transform: translateY(-4px); border-color: var(--border-strong); background: var(--bg-card-hover); }

/* Product card */
.product-card__cover{ aspect-ratio: 4/3; overflow:hidden; border-bottom:1px solid var(--border); background:#0a0d13; }
.product-card__cover img{ width:100%; height:100%; object-fit:cover; transition: transform .35s ease; }
.card:hover .product-card__cover img{ transform: scale(1.05); }
.product-card__body{ padding:20px 22px 22px; }
.product-card__price{ font-family: var(--font-mono); font-size:13px; color: var(--accent); margin-bottom:8px; letter-spacing:.03em; }
.product-card__price.free{ color: var(--success); }
.product-card__body h3{ font-size:19px; margin-bottom:6px; }
.product-card__body p{ font-size:14.5px; margin-bottom:16px; }

/* Who we are / mission split */
.split{ display:grid; grid-template-columns: 1fr 1fr; gap:56px; align-items:center; }
@media (max-width: 860px){ .split{ grid-template-columns:1fr; gap:32px; } }
.split__media{ border-radius: var(--radius); overflow:hidden; border:1px solid var(--border); }
.split__media img{ width:100%; }
.split h2{ font-size: clamp(26px,3.6vw,34px); }
.split p{ font-size:16px; }

/* Benefits */
.benefit{ padding:26px; background: var(--bg-card); border:1px solid var(--border); border-radius: var(--radius); }
.benefit__icon{
  width:44px; height:44px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  background: rgba(110,231,242,0.1); color: var(--accent); margin-bottom:16px;
}
.benefit__icon svg{ width:22px; height:22px; }
.benefit h3{ font-size:17px; margin-bottom:8px; }
.benefit p{ font-size:14.5px; margin:0; }

/* Free guide CTA banner */
.cta-banner{
  border-radius: 20px; padding: 54px 40px; text-align:center;
  background: radial-gradient(circle at 50% 0%, rgba(110,231,242,0.12), transparent 60%), var(--bg-card);
  border:1px solid var(--border);
}
.cta-banner h2{ font-size: clamp(24px,3.4vw,32px); margin-bottom:12px; }
.cta-banner p{ max-width:480px; margin:0 auto 26px; }

/* FAQ accordion */
.faq-item{ border-bottom:1px solid var(--border); }
.faq-item:first-child{ border-top:1px solid var(--border); }
.faq-q{
  width:100%; text-align:left; background:none; border:none; color: var(--text);
  padding:20px 4px; font-size:16px; font-weight:600; cursor:pointer;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.faq-q__icon{ flex-shrink:0; width:20px; height:20px; transition: transform .2s ease; color: var(--accent); }
.faq-item.open .faq-q__icon{ transform: rotate(45deg); }
.faq-a{ max-height:0; overflow:hidden; transition: max-height .25s ease; }
.faq-a__inner{ padding: 0 4px 20px; }
.faq-a p{ font-size:15px; margin:0; }
.faq-search{
  width:100%; padding:14px 18px; border-radius: 999px; border:1px solid var(--border-strong);
  background: var(--bg-card); color: var(--text); font-size:15px; margin-bottom: 28px;
}
.faq-search::placeholder{ color: var(--text-faint); }
.faq-group-title{ font-family: var(--font-mono); font-size:12px; letter-spacing:.12em; text-transform:uppercase; color: var(--text-faint); margin: 34px 0 6px; }
.faq-group-title:first-of-type{ margin-top:0; }

/* Footer */
.footer{ border-top:1px solid var(--border); padding: 64px 0 28px; background: var(--bg-elevated); }
.footer__grid{ display:grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap:40px; margin-bottom:48px; }
@media (max-width: 780px){ .footer__grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px){ .footer__grid{ grid-template-columns: 1fr; } }
.footer h4{ font-size:13px; text-transform:uppercase; letter-spacing:.1em; color: var(--text-faint); margin-bottom:16px; }
.footer li{ margin-bottom:10px; }
.footer a{ color: var(--text-dim); font-size:14.5px; }
.footer a:hover{ color: var(--accent); }
.footer__brand p{ font-size:14px; max-width: 280px; }
.footer__social{ display:flex; gap:12px; margin-top:16px; }
.footer__social a{
  width:36px; height:36px; border-radius:8px; border:1px solid var(--border-strong);
  display:flex; align-items:center; justify-content:center;
}
.footer__social a:hover{ border-color: var(--accent); color: var(--accent); }
.footer__bottom{
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px;
  padding-top:24px; border-top:1px solid var(--border); font-size:13px; color: var(--text-faint);
}
.footer__bottom a{ color: var(--text-faint); }
.footer__bottom a:hover{ color:var(--accent); }

/* Product page */
.product-hero{ display:grid; grid-template-columns: 1fr 1fr; gap:56px; align-items:start; padding: 56px 0; }
@media (max-width: 860px){ .product-hero{ grid-template-columns:1fr; gap:32px; } }
.product-hero__cover{ border-radius: var(--radius); overflow:hidden; border:1px solid var(--border); position:sticky; top:100px; }
.product-hero__price{ font-family: var(--font-mono); font-size: 32px; color: var(--accent); margin: 14px 0 6px; }
.product-hero__price.free{ color: var(--success); }
.product-hero__tagline{ font-size:18px; color: var(--text-dim); margin-bottom:22px; }
.badge{
  display:inline-flex; align-items:center; gap:6px; font-family: var(--font-mono); font-size:12px;
  padding:6px 12px; border-radius:999px; border:1px solid var(--border-strong); color: var(--text-dim); margin-bottom:16px;
}
.module-list{ margin: 22px 0; }
.module-list li{
  display:flex; gap:12px; padding:14px 0; border-bottom:1px solid var(--border); font-size:15px; color: var(--text);
}
.module-list li:first-child{ border-top:1px solid var(--border); }
.module-list .num{ font-family: var(--font-mono); color: var(--accent); flex-shrink:0; }
.for-whom{ background: var(--bg-card); border:1px solid var(--border); border-radius: var(--radius-sm); padding:18px 20px; font-size:14.5px; margin-bottom: 26px; }
.for-whom strong{ color: var(--text); }

/* Loading page */
.loading-wrap{
  min-height: 70vh; display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding: 40px 24px;
}
.spinner{
  width:64px; height:64px; border-radius:50%;
  border: 3px solid var(--border-strong); border-top-color: var(--accent);
  animation: spin 0.9s linear infinite; margin-bottom: 28px;
}
@keyframes spin{ to{ transform: rotate(360deg); } }
.loading-wrap h1{ font-size:22px; }
.loading-wrap p{ max-width: 380px; }
.loading-fallback{ display:none; margin-top: 18px; }
.loading-fallback.show{ display:block; }

/* Simple content pages (legal, about, contact) */
.prose{ max-width: 760px; }
.prose h2{ font-size:22px; margin-top:40px; }
.prose h2:first-child{ margin-top:0; }
.prose p, .prose li{ font-size:15.5px; color: var(--text-dim); }
.prose ul{ margin-bottom:1em; padding-left: 1.3em; list-style: disc; }
.prose li{ margin-bottom:6px; }
.prose strong{ color: var(--text); }
.updated{ font-family: var(--font-mono); font-size:13px; color: var(--text-faint); margin-bottom:32px; }

/* Contact form */
.form{ max-width: 560px; }
.form label{ display:block; font-size:13.5px; color: var(--text-dim); margin-bottom:6px; }
.form .field{ margin-bottom:18px; }
.form input, .form textarea, .form select{
  width:100%; padding:13px 16px; border-radius: var(--radius-sm); border:1px solid var(--border-strong);
  background: var(--bg-card); color: var(--text); font-size:15px; font-family: inherit;
}
.form textarea{ resize: vertical; min-height:130px; }
.form-note{ font-size:13.5px; color: var(--text-faint); margin-top:14px; }
.form-success{ display:none; padding:16px 18px; border-radius: var(--radius-sm); background: rgba(74,222,128,0.1); border:1px solid rgba(74,222,128,0.3); color:#bbf7d0; font-size:14.5px; margin-bottom:18px; }
.form-success.show{ display:block; }

/* Curriculum */
.curriculum-row{
  display:grid; grid-template-columns: 90px 1fr; gap:20px;
  padding: 24px 0; border-bottom:1px solid var(--border);
}
.curriculum-row:first-child{ border-top:1px solid var(--border); }
.curriculum-row__index{ font-family: var(--font-mono); color: var(--accent); font-size:14px; padding-top:2px; }
.curriculum-row h3{ font-size:18px; margin-bottom:6px; }
.curriculum-row p{ font-size:14.5px; margin-bottom:10px; }
.tag-list{ display:flex; flex-wrap:wrap; gap:8px; }
.tag{ font-family: var(--font-mono); font-size:11.5px; padding:4px 10px; border-radius:999px; border:1px solid var(--border-strong); color: var(--text-dim); }

/* Updates page */
.update-item{ display:grid; grid-template-columns: 140px 1fr; gap:20px; padding:22px 0; border-bottom:1px solid var(--border); }
.update-item:first-child{ border-top:1px solid var(--border); }
.update-item__date{ font-family: var(--font-mono); font-size:13px; color: var(--text-faint); }
.update-item h3{ font-size:16px; margin-bottom:6px; }
.update-item p{ font-size:14.5px; margin:0; }
@media (max-width:600px){ .update-item{ grid-template-columns:1fr; gap:6px; } }

/* Catalog page filter bar */
.catalog-toolbar{ display:flex; gap:14px; flex-wrap:wrap; align-items:center; margin-bottom:32px; }
.sort-select{ padding:10px 14px; border-radius: 999px; border:1px solid var(--border-strong); background: var(--bg-card); color: var(--text); font-size:14px; }

/* Misc */
.section-divider{ border:none; border-top:1px solid var(--border); margin: 0; }
.text-center{ text-align:center; }
.mt-40{ margin-top:40px; }
.skip-link{ position:absolute; left:-999px; top:0; background:var(--accent); color:#05070b; padding:10px 16px; border-radius:8px; z-index:999; }
.skip-link:focus{ left:16px; top:16px; }


/* Social buttons — fixed layout */
.footer__social{
  display:flex !important;
  align-items:center !important;
  flex-wrap:wrap !important;
  gap:10px !important;
  margin-top:16px !important;
}
.footer__social .social-btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  width:auto !important;
  min-width:118px !important;
  height:42px !important;
  padding:0 14px !important;
  margin:0 !important;
  border:1px solid rgba(255,255,255,.14) !important;
  border-radius:10px !important;
  text-decoration:none !important;
  line-height:1 !important;
  white-space:nowrap !important;
  box-sizing:border-box !important;
}
.footer__social .social-btn__icon{
  display:block !important;
  width:19px !important;
  height:19px !important;
  min-width:19px !important;
  flex:0 0 19px !important;
  margin:0 !important;
}
.footer__social .social-btn span{
  display:block !important;
  position:static !important;
  margin:0 !important;
  padding:0 !important;
  line-height:1 !important;
}
.footer__social .social-btn:hover{
  transform:translateY(-1px);
}
@media (max-width:480px){
  .footer__social{align-items:stretch !important;}
  .footer__social .social-btn{min-width:0 !important;}
}
