/* ==========================================================================
   NAGAWIN — Refined Royal Emerald & Champagne Gold UI System
   ========================================================================== */
:root {
  --bg-canvas: #040F0B;
  --bg-surface: rgba(11, 30, 23, 0.72);
  --bg-surface-solid: #0A1D16;
  --bg-surface-hover: rgba(16, 43, 33, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.14);
  --border-gold: rgba(212, 175, 55, 0.4);

  --gold-primary: #D8B448;
  --gold-hover: #E9C968;
  --gold-soft: rgba(216, 180, 72, 0.12);

  --text-primary: #F3F6F4;
  --text-secondary: #9DB3AA;
  --text-muted: #6C857B;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-pill: 9999px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --container-max: 1180px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-canvas);
  overflow-x: hidden;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.25s var(--ease-out);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.text-gold { color: var(--gold-primary); }
.italic-accent { font-style: italic; font-weight: 500; }

/* Ambient Background Depth */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
}

.orb-1 {
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(16, 78, 56, 0.65) 0%, transparent 70%);
  top: -180px;
  left: -120px;
}

.orb-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(216, 180, 72, 0.16) 0%, transparent 70%);
  top: 120px;
  right: -140px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 0;
  transition: background-color 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(4, 15, 11, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border-subtle);
  padding: 10px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(145deg, rgba(216, 180, 72, 0.18), rgba(216, 180, 72, 0.04));
  border: 1px solid var(--border-gold);
  color: var(--gold-primary);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 10px;
}

.brand-text {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  padding: 4px;
  border-radius: var(--radius-pill);
}

.nav-link {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Pill Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.825rem;
}

.btn-full { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, #E2C058 0%, #C59B27 100%);
  color: #05110D;
  box-shadow: 0 4px 20px rgba(216, 180, 72, 0.22);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(216, 180, 72, 0.34);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--text-secondary);
}

.btn-ghost:hover { color: var(--text-primary); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background-color: var(--text-primary);
}

/* Hero Section */
.hero-section {
  padding: 72px 0 92px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--gold-soft);
  border: 1px solid var(--border-gold);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-primary);
  margin-bottom: 24px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--gold-primary);
  box-shadow: 0 0 0 4px rgba(216, 180, 72, 0.2);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.7rem, 5vw, 4.1rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin-bottom: 24px;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Layered Glass Card */
.glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 24px 48px rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.status-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.micro-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.card-heading {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
}

.status-pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: #4ADE80;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.25);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.metric-tile {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.metric-tile-wide {
  grid-column: span 2;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-icon {
  color: var(--gold-primary);
  opacity: 0.85;
}

.metric-value {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.metric-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Directory Bento Grid with Spotlight Hover */
.directory-section {
  padding: 72px 0 96px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 44px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.12;
}

.section-desc {
  max-width: 390px;
  font-size: 0.94rem;
  color: var(--text-secondary);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 28px;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease;
}

.bento-wide { grid-column: span 2; }

/* Subtle Cursor Spotlight */
.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(216, 180, 72, 0.1),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.spotlight-card:hover::before { opacity: 1; }

.bento-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
}

.bento-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(216, 180, 72, 0.08);
  border: 1px solid rgba(216, 180, 72, 0.22);
  color: var(--gold-primary);
  display: grid;
  place-items: center;
}

.bento-step {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.bento-card h3 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.bento-card p {
  font-size: 0.93rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  flex-grow: 1;
}

.bento-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.arrow-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
  transition: transform 0.25s var(--ease-out), background-color 0.25s ease;
}

.bento-card:hover .arrow-circle {
  background: var(--gold-primary);
  color: #040F0B;
  transform: translateX(3px);
}

/* Editorial Content */
.editorial-section {
  padding: 64px 0 104px;
  border-top: 1px solid var(--border-subtle);
}

.editorial-layout {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 60px;
  align-items: start;
}

.prose h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.15;
}

.prose h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  margin: 36px 0 16px;
}

