@import url('typography.css');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  padding: 12px 20px; background: var(--ink); color: var(--white);
}
.skip-link:focus { left: 0; }

.label {
  display: inline-block;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bronze); margin-bottom: 0.85rem;
}

.lead {
  font-size: 1.12rem; line-height: 1.65;
  color: var(--ink-muted); max-width: 36rem;
}

.section { padding: var(--section) 0; }
.section--dark { background: var(--ink); color: rgba(255,255,255,.78); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--white); }
.section--stone { background: var(--stone); }

.reveal { opacity: 0; transform: translateY(28px); }
.reveal.is-visible {
  opacity: 1; transform: translateY(0);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid transparent; border-radius: var(--radius-full);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { box-shadow: var(--shadow-soft); transform: translateY(-1px); }
.btn--primary { background: var(--ink); color: var(--white); }
.btn--primary:hover { background: var(--bronze); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--white); }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--stone); }
.btn--outline-light { color: var(--white); border-color: rgba(255,255,255,.55); }
.btn--outline-light:hover { background: var(--white); color: var(--ink); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px,5vw,72px); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.prose { max-width: 42rem; }
.prose h2 { font-family: var(--font-display); font-size: clamp(1.6rem,3vw,2.2rem); font-weight: 400; color: var(--ink); margin: 2rem 0 1rem; }
.prose p { margin-bottom: 1rem; }
.prose ul { list-style: disc; margin: 1rem 0 1rem 1.25rem; }
.prose li { margin-bottom: .5rem; }

.page-hero {
  padding: calc(var(--header-h) + 72px) 0 72px;
  background: var(--ink); color: rgba(255,255,255,.82);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem,5vw,3.5rem);
  font-weight: 400; color: var(--white);
  letter-spacing: -0.03em; margin-top: .5rem;
}
.page-hero .lead { color: rgba(255,255,255,.68); }
.breadcrumb { font-size: .82rem; color: rgba(255,255,255,.55); margin-bottom: 1rem; }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb span { margin: 0 8px; }

.hub-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.hub-card {
  background: var(--white); border: var(--border-soft);
  border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.hub-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.hub-card h3 { margin-bottom: .5rem; }

/* Editorial section index (procedure hubs) */
.section-index-wrap { padding-top: 0; }
.section-index__head { margin-bottom: 32px; max-width: 28rem; }
.section-index__head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.section-index {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--stone-dark);
}
.section-index__item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--stone-dark);
  color: inherit;
  transition: color .25s var(--ease), padding-left .25s var(--ease);
}
.section-index__item:hover {
  color: var(--ink);
  padding-left: 6px;
}
.section-index__item:hover .section-index__arrow { color: var(--bronze); transform: translateX(4px); }
.section-index__num {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--bronze);
  font-variant-numeric: tabular-nums;
}
.section-index__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.section-index__title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.section-index__desc {
  font-size: .92rem;
  line-height: 1.55;
  color: var(--ink-muted);
}
.section-index__arrow {
  font-size: 1.25rem;
  color: var(--ink-muted);
  transition: transform .25s var(--ease), color .25s var(--ease);
}

/* Sidebar CTA — distinct from hub cards */
.sidebar-cta {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.sidebar-cta .label { color: var(--bronze-light); }
.sidebar-cta p { color: rgba(255,255,255,.75); font-size: .95rem; line-height: 1.6; margin-top: .75rem; }
.sidebar-cta .btn { margin-top: 1.25rem; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .hub-grid { grid-template-columns: 1fr; }
  .section-index__item { grid-template-columns: 44px 1fr auto; gap: 14px; padding: 22px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
