:root{--intro-copy:936px;--copy-width:516px}
/* Readymag-style reference gutter: the flower sits above and 50-60px left of the case title on desktop. */
.site-header{position:fixed;z-index:60;inset:0 auto auto 0;width:0;height:0;pointer-events:none}
.home-symbol{position:fixed;top:15px;left:max(18px,calc((100vw - 1440px)/2 + 20px));display:flex;align-items:center;justify-content:center;width:62px;height:60px;color:#bbb9c0;font-family:'Poppins',Arial,sans-serif;font-weight:400;font-size:67px;line-height:1;pointer-events:auto;text-decoration:none;transform-origin:50% 50%;}
.home-symbol:hover{animation:star-reference-spin 10s linear infinite}
@keyframes star-reference-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
.home-symbol:focus-visible{outline:2px solid #fff;outline-offset:5px;border-radius:6px}
.intro{display:grid;grid-template-columns:minmax(0,307px) minmax(0,1fr);gap:25px;margin-bottom:96px;padding-top:71px}
h1{text-transform:lowercase}
/* Every artwork section bleeds to the full browser width, matching the Readymag reference. */
.media-artboard{position:relative;width:min(1268px,100%);height:100%;margin-inline:auto;z-index:1}
.background-pattern{position:absolute;inset:-8% 0;background-image:url('assets/frame-gradient.svg');background-position:center top;background-size:cover;background-repeat:no-repeat;opacity:.95;z-index:0;pointer-events:none}
.hero-media{height:676px}
.hero-tile{position:absolute;width:42.27%;border-radius:10px;overflow:hidden;box-shadow:0 0 30px rgba(0,0,0,.25)}
.hero-tile img{width:100%;height:100%;object-fit:cover;object-position:top}
.tile-one{height:1025px;top:87px;left:calc(50% - 521px)}
.tile-two{height:803px;top:219px;left:calc(50% - 15px)}
.section-gap{margin-top:var(--section-space)}
.narrow-section{margin-inline:auto;width:calc(100% - 212px)}
.insights .section-title{margin-bottom:26px}
.stat-card{border-radius:20px;background:var(--surface);padding:24px}
.feature-copy{max-width:var(--copy-width);margin-bottom:48px}
.feature-copy p{max-width:100%}
.right-aligned{margin-left:auto;margin-right:106px}
.left-inset{margin-left:106px}
.standard-media{height:676px}
.centered-feature-image{position:absolute;z-index:1;left:50%;top:50%;transform:translate(-50%,-50%);height:auto;max-width:none;object-fit:contain}
.key-visual-img{width:min(65.46%,830px);border-radius:24px}
.modular-img{width:min(65%,824px)}
.component-stack{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:59.15%;display:flex;flex-direction:column;gap:15px;z-index:1}
.component-stack img{width:100%;height:auto}
.examples-media-shell{padding-block:92px}
.examples-artboard{position:relative}
.examples-stack{display:flex;flex-direction:column;gap:48px;width:min(908px,calc(100% - 360px));margin-inline:auto;position:relative;z-index:1}
/* Keep vertical row rhythm unchanged; increase only the gap between images in a row. */
#examples-media .page-previews{column-gap:40px}
.page-previews{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.page-previews-tall{min-height:1229px}
.page-previews-short{min-height:896px}
.page-shot{height:100%;overflow:hidden;background:transparent}
.page-shot img{display:block;width:100%;height:auto;max-width:none}
.results{margin-left:106px;display:grid;grid-template-columns:516px minmax(0,1fr);gap:24px;margin-bottom:179px}
.results-intro p{max-width:516px}
.results-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.stat-card{min-height:150px}.stat-card strong{display:block;white-space:nowrap;margin-bottom:13px;font-weight:700}.stat-card p{font-size:18px;line-height:1.45;color:var(--secondary)}

@media(max-width:1100px){:root{--pad:40px}.intro{grid-template-columns:240px minmax(0,1fr)}h1,.lead,.stat-card strong{font-size:clamp(36px,4vw,50px)}.narrow-section{width:100%}.right-aligned{margin-right:7%}.left-inset{margin-left:7%}.results{margin-left:0;grid-template-columns:40% 1fr}.hero-media,.standard-media{height:min(55vw,676px)}.hero-tile{width:42%}.tile-one{left:8%;height:138%;top:13%}.tile-two{left:49%;height:122%;top:32%}.info-card p,.info-card h3{font-size:16px}.examples-media-shell{padding-block:72px}.examples-stack{width:min(72%,908px)}.page-previews-tall{min-height:min(88vw,1229px)}.page-previews-short{min-height:min(70vw,896px)}}
@media(max-width:767px){:root{--pad:20px;--section-space:96px}.home-symbol{top:11px;left:12px;width:44px;height:54px;font-size:49px}.intro{display:flex;flex-direction:column;gap:19px;margin-bottom:48px;padding-top:85px}h1{font-size:34px}.lead{font-size:clamp(28px,7vw,36px);line-height:1.22;margin-bottom:20px;letter-spacing:normal}.body-text,.feature-copy p,.results-intro p{font-size:16px;line-height:1.52}.media-frame{border-radius:0}.hero-media{height:clamp(380px,112vw,560px)}.tile-one{width:75%;height:110%;top:14%;left:-8%}.tile-two{width:75%;height:100%;top:31%;left:42%}.narrow-section{width:100%}.section-title{font-size:18px;line-height:1.45;margin-bottom:12px}.insights .section-title{margin-bottom:24px}.insight-grid{display:flex;flex-direction:column;gap:12px}.info-card{min-height:0;padding:20px;border-radius:16px}.info-card h3{font-size:16px;line-height:1.45;margin-bottom:12px}.info-card p{font-size:15px;line-height:1.55}.feature-copy,.right-aligned,.left-inset{margin-left:0;margin-right:0;max-width:none;margin-bottom:28px}.standard-media{height:clamp(250px,71vw,530px)}.key-visual-img{width:90%;border-radius:12px}.modular-img{width:90%}.component-stack{width:91%;gap:8px}.examples-media-shell{padding-block:32px}.examples-stack{gap:16px;width:calc(100% - 32px)}.page-previews{gap:10px}.page-previews-tall,.page-previews-short{min-height:auto}.results{margin-left:0;display:block;margin-bottom:94px}.results-intro{margin-bottom:28px}.results-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.stat-card{min-height:0;padding:18px 16px;border-radius:16px}.stat-card strong{font-size:clamp(25px,6.8vw,38px);margin-bottom:10px}.stat-card p{font-size:13px;line-height:1.45}}
@media(max-width:375px){:root{--pad:16px}.home-symbol{left:10px}.lead{font-size:28px}}
.asset-unavailable{visibility:hidden}

.page-shot img{object-fit:cover;object-position:top center}

@media(max-width:767px){
  .page-previews{grid-template-columns:1fr 1fr}
  .page-shot img{width:100%;height:auto}
}


/* Finam image panels: requested solid #1B1A20 background. */
#hero-showcase,#key-visual-media,#modular-media,#components-media,#examples-media{background:#1B1A20;}
#hero-showcase>.background-pattern,#key-visual-media>.background-pattern,#components-media>.background-pattern,#examples-media>.background-pattern{display:none;}
/* Reuse the exact hero tile radius and shadow for artwork surfaces. */
#key-visual-image,#component-stack img,#examples-media .page-shot img,#modular-carousel .modular-slide img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:0;box-shadow:none}
#component-stack img,#examples-media .page-shot img{overflow:hidden;}
/* The carousel is an overlay inside the existing fixed-size media panel. */
#modular-carousel{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:2;outline-offset:-4px;}
#modular-carousel-viewport{width:min(65%,824px);height:100%;overflow:hidden;}
#modular-carousel-track{height:100%;display:flex;transition:transform .45s ease;will-change:transform;}
#modular-carousel .modular-slide{flex:0 0 100%;height:100%;min-width:0;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:0 0 108px;}
#modular-carousel .modular-slide img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:0;box-shadow:none}
#modular-carousel .modular-control{position:absolute;z-index:4;top:50%;transform:translateY(-50%);border:1px solid rgba(255,255,255,.3);border-radius:50%;background:rgba(15,15,20,.5);color:white;width:40px;height:40px;font:30px/1 Arial,sans-serif;cursor:pointer;display:grid;place-items:center;}
#modular-carousel .modular-prev{left:3.5%;}
#modular-carousel .modular-next{right:3.5%;}
#modular-carousel .modular-pagination{position:absolute;z-index:4;bottom:75px;left:50%;transform:translateX(-50%);display:flex;gap:10px;}
#modular-carousel .modular-dot{width:8px;height:8px;border:0;border-radius:50%;padding:0;background:rgba(255,255,255,.4);cursor:pointer;}
#modular-carousel .modular-dot.is-current{background:#fff;}
@media(max-width:767px){
  #modular-carousel-viewport{width:90%;}
  #modular-carousel .modular-slide{padding:20px 0 108px;}
  #modular-carousel .modular-control{width:30px;height:30px;font-size:23px;}
  #modular-carousel .modular-prev{left:1%;}
  #modular-carousel .modular-next{right:1%;}
}
@media(prefers-reduced-motion:reduce){#modular-carousel-track{transition:none;}}

/* Page examples: show each complete image with equal rounding on all four corners.
   The old .page-shot {height:100%;overflow:hidden} clipped image bottoms and shadows. */
#examples-media .page-shot{
  height:auto;
  min-height:0;
  align-self:start;
  overflow:visible;
  border-radius:10px;
  box-shadow:0 0 30px rgba(0,0,0,.25);
}
#examples-media .page-shot img{
  display:block;
  width:100%;
  height:auto;
  border-radius:10px;
  box-shadow:none;
}
/* Make each screenshot row shrink to its visible images. Fixed row min-heights
   created larger visual gaps when the gallery became narrower than 1268px.
   The existing .examples-stack gap remains the same for all three rows. */
#examples-media .page-previews{min-height:0}
/* Preserve image dimensions before lazy-loaded WebP assets become available.
   The intrinsic source ratio takes precedence after loading. */
#example-image-one,#example-image-two{aspect-ratio:auto 888 / 2458}
#example-image-three,#example-image-four{aspect-ratio:auto 888 / 2534}
#example-image-five,#example-image-six{aspect-ratio:auto 888 / 1792}

#modular-media,#modular-media *{border-radius:0;box-shadow:none}.modular-slide{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.modular-slide img{display:block}

#hero-image-left{z-index:2}
#hero-image-right{z-index:1}


/* Key Visual: independent 6-slide carousel. Scoped rules preserve other sections. */
#key-visual-carousel{
  position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;outline-offset:-4px;
}
#key-visual-carousel-viewport{
  width:min(65.46%,830px);height:100%;overflow:hidden;
}
#key-visual-carousel-track{
  display:flex;height:100%;transition:transform .45s ease;will-change:transform;
}
#key-visual-carousel .key-visual-slide{
  flex:0 0 100%;min-width:0;height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;
  padding:34px 0 108px;
}
#key-visual-carousel .key-visual-slide img{
  display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;
  border-radius:10px;box-shadow:none;
}
#key-visual-carousel .key-visual-control{
  position:absolute;z-index:4;top:50%;transform:translateY(-50%);
  width:40px;height:40px;display:grid;place-items:center;cursor:pointer;
  border:1px solid rgba(255,255,255,.3);border-radius:50%;
  background:rgba(15,15,20,.55);color:#fff;font:30px/1 Arial,sans-serif;
}
#key-visual-carousel .key-visual-prev{left:3.5%;}
#key-visual-carousel .key-visual-next{right:3.5%;}
#key-visual-carousel .key-visual-pagination{
  position:absolute;z-index:4;bottom:75px;left:50%;transform:translateX(-50%);
  display:flex;gap:10px;
}
#key-visual-carousel .key-visual-dot{
  width:8px;height:8px;min-width:8px;min-height:8px;padding:0;cursor:pointer;
  border:0;border-radius:50%;background:rgba(255,255,255,.4);
}
#key-visual-carousel .key-visual-dot.is-current{background:#fff;}
#key-visual-carousel .key-visual-control:focus-visible,
#key-visual-carousel .key-visual-dot:focus-visible{outline:2px solid #fff;outline-offset:3px;}
@media(max-width:767px){
  /* Size the carousel from its slides and pagination; the media panel adds 34px padding. */
  #key-visual-media > .media-artboard{height:auto;}
  #key-visual-carousel{position:relative;inset:auto;flex-direction:column;}
  #key-visual-carousel-viewport{width:90%;height:auto;}
  #key-visual-carousel-track{height:auto;align-items:stretch;}
  #key-visual-carousel .key-visual-slide{height:auto;padding:0;justify-content:center;}
  #key-visual-carousel .key-visual-slide img{max-height:none;}
  #key-visual-carousel .key-visual-pagination{
    position:static;bottom:auto;left:auto;transform:none;margin-top:25px;
  }
  #key-visual-carousel .key-visual-control{width:30px;height:30px;font-size:23px;}
  #key-visual-carousel .key-visual-prev{left:1%;}
  #key-visual-carousel .key-visual-next{right:1%;}
}
@media(prefers-reduced-motion:reduce){#key-visual-carousel-track{transition:none;}}


/* Components: three individual Figma artwork frames in a full-bleed image panel. */
#components-carousel{
  position:absolute;inset:0;z-index:2;
  display:flex;align-items:center;justify-content:center;outline-offset:-4px;
}
#components-carousel-viewport{width:59.15%;height:100%;overflow:hidden;}
#components-carousel-track{
  display:flex;height:100%;transition:transform .45s ease;will-change:transform;
}
/* Center each image on the carousel's vertical midpoint, not at the slide's bottom. */
#components-carousel .components-slide{
  flex:0 0 100%;min-width:0;height:100%;
  display:flex;align-items:center;justify-content:center;padding:0;
}
#components-carousel .components-slide img{
  display:block;max-width:100%;max-height:calc(100% - 216px);width:auto;height:auto;
  object-fit:contain;border-radius:0;box-shadow:none;
}
#components-carousel .components-control{
  position:absolute;z-index:4;top:50%;transform:translateY(-50%);
  width:40px;height:40px;display:grid;place-items:center;cursor:pointer;
  border:1px solid rgba(255,255,255,.3);border-radius:50%;
  background:rgba(15,15,20,.55);color:white;font:30px/1 Arial,sans-serif;
}
#components-carousel .components-prev{left:3.5%;}
#components-carousel .components-next{right:3.5%;}
#components-carousel .components-pagination{
  position:absolute;z-index:4;bottom:75px;left:50%;transform:translateX(-50%);
  display:flex;gap:10px;
}
#components-carousel .components-dot{
  width:8px;height:8px;min-width:8px;min-height:8px;padding:0;cursor:pointer;
  border:0;border-radius:50%;background:rgba(255,255,255,.4);
}
#components-carousel .components-dot.is-current{background:#fff;}
#components-carousel .components-control:focus-visible,
#components-carousel .components-dot:focus-visible{outline:2px solid #fff;outline-offset:3px;}
@media(max-width:767px){
  #components-carousel-viewport{width:91%;}
  #components-media{height:clamp(360px,100vw,530px);}
  #components-carousel .components-slide{padding:0;}
  #components-carousel .components-control{width:30px;height:30px;font-size:23px;}
  #components-carousel .components-prev{left:1%;}
  #components-carousel .components-next{right:1%;}
}
@media(prefers-reduced-motion:reduce){#components-carousel-track{transition:none;}}

/* Mobile-only: measured reference proportions (Readymag 320px canvas scaled to viewport). */
@media (max-width:767px){
  /* Reference text grid is 87.5vw wide: 6.25vw external gutter on both sides. */
  :root{--pad:6.25vw}
  .wrap{padding-inline:var(--pad)}
  .intro-copy,.feature-copy,.info-card,.stat-card,.results-grid,.page-previews,.page-shot{min-width:0}

  /* Readymag mobile canvas scales a 320px design across the full viewport. */
  #portfolio-home-link{
    top:4.375vw;left:2.5vw;width:7.5vw;height:8.125vw;
    font-size:8.125vw;line-height:1;
  }
  .intro{padding-top:15vw;gap:0}
  /* Reference: 320px design canvas, transform:scale(viewport / 320).
     Match its rendered font size and line pitch without scaling media or page geometry. */
  #case-title,.lead{
    font-family:'Unbounded',sans-serif;
    font-size:7.8125vw;font-weight:400;line-height:11.25vw; /* 25px / 36px × viewport/320 */
    letter-spacing:normal;font-synthesis:none;
  }
  /* Mobile heading weight; keep the large descriptive lead at 400. */
  #case-title{font-weight:700}
  /* The reference separates the intro headline from body copy by 24 design px. */
  .intro .lead{margin-bottom:7.5vw}
  .body-text,.feature-copy p,.results-intro p,.info-card p,.stat-card p{
    font-family:'Poppins',Arial,sans-serif;
    font-size:5vw;font-weight:400;line-height:7.5vw; /* 16px / 24px × viewport/320 */
    letter-spacing:normal;font-synthesis:none;
  }
  .section-title,.info-card h3{
    font-family:'Unbounded',sans-serif;
    font-size:5vw;font-weight:700;line-height:7.5vw;
    /* Readymag section labels include 13 design px of bottom padding inside the widget. */
    padding-bottom:4.0625vw;
    letter-spacing:normal;font-synthesis:none;
  }
  /* Text in the reference flows immediately after its subsection heading. */
  .feature-copy .section-title,.results-intro .section-title,.info-card h3{margin-bottom:0}
  /* Mobile Readymag rhythm on a 320px design canvas:
     13px heading padding + 11px following margin = 24px before cards.
     14px inter-card spacing scales with the viewport (20px at 449px). */
  .insights .section-title{margin-bottom:3.4375vw}
  #insights .insight-grid{gap:4.375vw}
  .info-card{padding:var(--pad)}
  .results-grid{grid-template-columns:minmax(0,1fr);gap:4.375vw}
  .stat-card{padding:var(--pad)}
  .stat-card strong{
    font-family:'Unbounded',sans-serif;
    font-size:7.8125vw;font-weight:700;line-height:11.25vw;letter-spacing:normal;
    white-space:normal;font-synthesis:none;
  }
  /* Match the heading-to-description spacing of #insight-grid cards. */
  #results-grid .stat-card strong{margin-bottom:4.0625vw}

  /* Every artwork area remains full-bleed; each gallery has its own size. */
  #key-visual-media{height:auto;min-height:0;padding-block:34px}
  #modular-media{height:clamp(420px,112vw,490px)}
  #components-media{height:clamp(460px,126vw,560px)}
  #key-visual-carousel-viewport{width:90%}
  #modular-carousel-viewport{width:90%}
  #components-carousel-viewport{width:91%}

  /* Align all six page screenshots to the same content grid as the copy. */
  .examples-stack{width:calc(100% - var(--pad) - var(--pad))}
  .page-previews{gap:3vw}
  #examples-media .page-previews{column-gap:6vw}

  /* Reserve the true shape of every tall screenshot before lazy-loading. */
  #examples-media .page-shot img{
    display:block;width:100%;height:auto;max-width:100%;object-fit:contain;
  }
  /* Intrinsic WebP sizes measured after load: no letterboxing or cropping. */
  #example-image-one,#example-image-two{aspect-ratio:888 / 2458}
  #example-image-three,#example-image-four{aspect-ratio:888 / 2534}
  #example-image-five,#example-image-six{aspect-ratio:888 / 1792}

  /* Keep slide height stable even when an offscreen image loads lazily.
     object-fit:contain preserves each source image's intrinsic proportions. */
  #components-carousel .components-slide img{
    display:block;width:100%;height:calc(100% - 216px);
    max-width:100%;max-height:calc(100% - 216px);
    object-fit:contain;object-position:center;
  }
}


