@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');

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

:root {
  --white: #ffffff;
  --gray: #f5f5f5;
  --ink: #1f1f1f;
  --ink-soft: #4a4a4a;
  --ink-muted: #8a8a8a;
  --accent: #1f1f1f;
  --accent-hover: #3a3a3a;
  --radius-card: 10px;
  --radius-lg: 24px;
  --sidebar-w: 240px;
  --shadow-card: 0 4px 6px rgba(0,0,0,0.05);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --scroll-offset: 80px;
}

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

body {
  font-family: 'Outfit', 'Work Sans', system-ui, -apple-system, sans-serif;
  background: var(--gray);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
}

section[id] {
  scroll-margin-top: var(--scroll-offset);
}

/* ── PAGE SHELL ── */
.page-shell {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--white);
  border-right: 1px solid rgba(31,31,31,0.08);
  display: flex;
  flex-direction: column;
  padding: 32px 0 24px;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 32px;
  border-bottom: 1px solid rgba(31,31,31,0.06);
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}

.sidebar-nav {
  flex: 1;
  padding: 24px 0;
}

.sidebar-nav dl {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav dt {
  padding: 0 12px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-card);
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  min-height: 42px;
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover {
  background: var(--gray);
  color: var(--ink);
}

.nav-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-muted);
  flex-shrink: 0;
  transition: background var(--transition);
}

.nav-link:hover .nav-dot {
  background: var(--ink);
}

.sidebar-foot {
  padding: 0 24px;
  border-top: 1px solid rgba(31,31,31,0.06);
  padding-top: 16px;
}

.sidebar-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  text-transform: none;
}

/* ── CONTENT AREA ── */
.content-area {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ── MAIN / WRAP ── */
main {
  flex: 1;
}

.wrap {
  width: 100%;
}

/* ── HERO ── */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  background: var(--white);
  padding: 0 48px 80px;
  border-bottom: 1px solid rgba(31,31,31,0.06);
}

.hero-article {
  max-width: 760px;
}

.hero-h1 {
  font-size: clamp(2.6rem, 5vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--ink-soft);
  max-width: 560px;
  line-height: 1.7;
}

/* ── CONTENT SECTION ── */
.content-section {
  padding: 64px 48px;
}

.content-article {
  max-width: 960px;
}

/* ── PAGE CONTENT (injected HTML) ── */
.page-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(200px, auto);
  gap: 16px;
}

.page-content > section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
  border-bottom: 3px solid var(--ink);
  transition: transform var(--transition), box-shadow var(--transition);
  grid-column: span 2;
  position: relative;
  overflow: hidden;
}

.page-content > section:first-child {
  grid-column: span 4;
}

.page-content > section:nth-child(3),
.page-content > section:nth-child(5) {
  grid-column: span 2;
}

.page-content > section:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.page-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
  line-height: 1.25;
}

.page-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 20px 0 10px;
}

.page-content p {
  font-size: 1rem;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 12px;
}

.page-content ul,
.page-content ol {
  padding-left: 1.4em;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

.page-content li {
  margin-bottom: 6px;
}

.page-content a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--transition);
}

.page-content a:hover {
  opacity: 0.65;
}

.page-content strong {
  font-weight: 700;
  color: var(--ink);
}

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

.page-content th {
  background: var(--gray);
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid var(--ink);
}

.page-content td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(31,31,31,0.08);
  color: var(--ink-soft);
}

/* ── FOOTER ── */
.site-footer {
  background: var(--white);
  border-top: 1px solid rgba(31,31,31,0.08);
  margin-top: 0;
}

.footer-cta {
  background: var(--ink);
  padding: 72px 48px;
}

.footer-cta-inner {
  max-width: 640px;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
  text-transform: none;
}

.footer-cta-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 16px;
}

.footer-cta-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  margin-bottom: 32px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 28px;
  background: var(--white);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-card);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: background var(--transition), transform var(--transition);
}

.cta-btn:hover {
  background: var(--gray);
  transform: translateY(-2px);
}

.footer-links {
  padding: 56px 48px;
  border-bottom: 1px solid rgba(31,31,31,0.07);
}

.footer-links-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  max-width: 960px;
}

.footer-col-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 16px;
}

.footer-col nav dl {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-col nav dl dd {
  padding: 0;
}

.footer-col nav dl dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-col nav dl dd a:hover {
  color: var(--ink);
}

.footer-col-text {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.7;
}

.footer-bottom {
  padding: 24px 48px;
  text-align: center;
}

.copyright {
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

/* ── SCROLL REVEAL ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .page-content > section:hover { transform: none; }
  .cta-btn:hover { transform: none; }
}

/* ── RESPONSIVE: TABLET ── */
@media (max-width: 1024px) {
  :root { --sidebar-w: 200px; }

  .hero-section { padding: 0 32px 64px; }
  .content-section { padding: 48px 32px; }
  .footer-cta { padding: 56px 32px; }
  .footer-links { padding: 40px 32px; }
  .footer-bottom { padding: 20px 32px; }

  .page-content {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-content > section:first-child { grid-column: span 2; }
  .page-content > section { grid-column: span 1; }
  .page-content > section:nth-child(3),
  .page-content > section:nth-child(5) { grid-column: span 1; }
}

/* ── RESPONSIVE: MOBILE ── */
@media (max-width: 720px) {
  :root { --sidebar-w: 0px; --scroll-offset: 64px; }

  .sidebar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 0;
    border-right: none;
    border-top: 1px solid rgba(31,31,31,0.1);
    overflow-x: auto;
    overflow-y: visible;
    z-index: 200;
  }

  .sidebar-brand {
    padding: 12px 16px;
    border-bottom: none;
    border-right: 1px solid rgba(31,31,31,0.08);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .brand-name { font-size: 13px; }

  .sidebar-nav {
    flex: 1;
    padding: 0;
    overflow-x: auto;
  }

  .sidebar-nav dl {
    flex-direction: row;
    gap: 0;
    padding: 0 8px;
  }

  .sidebar-nav dt { padding: 0 2px; }

  .nav-link {
    padding: 0 12px;
    height: 56px;
    font-size: 13px;
    white-space: nowrap;
    border-radius: 0;
  }

  .nav-dot { display: none; }

  .sidebar-foot { display: none; }

  .content-area {
    margin-left: 0;
    padding-bottom: 64px;
  }

  .hero-section {
    min-height: 100svh;
    padding: 80px 20px 48px;
    align-items: center;
  }

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

  .content-section { padding: 32px 20px; }

  .page-content {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .page-content > section,
  .page-content > section:first-child,
  .page-content > section:nth-child(3),
  .page-content > section:nth-child(5) {
    grid-column: span 1;
  }

  .page-content > section { padding: 24px; }

  .footer-cta { padding: 48px 20px; }
  .footer-links { padding: 40px 20px; }
  .footer-links-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom { padding: 20px; }
}
