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

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

:root {
  --black: #000000;
  --white: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #e8e8e8;
  --gray-400: #999999;
  --gray-600: #555555;
  --accent: #000000;
  --font: 'Inter', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --max-w: 1200px;
  --side-w: 220px;
  --gap: 2rem;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ─── Header ─── */
.site-header {
  border-bottom: 2px solid var(--black);
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
}

.brand-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 2rem 0.5rem;
  border-bottom: 1px solid var(--gray-200);
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--black);
  text-decoration: none;
  white-space: nowrap;
}

.brand-name:hover {
  opacity: 0.7;
}

.brand-tagline {
  font-size: 0.8rem;
  color: var(--gray-600);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  gap: 1rem;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  flex: 1;
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}

.nav-link:hover,
.nav-link.active {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}

.contact-entry {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--black);
  text-decoration: none;
  padding: 0.5rem 1rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--black);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.contact-entry:hover {
  background: var(--black);
  color: var(--white);
}

/* ─── Main & Wrap ─── */
main {
  min-height: 60vh;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ─── Hero Section (home) ─── */
.hero-section {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--gray-200);
}

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

.hero-h1 {
  font-size: clamp(2.5rem, 8vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--black);
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--gray-600);
  font-weight: 400;
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.75rem 1.75rem;
  background: var(--black);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--black);
  transition: background 0.15s, color 0.15s;
}

.btn-primary:hover {
  background: var(--white);
  color: var(--black);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.75rem 1.75rem;
  background: var(--white);
  color: var(--black);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--black);
  transition: background 0.15s, color 0.15s;
}

.btn-secondary:hover {
  background: var(--black);
  color: var(--white);
}

.btn-sm {
  min-height: 40px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* ─── Page Header Section ─── */
.page-header-section {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--gray-200);
}

.page-header-article {
  max-width: 720px;
}

.page-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--black);
  padding-bottom: 0.2rem;
}

.page-h1 {
  font-size: clamp(1.75rem, 4vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--black);
  margin-bottom: 1rem;
}

.page-lead {
  font-size: 1.05rem;
  color: var(--gray-600);
  line-height: 1.65;
  margin-top: 0.75rem;
  max-width: 600px;
}

.page-date {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-top: 0.5rem;
}

.page-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-top: 0.5rem;
}

/* ─── Content + Aside Layout ─── */
.content-section {
  padding: 3rem 0;
}

.content-with-aside .content-article {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

/* aside on the LEFT */
.sidebar-left {
  flex: 0 0 var(--side-w);
  position: sticky;
  top: 120px;
  order: -1;
  border-right: 1px solid var(--gray-200);
  padding-right: 2rem;
}

.aside-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 0.75rem;
}

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

.aside-list li a {
  display: block;
  font-size: 0.85rem;
  color: var(--black);
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  line-height: 1.4;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: border-color 0.15s;
}

.aside-list li a:hover {
  border-bottom-color: var(--black);
}

.aside-cta {
  margin-top: 1.5rem;
}

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

/* ─── Prose ─── */
.prose {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--black);
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 2.5rem 0 1rem;
  color: var(--black);
}

.prose h2 span {
  display: inline;
}

.prose h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: var(--black);
}

.prose h3 span {
  display: inline;
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose ul,
.prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose a {
  color: var(--black);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  opacity: 0.6;
}

.prose strong {
  font-weight: 700;
}

.prose blockquote {
  border-left: 3px solid var(--black);
  padding-left: 1.25rem;
  font-style: italic;
  color: var(--gray-600);
  margin: 1.5rem 0;
}

.prose code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 0.9em;
  background: var(--gray-100);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

.prose pre {
  background: var(--black);
  color: var(--white);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 4px;
  font-size: 0.9rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.prose th {
  background: var(--black);
  color: var(--white);
  font-weight: 600;
  text-align: left;
  padding: 0.6rem 0.75rem;
}

.prose td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--gray-200);
}

.prose tr:nth-child(even) td {
  background: var(--gray-100);
}

.prose img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem 0;
  border-radius: 4px;
}

/* ─── Cards Section ─── */
.cards-section {
  padding: 4rem 0;
  border-top: 2px solid var(--black);
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  margin-bottom: 2.5rem;
  color: var(--black);
}

.section-title span {
  display: inline;
}

.home-card {
  border-bottom: 3px solid var(--black);
  border-radius: 4px;
  margin-bottom: 0;
  transition: transform 0.15s;
}

.home-card:first-of-type {
  border-top: 1px solid var(--gray-200);
}

.card-inner {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.5rem 1.5rem;
  padding: 1.5rem 0;
  align-items: start;
}