/* Reference-derived hero artwork geometry: Readymag uses one 292x156 image
   in its 320px mobile canvas and a 1268x676 image on desktop.
   Finam has two separate source screenshots, so match their composition
   without altering, stretching or reordering either source. */
#hero-showcase{height:676px;}
#hero-artboard{
  position:relative;
  width:1268px;max-width:none;height:100%;
  margin-inline:0;
  /* Reference image starts 66px from the left up to a 1440px viewport. */
  left:max(66px,calc(50% - 654px));
}
/* Image geometry from Figma frame 2304:1991 (1268 × 676).
   Front: image 37, x=113 y=87, 536 × 1025.
   Back:  image 36, x=618 y=219, 536 × 803.
   Percentages preserve their exact relative placement inside the scaled
   mobile hero artboard without changing either source image. */
#hero-artboard .hero-tile{
  position:absolute;
  overflow:hidden;
}
#hero-artboard .hero-tile img{
  /* Preserve image width and natural height, anchored to the tile's top edge. */
  display:block;width:100%;max-width:100%;height:auto;
  object-fit:contain;object-position:center top;
}
#hero-artboard > #hero-image-left{
  left:8.9116719%;top:12.8698225%;
  width:42.2712934%;height:151.6272189%;
  z-index:2;
}
#hero-artboard > #hero-image-right{
  left:48.7381703%;top:32.3964497%;
  width:42.2712934%;height:118.7869822%;
  z-index:1;
}
@media(max-width:767px){
  /* 320px canvas: image x=8px, w=292px, h=156px. */
  #hero-showcase{height:48.75vw;}
  #hero-artboard{width:91.25%;left:2.5%;margin-inline:0;}
}

