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

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

html {
  font-size: 16px;
  background: #000;
  color: #fff;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  background: #000;
  color: #fff;
  overflow-x: hidden;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a {
  color: #00ff80;
  text-decoration: none;
  transition: none;
}

a:hover {
  color: #fff;
  background: #00ff80;
}

p {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

/* ── Site Header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #000;
  border-bottom: 3px solid #00ff80;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 56px;
}

.brand-logo {
  font-size: 1rem;
  font-weight: 700;
  color: #00ff80;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: none;
}

.brand-logo:hover {
  color: #000;
  background: #00ff80;
}

/* ── Menu Toggle ── */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 2px solid #00ff80;
  cursor: pointer;
  padding: 8px;
}

.menu-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: #00ff80;
}

/* ── Fullscreen Nav ── */
.fullscreen-nav {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  border: 4px solid #00ff80;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 3rem;
  transform: translateX(100%);
  visibility: hidden;
  transition: none;
}

.fullscreen-nav.is-open {
  transform: translateX(0);
  visibility: visible;
}

.fullscreen-nav nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.nav-link {
  display: block;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: #fff;
  border-bottom: 2px solid #0000ff;
  padding: 1rem 0;
  text-transform: none;
  background: none;
  letter-spacing: -0.01em;
}

.nav-link:hover {
  color: #000;
  background: #00ff80;
  padding-left: 1rem;
}

.nav-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background: #0000ff;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-close:hover {
  background: #00ff80;
  color: #000;
}

/* ── Page offset for fixed header ── */
article {
  margin-top: 56px;
}

/* ── Eyebrow Labels ── */
.section-eyebrow,
.faq-eyebrow,
.about-eyebrow,
.privacy-eyebrow,
.changelog-eyebrow,
.guide-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #000;
  background: #00ff80;
  padding: 2px 8px;
  margin-bottom: 1rem;
}

/* ── HOME Layout ── */
.page-home {
  min-height: 100vh;
}

.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 5rem 1.5rem 3rem;
  border-bottom: 3px solid #0000ff;
  background: #000;
  position: relative;
  overflow: hidden;
}

.hero-text {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
}

.hero-h1 {
  font-size: clamp(2rem, 7vw, 5rem);
  font-weight: 700;
  color: #00ff80;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  border-left: 8px solid #0000ff;
  padding-left: 1rem;
  text-align: left;
}

.hero-sub {
  font-size: 1.1rem;
  color: #ccc;
  margin-bottom: 2rem;
  text-align: left;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-media {
  width: 100%;
  max-width: 700px;
  margin-top: 2rem;
  border: 3px solid #0000ff;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-placeholder {
  height: 200px;
  background: #0000ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #00ff80;
  letter-spacing: 0.1em;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #00ff80;
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  border: 3px solid #00ff80;
  cursor: pointer;
  min-height: 44px;
  line-height: 1.4;
}

.btn-primary:hover {
  background: #000;
  color: #00ff80;
}

.btn-ghost {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #000;
  color: #00ff80;
  font-weight: 700;
  font-size: 1rem;
  border: 3px solid #00ff80;
  cursor: pointer;
  min-height: 44px;
  line-height: 1.4;
}

.btn-ghost:hover {
  background: #00ff80;
  color: #000;
}

/* ── Content Section ── */
.content-section {
  padding: 3rem 1.5rem;
  border-bottom: 2px solid #222;
  max-width: 900px;
  margin: 0 auto;
}

/* ── Index Table ── */
.index-section {
  padding: 3rem 1.5rem;
  border-bottom: 2px solid #222;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.index-table {
  width: 100%;
  border-collapse: collapse;
  border: 3px solid #0000ff;
  font-size: 0.9375rem;
}

.index-table th {
  background: #0000ff;
  color: #fff;
  font-weight: 700;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid #0000ff;
}

.index-table td {
  padding: 0.75rem 1rem;
  border: 1px solid #222;
  vertical-align: top;
}

.index-table tbody tr:nth-child(odd) {
  background: #0a0a0a;
}

.index-table tbody tr:nth-child(even) {
  background: #111;
}

.index-table tbody tr:hover {
  background: #0000ff;
}

.index-table tbody tr:hover a {
  color: #00ff80;
  background: none;
}

.tbl-num {
  font-family: 'Inter', monospace;
  font-weight: 700;
  color: #00ff80;
  font-size: 0.875rem;
  white-space: nowrap;
  width: 3rem;
}

.tbl-title a {
  color: #fff;
  font-weight: 600;
}

.tbl-title a:hover {
  color: #000;
  background: #00ff80;
}

.tbl-desc {
  color: #aaa;
  font-size: 0.875rem;
}

.tbl-date {
  color: #666;
  font-size: 0.8125rem;
  white-space: nowrap;
}

/* ── Quick Links ── */
.quicklinks-section {
  padding: 3rem 1.5rem;
  border-bottom: 2px solid #222;
}

.quicklinks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  border: 3px solid #0000ff;
  margin-top: 1.5rem;
}