.card-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-400);
  letter-spacing: 0.05em;
  padding-top: 0.25rem;
  grid-row: 1;
  grid-column: 1;
}

.card-inner h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
  grid-row: 1;
  grid-column: 2;
  line-height: 1.3;
}

.card-inner h3 span {
  display: inline;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.55;
  grid-row: 2;
  grid-column: 2;
}

.card-link {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--black);
  text-decoration: none;
  letter-spacing: 0.03em;
  grid-row: 1;
  grid-column: 3;
  padding: 0.25rem 0;
  white-space: nowrap;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.card-link:hover {
  opacity: 0.5;
}

.home-card:hover {
  transform: translateX(4px);
}

/* ─── Related Section ─── */
.related-section {
  padding: 3rem 0;
  border-top: 2px solid var(--black);
}

.related-card {
  padding: 1.5rem 0;
  border-bottom: 2px solid var(--black);
  border-radius: 4px;
  transition: transform 0.15s;
}

.related-card:first-of-type {
  border-top: 1px solid var(--gray-200);
}

.related-card .card-num {
  display: block;
  margin-bottom: 0.5rem;
}

.related-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.related-card h3 span {
  display: inline;
}

.related-card p {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 0.75rem;
  line-height: 1.55;
}

.related-card a {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--black);
  text-decoration: none;
  letter-spacing: 0.02em;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.related-card a:hover {
  opacity: 0.5;
}

.related-card:hover {
  transform: translateX(4px);
}

/* ─── Feature Header ─── */
.feature-header {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.feature-hero-media {
  flex: 0 0 320px;
}

.feature-hero-img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--gray-200);
}

/* ─── Footer ─── */
.site-footer {
  border-top: 2px solid var(--black);
  padding: 2.5rem 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-brand {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--gray-600);
  display: block;
  margin-bottom: 1.5rem;
}

.footer-copy a {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Footer nav: footer > nav > dl > dt > a */
.footer-nav {
  margin-top: 0.5rem;
}

.footer-nav dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
}

.footer-nav dt {
  width: 100%;
}

.footer-nav dt a {
  font-size: 0.8rem;
  color: var(--gray-600);
  text-decoration: none;
  padding: 0.3rem 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s;
}

.footer-nav dt a:hover {
  color: var(--black);
}

/* ─── FAQ specific ─── */
.faq-content details {
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 0;
}

.faq-content summary {
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  list-style: none;
  padding: 0.25rem 0;
  min-height: 40px;
  display: flex;
  align-items: center;
}

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

.faq-content summary::before {
  content: '+';
  font-size: 1.25rem;
  font-weight: 300;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.faq-content details[open] summary::before {
  content: '−';
}

/* ─── Stagger animation ─── */
@media (prefers-reduced-motion: no-preference) {
  .home-card {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.4s ease forwards;
    animation-delay: calc(var(--i, 0) * 0.06s);
  }

  .related-card {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 0.35s ease forwards;
    animation-delay: calc(var(--i, 0) * 0.07s);
  }

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

@media (prefers-reduced-motion: reduce) {
  .home-card,
  .related-card {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .content-with-aside .content-article {
    flex-direction: column;
  }

  .sidebar-left {
    position: static;
    flex: none;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
    padding-right: 0;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .aside-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .aside-list li a {
    min-height: auto;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    border-radius: 2px;
  }

  .feature-header {
    flex-direction: column;
  }

  .feature-hero-media {
    flex: none;
    width: 100%;
  }

  .card-inner {
    grid-template-columns: 2.5rem 1fr;
    grid-template-rows: auto auto auto;
  }

  .card-link {
    grid-row: 3;
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .brand-row {
    padding: 0.75rem 1rem 0.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .nav-row {
    padding: 0.5rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .top-nav {
    gap: 0.15rem;
  }

  .nav-link {
    font-size: 0.75rem;
    padding: 0.5rem 0.5rem;
  }

  .wrap {
    padding: 0 1rem;
  }

  .hero-section {
    padding: 2.5rem 0 2rem;
  }

  .hero-h1 {
    font-size: clamp(2rem, 10vw, 4rem);
  }

  .page-header-section {
    padding: 2rem 0 1.5rem;
  }

  .page-h1 {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
  }

  .cards-section {
    padding: 2rem 0;
  }

  .section-title {
    font-size: clamp(1.25rem, 6vw, 2rem);
  }

  .card-inner {
    grid-template-columns: 2.5rem 1fr;
    gap: 0.5rem 1rem;
  }

  .site-footer {
    padding: 2rem 1rem;
  }

  .footer-nav dl {
    flex-direction: column;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}
