/* ==============================================
   Lakona — Marketing Landing Page
   Premium gold-on-dark. Minimal. Code-aware.
   ============================================== */

/* -- Design Tokens ----------------------------------------------- */
:root {
  --bg: #090806;
  --panel: #14120e;
  --ink: #f6edd8;
  --muted: #b8ad95;
  --accent: #d6a93a;
  --accent-light: #f1d38a;
  --border: rgba(214, 169, 58, 0.24);
  --border-subtle: rgba(214, 169, 58, 0.10);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  --radius: 18px;
  --radius-sm: 12px;
}

/* -- Reset -------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* -- Base --------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 169, 58, 0.10), transparent 48rem),
    radial-gradient(circle at 80% 30%, rgba(214, 169, 58, 0.04), transparent 32rem),
    linear-gradient(180deg, #110e08 0%, var(--bg) 100%);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.7;
  font-size: 1.125rem;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-light);
}

/* -- Layout ------------------------------------------------------- */
.wrap {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
}

/* -- Navigation --------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(9, 8, 6, 0.78);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header.scrolled {
  background: rgba(9, 8, 6, 0.92);
  border-bottom-color: var(--border);
}

.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  gap: 16px;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.brand:hover {
  color: var(--ink);
}

.nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--accent-light);
}

/* -- Hero Section ------------------------------------------------- */
.hero {
  text-align: center;
  padding: 80px 24px 72px;
  position: relative;
  overflow: hidden;
}

