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

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: #0D0D0D;
  color: #F0F0F0;
}

body.dark-body {
  font-family: 'Karla', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  background: #0D0D0D;
  color: #F0F0F0;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===== DOT GRID BACKGROUND ===== */
.dot-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,107,43,0.18) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.5;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #0D0D0D; }
::-webkit-scrollbar-thumb { background: #FF6B2B; border-radius: 2px; }

/* ===== ASIDE NAV (structural: aside > nav > ul > li > a) ===== */
.site-aside {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  z-index: 200;
  background: rgba(13,13,13,0.96);
  border-right: 1px solid rgba(255,107,43,0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  backdrop-filter: blur(12px);
}

.site-aside.is-open { transform: translateX(0); }

.side-nav { padding: 2rem 0; }

.side-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.side-nav ul li { width: 100%; }

.side-nav ul li a.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: #F0F0F0;
  text-decoration: none;
  font-family: 'Karla', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  min-height: 44px;
}

.side-nav ul li a.nav-link:hover,
.side-nav ul li a.nav-link:focus {
  color: #FF6B2B;
  border-left-color: #FF6B2B;
  background: rgba(255,107,43,0.08);
  outline: none;
}

.nav-icon {
  font-size: 1rem;
  color: #FF6B2B;
  flex-shrink: 0;
  line-height: 1;
}

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: 56px;
  background: rgba(13,13,13,0.88);
  border-bottom: 1px solid rgba(255,107,43,0.15);
  backdrop-filter: blur(16px);
}

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

.brand-mark {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 0.5rem;
}

.brand-logo-img { height: 36px; width: auto; }

.brand-glyph {
  font-family: 'Playfair Display SC', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #FF6B2B;
  letter-spacing: 0.05em;
  line-height: 1;
  display: inline-block;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: #F0F0F0;
  border-radius: 1px;
  transition: background 0.2s;
}