/* Mobile-only carousel panel sizing: match the approved Key Visual rhythm. */
@media (max-width:767px){
  /* Only the two remaining carousels; desktop rules and the reference carousel stay unchanged. */
  #modular-media,#components-media{
    height:auto;
    min-height:0;
    padding-block:34px;
  }
  #modular-media > .media-artboard,
  #components-media > .media-artboard{height:auto;}
  #modular-carousel,#components-carousel{
    position:relative;
    inset:auto;
    flex-direction:column;
  }
  #modular-carousel-viewport,#components-carousel-viewport{height:auto;}
  #modular-carousel-track,#components-carousel-track{
    height:auto;
    align-items:flex-start;
  }
  #modular-carousel .modular-slide,
  #components-carousel .components-slide{
    height:auto;
    padding:0;
    justify-content:center;
  }
  #modular-carousel .modular-slide img,
  #components-carousel .components-slide img{
    width:auto;
    max-width:100%;
    height:auto;
    max-height:none;
    object-fit:contain;
  }
  /* Pagination participates in flow: 34px panel padding + image + 25px + 8px dots + 34px. */
  #modular-carousel .modular-pagination,
  #components-carousel .components-pagination{
    position:static;
    bottom:auto;
    left:auto;
    transform:none;
    margin-top:25px;
  }
}


