/* Shared screen frames. Arrows live outside the scrolling content panels. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.paged-site { scroll-snap-type: y proximity; }
body { min-width: 0; margin: 0; font-family: Arial, Helvetica, sans-serif; color: #353a3d; background: #fff; }
a { color: inherit; }
a:focus-visible { outline: 3px solid #438b2e; outline-offset: 6px; }
.first-screen, .second-screen {
  height: 100vh;
  height: 100svh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}
.screen-middle { position: relative; min-height: 0; display: grid; }
.first-screen > .screen-middle { padding-bottom: 72px; }
.second-screen > .screen-middle { padding-top: 72px; }
.first-screen .home-screen-middle { background: #0a0a0a; }
.site-header { background: #fff; }
.header-inner { width: calc(100% - 48px); max-width: 1140px; min-height: 70px; margin: 0 auto; padding: 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: #000; font-size: 28px; font-weight: 700; text-decoration: none; }
nav { display: flex; gap: 24px; }
nav a { padding: 2px; border: none; font: normal normal 22px Arial, sans-serif; color: #2c2c2c; text-decoration: none; background: transparent; }
nav a[aria-current='page'], nav a:hover { color: #43852d; }
footer { min-height: 70px; padding: 24px; background: #fff; color: #2c2c2c; text-align: center; }
footer p { margin: 0; font-size: 16px; line-height: 22px; }
footer a { text-decoration: none; }
footer a:first-child { font-weight: 700; text-decoration: underline; }
.down-arrow, .up-arrow { position: absolute; left: 50%; transform: translateX(-50%); width: fit-content; margin: 0; font-size: 28px; text-decoration: none; }
.down-arrow { display: block; bottom: 36px; color: #fff; }
.up-arrow { top: 24px; color: #0a0a0a; }
.content-inner { width: 100%; max-width: 1140px; margin: 0 auto; }
h1 { margin: 0 0 40px; font-size: 70px; line-height: 78px; }
h2 { margin: 0; color: #858585; font-size: 70px; line-height: 78px; font-weight: 700; }
.columns h3 { margin: 0 0 20px; font-size: 28px; line-height: 32px; }

/* Home: fixed lines scale together within the available panel. */
.hero, .home-about { height: 100%; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; text-align: center; }
.first-screen:has(.hero) { height: 100svh; min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto; }
.first-screen .hero { height: 100%; min-height: 0; container-type: size; }
.hero { padding: 0 24px; background: #0a0a0a; color: #fff; }
/* One font size and fixed phrase breaks; width and height scale together. */
.hero-content { flex: 0 0 auto; width: 12.24em; margin: auto; font-size: min(54.4661200588px, 5.4575163399cqw, 7.2324011569cqh); line-height: 1.4; }
.hero p, .hero h1 { display: block; width: 100%; margin: 0; font: inherit; text-align: left; }
.hero h1 { margin-bottom: 1em; }
.hero-line { display: block; white-space: nowrap; }
.home-about { padding: 0 24px 48px; background: #0a0a0a; color: #fff; }
.home-about .columns p { color: #bcbcbc; }
.second-screen:has(.home-about) > .screen-middle { background: #0a0a0a; }
.second-screen:has(.home-about) .up-arrow { color: #fff; }
.home-about .content-inner { flex: 0 0 auto; margin-block: auto; }
.home-about h2 { max-width: 26ch; margin-inline: auto; }
.projects { padding-top: 130px; scroll-margin-top: 24px; }
.columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.columns p { max-width: 48ch; margin: 0 auto; font-size: 16px; line-height: 22px; color: #6b6b6b; }

/* Team: natural card heights, with compact rows on phones. */
.team-screen { background: #0a0a0a; color: #fff; }
.team-screen .down-arrow { bottom: 20px; color: #fff; background: #0a0a0a; padding: 4px 18px; }
.team-screen .up-arrow { top: 20px; color: #fff; background: #0a0a0a; padding: 4px 18px; }
.team-panel { height: 100%; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding: 0 24px; }
.first-screen .team-panel { --team-gap: 24px; gap: var(--team-gap); }
.second-screen .team-panel { padding-bottom: 48px; }
.team-panel > :first-child { margin-top: auto; }
.team-panel > :last-child { margin-bottom: auto; }
.team-intro { flex-shrink: 0; text-align: center; }
.team-intro h1 { font-size: 48px; line-height: 1.12; margin-bottom: 18px; }
.team-intro p { max-width: 850px; margin: 0 auto; color: #ccc; font-size: 16px; line-height: 1.5; }
.team-roster { flex: 0 0 auto; display: flex; flex-direction: column; margin-top: 0; }
.team-panel .team-roster h2 { margin: 0 0 16px; font-size: 24px; line-height: 1.2; text-align: left; }
.member-groups { display: grid; gap: 16px; }
.member-list { flex: 0 0 auto; width: 100%; padding: 0; margin: 0 auto; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; grid-auto-rows: auto; }
.member-list li { position: relative; min-width: 0; padding: 22px; background: #151515; border: 1px solid #303030; }
.member-name { display: block; width: fit-content; margin: 0 0 10px; font-size: 24px; font-weight: 700; line-height: 1.2; text-decoration: none; overflow-wrap: anywhere; }
.member-name::after { content: ''; position: absolute; inset: 0; }
.member-list span { display: block; color: #bcbcbc; font-size: 16px; line-height: 1.5; }
.member-list span a { position: relative; z-index: 1; text-decoration: none; }
.team-panel a:hover { color: #83b76f; }
.member-name:focus-visible { outline: none; }
.member-name:focus-visible::after { outline: 3px solid #438b2e; outline-offset: -3px; }
.member-list li:has(.member-name:hover) { border-color: #83b76f; }
.team-panel h2 { color: #fff; font-size: 32px; line-height: 1.2; }
.team-note { color: #bcbcbc; line-height: 1.6; margin: 16px 0 24px; }
.role-list { margin: 0; }
.role-list > div { padding: 18px 0; border-bottom: 1px solid #303030; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; }
.role-list dt { font-weight: 700; font-size: 18px; }
.role-list dd { margin: 0; color: #bcbcbc; line-height: 1.6; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 1199px), (orientation: portrait) {
  html.paged-site { scroll-snap-type: none; }
  .first-screen, .second-screen { height: auto; min-height: 100svh; grid-template-rows: auto 1fr auto; }
  .hero, .home-about, .team-panel { height: auto; overflow-y: visible; }
  .team-panel { min-height: auto; }
  h2 { font-size: clamp(32px, 5.8vw, 70px); line-height: 1.12; }
  .columns { grid-template-columns: minmax(0, 1fr); gap: 52px; }
  .columns article { width: 100%; max-width: 480px; margin: 0 auto; }
  .projects { padding-top: 72px; }
}
@media (max-height: 750px) and (min-width: 1200px) and (orientation: landscape) {
  .team-intro h1 { font-size: 38px; margin-bottom: 12px; }
}
@media (min-width: 601px) and (max-width: 1199px) and (max-height: 750px) and (orientation: landscape) {
  .first-screen .team-panel { --team-gap: 14px; gap: var(--team-gap); }
  .team-intro h1 { font-size: 34px; margin-bottom: 10px; }
}
@media (min-width: 700px) {
  .member-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .member-list { gap: 12px; }
  .member-list--other { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-list li { padding: clamp(10px, 1.5vw, 22px) 12px; }
  .member-name { font-size: clamp(18px, 2.3vw, 26px); margin-bottom: 10px; }
  .member-list span { font-size: clamp(13px, 1.5vw, 16px); }
}
@media (max-width: 600px) {
  .first-screen > .screen-middle { padding-bottom: 64px; }
  .first-screen > .home-screen-middle { padding-bottom: 72px; }
  .second-screen > .screen-middle { padding-top: 64px; }
  .header-inner { width: calc(100% - 32px); min-height: 56px; flex-direction: row; gap: 8px; padding: 8px 0; }
  .brand { flex-shrink: 0; font-size: 22px; white-space: nowrap; }
  nav { gap: 10px; flex-wrap: nowrap; justify-content: center; }
  nav a { font-size: 16px; }
  footer { padding: 20px 16px; }
  footer p { font-size: 14px; overflow-wrap: anywhere; }
  h1 { font-size: clamp(36px, 10vw, 56px); line-height: 1.12; margin-bottom: 28px; }
  .columns h3 { font-size: 26px; line-height: 32px; }
  .hero { padding-inline: 20px; }
  .home-about { padding-inline: 20px; padding-bottom: 16px; }
  .home-about .content-inner { display: flex; flex-direction: column; }
  .home-about .projects { display: flex; flex-direction: column; padding-top: clamp(24px, calc(8svh - 32px), 44px); }
  .home-about .columns { gap: clamp(8px, calc(6svh - 32px), 24px); }
  .home-about .columns h3 { margin-bottom: clamp(6px, 1.2svh, 10px); }
  .team-panel { padding-inline: 20px; }
  .first-screen .team-panel { --team-gap: 16px; gap: var(--team-gap); padding-inline: 16px; }
  .second-screen .team-panel { padding-bottom: 24px; }
  .team-intro h1 { font-size: 34px; }
  .team-intro p { font-size: 14px; line-height: 1.3; }
  .team-note { margin: 12px 0; line-height: 1.4; }
  .role-list > div { grid-template-columns: minmax(0, 1fr); padding: 5px 0; gap: 4px; }
  .role-list dd { line-height: 1.4; }
}
@media (max-width: 699px) {
  .member-groups { gap: clamp(4px, 0.8svh, 8px); }
  .member-list { gap: clamp(4px, 0.8svh, 8px); }
  .member-list li { display: flex; min-height: 44px; flex-wrap: nowrap; justify-content: space-between; align-items: center; gap: 8px; padding: 0 10px; }
  .member-name { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; margin: 0; font-size: 20px; }
  .member-list span { font-size: 14px; text-align: right; }
  .member-list span a { display: inline-flex; align-items: center; justify-content: flex-end; min-width: 44px; min-height: 44px; margin-block: 0; padding-inline: 6px; }
}

/* Short phone viewports need less chrome and a plain, compact roster. */
@media (max-width: 600px) and (max-height: 850px) {
  footer { min-height: 48px; padding: 8px 12px; }
  footer p { font-size: 12px; line-height: 16px; }
  .home-about h2 { font-size: clamp(20px, 6vw, 26px); }
  .home-about .columns h3 { font-size: 20px; line-height: 24px; }
  .home-about .columns p { font-size: 13px; line-height: 17px; }
  .first-screen .team-panel { --team-gap: 12px; gap: var(--team-gap); }
  .team-intro h1 { margin-bottom: 12px; font-size: 28px; }
  .team-intro p { font-size: 13px; line-height: 1.25; }
  .team-panel .team-roster h2 { margin-bottom: 8px; font-size: 18px; line-height: 22px; }
  .member-groups, .member-list { gap: 2px; }
  .member-list li { min-height: 28px; padding: 0; border: 0; background: transparent; }
  .member-name { display: inline-flex; align-items: center; min-height: 28px; font-size: 16px; line-height: 20px; }
  .member-name::after { content: none; }
  .member-name:focus-visible { outline: 3px solid #438b2e; outline-offset: 2px; }
  .member-list span { font-size: 12px; line-height: 16px; }
  .member-list span a { min-height: 28px; margin: 0; padding-inline: 2px; }
  .second-screen .team-panel { padding-bottom: 16px; }
  .team-panel h2 { font-size: 24px; line-height: 28px; }
  .team-note { margin-block: 8px; font-size: 13px; line-height: 1.25; }
  .role-list > div { padding-block: 2px; gap: 2px; }
  .role-list dt { font-size: 14px; line-height: 17px; }
  .role-list dd { font-size: 13px; line-height: 1.25; }
}
@media (max-width: 360px) and (max-height: 600px) {
  footer { min-height: 44px; padding-block: 6px; }
  .first-screen .team-panel { --team-gap: 8px; gap: var(--team-gap); }
  .team-intro h1 { margin-bottom: 8px; font-size: 24px; }
  .team-intro p, .team-note { font-size: 12px; line-height: 1.2; }
  .team-panel .team-roster h2 { margin-bottom: 6px; font-size: 16px; line-height: 20px; }
  .member-groups, .member-list { gap: 1px; }
  .member-list li, .member-name, .member-list span a { min-height: 24px; }
  .member-name { font-size: 14px; line-height: 18px; }
  .member-list span { font-size: 11.5px; line-height: 14px; }
  .team-panel h2 { font-size: 22px; line-height: 26px; }
  .role-list > div { padding-block: 1px; gap: 1px; }
  .role-list dt { font-size: 13px; line-height: 15px; }
  .role-list dd { font-size: 12px; line-height: 1.2; }
  .team-note { margin-block: 4px; }
  .second-screen .team-panel { padding-bottom: 8px; }
}

/* Keep full-size desktop cards; compact them only when panel height requires it. */
@media (min-width: 1200px) and (orientation: landscape) {
  .first-screen.team-screen > .screen-middle { container-type: size; }
  .first-screen .team-panel { --team-gap: 48px; gap: var(--team-gap); padding-block: 8px; }
}
@container (max-height: 849px) {
  .first-screen .team-panel { --team-gap: clamp(24px, calc(8cqh - 24px), 48px); gap: var(--team-gap); }
  .team-intro h1 { font-size: clamp(28px, 5cqh, 48px); margin-bottom: clamp(8px, 1.5cqh, 18px); }
  .team-intro p { font-size: clamp(13px, 2cqh, 16px); line-height: 1.35; }
  .team-panel .team-roster h2 { font-size: clamp(18px, 2.8cqh, 24px); margin-bottom: clamp(6px, 1.5cqh, 16px); }
  .member-groups, .member-list { gap: clamp(4px, 1cqh, 12px); }
  .member-list li { padding-block: clamp(2px, calc(4cqh - 18px), 22px); }
  .member-name { font-size: clamp(18px, calc(2cqh + 8px), 26px); margin-bottom: clamp(4px, 1cqh, 10px); }
  .member-list span { font-size: clamp(13px, 1.8cqh, 16px); line-height: 1.35; }
}
@container (max-height: 450px) {
  .first-screen .team-panel { --team-gap: 16px; gap: var(--team-gap); }
  .member-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
  .member-name { margin-bottom: 0; }
  .member-list span { text-align: right; }
}

/* Use up to 32px of spare panel height between the introduction and roster. */
@media (max-width: 1199px), (orientation: portrait) {
  .first-screen.team-screen .team-panel::before {
    content: '';
    order: 1;
    flex: 1 1 0;
    min-height: 0;
    max-height: 32px;
    margin-block: calc(var(--team-gap) / -2);
  }
  .first-screen.team-screen .team-intro { order: 0; }
  .first-screen.team-screen .team-roster { order: 2; }
}

/* Add modest card height only when the desktop panel has room. */
@container (min-height: 700px) and (max-height: 849px) {
  .member-list li { padding-block: clamp(2px, calc(4cqh - 12px), 28px); }
}
@container (min-height: 850px) {
  .member-list li { padding-block: clamp(22px, calc(22px + (100cqh - 850px) / 10), 30px); }
}
