/* Shared-brand project entrance. Existing project layouts stay scoped to their own screens. */
body:has(.lab-cover) {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
body:has(.lab-cover) .site-head { flex-shrink: 0; }
body:has(.lab-cover) #main {
  width: min(1400px, calc(100% - 72px));
  max-width: none;
  min-height: 0;
  margin: 0 auto;
  padding: clamp(22px, 3.4vh, 34px) 0 0;
  flex: 1 0 auto;
}
.lab-intro { margin-bottom: 26px; text-align: center; }
.lab-byline {
  margin: 0 0 10px;
  color: var(--red-dark);
  font: 700 16px/1.5 var(--brand-sans);
  letter-spacing: 3px;
}
.lab-intro h1 {
  margin: 0 0 14px;
  color: var(--ink);
  font: 900 clamp(48px, 5.4vw, 76px)/1.15 var(--serif);
  letter-spacing: -2px;
}
.lab-subtitle {
  width: fit-content;
  min-width: 340px;
  margin: 0 auto;
  padding: 11px 24px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font: 600 24px/1.5 var(--serif);
  letter-spacing: 2px;
}
.lab-projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.lab-project {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  height: clamp(365px, calc(100svh - 395px), 480px);
  padding: clamp(25px, 2.6vw, 38px);
  border: 1px solid var(--project-line);
  border-radius: 12px;
  background-color: var(--project-paper);
  background-image: linear-gradient(var(--project-tint), var(--project-tint)), url('./assets/editorial-paper.webp');
  background-size: auto, 1536px 1024px;
  box-shadow: inset 0 0 0 1px #fff8, 0 3px 0 var(--project-rim), 0 12px 26px #4b301414;
  color: var(--ink);
  text-decoration: none;
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.lab-project--life {
  --project-line: #b8ad97;
  --project-paper: #f8f5e9;
  --project-tint: #fffdf4b8;
  --project-rim: #d4c8ae;
  --project-accent: #9d3328;
}
.lab-project--career {
  --project-line: #b8ad97;
  --project-paper: #f8f5e9;
  --project-tint: #fffdf4b8;
  --project-rim: #d4c8ae;
  --project-accent: #80602c;
}
.lab-project-copy { position: relative; z-index: 2; pointer-events: none; }
.lab-project-index {
  display: flex;
  align-items: baseline;
  gap: 13px;
  margin: 0 0 22px;
  font: 700 19px/1.2 var(--serif);
}
.lab-project-index > span:first-child { color: var(--project-accent); font-size: 30px; }
.lab-project-index > span:nth-child(2) { color: var(--project-accent); font-weight: 400; }
.lab-project h2 {
  margin: 0 0 18px;
  color: var(--ink);
  font: 900 clamp(40px, 3.9vw, 58px)/1.16 var(--serif);
  letter-spacing: -1.6px;
}
.lab-project h2 > span { display: block; }
.lab-project-description {
  margin: 0;
  font: 600 clamp(16px, 1.42vw, 20px)/1.6 var(--serif);
  color: #342b22;
}
.lab-project-audience {
  display: inline-block;
  margin: -4px 0 15px;
  padding: 4px 12px;
  border: 1px solid #a77c41;
  border-radius: 8px;
  color: #765020;
  font: 650 15px/1.3 var(--brand-sans);
}
.lab-project-character {
  position: absolute;
  z-index: 1;
  display: block;
  width: auto;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  transition: transform 300ms ease;
}
.lab-project-character--life { width: 107%; max-width: none; right: -5%; bottom: 45px; aspect-ratio: 1820 / 832; }
.lab-project-character--career { width: 71%; right: -3%; bottom: 0; }
.lab-project-cta {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-width: 188px;
  min-height: 52px;
  margin-top: auto;
  padding: 12px 24px;
  border: 1px solid #ffffff18;
  border-radius: 9px;
  background: var(--project-accent);
  color: #fff8e9;
  font: 700 23px/1.25 var(--serif);
  box-shadow: inset 0 1px 0 #ffffff24;
}
.lab-project--career .lab-project-cta { background: #30261d; }
.lab-project-cta img { flex: none; filter: brightness(0) invert(96%); transition: transform 220ms ease; }
.lab-project:focus-visible { outline: 3px solid var(--red-dark); outline-offset: 6px; }
@media (hover: hover) and (pointer: fine) {
  .lab-project:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px #fff9, 0 3px 0 var(--project-rim), 0 18px 34px #4b301422; }
  .lab-project:hover .lab-project-character { transform: translateY(-5px); }
  .lab-project:hover .lab-project-cta img { transform: translateX(5px); }
}
.lab-project:active { transform: translateY(-1px); }
body:has(.lab-cover) .site-foot {
  width: min(1400px, calc(100% - 72px));
  max-width: none;
  flex-shrink: 0;
  margin: 28px auto 0;
  padding: 17px 0 23px;
}
body:has(.lab-cover) .foot-note { display: none; }
@media (min-width: 901px) and (max-height: 820px) {
  body:has(.lab-cover) #main { padding-top: 20px; }
  .lab-intro { margin-bottom: 22px; }
  .lab-byline { margin-bottom: 7px; font-size: 14px; }
  .lab-intro h1 { margin-bottom: 10px; font-size: 62px; }
  .lab-subtitle { padding-top: 8px; font-size: 21px; }
  .lab-project { height: clamp(350px, calc(100svh - 355px), 440px); padding: 26px 30px; }
  .lab-project-character--life { width: 70%; right: -4%; bottom: 40px; }
  .lab-project-index { margin-bottom: 17px; font-size: 17px; }
  .lab-project-index > span:first-child { font-size: 27px; }
  .lab-project h2 { margin-bottom: 14px; font-size: 49px; }
  .lab-project-audience { margin-bottom: 10px; }
  .lab-project-description { font-size: 17px; }
  .lab-project-cta { min-height: 48px; padding: 10px 22px; font-size: 21px; }
  body:has(.lab-cover) .site-foot { margin-top: 23px; padding: 14px 0 19px; }
}
@media (min-width: 681px) and (max-width: 1000px) {
  body:has(.lab-cover) #main, body:has(.lab-cover) .site-foot { width: calc(100% - 40px); }
  .lab-projects { gap: 18px; }
  .lab-project { height: 405px; padding: 24px; }
  .lab-project-index { font-size: 17px; margin-bottom: 18px; }
  .lab-project h2 { font-size: 42px; }
  .lab-project-description { max-width: 220px; font-size: 17px; }
  .lab-project-character--life { width: 80%; bottom: 65px; right: -5%; }
  .lab-project-character--career { width: 83%; right: -8%; bottom: 0; }
  .lab-project-cta { min-width: 165px; gap: 16px; font-size: 20px; }
}
@media (max-width: 680px) {
  body:has(.lab-cover) #main { width: calc(100% - 28px); padding-top: 23px; }
  .lab-intro { margin-bottom: 21px; }
  .lab-byline { font-size: 11px; letter-spacing: 2px; margin-bottom: 9px; }
  .lab-intro h1 { font-size: clamp(33px, 8.3vw, 49px); letter-spacing: -.8px; margin-bottom: 11px; }
  .lab-subtitle { min-width: 0; padding: 9px 18px 0; font-size: 17px; letter-spacing: .5px; }
  .lab-projects { grid-template-columns: 1fr; gap: 18px; }
  .lab-project { height: 256px; padding: 21px 22px; border-radius: 11px; overflow: clip; }
  .lab-project-index { gap: 9px; margin-bottom: 13px; font-size: 14px; }
  .lab-project-index > span:first-child { font-size: 20px; }
  .lab-project h2 { font-size: 35px; letter-spacing: -.7px; margin-bottom: 11px; }
  .lab-project-description { max-width: 210px; font-size: 14px; line-height: 1.6; }
  .lab-project--career h2 { font-size: 31px; line-height: 1.05; margin-bottom: 9px; }
  .lab-project-audience { margin: 0 0 8px; border-radius: 5px; padding: 3px 8px; font-size: 11px; }
  .lab-project-character--life { width: 72%; bottom: 43px; right: -5%; }
  .lab-project-character--career { width: min(69%, 312px); right: -5%; bottom: 0; }
  .lab-project-cta { min-width: 132px; min-height: 39px; gap: 18px; padding: 8px 14px; border-radius: 7px; font-size: 17px; }
  .lab-project-cta img { width: 21px; height: 21px; }
  body:has(.lab-cover) .site-foot { width: calc(100% - 28px); margin-top: 23px; padding: 15px 0 20px; flex-direction: row; align-items: center; gap: 10px; }
  body:has(.lab-cover) .foot-signature { font-size: 13px; gap: 6px; }
  body:has(.lab-cover) .foot-signature img { width: 16px; height: 16px; }
  body:has(.lab-cover) .foot-signature small { display: none; }
  body:has(.lab-cover) .foot-project { font-size: 0; }
  body:has(.lab-cover) .foot-domain { font-size: 11px; }
}
@media (max-width: 370px) {
  .lab-project { padding: 19px 18px; }
  .lab-project h2 { font-size: 31px; }
  .lab-project--career h2 { font-size: 28px; }
  .lab-project-description { font-size: 13px; }
  .lab-project-character--life { right: -5%; width: 70%; }
  .lab-project-character--career { right: -5%; width: 66%; }
}
@media (prefers-reduced-motion: reduce) {
  .lab-project, .lab-project-character, .lab-project-cta img { transition: none; }
  .lab-project:hover, .lab-project:hover .lab-project-character, .lab-project:hover .lab-project-cta img { transform: none; }
}