/* Shared image-shadow standard: no vertical offset, 30px desktop blur. */
@media(max-width:767px){
  .hero-tile{box-shadow:0 0 15px rgba(0,0,0,.25)}
  #examples-media .page-shot{box-shadow:0 0 15px rgba(0,0,0,.25)}
}

/* Text-only, per-rendered-line roll reveal; no changes to media or page geometry. */
@media (prefers-reduced-motion: no-preference) {
  html.has-text-reveal .text-reveal-line {
    display: block;
    overflow: hidden;
  }
  html.has-text-reveal .text-reveal-line-inner {
    display: block;
    white-space: nowrap;
    opacity: 0;
    transform: translate3d(0, 105%, 0);
    transition: transform 1230ms cubic-bezier(.22, 1, .36, 1),
                opacity 930ms cubic-bezier(.22, 1, .36, 1);
    transition-delay: calc(var(--reveal-order, 0) * 135ms);
  }
  html.has-text-reveal .text-reveal-ready:not(.text-reveal-visible) .text-reveal-line-inner {
    transition: none;
  }
  html.has-text-reveal .text-reveal-visible .text-reveal-line-inner {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Shared crossfade: section-specific sizes, alignment, shadows and hover remain intact. */
#components-carousel-track,#key-visual-carousel-track,#modular-carousel-track{
  position:relative;display:block;height:100%;transform:none;transition:none;will-change:auto;
}
#components-carousel .components-slide,
#key-visual-carousel .key-visual-slide,
#modular-carousel .modular-slide{
  position:absolute;inset:0;width:100%;min-width:0;height:100%;
  opacity:0;pointer-events:none;transition:opacity 400ms ease-in-out;
}
#components-carousel .components-slide.is-current,
#key-visual-carousel .key-visual-slide.is-current,
#modular-carousel .modular-slide.is-current{
  z-index:2;opacity:1;pointer-events:auto;
}
#components-carousel .components-slide.is-leaving,
#key-visual-carousel .key-visual-slide.is-leaving,
#modular-carousel .modular-slide.is-leaving{z-index:1}
#components-carousel:not(.is-crossfade-ready) .components-slide:first-child,
#key-visual-carousel:not(.is-crossfade-ready) .key-visual-slide:first-child,
#modular-carousel:not(.is-crossfade-ready) .modular-slide:first-child{
  position:relative;opacity:1;
}
@media(max-width:767px){
  #components-carousel-viewport,#key-visual-carousel-viewport,#modular-carousel-viewport{
    transition:height 400ms ease-in-out;
  }
  #components-carousel .components-slide img,
  #key-visual-carousel .key-visual-slide img,
  #modular-carousel .modular-slide img{flex-shrink:0}
}
@media(prefers-reduced-motion:reduce){
  #components-carousel .components-slide,#key-visual-carousel .key-visual-slide,
  #modular-carousel .modular-slide,#components-carousel-viewport,
  #key-visual-carousel-viewport,#modular-carousel-viewport{transition:none}
}

