/* The mockups page — our sites filed as folders, then one chapter per site in that site's own colours.
   Builds on styles.css: same white board, same grotesk, same 6px radius and 8px gaps. */

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- The first screen: the folder stack ---------- */
.shelf { --s: 46px; --tab: 210px; position: relative; min-height: calc(100svh - 80px); margin: 0 var(--m); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; background: var(--deep); color: var(--paper); }
.shelf__words { display: grid; justify-items: center; gap: 22px; padding: 48px var(--pad) 0; text-align: center; }
.shelf h1 { font-size: clamp(3.4rem, 10vw, 9rem); white-space: nowrap; }
.shelf__words p { max-width: 50ch; font-size: var(--step-lead); line-height: 1.35; }
.folders { position: relative; flex: 1; min-height: calc(40px + 6 * var(--s) + 170px); margin-top: 48px; }
.folder { position: absolute; left: 6%; right: 6%; top: calc(40px + var(--k) * var(--s)); bottom: 0; background: var(--f); color: var(--fi); border-radius: 0 var(--r) 0 0; animation: file 0.8s var(--ease-out) both; animation-delay: calc(0.15s + var(--k) * 70ms); transition: translate 0.35s var(--ease-out); }
.folder > a { position: absolute; inset: 0; color: inherit; text-decoration: none; }
.folder__tab { position: absolute; top: -40px; left: calc(var(--k) * (100% - var(--tab)) / 6); width: var(--tab); height: 40px; display: flex; align-items: center; justify-content: center; padding: 0 18px; background: var(--f); color: var(--fi); font-weight: 700; white-space: nowrap; clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 100%, 0 100%); }
.folder:not(.folder--front):hover, .folder:not(.folder--front):focus-within { translate: 0 -12px; }
.folder > a:focus-visible { outline: 3px solid var(--sun); outline-offset: -6px; }
.folder--front { --f: var(--accent); --fi: var(--accent-ink); }
.folder__body { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 32px; }
.folder__body p { max-width: 34ch; font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
@keyframes file { from { translate: 0 60px; opacity: 0; } }

/* ---------- The six sites: a grid of tiles in their own colours, wide and narrow in turn ---------- */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--g); margin: var(--g) var(--m) 0; }
.ch { grid-column: span 7; display: flex; flex-direction: column; padding: 24px 24px 28px; border-radius: var(--r); overflow: hidden; background: var(--f); color: var(--fi); scroll-margin-top: 12px; }
.ch:nth-child(2), .ch:nth-child(3), .ch:nth-child(6) { grid-column: span 5; }
/* The film fills the top of the tile; the phone stands on its right edge and steps down into the words. */
.ch__stage { order: -1; position: relative; padding-right: 9%; }
.ch__screen { background: rgb(0 0 0 / 0.18); }
.ch__screen video { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: scale 0.6s var(--ease-out); }
.ch__phone { position: absolute; right: 0; top: 30%; width: 27%; z-index: 2; padding: 5px; background: var(--fi); border-radius: 14px; transition: translate 0.45s var(--ease-out); }
.ch__phone img { width: 100%; height: auto; border-radius: 9px; }
.ch:hover .ch__phone { translate: 0 -12px; }
.ch:hover .ch__screen video { scale: 1.03; }
.ch__head { margin-top: 24px; padding-right: 33%; min-height: 9.5rem; }
.ch__head h2 { font-size: clamp(2.4rem, 3.9vw, 4.25rem); }
.ch__trade { margin-top: 12px; font-size: var(--step-body); font-weight: 600; letter-spacing: -0.01em; }
.ch__body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 18px; }
.ch__idea { font-size: var(--step-lead); line-height: 1.3; max-width: 36ch; }
.ch__body h3 { margin-top: 4px; font-size: var(--step-body); font-weight: 800; }
.ch__list { display: grid; gap: 6px; }
.ch__list li { position: relative; padding-left: 22px; }
.ch__list li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 9px; height: 9px; border-radius: 2px; background: currentColor; }
.ch__go { margin-top: auto; background: var(--a); color: var(--ai); }
.ch__go:hover { background: var(--a); filter: brightness(1.12); }

