/* Homepage (Phase B, refinement pass). Loaded only by /index.html, after styles.css.
   Two typefaces: Source Serif 4 for display, IBM Plex Sans for everything else.
   Depth and motion are CSS only; all motion is off for reduced-motion visitors. */
.hb {
  --hb-bone: #ebe8e0;
  --hb-ink: #121516;
  --hb-ink-soft: #4a5052;
  --hb-signal-ink: #7a6239;
  --hb-line-light: #d3cfc4;
  --hb-gold-soft: rgba(185, 154, 106, 0.35);
  --hb-w: 1240px;
  --hb-gut: clamp(20px, 4.5vw, 64px);
  --hb-pad: clamp(112px, 13vw, 184px);
  position: relative;
  color: var(--paper-dim);
  font: 400 1.0625rem/1.72 var(--font-sans);
}
.hb-wrap { width: min(100% - 2 * var(--hb-gut), var(--hb-w)); margin: 0 auto; }
.hb section { position: relative; scroll-margin-top: 96px; }

/* Labels: small spaced capitals with a short gold rule */
.hb-label { display: flex; align-items: center; gap: 14px; font: 500 0.78rem/1.4 var(--font-sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--signal); margin: 0 0 26px; }
.hb-label::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: 0.8; }

/* Display type */
.hb h2 { font: 400 clamp(2.3rem, 4.4vw, 3.7rem)/1.08 var(--font-serif); color: var(--paper); margin: 0; letter-spacing: -0.012em; }
.hb-split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); gap: clamp(40px, 7vw, 112px); }

/* Film grain over the whole page, very faint */
.hb::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Hero */
.hb-hero { overflow: hidden; min-height: min(92vh, 900px); display: flex; align-items: flex-end; border-bottom: 1px solid var(--line); background: var(--black); }
.hb-hero::before { content: ""; position: absolute; inset: -6% 0 0; background: url("/assets/media/hero/hero-night-3200.webp") center 35% / cover no-repeat; opacity: 0.8; transform-origin: 50% 0; }
@media (max-width: 900px) { .hb-hero::before { background-image: url("/assets/media/hero/hero-night-1600.webp"); } }
.hb-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 55% at 78% 22%, rgba(185, 154, 106, 0.2), transparent 70%),
    radial-gradient(90% 70% at 10% 100%, rgba(5, 6, 7, 0.9), transparent 70%),
    linear-gradient(180deg, rgba(5, 6, 7, 0.55), rgba(5, 6, 7, 0.1) 35%, rgba(5, 6, 7, 0.7) 78%, var(--black));
}
.hb-hero .hb-wrap { position: relative; z-index: 1; padding: 168px 0 84px; }
.hb-hero h1 { font: 400 clamp(3.1rem, 7.2vw, 6.6rem)/1.02 var(--font-serif); color: var(--paper); margin: 0 0 36px; max-width: 14ch; letter-spacing: -0.022em; text-shadow: 0 2px 40px rgba(0, 0, 0, 0.5); }
.hb-hero-sub { font: 500 clamp(1.15rem, 1.7vw, 1.4rem)/1.5 var(--font-sans); color: var(--paper); max-width: 38rem; margin: 0 0 16px; }
.hb-hero-lead { max-width: 36rem; margin: 0; }
.hb-hero-lanes { position: relative; margin: 72px 0 0; padding: 24px 0 0; list-style: none; display: flex; flex-wrap: wrap; gap: 12px 40px; font: 500 0.78rem/1.4 var(--font-sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper-dim); }
.hb-hero-lanes::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, var(--signal), var(--hb-gold-soft) 40%, transparent); }

/* Thesis */
.hb-thesis { background: radial-gradient(70% 90% at 0% 50%, rgba(185, 154, 106, 0.09), transparent 70%), var(--graphite); border-bottom: 1px solid var(--line); padding: var(--hb-pad) 0; }
.hb-thesis blockquote { margin: 0; font: 400 clamp(2.4rem, 5.6vw, 4.9rem)/1.1 var(--font-serif); color: var(--paper); max-width: 17ch; letter-spacing: -0.015em; }
.hb-thesis p:last-child { margin: 40px 0 0; max-width: 34rem; font-size: 1.12rem; }

