/* AI Lab extends the home page's typography, palette and invitation links. */
.labs-page { --lab-width: 1168px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.lab-header-nav { display: flex; gap: 30px; align-items: center; font-size: .875rem; }
.lab-header-nav a { display: inline-flex; min-height: 44px; align-items: center; gap: 12px; text-decoration: none; }
.lab-header-nav a:hover, .lab-header-nav [aria-current] { text-decoration: underline; text-underline-offset: 7px; }
.lab-intro, .lab-projects, .lab-closing { width: min(var(--lab-width), calc(100% - 112px)); margin-inline: auto; }
.lab-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 12%; padding: 72px 0 68px; }
.labs-page .eyebrow { font-size: .75rem; letter-spacing: .12em; margin-bottom: 28px; }
.lab-intro h1 { font-size: clamp(90px, 10.5vw, 148px); line-height: .95; letter-spacing: -.075em; margin: 0 0 32px; }
.lab-intro h1 em { color: var(--accent); }
.lab-deck { font-size: clamp(26px, 3vw, 38px); font-weight: 400; letter-spacing: -.035em; line-height: 1.16; margin: 0; }
.lab-deck em { color: var(--accent); }
.intro-story { align-self: end; font-size: 1rem; line-height: 1.8; color: var(--text); }
.intro-story p { margin: 0 0 18px; }
.intro-story p:last-child { margin: 0; }
.lab-mark { width: 200px; height: 90px; margin: 0 0 28px auto; position: relative; }
.lab-mark svg { width: 100%; height: 100%; overflow: visible; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lab-mark span { position: absolute; left: 45%; top: 35%; font-size: 28px; color: var(--accent); }
.lab-mark-line { stroke-dasharray: 400; animation: lab-draw 2s ease-out both; }
@keyframes lab-draw { from { stroke-dashoffset: 400; } to { stroke-dashoffset: 0; } }
.project-nav { position: sticky; top: 0; z-index: 10; background: #f2f4f5f5; backdrop-filter: blur(14px); border-top: 1px solid #c9d3da; border-bottom: 1px solid #c9d3da; }
.project-nav > div { width: min(var(--lab-width), calc(100% - 112px)); margin-inline: auto; display: flex; align-items: center; gap: 12px; padding-block: 12px; }
.project-nav-label { color: var(--muted); font-size: .8125rem; margin-right: auto; white-space: nowrap; }
.project-nav a { flex-shrink: 0; padding: 11px 16px; border: 1px solid transparent; border-radius: 30px; text-decoration: none; font-size: .875rem; transition: background .2s; }
.project-nav a:hover { background: #e1e8ed; }
.project-nav a[aria-current="location"] { background: var(--ink); color: var(--paper); }
.lab-project { padding: 72px 0 76px; scroll-margin-top: 88px; }
.lab-project + .lab-project { border-top: 1px solid #c9d3da; }
#projects { scroll-margin-top: 88px; }
#projects:focus { outline: none; }
.project-heading { display: flex; gap: 22px; align-items: center; margin-bottom: 34px; }
.app-icon { flex: 0 0 74px; width: 74px; height: 74px; display: grid; place-items: center; border-radius: 20px; font-size: 42px; font-weight: 650; letter-spacing: -.06em; box-shadow: 0 5px 12px #20304712; }
.app-icon.pizza { background: #f2cc43; color: #9c2c24; font-family: Georgia, serif; font-style: italic; border: 5px solid #a83a2e; }
.app-icon.traffic { background: #273532; color: #f6d15a; border: 1px solid #46634d; font-family: Georgia, serif; }
.app-icon.travel { background: #111a2e; color: #c4a665; font-family: Georgia, serif; font-weight: 400; }
.project-category { margin: 0 0 9px; color: var(--muted); font-size: .75rem; letter-spacing: .035em; }
.project-category span { padding: 0 6px; }
.labs-page h2 { font-size: clamp(28px, 3.3vw, 44px); letter-spacing: -.045em; line-height: 1.1; font-weight: 450; }
.project-tagline { margin: 9px 0 0; font-size: 1rem; line-height: 1.55; color: var(--text); }
.project-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.project-story { font-size: 1rem; line-height: 1.8; color: var(--text); }
.project-story p { margin: 0 0 22px; }
.project-story .project-summary { color: var(--ink); font-size: 1.125rem; line-height: 1.65; }
.project-story h3 { margin: 26px 0 8px; color: var(--ink); font-size: .875rem; font-weight: 650; }
.project-story .project-aside { font-family: Georgia, serif; font-size: 1.125rem; font-style: italic; color: var(--accent); }
.project-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 20px; }
.labs-page .connect-link { font-size: .875rem; gap: 16px; }
.labs-page .link-arrow { flex: 0 0 42px; height: 42px; width: 42px; }
.project-gallery { position: sticky; top: 106px; min-width: 0; }
.gallery-stage { border-radius: 22px; overflow: hidden; border: 1px solid #d1dbe0; }
.pizzaclass-gallery .gallery-stage { background: #e7e0d0; }
.gridlock-gallery .gallery-stage { background: #dbe3dc; }
.montreal-gallery .gallery-stage { background: #d6dfe8; }
.gallery-track { display: flex; gap: 22px; overflow-x: auto; padding: 28px; scroll-snap-type: x mandatory; scroll-padding-left: 28px; scrollbar-width: thin; scrollbar-color: #8195a6 transparent; overscroll-behavior-x: contain; }
.gallery-track:focus-visible { outline: 3px solid var(--accent); outline-offset: -4px; }
.gallery-slide { margin: 0; flex-shrink: 0; scroll-snap-align: start; min-width: 0; }
.web-slide { width: 100%; }
.browser-frame { overflow: hidden; border-radius: 10px; border: 1px solid #b7b2a5; background: #f6f4ed; box-shadow: 0 12px 22px #363e4018; }
.browser-chrome { height: 28px; background: #f5f1e7; display: flex; gap: 4px; align-items: center; padding: 0 10px; border-bottom: 1px solid #ddd8cb; }
.browser-chrome i { width: 5px; height: 5px; border-radius: 50%; background: #b7b2a5; }
.browser-chrome span { margin: 0 auto; padding-right: 22px; font-size: 10px; letter-spacing: .04em; color: #655d50; }
.gallery-slide img { display: block; width: 100%; height: auto; }
.phone-slide { width: 218px; }
.phone-frame { border: 6px solid #202b36; border-radius: 26px; overflow: hidden; background: #111a2e; box-shadow: 0 14px 25px #20304720; }
.phone-frame img { aspect-ratio: 390 / 844; object-fit: cover; }
.gallery-slide figcaption { margin: 18px 0 0; font-size: .8125rem; line-height: 1.5; color: #394d59; }
.gallery-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; min-height: 44px; }
.gallery-position { display: flex; align-items: center; gap: 7px; font-size: .8125rem; color: var(--text); margin: 0; }
.gallery-instruction { color: var(--muted); margin-left: 10px; }
.gallery-buttons { display: flex; gap: 8px; }
.gallery-buttons[hidden] { display: none; }
.gallery-buttons button { width: 44px; height: 44px; padding: 0 0 3px; display: grid; place-items: center; border: 1px solid #9babb8; border-radius: 50%; color: var(--ink); background: transparent; cursor: pointer; font-size: 27px; line-height: 1; transition: background .2s; }
.gallery-buttons button:hover:not(:disabled) { background: #dce4ea; }
.gallery-buttons button:disabled { opacity: .35; cursor: default; }
.gallery-buttons button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.lab-closing { border-top: 1px solid #c9d3da; padding: 60px 0 70px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.lab-closing p { font-size: clamp(30px, 4vw, 52px); line-height: 1.1; letter-spacing: -.045em; margin: 0; }
.lab-closing em { color: var(--accent); }
.labs-page footer { border-top: 1px solid #c9d3da; }
@media (max-width: 1050px) {
  .lab-intro { gap: 8%; }
  .project-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
  .project-heading { align-items: start; }
  .phone-slide { width: 200px; }
  .gallery-track { padding: 22px; scroll-padding-left: 22px; }
}
@media (max-width: 700px) {
  .labs-page .masthead { width: calc(100% - 40px); }
  .lab-header-nav { gap: 18px; font-size: .8125rem; }
  .lab-header-nav a:last-child { display: none; }
  .lab-intro, .lab-projects, .lab-closing { width: calc(100% - 40px); }
  .lab-intro { display: block; padding: 40px 0; }
  .labs-page .eyebrow { font-size: .75rem; letter-spacing: .08em; }
  .lab-intro h1 { font-size: clamp(82px, 24vw, 128px); margin-bottom: 24px; }
  .lab-deck { font-size: 28px; }
  .intro-story { margin-top: 28px; }
  .lab-mark { display: none; }
  .project-nav > div { width: 100%; padding: 10px 20px; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .project-nav-label { display: none; }
  .project-nav a { font-size: .8125rem; padding: 10px 14px; }
  .lab-project { padding-block: 44px 48px; scroll-margin-top: 76px; }
  .project-heading { gap: 14px; margin-bottom: 24px; }
  .app-icon { width: 56px; height: 56px; flex-basis: 56px; border-radius: 15px; font-size: 30px; }
  .project-category { font-size: .75rem; line-height: 1.5; margin-bottom: 7px; }
  .project-tagline { font-size: .9375rem; }
  .project-layout { display: flex; flex-direction: column; gap: 28px; }
  .project-gallery { position: static; width: 100%; order: -1; }
  .gallery-track { padding: 22px; gap: 16px; scroll-padding-left: 22px; }
  .phone-slide { width: clamp(190px, 61vw, 240px); }
  .gallery-stage { border-radius: 16px; }
  .gallery-tools { margin-top: 10px; }
  .project-story { width: 100%; }
  .project-story h3 { font-size: .9375rem; }
  .project-links { gap: 10px 22px; }
  .lab-closing { display: block; padding-block: 40px; }
  .lab-closing .connect-link { margin-top: 22px; }
  .labs-page footer { padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-track { scroll-behavior: auto; }
}
@media (min-width: 701px) and (max-width: 1050px) {
  .gallery-instruction { display: none; }
}

/* App Store artwork already includes its own phone and headline. */
.store-slide .phone-frame { border: 0; border-radius: 18px; }
.store-slide img { aspect-ratio: 598 / 1300; object-fit: contain; }
