.portfolio-home { overflow-x: clip; }
.portfolio-home .story-cover {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-content: start;
  min-height: min(800px, 91svh);
  padding: clamp(2.25rem, 5vw, 5rem) 1rem 0;
  text-align: center;
  border-radius: 1.3rem;
}
.story-cover .work-hero-copy { position: relative; z-index: 1; }
.studio-edition .story-cover h1 {
  font-size: clamp(2.4rem, 7vw, 7.5rem);
  max-width: none;
  margin-inline: auto;
  line-height: .98;
}
.story-cover .work-hero-copy > p:not(.eyebrow) { max-width: 60ch; margin-inline: auto; }
.story-cover .project-actions { justify-content: center; }
.studio-edition .story-cover::before {
  background:
    radial-gradient(ellipse at 51% 83%, #596f3d 0, transparent 47%),
    radial-gradient(ellipse at 19% 51%, #383d85 0, transparent 37%),
    radial-gradient(ellipse at 88% 63%, #634491 0, transparent 37%);
}
.studio-edition .story-cover::after {
  background: linear-gradient(#0b1513 0%, #0b15134a 58%, transparent 85%),
    repeating-linear-gradient(90deg, transparent 0 59px, #a6bfba16 60px);
}
.story-reel {
  position: relative;
  align-self: end;
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  align-items: center;
  width: min(940px, 93%);
  margin-top: clamp(1.5rem, 4vw, 3.1rem);
  margin-bottom: -5%;
  perspective: 1050px;
}
.story-reel img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #829488;
  border-radius: .55rem;
  box-shadow: 0 12px 40px #050a06a8;
}
.story-reel img:first-child { transform: translate(17%, 13%) rotate(-7deg) rotateY(12deg); opacity: .78; }
.story-reel img:nth-child(2) { transform: scale(1.13); z-index: 1; }
.story-reel img:last-child { transform: translate(-17%, 13%) rotate(7deg) rotateY(-12deg); opacity: .78; }
.story-work { margin: 0 0 clamp(3rem, 8vw, 7rem); }
.story-work .studio-index { margin-top: .75rem; }
.story-work .work-section-head { margin-block: clamp(2.25rem,7vw,6rem) clamp(1rem, 3vw, 2rem); }
.story-chapters { display: grid; gap: 0; }
.studio-edition .story-chapter {
  --chapter-light: #537848;
  --chapter-base: #101b14;
  --chapter-accent: #b6f74f;
  display: block;
  position: relative;
  border: 0;
  border-block-start: 1px solid #ffffff27;
  background: radial-gradient(ellipse at 18% 70%, var(--chapter-light), transparent 58%), var(--chapter-base);
}
.studio-edition .story-chapter#meyer { --chapter-light: #624584; --chapter-base: #1a1523; --chapter-accent: #e3defd; }
.studio-edition .story-chapter#gold { --chapter-light: #655030; --chapter-base: #1c1c16; --chapter-accent: #ffe2a4; }
.story-chapter-inner {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0,1.37fr) minmax(0,.83fr);
  gap: clamp(1.75rem,5vw,5rem);
  align-items: center;
  padding-block: clamp(2.5rem,7vw,6rem);
}
.story-chapter#meyer .work-card-image { order: 2; }
.story-chapter#meyer .story-chapter-inner { grid-template-columns: minmax(0,.83fr) minmax(0,1.37fr); }
.story-chapter .work-card-image {
  border-radius: .8rem;
  aspect-ratio: auto;
  background: #0e1712;
  border: 1px solid #93ab9a82;
  box-shadow: 0 35px 75px #080b09a8;
}
.story-chapter .work-card-image img { height: auto; aspect-ratio: 1.63; }
.story-window {
  display: flex;
  gap: .35rem;
  align-items: center;
  padding: .55rem .8rem;
  font: .73rem var(--font-mono);
  color: #f0f4ec;
}
.story-window i { width: .43rem; aspect-ratio: 1; border-radius: 50%; background: #90aa9a; }
.story-window b { margin-left: auto; font-weight: 400; }
.story-chapter .work-card-body { padding: 0; }
.story-chapter .work-card h3,.story-chapter .work-card-body h3 { font-size: clamp(2.1rem,5vw,5rem); line-height: .98; letter-spacing: -.075em; }
.story-chapter .chapter-index { color: var(--chapter-accent); }
.story-chapter .work-card-heading { color: #f1f5ee; font-size: clamp(1.1rem,2vw,1.45rem); }
.story-chapter .work-tags li { color: #f1f5ee; background: #ffffff14; border: 1px solid #ffffff30; }
.studio-edition .story-chapter .work-button-dark { background: var(--chapter-accent); border-color: var(--chapter-accent); }
.story-chapter .chapter-build { margin-top: .3rem; }
.studio-edition .story-chapter .work-card-body > p:not(.work-card-heading) { color: #d7e1d8; }
.studio-edition .story-chapter .work-card-body > .chapter-index { color: var(--chapter-accent); }
@media (min-width: 851px) {
  .story-work .studio-index { position: sticky; z-index: 3; top: .65rem; }
  .story-chapter { scroll-margin-top: 4.5rem; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .story-chapter .work-card-image {
      animation: story-screen ease-out both;
      animation-timeline: view();
      animation-range: entry 2% cover 44%;
    }
    .story-chapter#meyer .work-card-image { --story-side: 3%; }
    @keyframes story-screen {
      from { transform: translate(var(--story-side,-3%),7%) scale(.94); opacity: .67; }
      to { transform: translate(0,0) scale(1); opacity: 1; }
    }
  }
}
@media (max-width: 850px) {
  .portfolio-home .story-cover { min-height: 0; }
  .story-chapter-inner,.story-chapter#meyer .story-chapter-inner { grid-template-columns: minmax(0,1fr); min-height: 100svh; align-content: center; }
  .story-chapter#meyer .work-card-image { order: 0; }
  .story-chapter .work-card-image { max-width: 660px; }
}
@media (max-width: 480px) {
  .studio-edition .story-cover h1 { font-size: clamp(2rem,9vw,3.25rem); }
  .story-cover .work-hero-copy > p:not(.eyebrow) { font-size: .94rem; }
  .story-reel { width: 100%; margin-bottom: -4%; }
  .story-chapter .work-card-body h3 { font-size: 2.1rem; }
}

/* Infinity POS interface preview (clearly labelled as a visual preview, not a captured screen). */
.story-chapter#infinity-pos { --chapter-light:#525d43; --chapter-base:#181d16; --chapter-accent:#e2f6b9; }
.infinity-pos-preview {
  position:relative; isolation:isolate; display:grid; place-items:center; width:100%; aspect-ratio:1.63;
  overflow:hidden; padding:clamp(.55rem,2.2vw,1.2rem); color:#18251c; background:#e9eddf;
}
.infinity-pos-preview-photo { position:absolute; z-index:-1; inset:0; width:100%; height:100%; object-fit:cover; aspect-ratio:auto; opacity:.28; filter:saturate(.78) brightness(.76); }
.pos-window { width:100%; overflow:hidden; border:1px solid #f8faf3; border-radius:.7rem; background:#f8f9f4; box-shadow:0 22px 58px #09120bc2; font-family:Arial,sans-serif; }
.pos-window-bar { min-height:38px; display:flex; align-items:center; gap:.45rem; padding:.45rem .65rem; color:#eff4e8; background:#15231b; font-size:clamp(.49rem,1vw,.72rem); }
.pos-window-bar > span { color:#d3f094; font-size:1.25em; font-weight:800; }
.pos-window-bar strong { letter-spacing:.09em; }
.pos-window-bar small { margin-left:auto; color:#acbba9; font-size:.78em; letter-spacing:.08em; }
.pos-window-bar i { padding:.2rem .42rem; border-radius:2em; color:#d5f6ae; background:#31543a; font-size:.63em; font-style:normal; font-weight:700; letter-spacing:.1em; }
.pos-preview-body { display:grid; grid-template-columns:minmax(0,1.18fr) minmax(140px,.82fr); gap:clamp(.45rem,1.5vw,1rem); padding:clamp(.55rem,1.9vw,1.1rem); }
.pos-preview-main { min-width:0; }
.pos-preview-kicker { margin:0 0 .3rem; color:#69814d; font-size:clamp(.45rem,.85vw,.62rem); font-weight:700; letter-spacing:.16em; }
.pos-preview-main h3 { margin:0 0 .6rem; color:#1d2b20; font:700 clamp(.68rem,1.5vw,1.08rem)/1.1 Arial,sans-serif; letter-spacing:-.035em; }
.pos-table-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.35rem; }
.pos-table-grid b { padding:.44rem .5rem; border:1px solid #e1e6d9; border-radius:.38rem; color:#344632; background:#fff; font-size:clamp(.48rem,.95vw,.68rem); }
.pos-table-grid b.is-open { border-color:#a5c789; background:#eef5e7; }
.pos-table-grid small { display:block; margin-top:.14rem; color:#77816f; font-size:.78em; font-weight:400; }
.pos-menu-preview { display:flex; align-items:center; gap:.45rem; margin-top:.5rem; padding:.42rem; border:1px solid #e3e7dd; border-radius:.4rem; background:#fff; }
.pos-menu-preview > span { display:grid; place-items:center; width:1.8rem; height:1.8rem; flex:0 0 auto; border-radius:.3rem; background:#f1eee1; font-size:1rem; }
.pos-menu-preview div { min-width:0; }
.pos-menu-preview strong,.pos-menu-preview small { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pos-menu-preview strong { color:#273426; font-size:clamp(.48rem,.9vw,.65rem); }
.pos-menu-preview small { margin-top:.12rem; color:#798375; font-size:clamp(.4rem,.72vw,.53rem); }
.pos-menu-preview > b { margin-left:auto; color:#435a35; white-space:nowrap; font-size:clamp(.45rem,.82vw,.6rem); }
.pos-preview-ticket { min-width:0; padding:clamp(.5rem,1.2vw,.82rem); border:1px solid #e2e6dc; border-radius:.45rem; background:#fff; }
.pos-preview-ticket > small { color:#71806b; font-size:clamp(.4rem,.72vw,.53rem); font-weight:700; letter-spacing:.09em; }
.pos-preview-ticket h4 { margin:.45rem 0 .7rem; color:#202e23; font:700 clamp(.63rem,1.1vw,.82rem)/1.2 Arial,sans-serif; }
.pos-preview-ticket p { display:flex; justify-content:space-between; gap:.3rem; margin:.4rem 0; color:#485247; font-size:clamp(.43rem,.78vw,.57rem); }
.pos-preview-ticket p b { color:#273626; white-space:nowrap; }
.pos-ticket-status { display:flex; align-items:center; gap:.35rem; margin-top:.7rem; padding:.38rem; border-radius:.3rem; color:#3a5a34; background:#edf5e8; font-size:clamp(.42rem,.72vw,.54rem); font-weight:700; }
.pos-ticket-status i { width:.43rem; aspect-ratio:1; border-radius:50%; background:#76a958; }
.pos-preview-ticket .pos-ticket-foot { display:block; margin-top:.5rem; color:#7d8676; font-weight:400; letter-spacing:0; }
.pos-preview-caption { position:absolute; right:.5rem; bottom:.45rem; padding:.26rem .44rem; border:1px solid #ffffff68; border-radius:2rem; color:#f6f7f1; background:#121a14c9; font:600 clamp(.38rem,.7vw,.52rem)/1 Arial,sans-serif; letter-spacing:.08em; }
.project-case-modal[data-project="infinity-pos"] { --case-glow:#536340; --case-accent:#e2f6b9; }
.project-case-screen .infinity-pos-preview { aspect-ratio:1.48; }
.project-case-screen .infinity-pos-preview-photo { height:100%; }
.project-case-screen .pos-window { max-width:650px; }
.project-case-screen .pos-window-bar { min-height:46px; }
.project-case-screen .pos-preview-body { padding:clamp(.75rem,2.3vw,1.3rem); }
@media (max-width:480px) {
  .pos-preview-body { grid-template-columns:minmax(0,1fr) minmax(112px,.8fr); }
}