/* Abstract SVG node graph — background layer */
.hero-graph {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-graph .node {
  fill: none;
  stroke: var(--accent);
  animation: nodePulse 3s ease-in-out infinite;
}

.hero-graph .node:nth-child(2) { animation-delay: 0.6s; }
.hero-graph .node:nth-child(3) { animation-delay: 1.2s; }
.hero-graph .node:nth-child(4) { animation-delay: 0.3s; }
.hero-graph .node:nth-child(5) { animation-delay: 0.9s; }

.hero-graph .edge {
  stroke: var(--accent);
  opacity: 0.15;
}

.hero-graph .dot {
  fill: var(--accent-light);
  animation: nodePulse 3s ease-in-out infinite;
}

.hero-graph .dot:nth-child(odd) { animation-delay: 0.4s; }
.hero-graph .dot:nth-child(even) { animation-delay: 1.0s; }

.hero .eyebrow {
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero .lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* -- Buttons ------------------------------------------------------ */
.button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.button:hover {
  transform: scale(1.03);
  border-color: var(--accent);
  color: var(--ink);
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #171107;
  border-color: rgba(241, 211, 138, 0.48);
}

.button.primary:hover {
  box-shadow: 0 0 28px rgba(214, 169, 58, 0.35);
  transform: scale(1.03);
}

/* -- Section Headings --------------------------------------------- */
.section-label {
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  text-align: center;
  margin-bottom: 8px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-light);
  text-align: center;
  margin-bottom: 36px;
  letter-spacing: -0.01em;
}

/* -- Features Grid ------------------------------------------------ */
.features {
  padding: 72px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  transform: translateY(24px);
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.4);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* -- Code Showcase ------------------------------------------------- */
.code-showcase {
  padding: 72px 0;
}

.code-window {
  background: #050504;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 0 auto;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.code-window.visible {
  opacity: 1;
  transform: translateX(0);
}

.code-chrome {
  background: rgba(20, 18, 14, 0.8);
  padding: 10px 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.code-chrome .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red  { background: #ff5f56; }
.dot-yel  { background: #ffbd2e; }
.dot-grn  { background: #27c93f; }

.code-chrome .filename {
  margin-left: 8px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.75rem;
}

.code-body {
  padding: 20px 24px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
}

/* GitHub-dark-inspired syntax colors */
.code-body .c  { color: #8b949e; font-style: italic; }  /* comment */
.code-body .k  { color: #ff7b72; }                        /* keyword */
.code-body .nc { color: #f0883e; font-weight: 700; }       /* type name */
.code-body .nf { color: #d2a8ff; font-weight: 700; }       /* function */
.code-body .s  { color: #a5d6ff; }                        /* string */
.code-body .kt { color: #ff7b72; }                        /* keyword type */
.code-body .na { color: #79c0ff; }                        /* attribute */
.code-body .nl { color: #79c0ff; font-weight: 700; }       /* label */

/* Cursor blink */
.code-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent-light);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: cursorBlink 0.9s step-end infinite;
}

/* -- Guides Section ----------------------------------------------- */
.guides {
  padding: 72px 0;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}

.guide-card {
  background: var(--panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  transform: translateY(24px);
}

.guide-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.guide-card:hover {
  transform: translateY(-4px);
  border-color: var(--border);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.4);
}

.guide-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.guide-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 6px;
}

.guide-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.guide-card .arrow {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.guide-card:hover .arrow {
  color: var(--accent-light);
}

/* -- Footer ------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0;
  text-align: center;
}

.site-footer .brand {
  font-size: 1.1rem;
  margin-bottom: 8px;
  display: block;
}

.site-footer .muted {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  font-size: 0.85rem;
}

.footer-links a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-light);
}

/* -- About Page --------------------------------------------------- */
.article {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  margin: 40px 0 80px;
}

.article .article-header {
  margin-bottom: 24px;
}

.article .article-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: -0.01em;
}

.article .content {
  color: var(--ink);
  line-height: 1.8;
}

.article .content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-light);
  margin-top: 28px;
  margin-bottom: 10px;
}

.article .content p {
  margin-bottom: 12px;
}

.article .content ul,
.article .content ol {
  margin: 0 0 16px 22px;
}

.article .content li {
  margin-bottom: 8px;
}

.article .content strong {
  color: var(--accent-light);
}

.article .content code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
  color: var(--accent-light);
}

.article .content pre {
  background: #050504;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 16px 0;
  overflow-x: auto;
}

.article .content pre code {
  color: var(--ink);
}

/* -- Rich Article Components -------------------------------------- */
.article-hero-panel,
.workspace-map {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, rgba(214, 169, 58, 0.14), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 8px 0 28px;
}

.article-kicker,
.command-label {
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin-bottom: 8px;
}

.article-hero-copy {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink);
  max-width: 34rem;
}

.mini-tree,
.file-tree,
.command-card pre,
.engine-card pre {
  font-family: "SFMono-Regular", Consolas, monospace;
}

.mini-tree {
  display: grid;
  gap: 6px;
  background: rgba(5, 5, 4, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 18px;
  color: var(--accent-light);
  font-size: 0.86rem;
}

.mini-tree .indent {
  padding-left: 18px;
  color: var(--ink);
}

.mini-tree em {
  color: var(--muted);
  font-style: normal;
}

.journey-steps,
.requirement-grid,
.engine-grid,
.edit-grid,
.outcome-grid {
  display: grid;
  gap: 14px;
  margin: 20px 0 28px;
}

.journey-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.requirement-grid,
.engine-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.edit-grid,
.outcome-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.journey-step,
.requirement-card,
.engine-card,
.edit-grid > div,
.outcome-grid > div,
.command-card,
.notice-card {
  background: rgba(20, 18, 14, 0.82);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.journey-step,
.requirement-card,
.engine-card,
.edit-grid > div,
.outcome-grid > div {
  padding: 18px;
}

.journey-step h3,
.requirement-card h3,
.engine-card h3,
.outcome-grid h3 {
  color: var(--accent-light);
  font-size: 1rem;
  margin-bottom: 6px;
}

.journey-step p,
.requirement-card p,
.engine-card p,
.edit-grid p,
.outcome-grid p,
.notice-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 0;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--accent);
  color: #171107;
  font-weight: 700;
  font-size: 0.85rem;
}

.command-card {
  position: relative;
  padding: 14px 16px 16px;
  margin: 14px 0 20px;
}

.engine-card {
  position: relative;
}

.command-card.primary-command {
  border-color: var(--border);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.article .content .command-card pre,
.article .content .engine-card pre,
.article .content .file-tree {
  margin: 0;
  background: #050504;
  border: 1px solid var(--border-subtle);
}

.article .content .command-card pre {
  padding: 14px;
}

.copy-button {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 64px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(5, 5, 4, 0.84);
  color: var(--accent-light);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.copy-button:hover {
  background: rgba(214, 169, 58, 0.16);
  border-color: var(--accent);
  color: var(--ink);
}

.engine-card pre,
.file-tree {
  margin-top: 14px;
  font-size: 0.78rem;
  line-height: 1.65;
}

.notice-card {
  border-color: rgba(214, 169, 58, 0.32);
  padding: 14px;
  margin-top: 14px;
}

.notice-card strong,
.edit-grid strong {
  color: var(--accent-light);
}

.workspace-map {
  grid-template-columns: minmax(0, 0.8fr) minmax(340px, 1.2fr);
}

/* -- Keyframe Animations ------------------------------------------ */
@keyframes nodePulse {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 0.65; }
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* -- Reduced Motion ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .feature-card,
  .guide-card,
  .code-window {
    opacity: 1;
    transform: none;
  }
}

/* -- Responsive --------------------------------------------------- */
@media (max-width: 800px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .guides-grid {
    grid-template-columns: 1fr;
  }

  .article-hero-panel,
  .workspace-map,
  .journey-steps,
  .requirement-grid,
  .engine-grid,
  .edit-grid,
  .outcome-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 48px 16px 48px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 500px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .site-header .wrap {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
  }

  .article {
    padding: 24px;
  }
}