.prose p {
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.prose a {
  color: var(--gold-primary);
  border-bottom: 1px solid rgba(216, 180, 72, 0.35);
}

.prose a:hover { border-bottom-color: var(--gold-primary); }

.editorial-quote {
  margin: 32px 0;
  padding: 24px 28px;
  border-left: 2px solid var(--gold-primary);
  background: linear-gradient(90deg, rgba(216, 180, 72, 0.06), transparent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.4;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-secondary);
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--gold-primary);
}

.feature-list strong { color: var(--text-primary); }

.spec-box {
  position: sticky;
  top: 96px;
}

.spec-box h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  margin-bottom: 18px;
}

.spec-list { margin-bottom: 24px; }

.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
}

.spec-row dt { color: var(--text-muted); }
.spec-row dd { color: var(--text-primary); font-weight: 500; text-align: right; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(2, 10, 7, 0.9);
  padding-top: 64px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand { max-width: 360px; }
.footer-brand p { margin-top: 16px; font-size: 0.875rem; color: var(--text-muted); }

.footer-links h4 {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 16px;
}

.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.875rem; color: var(--text-secondary); }
.footer-links a:hover { color: var(--gold-primary); }

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding: 20px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Sticky Bar */
.mobile-sticky-bar { display: none; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .editorial-layout { grid-template-columns: 1fr; gap: 40px; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-wide { grid-column: span 1; }
  .section-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    background: rgba(8, 24, 18, 0.96);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 8px;
  }

  .main-nav.is-open { display: block; }
  .nav-list { flex-direction: column; background: none; border: none; padding: 0; }
  .header-actions .btn { display: none; }
  .menu-toggle { display: flex; }

  .hero-section { padding: 48px 0 64px; }
  .footer-inner { flex-direction: column; }

  body { padding-bottom: 72px; }
  .mobile-sticky-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99;
    background: rgba(4, 15, 11, 0.92);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-subtle);
    padding: 12px 16px;
  }
}
/* ==========================================================================
   Subpath Editorial Layout (Article, Breadcrumb, Timeline, Table, FAQ)
   ========================================================================== */
.article-hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border-subtle);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.breadcrumb a:hover { color: var(--gold-primary); }
.breadcrumb span[aria-current="page"] { color: var(--gold-primary); font-weight: 500; }

.article-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.2vw, 3.3rem);
  font-weight: 600;
  line-height: 1.1;
  max-width: 820px;
  margin-bottom: 18px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.article-body-section {
  padding: 56px 0 96px;
}

.article-grid {
  display: grid;
  grid-template-columns: 1.55fr 0.65fr;
  gap: 56px;
  align-items: start;
}

/* Key Takeaways Box */
.takeaway-box {
  background: linear-gradient(135deg, rgba(216, 180, 72, 0.08), rgba(11, 30, 23, 0.65));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 36px;
}

.takeaway-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 12px;
}

/* Step Timeline */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0 32px;
}

.step-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.step-num {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gold-soft);
  border: 1px solid var(--border-gold);
  color: var(--gold-primary);
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.step-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.step-card p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Data Table */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0 32px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.data-table th, .data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--gold-primary);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table td { color: var(--text-secondary); }
.data-table td strong { color: var(--text-primary); }

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  padding: 18px 20px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-trigger::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--gold-primary);
  transition: transform 0.25s ease;
}

.faq-item.is-open .faq-trigger::after {
  transform: rotate(45deg);
}

.faq-panel {
  display: none;
  padding: 0 20px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.faq-item.is-open .faq-panel { display: block; }

/* Sticky Sidebar TOC */
.sidebar-stack {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.toc-list a {
  font-size: 0.86rem;
  color: var(--text-secondary);
  display: block;
  padding-left: 12px;
  border-left: 2px solid var(--border-subtle);
}

.toc-list a:hover {
  color: var(--gold-primary);
  border-left-color: var(--gold-primary);
}

@media (max-width: 960px) {
  .article-grid { grid-template-columns: 1fr; gap: 36px; }
  .sidebar-stack { position: static; }
}