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

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

:root {
  --c-paper: #fdfbf7;
  --c-offwhite: #f5f5f5;
  --c-ink: #1a1a1a;
  --c-ink-60: rgba(26,26,26,0.6);
  --c-ink-20: rgba(26,26,26,0.12);
  --c-ink-08: rgba(26,26,26,0.06);
  --c-border: #e2e0da;
  --radius-pill: 28px;
  --radius-card: 28px;
  --font-main: 'Outfit', 'Work Sans', system-ui, -apple-system, sans-serif;
  --aside-w: 260px;
  --content-max: 760px;
  --transition: none;
  scroll-behavior: smooth;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body.body-root {
  font-family: var(--font-main);
  background-color: var(--c-paper);
  color: var(--c-ink);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul, ol {
  list-style: none;
}

/* ── Page Layout ── */
.page-wrapper {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
}

/* ── Aside / Sidebar Nav ── */
.site-aside {
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--aside-w);
  flex-shrink: 0;
  border-right: 1px solid var(--c-border);
  background: var(--c-paper);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
}

.aside-inner {
  padding: 28px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-height: 100%;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: var(--c-offwhite);
  transition: var(--transition);
  flex-shrink: 0;
}

.brand-mark:hover {
  background: var(--c-ink);
}

.brand-mark:hover .site-logo-text {
  color: var(--c-paper);
}

.site-logo-text {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--c-ink);
}

.site-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* Nav pill group */
.nav-pill-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-pill-group li {
  opacity: 0;
  transform: translateX(-8px);
  animation: navSlideIn 0.3s ease forwards;
  animation-delay: calc(var(--i, 0) * 60ms + 100ms);
}

@keyframes navSlideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-pill-group li {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

.nav-pill {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--c-ink);
  background: transparent;
  border: 1px solid transparent;
  transition: var(--transition);
  line-height: 1.4;
  min-height: 44px;
}

.nav-pill:hover {
  background: var(--c-ink);
  color: var(--c-paper);
  border-color: var(--c-ink);
}

/* Search */
.aside-search {
  margin-top: auto;
}

.search-form {
  display: flex;
  align-items: center;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  background: var(--c-offwhite);
  overflow: hidden;
  padding: 0 4px 0 14px;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-main);
  font-size: 14px;
  color: var(--c-ink);
  padding: 10px 4px 10px 0;
  outline: none;
  min-width: 0;
  min-height: 44px;
}

.search-input::placeholder {
  color: var(--c-ink-60);
}

.search-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--c-ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.search-btn:hover {
  background: var(--c-ink);
  color: var(--c-paper);
}

/* ── Main Wrap ── */
.main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

div {
  width: 100%;
}

/* ── Hero Section ── */
.hero-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--c-border);
  padding: 60px 40px;
  scroll-margin-top: 80px;
}

.hero-inner {
  max-width: var(--content-max);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}

.hero-icon {
  flex-shrink: 0;
}

.hero-icon svg {
  display: block;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--c-ink);
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 400;
  color: var(--c-ink-60);
  max-width: 540px;
  line-height: 1.7;
}

/* ── Content Section ── */
.content-section {
  padding: 60px 40px 80px;
  scroll-margin-top: 80px;
}

.content-body {
  max-width: var(--content-max);
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-ink);
}

/* Content inner elements */
.content-body h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 56px 0 8px;
  line-height: 1.25;
  padding-top: 24px;
  border-top: 1px solid var(--c-border);
  scroll-margin-top: 80px;
}

.content-body h2:first-child {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.content-body .subtitle,
.content-body p.subtitle,
.content-body p.subhead,
.content-body p.desc,
.content-body p.lead {
  font-size: 1.05rem;
  color: var(--c-ink-60);
  margin-bottom: 20px;
  line-height: 1.65;
}

.content-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 32px 0 10px;
  letter-spacing: -0.01em;
}

.content-body p {
  margin-bottom: 18px;
}

.content-body p:last-child {
  margin-bottom: 0;
}

.content-body ul,
.content-body ol {
  list-style: disc;
  padding-left: 1.5em;
  margin-bottom: 18px;
}

.content-body ol {
  list-style: decimal;
}

.content-body li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.content-body a {
  color: var(--c-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--c-border);
}

.content-body a:hover {
  text-decoration-color: var(--c-ink);
}

.content-body strong,
.content-body b {
  font-weight: 600;
}

.content-body em,
.content-body i {
  font-style: italic;
}