/* Parts arrive once, on load or when a chapter comes into view. */
.js .ch .rise { opacity: 0; translate: 0 26px; transition: opacity 0.7s var(--ease-out), translate 0.7s var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
.js .ch .rise.in { opacity: 1; translate: none; }

/* ---------- The close: the word is the button ---------- */
.act { position: relative; display: grid; grid-template-rows: auto 1fr; min-height: 60svh; margin: var(--g) var(--m) 0; padding: 28px; border-radius: var(--r); overflow: hidden; background: var(--accent); color: var(--accent-ink); text-decoration: none; transition: background 0.2s, color 0.2s; }
.act:hover, .act:focus-visible { background: var(--sun); color: var(--ink); }
.act__say { max-width: 40ch; font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.act__arrow { position: absolute; top: 24px; right: 24px; width: 56px; height: 56px; fill: none; stroke: currentColor; stroke-width: 2.4; transition: translate 0.3s var(--ease-out); }
.act:hover .act__arrow { translate: 6px -6px; }
.act__word { align-self: end; font-size: clamp(4.5rem, 20.5vw, 21rem); font-weight: 800; letter-spacing: -0.065em; line-height: 0.78; white-space: nowrap; }
.page-maq .foot { margin-top: var(--g); }

@media (prefers-reduced-motion: reduce) {
  .folder { animation: none; transition: none; }
  .js .ch .rise { opacity: 1; translate: none; transition: none; }
  .act, .act__arrow { transition: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .shelf { --tab: 150px; }
  .folder__tab { font-size: var(--step-small); padding: 0 14px; }
  .ch, .ch:nth-child(2), .ch:nth-child(3), .ch:nth-child(6) { grid-column: span 6; }
  .ch__head h2 { font-size: clamp(2.2rem, 5.4vw, 3.4rem); }
  .ch__idea { font-size: var(--step-body); }
}

/* ---------- Phone: its own composition ---------- */
@media (max-width: 700px) {
  .shelf { --s: 40px; --tab: 112px; min-height: calc(100svh - 72px); }
  .shelf__words { justify-items: start; text-align: left; padding-top: 36px; gap: 16px; }
  .shelf h1 { font-size: 15vw; white-space: normal; }
  .shelf__words p { font-size: 1.125rem; }
  .folders { margin-top: 32px; min-height: calc(36px + 6 * var(--s) + 230px); }
  .folder { left: 0; right: 0; top: calc(36px + var(--k) * var(--s)); }
  .folder__tab { top: -36px; height: 36px; font-size: 0.8125rem; padding: 0 10px; clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 100%, 0 100%); }
  .folder__body { flex-direction: column; align-items: stretch; padding: 22px 16px; gap: 16px; }
  .folder__body p { font-size: var(--step-body); }
  .folder__body .btn { justify-content: center; min-height: 60px; font-size: var(--step-body); }

  .ch, .ch:nth-child(2), .ch:nth-child(3), .ch:nth-child(6) { grid-column: 1 / -1; padding: 16px 16px 22px; }
  .ch__phone { border-radius: 10px; padding: 4px; }
  .ch__phone img { border-radius: 7px; }
  .ch__head { margin-top: 18px; min-height: 0; }
  .ch__head h2 { font-size: 11vw; }
  .ch__go { width: 100%; justify-content: center; margin-top: 8px; }

  .act { min-height: 46svh; padding: 20px 16px; }
  .act__say { font-size: var(--step-body); padding-right: 56px; }
  .act__arrow { width: 36px; height: 36px; top: 18px; right: 14px; }
  .act__word { font-size: 22vw; }
}

/* The folded credit note reads at body size when opened. */
.page-maq .credits p { font-size: var(--step-body); color: var(--ink); }
