/* =================================================================
   Home: the laptop scroll story
   ================================================================= */

/* Header sits on the light scene: undo the old dark-hero header rules */
.page-home .hdr:not(.is-scrolled) .logo,
.page-home .hdr:not(.is-scrolled) .nav > a:not(.btn) { color: var(--text); }
.page-home .hdr:not(.is-scrolled) .nav > a:not(.btn) { color: var(--muted); }
.page-home .hdr:not(.is-scrolled) .nav > a:not(.btn):hover { color: var(--text); opacity: 1; }
.page-home .hdr:not(.is-scrolled) .nav .btn { background: var(--text); color: #fff; }
.page-home .hdr:not(.is-scrolled) .menu-btn { color: var(--text); border-color: var(--line-2); }
.page-home .hdr.is-scrolled { background: rgba(244, 244, 245, .9); }

.lp { position: relative; height: 820vh; background: #F4F4F5; overflow-anchor: none; }
.page-home { overflow-anchor: none; }
.lp-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.lp-gl, .lp-css { position: absolute; inset: 0; width: 100%; height: 100%; }
.lp-gl { display: block; z-index: 0; }
.lp-gl.is-hover { cursor: pointer; }
.lp-css { z-index: 1; pointer-events: none; }
.lp-screen { position: relative; width: 1280px; height: 800px; background: transparent; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
/* one window per site; the one on screen fades in over the one before, hidden ones stay loaded (and idle) underneath */
.lp-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #fff; opacity: 0; visibility: hidden; z-index: 0; pointer-events: none; transition: opacity .35s ease, visibility 0s linear .4s; }
.lp-screen iframe.on.ready { opacity: 1; visibility: visible; z-index: 1; transition: opacity .35s ease, visibility 0s; }
.is-live .lp-screen iframe.on { pointer-events: auto; }

/* Text panels on the left */
.lp-panels { position: absolute; z-index: 3; left: var(--g); top: 50%; translate: 0 -50%; width: min(460px, 34vw); transition: opacity .4s, transform .5s var(--ease); }
.is-live .lp-panels { opacity: 0; transform: translateX(-30px); pointer-events: none; }
.lp-panel { position: absolute; left: 0; top: 0; translate: 0 -50%; width: 100%; opacity: 0; transform: translateY(20px); transition: opacity .5s var(--ease), transform .6s var(--ease); pointer-events: none; }
.lp-panel.on { opacity: 1; transform: none; pointer-events: auto; }
.lp-kicker { margin: 0 0 16px; font: 13px var(--mono); color: var(--accent-text); }
.lp-title { margin: 0; font: 500 clamp(2.6rem, 5vw, 5rem)/.98 var(--sans); letter-spacing: -.055em; text-wrap: balance; }
.lp-h2 { margin: 0; font: 500 clamp(2rem, 3.6vw, 3.4rem)/1 var(--sans); letter-spacing: -.045em; text-wrap: balance; }
.lp-idea { margin: 18px 0 0; font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.35; color: var(--text); letter-spacing: -.01em; }
.lp-lede { margin: 14px 0 0; color: var(--muted); max-width: 44ch; }
.lp-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn--blue { background: var(--accent); color: #fff; }
.btn--blue:hover { background: var(--accent-ink); }

/* Project index, bottom right */
.lp-index { position: absolute; z-index: 3; right: var(--g); bottom: 30px; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .5s var(--ease); pointer-events: none; }
.is-sites .lp-index { opacity: 1; transform: none; pointer-events: auto; }
.is-live .lp-index { opacity: 0; pointer-events: none; }
.lp-index button { display: flex; align-items: baseline; gap: 8px; border: 0; background: transparent; color: var(--muted); font: 500 14px var(--sans); padding: 8px 12px; border-radius: 6px; cursor: pointer; border-top: 2px solid var(--line-2); border-radius: 0; }
.lp-index button span { font: 12px var(--mono); color: var(--faint); }
.lp-index button:hover { color: var(--text); }
.lp-index button[aria-current="true"] { color: var(--text); border-top-color: var(--accent); }
.lp-index button[aria-current="true"] span { color: var(--accent-text); }

/* Scroll hint */
.lp-hint { position: absolute; z-index: 3; left: 50%; bottom: 30px; translate: -50% 0; margin: 0; display: flex; align-items: center; gap: 10px; font: 13px var(--mono); color: var(--faint); transition: opacity .4s; white-space: nowrap; }
.lp-hint span { width: 18px; height: 28px; border: 1.5px solid currentColor; border-radius: 10px; position: relative; }
.lp-hint span::after { content: ""; position: absolute; left: 50%; top: 5px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: lpwheel 1.6s ease-in-out infinite; }
@keyframes lpwheel { 60% { transform: translateY(8px); opacity: 0; } 61% { transform: none; opacity: 0; } 100% { opacity: 1; } }

/* "Use it" status bar */
.lp-status { position: absolute; z-index: 3; left: 50%; top: 84px; translate: -50% 0; display: flex; align-items: center; gap: 14px; opacity: 0; pointer-events: none; transition: opacity .4s; white-space: nowrap; }
.is-live .lp-status { opacity: 1; pointer-events: auto; }
.lp-status span { font: 13px var(--mono); color: var(--muted); }
.lp-status i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #1DB954; margin-right: 8px; }

@media (max-width: 900px) {
  .lp { height: 760vh; }
  .lp-panels { left: var(--g); right: var(--g); top: auto; bottom: 64px; translate: none; width: auto; }
  .lp-panel { top: auto; bottom: 0; translate: none; }
  .lp-panel .lp-lede { display: none; }
  .lp-title { font-size: clamp(2.2rem, 9vw, 3rem); }
  .lp-h2 { font-size: clamp(1.7rem, 7vw, 2.3rem); }
  .lp-idea { font-size: 1rem; margin-top: 10px; }
  .lp-btns { margin-top: 16px; }
  .lp-index { left: var(--g); right: var(--g); bottom: 14px; justify-content: space-between; gap: 0; }
  .lp-index button { padding: 6px 4px; font-size: 0; }
  .lp-index button span { font-size: 12px; }
  .lp-hint { display: none; }
  .lp-status span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .lp-hint span::after { animation: none; } }

/* Centred laptop: headline above it while closed, a one-row caption below it while open */
@media (min-width: 901px) {
  .lp-panels { left: var(--g); right: var(--g); top: 0; bottom: 0; translate: none; width: auto; pointer-events: none; }
  .lp-panel { top: auto; bottom: 30px; translate: none; width: min(900px, 64vw); display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 28px; align-items: end; }
  .lp-panel > * { grid-column: 1; }
  .lp-panel .lp-btns { grid-column: 2; grid-row: 1 / span 3; margin: 0; flex-wrap: nowrap; }
  .lp-panel .lp-lede { display: none; }
  .lp-panel .lp-kicker { margin-bottom: 8px; }
  .lp-panel .lp-h2 { font-size: clamp(1.5rem, 2.2vw, 2.1rem); }
  .lp-panel .lp-idea { font-size: 1rem; margin-top: 6px; color: var(--muted); }
  .lp-panel[data-panel="boot"] { display: block; }
  /* intro + outro: centred headline above the closed laptop */
  .lp-panel--intro, .lp-panel--outro { display: block; top: 96px; bottom: auto; left: 50%; translate: -50% 0; width: min(980px, 90vw); text-align: center; }
  .lp-panel--intro .lp-title, .lp-panel--outro .lp-title { font-size: clamp(2.4rem, 4.6vw, 4.4rem); max-width: 18ch; margin: 0 auto; }
  .lp-panel--intro .lp-lede, .lp-panel--outro .lp-lede { display: block; margin: 14px auto 0; }
  .lp-panel--intro .lp-btns { display: none; }
  .lp-panel--outro .lp-btns { justify-content: center; margin-top: 24px; }
  .lp-index { top: 86px; bottom: auto; }
  .lp-hint { bottom: 26px; }
}

/* Decorative overlays must never block clicks */
.lp-hint, .lp-css, .lp-panels { pointer-events: none; }
.lp-panel.on .lp-btns, .lp-panel.on a, .lp-panel.on button { pointer-events: auto; }
.lp-index button, .lp-status button { pointer-events: none; }
.is-sites:not(.is-live) .lp-index button, .is-live .lp-status button { pointer-events: auto; }
.is-live .lp-css { pointer-events: none; }
.is-live .lp-screen { pointer-events: auto; }

/* Wide screens: project bar sits in the caption row, so the laptop gets the full height */
@media (min-width: 1200px) {
  .lp-index { top: auto; bottom: 30px; }
  .lp-panel:not(.lp-panel--intro):not(.lp-panel--outro) { width: min(820px, 54vw); }
}
@media (min-width: 1200px) {
  .lp-index button { font-size: 0; padding: 8px 6px; min-width: 52px; justify-content: center; position: relative; }
  .lp-index button span { font-size: 13px; }
  .lp-index button::after { content: attr(data-name); position: absolute; bottom: calc(100% + 6px); right: 0; white-space: nowrap; font: 500 13px var(--sans); color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; pointer-events: none; }
  .lp-index button:hover::after, .lp-index button:focus-visible::after { opacity: 1; transform: none; }
}

/* Project bar: compact numbers in the caption row (full name on hover) */
@media (min-width: 901px) {
  .lp-index { top: auto !important; bottom: 30px !important; }
  .lp-index button { font-size: 0; padding: 8px 6px; min-width: 50px; justify-content: center; position: relative; }
  .lp-index button span { font-size: 13px; }
  .lp-index button::after { content: attr(data-name); position: absolute; bottom: calc(100% + 6px); right: 0; white-space: nowrap; font: 500 13px var(--sans); color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; pointer-events: none; }
  .lp-index button:hover::after, .lp-index button:focus-visible::after { opacity: 1; transform: none; }
  .lp-panel:not(.lp-panel--intro):not(.lp-panel--outro) { width: calc(100% - 260px); max-width: 980px; }
  .lp-panel .lp-idea { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* The layer holding the live website must never scroll: a page loading inside it would push the site off the screen */
.lp-css { overflow: clip !important; }   /* inner 3D layers must stay overflow:visible or they lose their 3D */

/* Touch devices: the live site pops out of the laptop into a flat, swipeable panel */
.lp-touch { position: absolute; z-index: 4; left: 0; top: 0; width: 0; height: 0; overflow: hidden; background: #fff; border-radius: 14px; box-shadow: 0 30px 60px -20px rgba(12, 12, 14, .45); opacity: 0; pointer-events: none; visibility: hidden; }
.lp-touch.on { visibility: visible; pointer-events: auto; }
.lp-touch iframe { width: 100%; height: 100%; border: 0; display: block; }
.lp-status { z-index: 5; }

/* Case pages: one laptop with the project's live site (laptop.js "single" mode). Not pinned, one screen tall. */
.lp--single { height: auto; background: transparent; margin-top: clamp(24px, 4vh, 48px); }
.lp--single .lp-pin { position: relative; height: calc(100svh - 76px); min-height: 420px; }
.lp--single .lp-status { top: 18px; }
.lp--single .lp-hint { bottom: 16px; color: var(--muted); opacity: 0; }
.lp-pin:not(.is-live) .lp-screen { cursor: pointer; }

/* Exit button of the live laptop: small, quiet, with a cross */
.lp-exit { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px 0 11px; border-radius: 8px; border: 1px solid #3A4E53; background: #121D20; color: #ECF0F0; font: 500 14px var(--sans); cursor: pointer; transition: border-color .2s, background .2s; }
.lp-exit svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.lp-exit:hover { border-color: #ECF0F0; background: #19272A; }
.lp-status { gap: 12px; }

/* Under each website on the laptop: "Explore this site" (same look as the phone's "Try the live site") + a quiet case-study link */
.lp-btns { align-items: center; gap: 18px; }
.lp-btns .live-btn { height: 44px; font-size: 15px; }
.lp-case { color: var(--muted); text-decoration: none; font: 500 15px var(--sans); transition: color .2s; }
.lp-case span { display: inline-block; transition: transform .25s; }
.lp-case:hover { color: var(--text); } .lp-case:hover span { transform: translateX(4px); }

/* Client logos on the laptop's last screen: one flat white row, so different logos read as one set */
.clogos__k { margin: 22px 0 0; font: 500 12px "Geist Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: #889A9C; }
.clogos { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 34px; }
.clogos img { display: block; height: 30px; width: auto; filter: brightness(0) invert(1); opacity: .82; }
.clogos .clogo--patrz { height: 34px; }
.clogos .clogo--cet { height: 24px; }
@media (min-width: 821px) { .lp-panel--outro .clogos { justify-content: center; } }
@media (max-width: 700px) { .clogos { gap: 12px 22px; } .clogos img { height: 24px; } .clogos .clogo--patrz { height: 27px; } .clogos .clogo--cet { height: 19px; } }
