/* G mockups (round 4: colour film on white, real pictures, the cylinder beat). Sits on top of r.css. */
:root { --bg: #fff; --ink: #0c0c0d; --mute: #7a7a7d; --line: #e6e6e2; }
html, body { transition: none; }
#gl { z-index: 3; pointer-events: none; }
body.still #gl { transition: none; }
body.r-over-card { cursor: pointer; }
main { position: relative; }

/* stage: the first screen, pinned while one scroll turns the ribbon into the grid */
.g-stage { position: relative; height: 380vh; }
#work { position: absolute; top: 246vh; }
.g-pin { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; }
.g-head { position: absolute; inset: 0; z-index: 1; font-family: var(--serif); font-weight: 400; font-size: min(11.4vw, 19.8vh); line-height: 1; letter-spacing: -.03em; color: var(--ink); pointer-events: none; }
.g-l { position: absolute; left: 0; white-space: nowrap; will-change: transform, opacity; }
.g-l .m { display: inline-block; }
.g-l .g { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity; mix-blend-mode: multiply; }
.g-l .g1 { color: #ff3b30; } .g-l .g2 { color: #2f6bff; }
.g-l1 { top: 22vh; } .g-l2 { top: 51vh; }
/* ring: the headline sits in the hole */
.g-edge { position: absolute; z-index: 4; bottom: var(--pad); font-size: 13px; opacity: 0; }
.g-lead { left: var(--pad); } .g-hint { right: var(--pad); color: var(--mute); }

/* work grid */
.g-work { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none; }
.g-workin { position: relative; width: min(66vw, calc((100dvh - 240px) * 2.2)); margin-top: 5vh; }
.fx-lay .g-workin { width: min(62vw, calc((100dvh - 260px) * 2.1)); }
.g-bar { position: absolute; left: 0; right: 0; bottom: calc(100% + 18px); display: flex; align-items: flex-start; gap: 28px; opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .7s var(--ease); }
.g-work.on .g-bar { opacity: 1; transform: none; }
.g-bar .who { display: flex; gap: 7px; align-items: baseline; min-width: 160px; color: var(--mute); }
.g-bar .who span { font-size: 10px; } .g-bar .who b { font: 400 24px/1 var(--serif); letter-spacing: -.01em; color: var(--ink); }
.g-bar p { font-size: 12px; line-height: 1.35; color: var(--mute); max-width: 190px; white-space: pre-line; }
.g-bar .sw { transition: opacity .22s ease; } .g-bar.swap .sw { opacity: 0; }
.g-pill { margin-left: auto; pointer-events: auto; display: inline-flex; align-items: center; height: 28px; padding: 0 13px; border-radius: 14px; font-size: 12px; font-weight: 500; background: var(--ink); color: #fff; transition: transform .35s var(--ease); }
.g-pill:active { transform: scale(.94); }
.g-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: min(1.1vw, 18px); }
.g-cell { aspect-ratio: 16 / 9; border-radius: 4px; pointer-events: none; }
.g-work.on .g-cell { pointer-events: auto; }
.g-cell:focus-visible { outline: 1px solid var(--ink); outline-offset: 5px; }

/* About, Contact: plain, on white */
.g-sec { position: relative; z-index: 5; background: var(--bg); padding: clamp(96px, 18vh, 200px) var(--pad); }
.g-big { font-family: var(--serif); font-size: clamp(34px, 5.2vw, 84px); line-height: 1; letter-spacing: -.025em; max-width: 15em; margin-top: 16px; text-wrap: balance; }
.g-contact { border-top: 1px solid var(--line); }
.g-hello { font-size: clamp(64px, 12vw, 200px); line-height: .9; letter-spacing: -.035em; }
.g-mail { margin-top: 22px; font-size: 15px; color: var(--mute); }
.g-foot { position: relative; z-index: 5; background: var(--bg); display: flex; justify-content: space-between; gap: 16px; padding: var(--pad); font-size: 12px; color: var(--mute); }
.g-foot i { font-style: italic; font-family: var(--serif); font-size: 15px; }
.g-foot span:first-child { font-family: var(--serif); font-size: 15px; color: var(--ink); }

@media (max-width: 700px) {
  .g-head { font-size: 19vw; } .g-l1 { top: 30dvh; } .g-l2 { top: 46dvh; }
  .g-workin, .fx-lay .g-workin { width: min(86vw, calc((100dvh - 330px) * .72)); margin-top: 5vh; }
  .g-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .g-bar { gap: 12px; } .g-bar p { display: none; } .g-bar .who { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .g-bar { transition: none; } }

/* nav stays readable where the film passes behind it */
.g-page .r-links { background: #fff; border-radius: 999px; padding: 0 16px; margin-right: -16px; box-shadow: 0 1px 10px rgba(0,0,0,.08); }
body.g-past .r-nav { opacity: 0; pointer-events: none; }
.r-nav { transition: opacity .4s ease; }