.ql-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 2rem 1.5rem;
  border-right: 3px solid #0000ff;
  background: #000;
  color: #fff;
}

.ql-block:last-child {
  border-right: none;
}

.ql-block:hover {
  background: #0000ff;
}

.ql-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #00ff80;
}

.ql-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

/* ── Prose Block ── */
.prose-block {
  font-size: 1rem;
  line-height: 1.8;
  color: #e0e0e0;
  max-width: 720px;
}

.prose-block h2 {
  font-size: 1.5rem;
  color: #00ff80;
  margin: 2rem 0 0.75rem;
  border-left: 5px solid #0000ff;
  padding-left: 0.75rem;
}

.prose-block h3 {
  font-size: 1.2rem;
  color: #fff;
  margin: 1.5rem 0 0.5rem;
  border-left: 3px solid #00ff80;
  padding-left: 0.6rem;
}

.prose-block p {
  margin-bottom: 1.25rem;
}

.prose-block ul,
.prose-block ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.prose-block li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.prose-block strong {
  color: #00ff80;
  font-weight: 700;
}

.prose-block em {
  color: #aaa;
}

.prose-block blockquote {
  border-left: 4px solid #0000ff;
  padding: 0.75rem 1.25rem;
  background: #0a0a0a;
  color: #ccc;
  margin: 1.5rem 0;
}

.prose-block a {
  color: #00ff80;
  border-bottom: 1px solid #00ff80;
}

.prose-block a:hover {
  color: #000;
  background: #00ff80;
}

.prose-block table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.prose-block table th {
  background: #0000ff;
  color: #fff;
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 700;
}

.prose-block table td {
  padding: 0.6rem 1rem;
  border: 1px solid #222;
}

.prose-block table tr:nth-child(even) {
  background: #0a0a0a;
}

/* ── Dates ── */
.pub-date,
.mod-date {
  display: inline-block;
  font-size: 0.8125rem;
  color: #666;
  letter-spacing: 0.05em;
  margin-right: 1rem;
}

/* ── GUIDE Layout ── */
.page-guide {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 56px);
  border-top: none;
}

.guide-sidebar {
  background: #0a0a0a;
  border-right: 3px solid #0000ff;
  padding: 2rem 0;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}

.sidebar-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #666;
  padding: 0 1.25rem 1rem;
  border-bottom: 2px solid #222;
  margin-bottom: 0.5rem;
}

.sidebar-link {
  display: block;
  padding: 0.7rem 1.25rem;
  color: #aaa;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid #111;
  background: none;
  min-height: 40px;
  line-height: 1.4;
}

.sidebar-link:hover {
  color: #000;
  background: #00ff80;
}

.sidebar-link.active {
  color: #00ff80;
  background: #0d0d0d;
  border-left: 4px solid #00ff80;
  padding-left: calc(1.25rem - 4px);
  font-weight: 700;
}

.sidebar-divider {
  height: 3px;
  background: #0000ff;
  margin: 1rem 0;
}

.guide-main {
  padding: 3rem 2.5rem;
  max-width: 800px;
}

.guide-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.guide-h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  color: #00ff80;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  border-left: 6px solid #0000ff;
  padding-left: 1rem;
}

.guide-desc {
  font-size: 1.1rem;
  color: #aaa;
  margin-bottom: 2.5rem;
  line-height: 1.65;
}

.guide-hero {
  margin-bottom: 2rem;
  border: 3px solid #0000ff;
  overflow: hidden;
}

.guide-hero-img {
  width: 100%;
  height: auto;
  display: block;
}

.guide-body {
  margin-bottom: 3rem;
}

.guide-nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 2px solid #222;
}

/* ── FAQ Layout ── */
.page-faq {
  max-width: 820px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.faq-header-block {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 3px solid #0000ff;
}

.faq-h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  color: #00ff80;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.faq-desc {
  font-size: 1.1rem;
  color: #aaa;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.faq-body {
  margin-bottom: 3rem;
}

.faq-related {
  padding: 2rem 0;
  border-top: 2px solid #222;
}

.faq-related-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1rem;
  border: 3px solid #0000ff;
}

.faq-related-link {
  display: block;
  padding: 1rem 1.25rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  border-bottom: 2px solid #0000ff;
  background: #000;
  min-height: 44px;
}