.nav-toggle:hover span,
.nav-toggle:focus span { background: #FF6B2B; }

.nav-toggle:focus { outline: 2px solid #FF6B2B; outline-offset: 2px; }

/* ===== STICKY ANCHOR BAR ===== */
.sticky-anchor-bar {
  position: sticky;
  top: 56px;
  z-index: 150;
  background: rgba(13,13,13,0.92);
  border-bottom: 1px solid rgba(255,107,43,0.12);
  backdrop-filter: blur(10px);
  overflow-x: auto;
  scrollbar-width: none;
}

.sticky-anchor-bar::-webkit-scrollbar { display: none; }

.anchor-inner {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 1rem;
  max-width: 1200px;
  margin: 0 auto;
  white-space: nowrap;
}

.anchor-link {
  display: inline-flex;
  align-items: center;
  padding: 0 1rem;
  height: 44px;
  min-height: 44px;
  color: rgba(240,240,240,0.65);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.anchor-link:hover,
.anchor-link:focus {
  color: #FF6B2B;
  border-bottom-color: #FF6B2B;
  outline: none;
}

/* ===== MAIN ===== */
.site-main {
  position: relative;
  z-index: 10;
  padding-top: 100px;
}

/* ===== HERO SECTION ===== */
.hero-section {
  min-height: 70vh;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 4rem 2rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 100px;
}

.hero-figure {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-deco-ring {
  position: absolute;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(255,107,43,0.15);
  border-radius: 50%;
  top: 50%;
  right: -80px;
  transform: translateY(-50%);
}

.hero-deco-cross {
  position: absolute;
  width: 60px;
  height: 60px;
  top: 20%;
  left: 5%;
  opacity: 0.25;
}

.hero-deco-cross::before,
.hero-deco-cross::after {
  content: '';
  position: absolute;
  background: #FF6B2B;
}

.hero-deco-cross::before { width: 100%; height: 1px; top: 50%; left: 0; }
.hero-deco-cross::after  { width: 1px; height: 100%; left: 50%; top: 0; }

.hero-content {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #FF6B2B;
  margin-bottom: 1rem;
  display: block;
}

.hero-title {
  font-family: 'Playfair Display SC', serif;
  font-size: clamp(2.2rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 1.25rem;
  color: #F0F0F0;
}

.title-line {
  display: inline-block;
  position: relative;
  background: linear-gradient(135deg, #F0F0F0 30%, #FF6B2B 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(240,240,240,0.72);
  margin-bottom: 2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  background: #FF6B2B;
  color: #0D0D0D;
  font-family: 'Karla', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s, transform 0.15s;
  min-height: 44px;
}

.btn-primary:hover { background: #e55a1f; transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  background: transparent;
  color: #F0F0F0;
  font-family: 'Karla', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  border: 1px solid rgba(240,240,240,0.3);
  border-radius: 4px;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
  min-height: 44px;
}

.btn-ghost:hover { border-color: #FF6B2B; color: #FF6B2B; transform: translateY(-1px); }

.hero-aside {
  grid-column: 1 / -1;
  grid-row: 2;
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  justify-content: center;
}

.tag-chip {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border: 1px solid rgba(255,107,43,0.35);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(240,240,240,0.7);
  background: rgba(255,107,43,0.06);
  transition: border-color 0.2s, color 0.2s;
}

.tag-chip:hover { border-color: #FF6B2B; color: #FF6B2B; }

/* ===== CONTENT WRAPPER ===== */
.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}

.content-main { min-width: 0; }

/* ===== PAGE CONTENT (injected sections) ===== */
.content-main article {
  position: relative;
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid rgba(255,107,43,0.1);
  scroll-margin-top: 104px;
}

.content-main article:last-child { border-bottom: none; }

.content-main article > figure,
.content-main article > aside {
  margin: 1.5rem 0;
}

.content-main article figure {
  display: block;
  border-left: 2px solid #FF6B2B;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: rgba(240,240,240,0.65);
  font-size: 0.9rem;
}

.content-main article aside {
  background: rgba(255,107,43,0.06);
  border: 1px solid rgba(255,107,43,0.15);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  color: rgba(240,240,240,0.8);
}

.content-main h2 {
  font-family: 'Playfair Display SC', serif;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 700;
  color: #F0F0F0;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.content-main h2 span {
  background: linear-gradient(90deg, #F0F0F0 60%, #FF6B2B 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.content-main h3 {
  font-family: 'Playfair Display SC', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #F0F0F0;
  margin: 1.5rem 0 0.75rem;
}

.content-main h3 span {
  color: #FF6B2B;
}

.content-main p {
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(240,240,240,0.82);
  margin-bottom: 1rem;
}

.content-main ul, .content-main ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.content-main li {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(240,240,240,0.8);
  margin-bottom: 0.35rem;
}

.content-main a {
  color: #FF6B2B;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

.content-main a:hover { opacity: 0.78; }

.content-main strong { color: #F0F0F0; font-weight: 700; }

/* ===== GLASS CARD ===== */
.glass-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,107,43,0.18);
  border-radius: 4px;
  backdrop-filter: blur(10px);
  padding: 1.5rem;
}

/* ===== CONTENT ASIDE ===== */
.content-aside {
  position: sticky;
  top: 104px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.aside-title {
  font-family: 'Playfair Display SC', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #FF6B2B;
  margin-bottom: 1rem;
  letter-spacing: 0.06em;
}

.aside-title span { color: inherit; }

.aside-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.aside-link {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  color: rgba(240,240,240,0.72);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  min-height: 44px;
}

.aside-link:hover { color: #FF6B2B; border-left-color: #FF6B2B; }

.aside-notice .aside-body {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(240,240,240,0.65);
}

/* ===== FOOTER ===== */
.site-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(255,107,43,0.15);
  background: rgba(13,13,13,0.97);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-wordmark {
  font-family: 'Playfair Display SC', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #FF6B2B;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  color: rgba(240,240,240,0.55);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.2s;
  min-height: 44px;
}

.footer-link:hover { color: #FF6B2B; }

.footer-copy {
  font-size: 0.78rem;
  color: rgba(240,240,240,0.35);
  text-align: right;
  white-space: nowrap;
}

/* ===== KINETIC ANIMATIONS ===== */
@keyframes kineticSlideUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes kineticFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero-title {
  animation: kineticSlideUp 0.8s cubic-bezier(0.22,1,0.36,1) both;
  animation-delay: 0.1s;
}

.hero-eyebrow {
  animation: kineticSlideUp 0.6s cubic-bezier(0.22,1,0.36,1) both;
  animation-delay: 0s;
}

.hero-sub {
  animation: kineticFade 0.9s ease both;
  animation-delay: 0.35s;
}

.hero-cta {
  animation: kineticFade 0.9s ease both;
  animation-delay: 0.55s;
}

.hero-aside {
  animation: kineticFade 1s ease both;
  animation-delay: 0.7s;
}

/* Scroll reveal */
.reveal-text {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-text.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-fade {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.reveal-fade.is-visible { opacity: 1; }

.content-main article {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.content-main article.is-visible {
  opacity: 1;
  transform: none;
}

/* ===== 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; }
  .reveal-text, .reveal-fade, .content-main article {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .aside-card { flex: 1 1 260px; }

  .hero-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .site-main { padding-top: 100px; }

  .hero-section {
    padding: 2rem 1.25rem 2rem;
    min-height: 70vh;
  }

  .hero-title { font-size: 2rem; }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .footer-copy { text-align: left; white-space: normal; }

  .anchor-link { padding: 0 0.65rem; font-size: 0.76rem; }

  .content-wrapper { padding: 0 1rem 3rem; }
}

/* ===== SECTION SCROLL MARGIN ===== */
article[id] { scroll-margin-top: 104px; }
