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

:root {
  --accent: #ff6b00;
  --nav-bg: #0d0d0d;
  --canvas: #141414;
  --card-bg: #1e1e1e;
  --text: #f0f0f0;
  --text-muted: #8a8a8a;
  --border: rgba(255,255,255,0.08);
  --font-heading: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', sans-serif;
  --nav-h: 56px;
  --content-max: 820px;
  --radius: 6px;
  --transition: 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--canvas);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

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

a { color: var(--accent); text-decoration: none; transition: color var(--transition), opacity var(--transition); }
a:hover { opacity: 0.85; }

/* Progress bar */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* Navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--nav-bg);
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav-logo:hover { opacity: 1; color: #fff; }

.nav-links {
  display: none;
  list-style: none;
  gap: 1.75rem;
  align-items: center;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover, .nav-links a.active { color: #fff; }

.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  transition: var(--transition);
}

.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 1.25rem 1rem;
}

.nav-mobile.open { display: flex; flex-direction: column; gap: 0.25rem; }

.nav-mobile a {
  color: rgba(255,255,255,0.85);
  padding: 0.65rem 0;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-hamburger { display: none; }
  .nav-mobile { display: none !important; }
}

/* Hero — index */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 2rem) 1.25rem 4rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
}


.hero::before {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 80px),
    linear-gradient(165deg, #0d0d0d 0%, var(--canvas) 55%, #1a1208 100%);
}
.hero-display { letter-spacing: 0.02em; text-transform: uppercase; font-weight: 800; }
.topic-card { border-radius: 0; border-top-width: 3px; }
.nav-logo { letter-spacing: 0.08em; font-size: 0.8rem; }
.article-chapter { text-transform: uppercase; letter-spacing: 0.06em; }


.hero-content {
  position: relative;
  z-index: 1;
  max-width: 960px;
  text-align: center;
}

.hero-display {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 700;
  color: #fff;
  line-height: 0.95;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero-divider {
  width: 64px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto 2.5rem;
}

.hero-cta {
  display: inline-block;
  text-align: left;
  max-width: 520px;
  padding: 1.5rem 1.75rem;
  background: var(--card-bg);
  border-left: 3px solid var(--accent);
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  opacity: 1;
}

.hero-cta-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}

.hero-cta h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.hero-cta p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.hero-cta-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
}

/* Topics section */
.topics-section {
  padding: 4rem 1.25rem 5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.topics-header {
  margin-bottom: 2rem;
}

.topics-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: #fff;
  margin-bottom: 0.5rem;
}

.topics-header p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.topics-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.topics-scroll::-webkit-scrollbar { height: 4px; }
.topics-scroll::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

.topic-card {
  flex: 0 0 min(85vw, 320px);
  scroll-snap-align: start;
  background: var(--card-bg);
  border-top: 3px solid var(--accent);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
}

.topic-card:hover { opacity: 1; color: inherit; }

.topic-card-cat {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}

.topic-card h3 {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.topic-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.topic-card-more {
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 500;
}

@media (min-width: 900px) {
  .topics-scroll {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    gap: 1.25rem;
  }
  .topic-card { flex: unset; }
}

/* Article pages */
.article-header {
  padding: calc(var(--nav-h) + 3rem) 1.25rem 2.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.article-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
}

.reading-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-cat {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.6875rem;
}

.article-chapter {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  color: #fff;
  max-width: var(--content-max);
  margin: 0 auto 1rem;
  line-height: 1.15;
}

.article-lead {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.breadcrumb {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 0.4rem; opacity: 0.4; }

.article-wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.article-body h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: #fff;
  margin: 2.5rem 0 1rem;
}

.article-body h3 {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  color: #fff;
  margin: 2rem 0 0.75rem;
}

.article-body p {
  margin-bottom: 1.25rem;
  color: rgba(240,240,240,0.88);
}

.article-body ul, .article-body ol {
  margin: 0 0 1.25rem 1.25rem;
  color: rgba(240,240,240,0.88);
}

.article-body li { margin-bottom: 0.5rem; }

.callout {
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  background: rgba(255,255,255,0.03);
}

.callout strong {
  display: block;
  color: var(--accent);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.callout p { margin: 0; font-size: 0.9375rem; }

.article-figure {
  margin: 2rem 0;
}

.article-figure img {
  width: 100%;
  border-radius: var(--radius);
  opacity: 0.92;
}

.article-figure figcaption {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border);
}

/* FAQ accordion */
.faq-list { margin: 1.5rem 0 2rem; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  background: var(--card-bg);
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 500;
  color: #fff;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 300;
  transition: transform var(--transition);
}

.faq-item[open] summary::after { content: '−'; }

.faq-body {
  padding: 0 1.25rem 1rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.faq-body p { margin: 0; }

/* Related */
.related-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.related-section h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 1.25rem;
}

.related-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}

.related-card {
  background: var(--card-bg);
  border-top: 2px solid var(--accent);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition);
}

.related-card:hover { transform: translateY(-2px); opacity: 1; color: inherit; }

.related-card-cat {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}

.related-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.related-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

/* Legal */
.legal-page {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3rem) 1.25rem 4rem;
}

.legal-page h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.legal-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.legal-page h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #fff;
  margin: 2rem 0 0.75rem;
}

.legal-page h3 {
  font-size: 1rem;
  color: #fff;
  margin: 1.5rem 0 0.5rem;
}

.legal-page p, .legal-page li {
  color: rgba(240,240,240,0.85);
  margin-bottom: 1rem;
}

.legal-page ul { margin-left: 1.25rem; }

.legal-data-box {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.03);
  margin: 1.5rem 0;
}

/* Footer */
.site-footer {
  background: var(--nav-bg);
  border-top: 1px solid var(--border);
  padding: 3rem 1.25rem 0;
}

.footer-inner { max-width: 1280px; margin: 0 auto; }

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.75rem;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 0.4rem; }

.footer-col a {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
}

.footer-col a:hover { color: var(--accent); opacity: 1; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-bottom a { color: var(--text-muted); text-decoration: underline; }

/* Cookie banner */
.cookie-banner {display: none; /* hidden by default, JS shows it */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 950;
  background: rgba(10,10,10,0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 1.25rem;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.cookie-banner.visible {display: flex;
  align-items: flex-start;
  transform: translateY(0); }

.cookie-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .cookie-banner-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cookie-banner-text p {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.cookie-banner-text a { color: var(--accent); }

.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-btn-accept {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: opacity var(--transition);
}

.cookie-btn-accept:hover { opacity: 0.9; }

.cookie-btn-reject {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0.6rem 1rem;
  font-size: 0.8125rem;
  cursor: pointer;
  text-decoration: underline;
}

/* Back to top */
#back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
  z-index: 800;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover { transform: translateY(-3px); }