/* Zoom the complete artwork surfaces, never the img inside them.
   Stacked crossfade slides can overflow their viewport safely: the shared
   controller places every slide at the same coordinates (no horizontal track). */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  #hero-artboard .hero-tile,
  #examples-media .page-shot {
    transform-origin: center center;
    transition: transform 350ms ease-out;
  }

  #hero-artboard .hero-tile:hover,
  #examples-media .page-shot:hover {
    transform: scale(1.03);
  }

  /* Each active carousel slide is the existing outer image surface.
     Keep the 400ms opacity transition intact for crossfade. */
  #key-visual-carousel .key-visual-slide,
  #modular-carousel .modular-slide,
  #components-carousel .components-slide {
    transform-origin: center center;
    transition: opacity 400ms ease-in-out, transform 350ms ease-out;
  }

  #key-visual-carousel .key-visual-slide.is-current:has(> img:hover),
  #modular-carousel .modular-slide.is-current:has(> img:hover),
  #components-carousel .components-slide.is-current:has(> img:hover) {
    transform: scale(1.03);
  }

  /* The previous overflow:hidden clips the 3% expansion at the carousel
     viewport edge. Crossfade does not require that horizontal mask. */
  #key-visual-carousel-viewport,
  #modular-carousel-viewport,
  #components-carousel-viewport {
    overflow: visible;
  }

  /* Allow page screenshots to grow over their siblings without moving
     grid cells or clipping the shadow on the outer card. */
  #examples-media .page-shot {
    overflow: visible;
    position: relative;
  }
  #examples-media .page-shot:hover {
    z-index: 2;
  }
}


