/* ==========================================================================
   Playnexiara — design tokens
   Visual concept: the site itself looks like the editor these courses teach
   you to work in — dark canvas, line-number gutters, tab chrome, and a
   restrained "syntax highlighting" palette used the way a real editor
   theme uses it: sparingly, and tied to meaning, not decoration.
   ========================================================================== */

:root {
  /* Color */
  --bg: #10131a;
  --bg-panel: #161a24;
  --bg-panel-raised: #1b2030;
  --line: #262c3d;
  --line-soft: #1e2333;
  --text: #e7e9f2;
  --text-dim: #8991a8;
  --text-faint: #565f78;

  --cyan: #6fe0d6;
  --amber: #eab868;
  --magenta: #c793ea;
  --green: #8fd17a;

  --focus: var(--cyan);

  /* Type */
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --gutter-w: 44px;
  --radius: 3px;
  --max-w: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-mono); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--cyan); color: #0a0c11; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Utility: code-comment eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.eyebrow::before { content: "//"; color: var(--green); }

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

/* ---------- Top bar (tab strip) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(16, 19, 26, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}
.brand .dots {
  display: inline-flex;
  gap: 5px;
}
.brand .dots span {
  width: 8px; height: 8px; border-radius: 50%;
}
.brand .dots span:nth-child(1) { background: #ec6a5e; }
.brand .dots span:nth-child(2) { background: #f4bf4f; }
.brand .dots span:nth-child(3) { background: #61c454; }
.brand small {
  color: var(--text-faint);
  font-weight: 500;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.nav a:hover { color: var(--text); background: var(--bg-panel-raised); }
.nav a.active { color: var(--cyan); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  padding: 7px 10px;
  font-family: var(--font-mono);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s, border-color 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--amber);
  color: #1a1406;
}
.btn-primary:hover { background: #f2c680; }
.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ==========================================================================
   Hero — the "editor window" signature element
   ========================================================================== */
.hero {
  padding: 64px 0 40px;
}
.editor-window {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-panel);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.6);
}
.editor-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-panel-raised);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
}
.editor-titlebar .dots span {
  width: 9px; height: 9px; border-radius: 50%; display: inline-block;
}
.editor-titlebar .dots { display: inline-flex; gap: 6px; margin-right: 10px; }
.editor-titlebar .dots span:nth-child(1) { background: #ec6a5e; }
.editor-titlebar .dots span:nth-child(2) { background: #f4bf4f; }
.editor-titlebar .dots span:nth-child(3) { background: #61c454; }

.editor-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 860px) {
  .editor-body { grid-template-columns: 1.15fr 1fr; }
}
.editor-code {
  padding: 28px 24px 28px 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.85;
  display: flex;
  border-right: 1px solid var(--line-soft);
  overflow-x: auto;
}
.editor-gutter {
  width: var(--gutter-w);
  text-align: right;
  padding-right: 14px;
  padding-left: 16px;
  color: var(--text-faint);
  user-select: none;
  flex-shrink: 0;
}
.editor-gutter div { height: 26.9px; }
.editor-code pre {
  margin: 0;
  white-space: pre-wrap;
}
.tok-kw { color: var(--magenta); }
.tok-str { color: var(--amber); }
.tok-fn { color: var(--cyan); }
.tok-cmt { color: var(--text-faint); font-style: italic; }
.tok-num { color: var(--green); }
.tok-text { color: var(--text); }

.hero-caret {
  display: inline-block;
  width: 8px; height: 18px;
  background: var(--cyan);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.editor-preview {
  background: repeating-linear-gradient(
    0deg, var(--bg) 0px, var(--bg) 27px, var(--line-soft) 27px, var(--line-soft) 28px
  ), repeating-linear-gradient(
    90deg, var(--bg) 0px, var(--bg) 27px, var(--line-soft) 27px, var(--line-soft) 28px
  );
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
}
.preview-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}
.preview-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.sprite {
  width: 46px; height: 46px;
  background: var(--amber);
  border-radius: 6px;
  position: relative;
  animation: hop 2.2s ease-in-out infinite;
  box-shadow: 0 0 0 3px rgba(234,184,104,0.15);
}
.sprite::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -10px;
  width: 34px; height: 8px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.35), transparent 70%);
}
@keyframes hop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-34px); }
}
.preview-hud {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}