/* Firm */
.hb-firm { padding: var(--hb-pad) 0; background: linear-gradient(180deg, var(--black), #080a0b); }
.hb-firm-lede { font: 400 clamp(1.3rem, 1.9vw, 1.55rem)/1.5 var(--font-serif); color: var(--paper); margin: 0 0 24px; }
.hb-firm p { margin-top: 0; max-width: 40rem; }

/* Practice (paper) */
.hb-lines { background: linear-gradient(180deg, #f1eee7, var(--hb-bone) 30%, #e4e0d6); color: var(--hb-ink-soft); padding: var(--hb-pad) 0; box-shadow: inset 0 24px 40px -30px rgba(0, 0, 0, 0.35); }
.hb-lines h2 { color: var(--hb-ink); }
.hb-lines .hb-label { color: var(--hb-signal-ink); }
.hb-lines-list { margin: 72px 0 0; padding: 0; list-style: none; }
.hb-line { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1fr); gap: 10px clamp(28px, 4.5vw, 64px); padding: 44px 0; border-top: 1px solid var(--hb-line-light); transition: background-color 0.3s; }
.hb-line::before { content: ""; position: absolute; top: -1px; left: 0; width: 0; height: 1px; background: var(--hb-signal-ink); transition: width 0.5s ease; }
.hb-line:hover::before { width: 100%; }
.hb-line:last-child { border-bottom: 1px solid var(--hb-line-light); }
.hb-line-n { font: 400 1.6rem/1.1 var(--font-serif); color: var(--hb-signal-ink); }
.hb-line h3 { font: 500 1.4rem/1.25 var(--font-sans); color: var(--hb-ink); margin: 0 0 10px; }
.hb-line-q { font: 400 1.35rem/1.45 var(--font-serif); font-style: italic; color: var(--hb-ink); margin: 0; }
.hb-line-detail p { margin: 0 0 14px; }
.hb-line-meta { display: flex; flex-wrap: wrap; gap: 6px 24px; font: 500 0.78rem/1.5 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--hb-ink-soft); }
.hb-line-meta a { color: var(--hb-signal-ink); text-decoration: none; border-bottom: 1px solid currentColor; }
.hb-line-meta a:hover, .hb-line-meta a:focus-visible { color: var(--hb-ink); }

/* Team */
.hb-team { padding: var(--hb-pad) 0; border-bottom: 1px solid var(--line); background: radial-gradient(60% 80% at 100% 0%, rgba(185, 154, 106, 0.07), transparent 70%), var(--black); }
.hb-team-lede { font: 400 clamp(1.5rem, 2.5vw, 2rem)/1.3 var(--font-serif); color: var(--paper); margin: 0 0 22px; }
.hb-roster { font: 400 1.2rem/1.7 var(--font-sans); margin: 0; max-width: 36rem; }
.hb-roster--for { margin-top: 22px; font-size: 1.05rem; color: var(--muted); }
.hb-roster strong { font-weight: 500; color: var(--paper); box-shadow: inset 0 -1px 0 var(--hb-gold-soft); }

/* Decision Notes */
.hb-notes { padding: var(--hb-pad) 0; background: var(--graphite); border-bottom: 1px solid var(--line); }
.hb-notes-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 56px; }
.hb-notes-head a { font: 500 0.78rem/1 var(--font-sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--signal); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 6px; }
.hb-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.hb-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  padding: 32px;
  border: 1px solid rgba(244, 244, 241, 0.09);
  text-decoration: none;
  background: linear-gradient(180deg, rgba(244, 244, 241, 0.045), rgba(244, 244, 241, 0.01));
  box-shadow: inset 0 1px 0 rgba(244, 244, 241, 0.06), 0 30px 60px -40px rgba(0, 0, 0, 0.9);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.hb-card:hover, .hb-card:focus-visible { border-color: var(--hb-gold-soft); transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(185, 154, 106, 0.25), 0 40px 70px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(185, 154, 106, 0.12); }
.hb-card .hb-label { margin-bottom: 18px; }
.hb-card h3 { font: 400 1.6rem/1.22 var(--font-serif); color: var(--paper); margin: 0; }
.hb-card-foot { display: flex; justify-content: space-between; margin: 32px 0 0; font: 500 0.78rem/1 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.hb-card:hover .hb-card-foot span, .hb-card:focus-visible .hb-card-foot span { color: var(--signal); }

/* Desk Updates */
.hb-updates { background: var(--hb-bone); color: var(--hb-ink-soft); padding: 72px 0; }
.hb-updates .hb-wrap { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.hb-updates .hb-wrap > * { min-width: 0; }
.hb-updates h2 { font: 400 1.9rem/1.2 var(--font-serif); color: var(--hb-ink); margin: 0 0 8px; letter-spacing: 0; }
.hb-updates p { margin: 0; }
.hb-updates p a { color: var(--hb-signal-ink); }
.hb-sub-form { margin: 0; }
.hb-sub-fields { display: flex; border: 1px solid var(--hb-ink); background: rgba(255, 255, 255, 0.35); }
.hb-sub-fields input[type="email"] { border: 0; background: transparent; padding: 15px 18px; font: 400 1rem var(--font-sans); width: min(320px, 60vw); color: var(--hb-ink); }
.hb-sub-fields input[type="email"]::placeholder { color: #6b7072; }
.hb-sub-fields button { border: 0; background: var(--hb-ink); color: var(--paper); font: 500 0.78rem/1 var(--font-sans); letter-spacing: 0.2em; text-transform: uppercase; padding: 0 24px; cursor: pointer; transition: background-color 0.2s; }
.hb-sub-fields button:hover, .hb-sub-fields button:focus-visible { background: var(--hb-signal-ink); }
.hb-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Contact */
.hb-contact { padding: var(--hb-pad) 0; background: radial-gradient(70% 90% at 20% 100%, rgba(185, 154, 106, 0.1), transparent 70%), var(--black); }
.hb-contact h2 { font-size: clamp(2.8rem, 6vw, 5.2rem); line-height: 1.04; max-width: 13ch; }
.hb-contact .hb-split { align-items: end; }
.hb-contact p { margin-top: 0; }
.hb-contact address { font-style: normal; }
.hb-mail { display: inline-block; font: 400 clamp(1.4rem, 2.5vw, 1.95rem)/1.2 var(--font-serif); color: var(--paper); text-decoration: none; border-bottom: 1px solid var(--signal); padding-bottom: 8px; margin: 10px 0 26px; transition: color 0.2s; }
.hb-mail:hover, .hb-mail:focus-visible { color: var(--signal); }
.hb-fine { font-size: 0.88rem; color: var(--muted); max-width: 32rem; }

/* Header: gold hover on the homepage */
html .site-nav a:hover, html .site-nav a:focus-visible { color: var(--signal); }

/* Motion: scroll-driven, CSS only, skipped when the visitor prefers less motion */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .hb-hero::before { animation: hb-drift linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
    .hb h2, .hb-thesis blockquote, .hb-firm-lede,       animation: hb-rise ease-out both;
      animation-timeline: view();
      animation-range: entry 5% entry 45%;
    }
  }
}
/* Desktop: the hero runs under the header, which starts nearly clear and firms up on scroll */
@media (min-width: 761px) {
  .hb-hero { margin-top: -92px; }
  .hb-hero .hb-wrap { padding-top: 220px; }
}
@media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    html .site-header { animation: hb-header linear both; animation-timeline: scroll(root); animation-range: 0 260px; }
  }
}
@keyframes hb-header {
  from { background-color: rgba(5, 6, 7, 0.2); border-bottom-color: rgba(45, 51, 53, 0); backdrop-filter: blur(0); }
  to { background-color: rgba(5, 6, 7, 0.94); border-bottom-color: rgba(45, 51, 53, 1); backdrop-filter: blur(18px); }
}
@keyframes hb-drift { to { transform: translateY(6%); } }
@keyframes hb-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .hb-split, .hb-updates .hb-wrap { grid-template-columns: 1fr; }
  .hb-line { grid-template-columns: 56px 1fr; }
  .hb-line-detail { grid-column: 2; }
      .hb-cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hb { --hb-pad: 96px; }
  .hb-hero { min-height: 0; }
  .hb-hero .hb-wrap { padding: 96px 0 60px; }
  .hb-hero-lanes { margin-top: 52px; gap: 10px 26px; }
  .hb-line { grid-template-columns: 40px 1fr; padding: 36px 0; }
  .hb-line-n { font-size: 1.25rem; }
  .hb-notes-head { flex-direction: column; align-items: start; }
  .hb-sub-form, .hb-sub-fields { width: 100%; }
  .hb-sub-fields input[type="email"] { flex: 1; min-width: 0; width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hb-card, .hb-line::before { transition: none; }
  .hb-card:hover, .hb-card:focus-visible { transform: none; }
}