.content-body blockquote {
  border-left: 3px solid var(--c-ink);
  padding: 12px 20px;
  margin: 24px 0;
  color: var(--c-ink-60);
  font-style: italic;
  background: var(--c-offwhite);
  border-radius: 0 8px 8px 0;
}

.content-body hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 40px 0;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.content-body th,
.content-body td {
  border: 1px solid var(--c-border);
  padding: 10px 14px;
  text-align: left;
}

.content-body th {
  background: var(--c-offwhite);
  font-weight: 600;
}

.content-body article,
.content-body [id] {
  scroll-margin-top: 80px;
}

.content-body .card,
.content-body figure {
  border-radius: var(--radius-card);
  background: var(--c-offwhite);
  border: 1px solid var(--c-border);
  padding: 24px 28px;
  margin: 24px 0;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--c-border);
  padding: 24px 40px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--c-paper);
}

.footer-logo {
  flex-shrink: 0;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-offwhite);
  min-height: 40px;
}

.footer-brand-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-ink);
}

.footer-logo-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 2px;
  flex: 1;
}

.footer-link {
  font-size: 13px;
  color: var(--c-ink-60);
  padding: 10px 12px;
  border-radius: 20px;
  border: 1px solid transparent;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
  white-space: nowrap;
}

.footer-link:hover {
  color: var(--c-ink);
  background: var(--c-offwhite);
  border-color: var(--c-border);
}

.footer-copy {
  flex-shrink: 0;
  margin-left: auto;
}

.footer-copy small {
  font-size: 12px;
  color: var(--c-ink-60);
  white-space: nowrap;
}

/* ── Responsive: Tablet ── */
@media (max-width: 900px) {
  :root {
    --aside-w: 220px;
  }

  .hero-section {
    padding: 48px 28px;
    min-height: 60vh;
  }

  .content-section {
    padding: 48px 28px 64px;
  }

  footer {
    padding: 20px 28px;
    gap: 16px;
  }
}

/* ── Responsive: Mobile ── */
@media (max-width: 680px) {
  .page-wrapper {
    flex-direction: column;
  }

  .site-aside {
    position: relative;
    top: auto;
    height: auto;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--c-border);
    z-index: 200;
  }

  .aside-inner {
    padding: 16px 16px 20px;
    gap: 16px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .nav-pill-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    min-width: 0;
  }

  .nav-pill {
    padding: 10px 14px;
    font-size: 13px;
    min-height: 44px;
  }

  .aside-search {
    margin-top: 0;
    width: 100%;
    flex-basis: 100%;
  }

  .search-input {
    min-height: 44px;
  }

  .main-wrap {
    min-height: calc(100vh - 160px);
  }

  .hero-section {
    min-height: auto;
    padding: 40px 20px 36px;
  }

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

  .hero-desc {
    font-size: 1rem;
  }

  .content-section {
    padding: 36px 20px 48px;
  }

  .content-body h2 {
    font-size: 1.3rem;
    margin: 40px 0 8px;
  }

  footer {
    padding: 20px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-nav {
    width: 100%;
  }

  .footer-copy {
    margin-left: 0;
  }
}

/* ── Stagger list animation in content ── */
.content-body ul li,
.content-body ol li {
  opacity: 0;
  transform: translateY(6px);
  animation: listItemIn 0.25s ease forwards;
}

.content-body ul li:nth-child(1) { animation-delay: 0ms; }
.content-body ul li:nth-child(2) { animation-delay: 40ms; }
.content-body ul li:nth-child(3) { animation-delay: 80ms; }
.content-body ul li:nth-child(4) { animation-delay: 120ms; }
.content-body ul li:nth-child(5) { animation-delay: 160ms; }
.content-body ul li:nth-child(6) { animation-delay: 200ms; }
.content-body ul li:nth-child(7) { animation-delay: 240ms; }
.content-body ul li:nth-child(8) { animation-delay: 280ms; }
.content-body ul li:nth-child(9) { animation-delay: 320ms; }
.content-body ul li:nth-child(10) { animation-delay: 360ms; }

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

@media (prefers-reduced-motion: reduce) {
  .content-body ul li,
  .content-body ol li {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ── Micro-interactions ── */
.nav-pill,
.footer-link,
.brand-mark,
.footer-brand,
.search-btn {
  cursor: pointer;
}

.content-body .card:hover,
.content-body figure:hover {
  background: var(--c-offwhite);
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--c-ink);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Print ── */
@media print {
  .site-aside {
    display: none;
  }
  .page-wrapper {
    display: block;
  }
  footer {
    border-top: 1px solid #ccc;
  }
}
