.story { height: 265svh; background: #16241f; color: #fffdf5; }
.story-stage { position: sticky; top: 76px; min-height: calc(100svh - 76px); display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.story-film, .shot { position: absolute; inset: 0; width: 100%; height: 100%; }
.story-film { pointer-events: none; }
.story-film::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,#101b17ed 1%,#101b1799 35%,transparent 76%),linear-gradient(0deg,#101b17ed,transparent 64%); }
.shot { opacity: 0; object-fit: cover; transform: scale(var(--zoom,1)); transition: opacity 190ms ease; }
.shot.current { opacity: 1; }
.story .hero-copy { position: relative; padding-block: 45px 58px; }
.story h1 { max-width: 12ch; text-shadow: 0 2px 16px #0005; }
.story h1 em, .story .intro, .story .eyebrow, .story .textlink { color: #fffdf5; }
.story .button { background: #f5e8cc; color: #233831; border-color: #f5e8cc; }
.laptop-shot { display: grid; place-items: center; background: radial-gradient(ellipse at 68% 45%,#ae8a5e,#593c2d 55%,#251e1b 95%); }
.laptop { width: min(61vw,950px); margin-left: 30%; filter: drop-shadow(0 20px 35px #0009); }
.screen { aspect-ratio: 16 / 10; border: 12px solid #252a28; border-radius: 16px 16px 3px 3px; overflow: hidden; background: #f5d7a0; }
.screen iframe { display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }
.keyboard { height: clamp(26px,6vw,85px); width: 108%; margin-left: -4%; background: repeating-linear-gradient(90deg,#2d302e 0 3%,#454845 3% 3.5%); border: 9px solid #636763; clip-path: polygon(4% 0,96% 0,100% 87%,98% 100%,2% 100%,0 87%); }
.gallery-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.gallery-heading p { color: var(--muted); margin-bottom: 0; }
.gallery-controls { display: flex; gap: 8px; }
.gallery-controls[hidden] { display: none; }
.gallery-controls button { min-width: 44px; min-height: 44px; border-radius: 50%; background: transparent; border: 1px solid var(--green); color: var(--green); font: 1.2rem var(--sans); cursor: pointer; }
.gallery-controls button:disabled { opacity: .35; cursor: default; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 18px; list-style: none; padding: 8px 4px 18px; margin: 24px -4px 0; }
.gallery-card { flex: 0 0 min(77%,720px); min-width: 0; scroll-snap-align: start; scroll-margin-inline: 4px; }
.gallery-preview { background: var(--demo-bg,#e4b866); display: block; padding: clamp(15px,3vw,40px); border-radius: 10px; }
.browser-frame { border-radius: 8px; overflow: hidden; box-shadow: 0 7px 25px #0003; }
.browser-top { display: flex; justify-content: space-between; gap: 10px; padding: 7px 12px; background: #fffaf0; color: #26382e; font-size: .73rem; }
.sample-preview { aspect-ratio: 1.8; position: relative; isolation: isolate; display: grid; align-items: end; background: #4f4437; }
.sample-preview img, .photo-demo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.sample-preview::after, .photo-demo::after { content:""; position:absolute; inset:0; background:linear-gradient(0deg,#151713e8,transparent 90%); z-index:-1; }
.preview-copy { padding: clamp(13px,3vw,34px); color: white; }
.preview-copy strong { font: clamp(1.35rem,3.7vw,3.5rem)/1 var(--demo-font,Georgia); display: block; }
.preview-copy span { display: inline-block; margin-top: 12px; padding: 5px 9px; background: var(--demo-bg,#f7db8e); color: var(--demo-ink,#28342c); font-size: .72rem; font-weight: 700; }
.gallery-caption { padding-top: 14px; display: flex; justify-content: space-between; gap: 6px 15px; flex-wrap: wrap; align-items: end; }
.gallery-caption .eyebrow { margin-bottom: 4px; }
.gallery-caption h3 { font-size: clamp(1.55rem,3vw,2.4rem); }
.photo-demo { position: relative; isolation: isolate; color: white; }
.photo-demo .sample-button { background: var(--demo-bg); color: var(--demo-ink); border-color: transparent; }
.in-screen, .in-screen body { scrollbar-width: none; }
.in-screen header { position: static; }
.in-screen .sample-hero { padding-block: clamp(24px,8vw,80px); }
.in-screen h1, .in-screen h2 { font-size: clamp(1.3rem,6.5vw,3.7rem); }
.in-screen .section { padding-block: 30px; }
@media(max-width:680px) {
  .story-stage { top: 113px; min-height: calc(100svh - 113px); }
  .story-film::after { background: linear-gradient(0deg,#101b17fa 3%,#101b1780 57%,transparent 91%); }
  .story .hero-copy { padding-block: 30px; }
  .story h1 { font-size: clamp(2.55rem,9vw,4rem); }
  .story .intro { font-size: .93rem; margin-block: 14px; }
  .story .actions { gap: 3px 10px; }
  .laptop { width: 87vw; margin: 0; align-self: start; margin-top: 8svh; }
  .screen { border-width: 7px; }
  .gallery-card { flex-basis: 89%; }
}
@media(prefers-reduced-motion:reduce) {
  .story { height: auto; }
  .story-stage { position: relative; top: 0; }
  .shot { transition: none; transform: none; }
}
.story:not(.animated-story) { height: auto; }
.story:not(.animated-story) .story-stage { position: relative; top: 0; }

.bakery-store-header { position: static; background: #f5d7a0; color: #572f21; }
.bakery-store-header .brand { font-family: Georgia, serif; }
.bakery-store-header .bar { min-height: 54px; padding-block: 4px; }
.bakery-store-header nav { width: auto; order: initial; gap: clamp(8px, 3vw, 22px); }
.bakery-store-header nav a { white-space: nowrap; }
.bakery-about { background: #f5d7a0; color: #572f21; }
.in-screen .portfolio-demo-bar { display: none; }
.in-screen .bakery-store-header .wrap { width: calc(100% - 24px); }
.in-screen .bakery-store-header .brand { font-size: clamp(.72rem, 3.6vw, 1.2rem); }
.in-screen .bakery-store-header nav a { font-size: clamp(.65rem, 3vw, .9rem); }

.interior-shot { object-position: 50% 54%; }
.table-shot { object-position: 50% 57%; }
body > header .brand { max-width: 23ch; }
.gallery-track .gallery-preview { cursor: default; }
.animated-story .shot { transition: none; }
.laptop { perspective: 900px; }
.laptop .screen { transform-origin: center bottom; transform: rotateX(var(--lid-angle, 0deg)); }
@media (max-width: 680px) {
  body > header .brand { max-width: 53%; min-height: 44px; }
}

/* The hero advances with the page, while the content below stays compact. */
.story { height: 235svh; }
.shot { transform: translateX(var(--slide-x, 0%)) scale(var(--zoom, 1)); }
.animated-story .hero-copy { padding-block: 30px 38px; }
#work, #services, #about, #contact { padding-block: clamp(32px, 5vw, 66px); }
#services .service-grid { margin-top: 20px; gap: 14px 24px; }
#services .service-grid article { padding-top: 14px; }
#about p:first-child { margin-top: 0; }
#about p:last-child { margin-bottom: 0; }

.gallery-track { margin-top: 15px; gap: 14px; }
/* All five items share one preview height regardless of their aspect ratio. */
.gallery-preview {
  --preview-height: clamp(240px, 34vw, 365px);
  --preview-padding: clamp(8px, 1.4vw, 18px);
  height: calc(var(--preview-height) + 2 * var(--preview-padding));
  padding: var(--preview-padding);
  display: grid;
  place-items: center;
}
.gallery-preview > .browser-frame {
  height: var(--preview-height);
  max-width: 100%;
}
.gallery-caption { padding-top: 8px; }
.gallery-caption .eyebrow { margin: 5px 0 0; }
@media (prefers-reduced-motion: reduce) {
  .story { height: auto; }
  .shot { transform: none; }
}

.story-black { position: absolute; inset: 0; background: #000; opacity: 0; }
.coffee-shot { transform-origin: 43% 41%; }
.laptop-shot { transform-origin: 68% 72%; }
@media (max-width: 680px) {
  .laptop-shot { transform-origin: 50% 55%; }
}

.preview-nav { padding: 8px 4%; font: 700 clamp(.62rem,1.35vw,.93rem)/1.3 system-ui,sans-serif; }
.restaurant-preview { box-shadow: none; }
.restaurant-preview img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.bakery-preview { display: grid; grid-template-rows: auto minmax(0, 1fr); width: 100%; background: #f4d8aa; color: #502c1e; }
.bakery-preview .preview-nav { display: flex; justify-content: space-between; gap: 8px; background: #8b3d28; color: white; }
.bakery-spread { display: grid; grid-template-columns: 49% 1fr; align-items: center; min-height: 0; }
.bakery-spread img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.bakery-spread div { padding: 8%; }
.bakery-spread strong { display: block; font: 700 clamp(1rem,3.1vw,2.85rem)/1.05 'Courier New',monospace; margin: .25em 0; }
.bakery-spread p, .bakery-spread small { font-size: clamp(.62rem,1.3vw,.9rem); }
.bakery-spread p { margin: 0; }
.barber-preview { display: grid; grid-template-columns: 27% 1fr; width: 100%; background: #671e2c; color: #fff0d4; }
.barber-rail { padding: 13%; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.barber-rail strong, .barber-cover strong { font: 900 clamp(1.2rem,3.75vw,3.1rem)/.9 Impact,'Arial Black',sans-serif; }
.barber-rail span { font-size: clamp(.62rem,1.35vw,.95rem); }
.barber-cover { isolation: isolate; position: relative; display: grid; align-items: end; padding: 7%; }
.barber-cover img { position: absolute; width: 100%; height: 100%; object-fit: cover; inset: 0; z-index: -2; }
.barber-cover::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg,#201312d9,transparent 65%); }
.phone { width: min(100%, 235px, calc(var(--preview-height) * .73)); height: var(--preview-height); padding: 7px; border-radius: 21px; background: #241d22; box-shadow: 0 6px 18px #0003; }
.phone-scroll { height: 100%; overflow-y: auto; border-radius: 15px; overscroll-behavior-y: contain; touch-action: pan-y; scrollbar-width: thin; background: #faf0fa; color: #422a47; }
.phone-scroll .preview-nav { position: sticky; z-index: 1; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 45px; padding: 0 6%; background: #522b52; color: #fff3ff; }
.phone-scroll details { position: static; }
.phone-scroll summary { list-style: none; cursor: pointer; display: grid; place-items: center; min-width: 44px; min-height: 44px; font-size: 1rem; }
.phone-scroll summary::-webkit-details-marker { display: none; }
.phone-scroll details[open] { background: #0002; }
.phone-scroll details a { display: block; padding: 7px; color: inherit; }
.phone-scroll details[open] a { text-decoration: underline; }
.florist-cover { padding: 12px; }
.florist-cover strong { display: block; margin-bottom: 10px; font: italic 700 2rem/.95 'Times New Roman',serif; }
.phone-scroll img { display: block; width: 100%; aspect-ratio: 1.55; object-fit: cover; }
.phone-section { padding: 12px; font-size: .8rem; }
.phone-section h4, .phone-section p { margin: 0 0 6px; }
.phone-section h4 { font-size: 1.1rem; }
.pickup { background: #ead6ef; }
.bike-preview { background: #f2f6df; color: #223528; font-family: system-ui,sans-serif; }
.bike-preview .preview-nav { justify-content: start; background: #dae74e; color: #203929; }
.bike-cover strong { display: block; padding: 10px; font: 850 1.35rem/.98 system-ui,sans-serif; letter-spacing: -.045em; text-transform: uppercase; }
.bike-preview ul { padding-left: 0; list-style: none; margin: 0; }
.bike-preview li { border-top: 1px solid #d0d9af; padding: 4px 0; }
.bike-checkin { background: #dce8ac; }

.process { border-top: 1px solid #becbc0; margin-top: 23px; padding-top: 22px; }
.process h3 { font-size: clamp(1.5rem,3vw,2.4rem); }
.process-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(230px,32vw,310px);
  grid-template-rows: auto auto auto; gap: 5px 14px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-padding-inline: 3px;
  list-style: none; margin: 12px -3px 0; padding: 5px 3px 12px;
}
.process-step {
  display: grid; grid-row: span 3; grid-template-rows: subgrid;
  scroll-snap-align: start; position: relative;
}
.process-step h4 {
  display: flex; align-items: center; gap: 8px; margin: 0;
  padding: 9px 11px; border-radius: 6px; background: #2f4d3e; color: #fff;
  font: 700 1rem/1.3 system-ui,sans-serif;
}
.process-step h4 span { font-size: .73rem; color: #e0ebde; }
.process-step:not(:last-child) h4::after {
  content: "→"; position: absolute; left: 100%; width: 14px;
  color: #2f4d3e; text-align: center;
}
.process-owner, .process-designer { padding: 8px 11px; border-radius: 6px; background: #fffdf7; }
.process-designer { background: #d5e3d5; }
.process-step p { margin: 3px 0 0; font-size: .9rem; line-height: 1.42; }
.process-step strong { display: block; font-size: .74rem; color: #365344; }
@supports not (grid-template-rows: subgrid) {
  .process-step { grid-template-rows: auto 1fr 1fr; }
}
@media (max-width: 520px) {
  .process-track { grid-auto-columns: min(84%,280px); }
}