.faq-related-link:last-child {
  border-bottom: none;
}

.faq-related-link:hover {
  background: #0000ff;
  color: #00ff80;
}

.faq-back {
  margin-top: 2.5rem;
}

/* ── ABOUT Layout ── */
.page-about {
  max-width: 820px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.about-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 3px solid #00ff80;
}

.about-h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.about-accent-bar {
  width: 60px;
  height: 8px;
  background: #0000ff;
  margin-bottom: 2rem;
}

.about-body {
  margin-bottom: 3rem;
}

.about-links {
  padding-top: 2rem;
  border-top: 2px solid #222;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── PRIVACY Layout ── */
.page-privacy {
  max-width: 820px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.privacy-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 3px solid #222;
}

.privacy-h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.privacy-body {
  margin-bottom: 3rem;
}

.privacy-back {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 2px solid #222;
}

/* ── CHANGELOG Layout ── */
.page-changelog {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.changelog-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 3px solid #0000ff;
}

.changelog-h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  color: #00ff80;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.changelog-body {
  margin-bottom: 3rem;
}

.changelog-index {
  margin-bottom: 3rem;
}

.changelog-back {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 2px solid #222;
}

/* ── DEFAULT Layout ── */
.page-default {
  max-width: 820px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.default-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 3px solid #222;
}

.default-h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  color: #00ff80;
  margin-bottom: 1rem;
}

.default-desc {
  font-size: 1.05rem;
  color: #aaa;
  line-height: 1.65;
}

.default-body {
  margin-bottom: 3rem;
}

.default-back {
  padding-top: 2rem;
  border-top: 2px solid #222;
}

/* ── Footer ── */
.site-footer {
  border-top: 3px solid #00ff80;
  background: #000;
  padding: 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  font-size: 0.875rem;
}

.footer-brand {
  font-weight: 700;
  color: #00ff80;
  letter-spacing: 0.05em;
}

.footer-sep {
  color: #333;
}

.footer-link {
  color: #aaa;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.25rem;
}

.footer-link:hover {
  color: #000;
  background: #00ff80;
}

/* ── Stagger Animation ── */
@media (prefers-reduced-motion: no-preference) {
  .index-table tbody tr {
    opacity: 0;
    transform: translateY(16px);
    animation: staggerIn 0.3s ease forwards;
  }

  .index-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
  .index-table tbody tr:nth-child(2) { animation-delay: 0.10s; }
  .index-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
  .index-table tbody tr:nth-child(4) { animation-delay: 0.20s; }
  .index-table tbody tr:nth-child(5) { animation-delay: 0.25s; }
  .index-table tbody tr:nth-child(6) { animation-delay: 0.30s; }

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

  .ql-block {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerIn 0.35s ease forwards;
  }

  .ql-block:nth-child(1) { animation-delay: 0.1s; }
  .ql-block:nth-child(2) { animation-delay: 0.2s; }

  .hero-h1 {
    opacity: 0;
    transform: translateY(-20px);
    animation: staggerIn 0.4s ease 0.05s forwards;
  }

  .hero-sub {
    opacity: 0;
    transform: translateY(10px);
    animation: staggerIn 0.35s ease 0.2s forwards;
  }

  .hero-cta {
    opacity: 0;
    animation: staggerIn 0.3s ease 0.35s forwards;
  }

  .hero-media {
    opacity: 0;
    animation: staggerIn 0.4s ease 0.45s forwards;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .page-guide {
    display: block;
  }

  .guide-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 3px solid #0000ff;
  }

  .guide-main {
    padding: 2rem 1.25rem;
  }

  .hero-section {
    padding: 3rem 1.25rem 2rem;
  }

  .hero-h1 {
    font-size: clamp(1.75rem, 8vw, 3rem);
  }

  .content-section,
  .index-section,
  .quicklinks-section {
    padding: 2rem 1.25rem;
  }

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

  .ql-block {
    border-right: none;
    border-bottom: 3px solid #0000ff;
  }

  .ql-block:last-child {
    border-bottom: none;
  }

  .tbl-desc {
    display: none;
  }

  .page-faq,
  .page-about,
  .page-privacy,
  .page-changelog,
  .page-default {
    padding: 2.5rem 1.25rem;
  }

  .faq-related-links {
    gap: 0;
  }

  .fullscreen-nav {
    padding: 4rem 1.5rem;
  }

  .nav-link {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 0 1rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    text-align: center;
  }

  .guide-nav-links {
    flex-direction: column;
  }

  .about-links {
    flex-direction: column;
  }

  .privacy-back {
    flex-direction: column;
  }

  .changelog-back {
    flex-direction: column;
  }
}