/* Desktop-only: scale the Hero artboard as a unit when the effective
   viewport is too narrow for the two screenshots. The final visible
   right edge is at 91.01% of the artboard; reserve 66px on either side.
   Preserve the 1268×676 reference proportions at wider viewports. */
@media (min-width:768px){
  #hero-showcase{
    height:min(676px,calc((100vw - 132px) * .5857));
  }
  #hero-showcase #hero-artboard{
    width:min(1268px,calc((100vw - 132px) * 1.0988));
    height:100%;
  }

  /* Keep the intro reasonably wide without compressing the result cards
     when browser zoom reduces the effective desktop viewport. */
  #results{
    margin-left:clamp(0px,calc((100vw - 1200px) * .45),106px);
    grid-template-columns:minmax(0,min(516px,42%)) minmax(0,1fr);
  }
}

/* Desktop carousel geometry: match the approved Key Visual alignment and inner spacing. */
@media (min-width:768px){
  #key-visual-carousel,
  #modular-carousel,
  #components-carousel{
    --carousel-slide-top:34px;
    --carousel-slide-bottom:108px;
  }
  #key-visual-carousel .key-visual-slide,
  #modular-carousel .modular-slide,
  #components-carousel .components-slide{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    padding:var(--carousel-slide-top) 0 var(--carousel-slide-bottom);
  }
  /* Equal visible widths for every Components slide. Keep the tallest
     artwork (1228 × 851) inside the 34px/108px desktop vertical insets. */
  #components-carousel-viewport{container-type:size;}
  #components-carousel .components-slide img{
    width:min(100%,calc((100cqh - var(--carousel-slide-top) - var(--carousel-slide-bottom)) * 1.443008));
    height:auto;
    max-width:100%;
    max-height:100%;
    object-fit:contain;
  }

  /* Figma section 4315:62167: four exports 1228px wide; tallest render is
     1012px. Equalize desktop slide widths without cropping or distortion. */
  #modular-carousel-viewport{container-type:size;}
  #modular-carousel .modular-slide img{
    width:min(100%,calc((100cqh - var(--carousel-slide-top) - var(--carousel-slide-bottom)) * 1.213439));
    height:auto;
    max-width:100%;
    max-height:100%;
  }
}