.hero-copy {
  max-width: 620px;
  margin: 0 auto 34px;
  text-align: left;
}
.hero-title {
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 16px;
}
.hero-title .accent { color: var(--cyan); }
.hero-sub {
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--text-dim);
  max-width: 540px;
  margin-bottom: 26px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head {
  max-width: 620px;
  margin-bottom: 40px;
}
.section-title {
  font-size: clamp(24px, 3vw, 32px);
  color: var(--text);
}
.section-sub {
  font-family: var(--font-sans);
  color: var(--text-dim);
  margin-top: 12px;
  font-size: 15.5px;
}

.divider {
  height: 1px;
  background: var(--line);
  border: none;
  margin: 0;
}

/* ---------- About / mission strip ---------- */
.mission {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-panel);
}
.mission .container { padding-top: 56px; padding-bottom: 56px; }
.mission-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .mission-grid { grid-template-columns: 0.9fr 1.1fr; }
}
.mission-text {
  font-size: 18px;
  color: var(--text);
  line-height: 1.65;
}
.mission-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-content: start;
}
.stat {
  font-family: var(--font-mono);
  border-left: 2px solid var(--cyan);
  padding-left: 14px;
}
.stat .num { font-size: 26px; color: var(--text); display: block; }
.stat .label { font-size: 12.5px; color: var(--text-faint); }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}
.product-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s, transform 0.15s;
  position: relative;
}
.product-card:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
}
.product-card .file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
}
.product-card .file-row .ext {
  background: var(--bg-panel-raised);
  padding: 2px 7px;
  border-radius: 3px;
  color: var(--amber);
}
.product-card h3 {
  font-size: 18px;
  color: var(--text);
}
.product-card .tagline {
  font-family: var(--font-sans);
  color: var(--text-dim);
  font-size: 14px;
  flex: 1;
}
.product-card .price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--font-mono);
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}
.product-card .price {
  color: var(--green);
  font-size: 15px;
}
.product-card .price::before { content: "$ "; color: var(--text-faint); }
.product-card .go {
  font-size: 13px;
  color: var(--cyan);
}

/* ---------- Benefits ---------- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.benefit {
  background: var(--bg-panel);
  padding: 26px 22px;
}
.benefit .icon {
  font-family: var(--font-mono);
  color: var(--magenta);
  font-size: 13px;
  margin-bottom: 14px;
}
.benefit h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--text);
}
.benefit p {
  font-family: var(--font-sans);
  color: var(--text-dim);
  font-size: 14.5px;
}

/* ---------- FAQ (console log style) ---------- */
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  text-align: left;
  padding: 20px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 15px;
}
.faq-q::before {
  content: ">";
  color: var(--green);
  margin-right: 10px;
}
.faq-q .plus {
  color: var(--text-faint);
  font-size: 18px;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq-item[open] .faq-q .plus { transform: rotate(45deg); color: var(--cyan); }
.faq-a {
  padding: 0 4px 22px 24px;
  color: var(--text-dim);
  font-family: var(--font-sans);
  font-size: 15px;
  max-width: 640px;
}
.faq-item summary { list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
  background: var(--bg-panel);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  margin-bottom: 32px;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}
.footer-brand p {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 10px;
  max-width: 320px;
}
.footer-col h4 {
  font-size: 12.5px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col a {
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--cyan); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

/* ==========================================================================
   Product page
   ========================================================================== */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  padding: 22px 0 0;
}
.breadcrumbs a { color: var(--text-dim); }
.breadcrumbs a:hover { color: var(--cyan); }

.product-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding: 36px 0 80px;
}
@media (min-width: 900px) {
  .product-layout { grid-template-columns: 1fr 360px; align-items: start; }
}

.product-header .index-tag {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 13px;
  margin-bottom: 10px;
  display: block;
}
.product-title {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 12px;
}
.product-tagline {
  font-family: var(--font-sans);
  color: var(--text-dim);
  font-size: 17px;
  margin-bottom: 28px;
}

.product-block {
  margin-bottom: 34px;
}
.product-block h2 {
  font-size: 14px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.product-block h2::before { content: "// "; color: var(--green); }
.product-block p {
  font-family: var(--font-sans);
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.75;
}

.module-list li {
  font-family: var(--font-mono);
  font-size: 14.5px;
  color: var(--text);
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  gap: 12px;
}
.module-list li .n {
  color: var(--text-faint);
  flex-shrink: 0;
}
.module-list li:last-child { border-bottom: none; }

.buy-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  position: sticky;
  top: 76px;
}
.buy-card .price-line {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.buy-card .price-big {
  font-family: var(--font-mono);
  font-size: 32px;
  color: var(--green);
  margin-bottom: 4px;
}
.buy-card .price-exact {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  margin-bottom: 20px;
}
.buy-card .meta-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  padding: 10px 0;
  border-top: 1px dashed var(--line);
}
.buy-card .meta-row:first-of-type { border-top: none; }

/* ==========================================================================
   Loading page
   ========================================================================== */
.loading-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.loading-panel {
  width: 100%;
  max-width: 420px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 36px 30px;
  text-align: center;
}
.spinner {
  width: 44px; height: 44px;
  margin: 0 auto 24px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--cyan);
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-panel h1 {
  font-size: 17px;
  color: var(--text);
  margin-bottom: 8px;
}
.loading-panel p {
  font-family: var(--font-sans);
  color: var(--text-dim);
  font-size: 14px;
}
.loading-log {
  margin-top: 22px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 12px 14px;
  min-height: 66px;
}
.loading-log div { margin-bottom: 4px; }
.loading-log .ok { color: var(--green); }
.loading-fallback {
  margin-top: 20px;
  display: none;
}
.loading-fallback.show { display: block; }

/* ==========================================================================
   Simple pages (about, contact, legal)
   ========================================================================== */
.page-hero {
  padding: 56px 0 20px;
}
.page-hero .eyebrow { margin-bottom: 12px; }
.page-hero h1 {
  font-size: clamp(28px, 4vw, 40px);
}
.prose {
  max-width: 720px;
  padding-bottom: 72px;
}
.prose h2 {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--text);
  margin: 34px 0 12px;
}
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li {
  font-family: var(--font-sans);
  color: var(--text-dim);
  font-size: 15.5px;
  line-height: 1.8;
  margin-bottom: 14px;
}
.prose ul { margin-bottom: 14px; }
.prose li { position: relative; padding-left: 20px; margin-bottom: 8px; }
.prose li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--cyan);
}
.prose strong { color: var(--text); }
.prose a { color: var(--cyan); border-bottom: 1px solid transparent; }
.prose a:hover { border-bottom-color: var(--cyan); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 72px;
}
@media (min-width: 760px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
.contact-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
}
.contact-card .row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 14px;
}
.contact-card .row:last-child { border-bottom: none; }
.contact-card .row span:first-child { color: var(--text-faint); }
.contact-card .row a, .contact-card .row span:last-child { color: var(--text); }

/* ---------- 404 / empty states ---------- */
.empty-state {
  text-align: center;
  padding: 90px 20px;
}
.empty-state h1 {
  font-size: 22px;
  margin-bottom: 10px;
}
.empty-state p {
  font-family: var(--font-sans);
  color: var(--text-dim);
  margin-bottom: 22px;
}

/* ---------- Responsive nav ---------- */
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav {
    position: absolute;
    top: 56px; left: 0; right: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .hero-copy { text-align: left; }
}