/* Mobile uses the same full carousel width without a fixed height. */
@media (max-width:767px){
  #components-carousel .components-slide img{
    width:100%;height:auto;max-width:100%;max-height:none;
  }
}

/* Experimental scroll reveal: only image pixels animate, never grey media panels.
   These properties are independent of the hover transform and slide opacity crossfade. */
@media (prefers-reduced-motion: no-preference) {
  img.image-reveal-pending,
  #hero-artboard .hero-tile.image-reveal-pending,
  #examples-media .page-shot.image-reveal-pending { opacity: 0; }

  img.image-scroll-reveal,
  #hero-artboard .hero-tile.image-scroll-reveal,
  #examples-media .page-shot.image-scroll-reveal {
    animation: image-scroll-reveal 1300ms ease-out both;
  }
}
@keyframes image-scroll-reveal {
  from { opacity: 0; translate: 0 30px; scale: .95; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}

/* Desktop gallery vertical rhythm: measure actual nontransparent image pixels
   in the shared controller. Keep the panel dimensions, image widths, hover,
   crossfade and all mobile rules unchanged. */
@media (min-width:768px){
  #components-carousel.has-balanced-spacing .components-slide,
  #key-visual-carousel.has-balanced-spacing .key-visual-slide,
  #modular-carousel.has-balanced-spacing .modular-slide{
    justify-content:flex-start;
    padding:var(--carousel-visual-top,34px) 0 0;
  }
  #components-carousel.has-balanced-spacing .components-pagination,
  #key-visual-carousel.has-balanced-spacing .key-visual-pagination,
  #modular-carousel.has-balanced-spacing .modular-pagination{
    bottom:var(--carousel-pagination-bottom,75px);
  }

  /* Restore the original Key Visual image height cap when the slide's
     vertical padding changes. Without this, widths can increase at
     narrower desktop breakpoints. */
  #key-visual-carousel-viewport{container-type:size;}
  #key-visual-carousel .key-visual-slide img{
    max-height:calc(100cqh - var(--carousel-slide-top) - var(--carousel-slide-bottom));
  }
}
