/* GGACRUX v2: one continuous sky. Words sit in the sky, never in boxes. One motion system (tokens below). */
@font-face { font-family: "Sora"; src: url("fonts/sora.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: optional; }
@font-face { font-family: "Caveat"; src: url("fonts/caveat.woff2") format("woff2"); font-weight: 400 700; font-display: optional; }
:root {
  --bg: #05060a; --ink: #eceef6; --muted: #a3a8bf; --star: #a3a9ff; --warm: #ffb36b; --line: rgb(236 238 246 / .12);
  --gut: max(20px, min(6vw, 96px));
  --ease: cubic-bezier(.2, .7, .2, 1); --d1: 150ms; --d2: 250ms; --d3: 400ms;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
html { overflow-x: clip; }
body { font: 400 17px/1.6 "Sora", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2 { margin: 0; font-weight: 500; letter-spacing: -0.035em; line-height: 1.02; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--star); outline-offset: 3px; border-radius: 6px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }

/* the sharp resting image laid over each 3D frame (see placeOverlay in v2.js) */
.shot-ov { position: fixed; left: 0; top: 0; z-index: 1; pointer-events: none; opacity: 0; transform-origin: 0 0; will-change: transform, opacity; object-fit: fill; max-width: none; max-height: none; }

/* the sky */
#sky { position: fixed; left: 0; top: 0; width: 100%; height: 100%; height: 100lvh; z-index: 0; display: block; } /* sized to the large viewport: runs under Safari's glass bar and never resizes as it moves */
.poster { position: fixed; inset: 0; z-index: 0; display: grid; place-items: center; background: var(--bg); transition: opacity .6s var(--ease); }
.poster img { width: 140px; margin-bottom: 30vh; }
html.gl-ready .poster { opacity: 0; pointer-events: none; }

/* header */
.bar { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; gap: 28px; height: 72px; padding: 0 var(--gut); }
.brand img { height: 22px; width: auto; }
.links { display: flex; gap: 26px; margin-left: auto; }
.links a { color: var(--muted); text-decoration: none; font-size: 15px; transition: color var(--d2) var(--ease); }
.links a:hover { color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 500 16px/1 "Sora", sans-serif; text-decoration: none; border: 0; cursor: pointer; transition: transform var(--d2) var(--ease), box-shadow var(--d3) var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 6px rgb(163 169 255 / .12), 0 10px 40px rgb(163 169 255 / .35); }
.btn:active { transform: scale(.97); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn--lg { min-height: 60px; padding: 0 34px; font-size: 18px; }
.menu-btn { display: none; }
.sound-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgb(236 238 246 / .28); background: transparent; color: var(--muted); cursor: pointer; transition: color var(--d2) var(--ease), border-color var(--d2) var(--ease); position: relative; z-index: 2; }
.sound-btn:hover { color: var(--ink); }
.sound-btn[aria-pressed="true"] { color: var(--star); border-color: rgb(163 169 255 / .6); }
.sound-btn .waves { display: none; } .sound-btn[aria-pressed="true"] .waves { display: inline; } .sound-btn[aria-pressed="true"] .mute { display: none; }
@media (max-width: 760px) {
  .bar { gap: 10px; } .bar .btn { position: relative; z-index: 2; } .sound-btn { margin-left: auto; } .brand { position: relative; z-index: 2; }
  .menu-btn { display: grid; place-content: center; gap: 6px; width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgb(236 238 246 / .28); background: transparent; cursor: pointer; position: relative; z-index: 2; }
  .menu-btn span { display: block; width: 18px; height: 1.6px; background: var(--ink); transition: transform var(--d3) var(--ease); }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.8px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.8px) rotate(-45deg); }
  .links { display: none; }
  .links[data-open] { display: flex; flex-direction: column; gap: 0; position: fixed; inset: 0; z-index: 1; margin: 0; padding: calc(96px + env(safe-area-inset-top, 0px)) var(--gut) 40px; background: rgb(5 6 10 / .97); }
  .links[data-open] a { font-size: 30px; color: var(--ink); padding: 14px 0; border-bottom: 1px solid var(--line); }
  html.menu-open { overflow: hidden; }
}

/* scenes: tall sections, a sticky "pin" holding the words; the sky does the rest */
main { position: relative; z-index: 2; }
.scene { height: calc(var(--h) * 1vh); height: calc(var(--h) * 1svh); position: relative; }
.pin { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 0 var(--gut); display: grid; align-items: center; }
.type { position: relative; max-width: 600px; will-change: opacity, transform; }
.type--narrow { max-width: 640px; }
.type--narrow h2 { font-size: clamp(30px, 3.4vw, 52px); }
.type--open { max-width: none; justify-self: center; text-align: center; align-self: end; padding-bottom: 11vh; }
.type--open h1 { width: min(88vw, 980px); margin: 18px auto 0; line-height: 0; }
.type--open h1 img { width: 100%; height: auto; }
.type--end { justify-self: center; text-align: center; align-self: end; padding-bottom: 14vh; display: grid; justify-items: center; gap: 18px; max-width: 760px; }
.appicon { display: block; width: 56px; height: 56px; border-radius: 13px; margin-bottom: 18px; box-shadow: 0 0 0 1px rgb(255 255 255 / .12), 0 10px 40px rgb(163 169 255 / .3); }
.appicon--print { display: grid; place-items: center; background: #1a1410; }
@media (max-width: 760px) { .appicon { width: 44px; height: 44px; border-radius: 11px; margin-bottom: 12px; } }
.eyebrow { font: 500 12px/1.5 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--star); }
.eyebrow span { padding: 4px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px currentColor; }
.live { color: #8df0b4; } .beta { color: #b9bdff; } .test { color: #ffc28a; }
.lede { margin-top: 18px; font-size: clamp(17px, 1.6vw, 22px); color: var(--muted); }
.type h2 { font-size: clamp(40px, 6vw, 92px); margin-top: 18px; text-shadow: 0 2px 40px rgb(5 6 10 / .8); }
.type--end h2 { font-size: clamp(40px, 4.8vw, 76px); }
.sub { margin-top: 20px; color: #c3c6d8; font-size: clamp(17px, 1.4vw, 20px); max-width: 46ch; text-shadow: 0 1px 20px rgb(5 6 10 / .9); }
.type--end .sub { margin-top: 0; }
.meta { margin-top: 14px; font: 500 13px "JetBrains Mono", monospace; color: var(--muted); letter-spacing: .04em; }
.arrow { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--star); text-decoration: none; font-weight: 500; min-height: 44px; }
.arrow::after { content: "→"; transition: transform var(--d2) var(--ease); }
.arrow:hover::after { transform: translateX(4px); }
.cue { margin-top: 34px; display: inline-flex; flex-direction: column; align-items: center; gap: 10px; font: 500 11px "JetBrains Mono", monospace; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.cue span { width: 1px; height: 40px; background: linear-gradient(transparent, var(--star)); transform-origin: top; animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { 0% { transform: scaleY(0); } 70% { transform: scaleY(1); opacity: 1; } 100% { opacity: 0; } }
.rays { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 22px; counter-reset: r; }
.rays li { counter-increment: r; padding-left: 52px; position: relative; color: #c3c6d8; font-size: 17px; max-width: 52ch; }
.rays li::before { content: ""; position: absolute; left: 0; top: .78em; width: 36px; height: 1px; background: linear-gradient(90deg, transparent, var(--star)); }
.rays b { color: var(--ink); font-weight: 500; }
.rays a { color: var(--star); }

/* a product screen, for screen readers and when there is no WebGL: the sky draws it otherwise */
.sr-shot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
html.no-gl .sr-shot { position: static; width: min(100%, 560px); height: auto; clip-path: none; margin-top: 24px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }

/* the hand-drawn note pointing at the one thing on each screen; placed by the script from the 3D screen's position */
.ink { position: fixed; left: 0; top: 0; z-index: 3; display: flex; align-items: flex-end; gap: 4px; font: 600 26px/1 "Caveat", "Bradley Hand", cursive; color: #ffd9a8; pointer-events: none; opacity: 0; white-space: nowrap; transform: translate(-9999px, 0); }
.ink span { padding-bottom: 2px; }
.ink svg { width: 75px; height: 100px; display: block; flex: none; overflow: visible; }
.ink { align-items: flex-end; }
.ink path { fill: none; stroke: #ffd9a8; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 240; stroke-dashoffset: calc(240 * (1 - var(--draw, 0))); }
@media (max-width: 760px) { .ink { display: none; } }

/* phones: the words sit low, the sky shows above them */
@media (max-width: 760px) {
  /* the words sit on the full screen (lvh), clear of Safari's pill and of its expanded bar: no empty band, no jump */
  .pin { align-items: end; height: 100lvh; padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .type--left { max-width: none; }
  .type h2 { font-size: clamp(36px, 11vw, 56px); }
  .type--open { padding-bottom: 8vh; } .type--end { padding-bottom: 10vh; }
  .rays li { padding-left: 32px; font-size: 16px; } .rays li::before { width: 20px; }
}

/* the footer sits inside the last frame, under the star and the contact words (desktop); on phones it follows */
:root { --foot-h: 250px; }
.foot { position: relative; z-index: 3; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; grid-template-rows: auto 1fr; gap: 0 64px; align-items: start; margin-top: calc(-1 * var(--foot-h)); min-height: var(--foot-h); padding: 44px var(--gut) calc(34px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: linear-gradient(rgb(5 6 10 / .55), rgb(5 6 10 / .92)); backdrop-filter: blur(6px); color: var(--muted); font-size: 14px; }
.foot-brand p { margin-top: 18px; max-width: 30ch; line-height: 1.5; }
.foot-col { display: grid; gap: 0; align-content: start; grid-row: 1 / span 2; }
.foot-col a { min-height: 34px !important; }
.foot-h { font: 500 11px/1.5 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--star); margin-bottom: 12px; }
.foot-col a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; min-height: 28px; transition: color var(--d2) var(--ease); }
.foot-col a:hover { color: var(--star); }
.foot-col img, .foot-print { width: 20px; height: 20px; border-radius: 5px; flex: none; }
.foot-print { background: #1a1410 linear-gradient(#ff9a4d, #ff9a4d) 4px 5px / 12px 2.5px no-repeat; box-shadow: inset 0 0 0 1px rgb(255 154 77 / .3); background-image: linear-gradient(#ff9a4d, #ff9a4d), linear-gradient(rgb(255 154 77 / .7), rgb(255 154 77 / .7)), linear-gradient(rgb(255 154 77 / .45), rgb(255 154 77 / .45)); background-size: 12px 2.5px; background-position: 4px 5px, 4px 9px, 4px 13px; }
.foot-legal { grid-column: 1; grid-row: 2; font-size: 12.5px; align-self: end; }
.foot-brand { grid-row: 1; }
.foot-legal a { color: var(--muted); }
.type--end { padding-bottom: calc(var(--foot-h) + 4vh) !important; }
@media (max-width: 760px) {
  .foot { grid-template-columns: 1fr 1fr; margin-top: 0; gap: 36px 24px; padding-top: 40px; padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
  .foot-brand, .foot-legal { grid-column: 1 / -1; grid-row: auto; }
  .foot-col { grid-row: auto; }
  .foot-col:nth-child(4) { grid-column: 1 / -1; }
  .foot-col a { min-height: 40px !important; }
  .type--end { padding-bottom: 7vh !important; }
}

@media (prefers-reduced-motion: reduce) { .cue span { animation: none; } }

/* phone (direction A): the reel above carries the products; the words underneath stay short */
@media (max-width: 760px) {
  .scene.product { --h: 200 !important; }
  .product .appicon, .product .meta { display: none; }
  .product .type h2 { font-size: 32px; margin-top: 8px; }
  .product .sub { margin-top: 8px; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .product .arrow { margin-top: 6px; }
}

/* the studio's seal (MGnetic Designs' own mark and ring, from its site), in the footer's free space */
.seal { position: relative; display: block; width: 88px; height: 88px; margin-top: 18px; min-height: 0 !important; color: #ecebe6; }
.seal__ring { width: 100%; height: 100%; transition: transform 1.2s var(--ease); }
.seal:hover .seal__ring { transform: rotate(40deg); }
.seal__ring text { font: 600 8.6px/1 "Sora", sans-serif; letter-spacing: .1em; fill: rgba(236, 235, 230, .64); }
.seal__disc { fill: none; stroke: rgb(236 238 246 / .16); stroke-width: 1; }
.seal__mk { position: absolute; left: 31%; top: 37%; width: 38%; height: 26%; }
.seal .mk { display: block; width: 100%; height: 100%; overflow: visible; }
.seal .mk .k { fill: none; stroke: currentColor; stroke-width: 5.4; stroke-linecap: round; stroke-linejoin: round; }
.seal .mk .n, .seal .mk .s { fill: none; stroke-width: 5.4; stroke-linecap: butt; }
.seal .mk .n { stroke: #ff5a45; } .seal .mk .s { stroke: #6f8cff; }
.seal .mk .gap { fill: none; stroke: #05060a; stroke-width: .9; }
.seal .mk .fil { fill: none; stroke: #ffcb47; stroke-width: 2.4; stroke-linecap: round; }
@media (prefers-reduced-motion: reduce) { .seal__ring { transition: none; } }

/* phones: the header keeps a dark band behind it, so nothing scrolling underneath ever reads through it */
@media (max-width: 760px) {
  .bar::before { content: ""; position: absolute; inset: 0 0 -18px; z-index: -1; pointer-events: none; background: linear-gradient(rgb(5 6 10 / .92) 62%, rgb(5 6 10 / 0)); }
}

/* phones: the long text in Services and Labs sits on a soft dark band, so the sky above stays clear and the words stay
   readable over it */
@media (max-width: 760px) {
  #services .pin::before, #labs .pin::before { content: ""; position: absolute; inset: 30% 0 0; pointer-events: none;
    background: linear-gradient(rgb(5 6 10 / 0), rgb(5 6 10 / .86) 26%, rgb(5 6 10 / .92)); }
  #services .type, #labs .type { z-index: 1; }
}

/* ---------- structure A, phones only: doors, the cross as an index, a product sheet, proof, topics ---------- */
.doors, .index, .proof-links, .topics, .star-btn { display: none; }
.sheet { display: none; }
@media (max-width: 760px) {
  
  .cue { display: none; }
  .doors { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
  .doors a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; text-decoration: none;
    font-size: 15px; font-weight: 500; color: var(--ink); box-shadow: inset 0 0 0 1px rgb(236 238 246 / .3); background: rgb(5 6 10 / .5); }
  .doors a:first-child { background: var(--ink); color: var(--bg); box-shadow: none; }

  #cross .sub { display: none; }
  .index { display: grid; gap: 6px; list-style: none; margin: 16px 0 0; padding: 0; }
  .index button { width: 100%; display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
    text-align: left; padding: 9px 12px; border-radius: 14px; border: 0; cursor: pointer; font: inherit; color: var(--ink);
    background: rgb(20 22 34 / .72); box-shadow: inset 0 0 0 1px rgb(236 238 246 / .1); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .index button:active { transform: scale(.985); }
  .index img, .idx-print { grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 9px; }
  .idx-print { background: #1a1410 linear-gradient(#ff9a4d, #ff9a4d) 9px 9px / 18px 4px no-repeat; box-shadow: inset 0 0 0 1px rgb(255 154 77 / .3);
    background-image: linear-gradient(#ff9a4d, #ff9a4d), linear-gradient(rgb(255 154 77 / .7), rgb(255 154 77 / .7)), linear-gradient(rgb(255 154 77 / .45), rgb(255 154 77 / .45));
    background-size: 18px 4px; background-position: 9px 9px, 9px 16px, 9px 23px; }
  .index span { display: flex; align-items: baseline; gap: 8px; } .index b { font-weight: 500; font-size: 16px; }
  .index i { font: 500 10px/1 "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; font-style: normal; }
  .index small { font-size: 13px; color: var(--muted); line-height: 1.3; }

  .star-btn { display: block; position: fixed; left: 0; top: 0; z-index: 4; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 99px;
    border: 0; background: transparent; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity var(--d2) var(--ease); }
  .star-btn.on { opacity: 1; pointer-events: auto; }
  .star-btn::after { content: ""; position: absolute; inset: 12px; border-radius: 99px; box-shadow: 0 0 0 1px rgb(236 238 246 / .35); }

  .proof-links { display: block; margin-top: 18px; font-size: 14px; color: var(--muted); }
  .proof-links a { color: var(--star); }
  .topics { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
  .topics a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 99px; text-decoration: none; font-size: 14px;
    color: var(--ink); box-shadow: inset 0 0 0 1px rgb(236 238 246 / .28); }

  .sheet[open] { display: block; position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: 92svh; overflow-y: auto;
    padding: 18px 18px calc(24px + env(safe-area-inset-bottom, 0px)); border: 0; border-radius: 24px 24px 0 0; color: var(--ink);
    background: #0d0f18; box-shadow: 0 -1px 0 rgb(236 238 246 / .12), 0 -30px 80px rgb(0 0 0 / .6); animation: sheet-in .38s var(--ease); }
  .sheet::backdrop { background: rgb(3 4 8 / .6); }
  .sheet__img { width: 100%; height: auto; border-radius: 14px; display: block; }
  .sheet__status { margin-top: 16px; } .sheet h2 { font-size: 30px; margin-top: 8px; }
  .sheet__sub { margin-top: 10px; color: #c3c6d8; font-size: 16px; }
  .sheet__close { position: sticky; top: 0; float: right; z-index: 1; width: 44px; height: 44px; margin: -6px -6px 6px 0; border-radius: 99px; border: 0;
    font-size: 26px; line-height: 1; color: var(--ink); background: rgb(30 33 48 / .9); cursor: pointer; }
  html.sheet-open { overflow: hidden; }
}
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } }
/* structure A on phones: shorter sections (the reel and the words scroll together, so less room is needed) */
@media (max-width: 760px) {
  #open { --h: 180 !important; } #cross { --h: 170 !important; } .scene.product { --h: 160 !important; }
  #services { --h: 150 !important; } #labs { --h: 170 !important; } #contact { --h: 200 !important; }
}

/* ---------- phone craft pass: one composition per section ---------- */
.only-ph { display: none; }
@media (max-width: 760px) {
  .only-ph { display: inline; } .only-dk { display: none; }

  /* hero: the line is the first thing read, the doors read as one set */
  .type--open .lede { font-size: 19px; color: var(--ink); margin-top: 14px; }
  .doors { margin-top: 20px; }

  /* the index: numbered rows in each product's colour, joined to their stars by a hairline (drawn in v2.js) */
  .index { gap: 0; margin-top: 18px; border-top: 1px solid rgb(236 238 246 / .1); }
  .index button { grid-template-columns: 22px 14px 1fr; grid-template-rows: auto auto; column-gap: 10px; padding: 12px 2px; border-radius: 0;
    background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 1px solid rgb(236 238 246 / .1); }
  .index img, .index .idx-print { display: none; }
  .idx-n { grid-row: 1 / span 2; font: 500 11px/1 "JetBrains Mono", monospace; color: var(--muted); font-style: normal; align-self: start; padding-top: 6px; }
  .idx-dot { grid-row: 1 / span 2; align-self: start; margin-top: 4px; width: 10px; height: 10px; border-radius: 99px; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
  .index span, .index small { grid-column: 3; }
  .index b { font-size: 21px; letter-spacing: -.02em; }
  .index small { margin-top: 2px; }

  /* products: the post carries the message; underneath, one caption line */
  .product .arm, .product .sub { display: none; }
  .product .type h2 { font-size: 28px; margin-top: 6px; }
  .product .type .arrow { margin-top: 4px; font-size: 15px; min-height: 40px; }
  .sheet .arm { display: none; }

  /* services: an editorial list, each service a headline of its own */
  #services .type h2 { font-size: 34px; }
  #services .rays { gap: 16px; margin-top: 20px; }
  #services .rays li { padding-left: 0; font-size: 14.5px; color: var(--muted); }
  #services .rays li::before { display: none; }
  #services .rays b { display: block; font-size: 19px; letter-spacing: -.015em; color: var(--ink); margin-bottom: 2px; }
  .proof-links { font-size: 13px; }

  /* labs: the question as a quote, and a real button */
  #labs .type h2 { font-size: 27px; line-height: 1.12; letter-spacing: -.025em; position: relative; padding-top: 30px; }
  #labs .type h2::before { content: "\201C"; position: absolute; left: -4px; top: -10px; font: 500 64px/1 "Sora", sans-serif; color: var(--star); opacity: .8; }
  #labs .sub { font-size: 15px; }
  .labs-cta { display: inline-flex; min-height: 46px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: var(--bg) !important; margin-top: 18px; }
  .labs-cta::after { color: var(--bg); }
}

.index-links { display: none; }
@media (max-width: 760px) {
  .index-links { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; opacity: 0; }
  .index-links path { fill: none; stroke-width: 1; stroke-dasharray: 2 4; opacity: .55; }
}

/* phones, from the owner's screenshots: the sheet fits one screen; Services holds longer; the contact close is compact */
@media (max-width: 760px) {
  .sheet[open] { overflow: hidden; display: flex; flex-direction: column; max-height: 94svh; padding-top: 14px; }
  .sheet:focus { outline: none; }
  .sheet__close { position: absolute; top: 10px; right: 10px; float: none; margin: 0; z-index: 2; background: rgb(13 15 24 / .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .sheet__close:focus:not(:focus-visible) { outline: none; }
  .sheet__img { flex: 0 1 auto; min-height: 0; max-height: 58svh; width: auto; max-width: 100%; align-self: center; object-fit: contain; }
  .sheet__status { margin-top: 14px; } .sheet h2 { font-size: 28px; margin-top: 6px; }
  .sheet__sub { font-size: 15px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .sheet__link { margin-top: 10px; display: flex; justify-content: center; min-height: 50px; border-radius: 999px; background: var(--ink); color: var(--bg) !important; }
  .sheet__link::after { color: var(--bg); }

  #services { --h: 230 !important; }                      /* a full screen and more of hold for the words */
  #services .pin::before { display: none; }               /* nothing behind the words now, so no band needed */

  .type--end h2 { font-size: 40px; }
  .type--end .sub { font-size: 16px; }
  .topics { gap: 6px; flex-wrap: nowrap; }
  .topics a { min-height: 38px; padding: 0 12px; font-size: 13px; white-space: nowrap; }
}

/* from the owner's iPhone screenshots */
.quiet-focus:focus { outline: none; }
@media (max-width: 760px) {
  .star-btn::after { display: none; }                      /* invisible tap targets: the star itself is the button */
  #labs .pin::before { display: none; }                   /* no band slicing the island */
  #cross .eyebrow { display: none; }                      /* room for the cross above the heading */
  #cross .type h2 { font-size: 34px; }
}

/* ---------- structure A on desktop: doors, the cross as an index beside its stars, a centred sheet, proof, topics ---------- */
#mark { display: none; }                                    /* the logo's story lives in the MGnetic case study */
@media (min-width: 761px) {
  .doors { display: flex; gap: 10px; justify-content: center; margin-top: 26px; }
  .doors a { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 999px; text-decoration: none; font-size: 15px; font-weight: 500;
    color: var(--ink); box-shadow: inset 0 0 0 1px rgb(236 238 246 / .3); transition: background var(--d2) var(--ease), color var(--d2) var(--ease); }
  .doors a:first-child { background: var(--ink); color: var(--bg); box-shadow: none; }
  .doors a:not(:first-child):hover { background: rgb(236 238 246 / .08); }
  .cue { margin-top: 26px; }

  #cross .sub { display: none; }
  #cross .type { max-width: 520px; }
  .index { display: grid; list-style: none; margin: 26px 0 0; padding: 0; border-top: 1px solid rgb(236 238 246 / .1); }
  .index button { width: 100%; display: grid; grid-template-columns: 26px 16px 1fr; grid-template-rows: auto auto; column-gap: 12px; text-align: left; padding: 14px 4px;
    border: 0; border-bottom: 1px solid rgb(236 238 246 / .1); background: none; color: var(--ink); font: inherit; cursor: pointer; transition: background var(--d2) var(--ease); }
  .index button:hover, .index button:focus-visible { background: rgb(236 238 246 / .04); }
  .index img, .index .idx-print { display: none; }
  .idx-n { grid-row: 1 / span 2; font: 500 11px/1 "JetBrains Mono", monospace; color: var(--muted); font-style: normal; padding-top: 7px; }
  .idx-dot { grid-row: 1 / span 2; margin-top: 5px; width: 11px; height: 11px; border-radius: 99px; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
  .index span { grid-column: 3; display: flex; align-items: baseline; gap: 10px; } .index b { font-size: 23px; font-weight: 500; letter-spacing: -.02em; }
  .index i { font: 500 10px/1 "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; font-style: normal; }
  .index small { grid-column: 3; font-size: 14px; color: var(--muted); margin-top: 3px; }
  .index-links { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; opacity: 0; }
  .index-links path { fill: none; stroke-width: 1; stroke-dasharray: 2 4; opacity: .5; }
  .star-btn { display: block; position: fixed; left: 0; top: 0; z-index: 4; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 99px; border: 0; background: transparent; cursor: pointer; opacity: 0; pointer-events: none; }
  .star-btn.on { pointer-events: auto; }

  .proof-links { display: block; margin-top: 22px; font-size: 15px; color: var(--muted); } .proof-links a { color: var(--star); }
  .topics { display: flex; gap: 8px; justify-content: center; margin-top: 2px; }
  .topics a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 99px; text-decoration: none; font-size: 14px; color: var(--ink);
    box-shadow: inset 0 0 0 1px rgb(236 238 246 / .28); transition: background var(--d2) var(--ease); }
  .topics a:hover { background: rgb(236 238 246 / .08); }

  .sheet[open] { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; width: min(980px, 92vw); max-height: 86vh; padding: 28px; border: 0; border-radius: 24px;
    color: var(--ink); background: #0d0f18; box-shadow: 0 0 0 1px rgb(236 238 246 / .1), 0 40px 120px rgb(0 0 0 / .7); animation: sheet-in .38s var(--ease); overflow: hidden; }
  .sheet::backdrop { background: rgb(3 4 8 / .66); }
  .sheet:focus { outline: none; }
  .sheet__img { grid-row: 1 / span 5; width: 100%; height: auto; max-height: calc(86vh - 56px); object-fit: contain; border-radius: 14px; }
  .sheet__status { align-self: end; } .sheet h2 { font-size: 40px; margin-top: 10px; }
  .sheet__sub { color: #c3c6d8; font-size: 17px; margin-top: 12px; }
  .sheet__link { margin-top: 18px; display: inline-flex; justify-self: start; min-height: 50px; padding: 0 22px; border-radius: 999px; background: var(--ink); color: var(--bg) !important; align-items: center; text-decoration: none; }
  .sheet__link::after { color: var(--bg); }
  .sheet__close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 99px; border: 0; font-size: 26px; line-height: 1; color: var(--ink); background: rgb(30 33 48 / .9); cursor: pointer; }
  .sheet .arm { display: none; }
  html.sheet-open { overflow: hidden; }
}

/* one voice: the sharper copy written for phones is now the copy everywhere */
.only-dk { display: none !important; } .only-ph { display: inline !important; }
@media (min-width: 761px) { #labs .type h2 { font-size: clamp(32px, 3.5vw, 54px); line-height: 1.06; } }

/* ---------- anticipation: name the next chapter, show the next card ---------- */
.next-cue { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 22px; text-decoration: none;
  font: 500 11.5px/1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); transition: color var(--d2) var(--ease); }
.next-cue span { color: var(--star); }
.next-cue:hover { color: var(--ink); }
.next-cue i { width: 9px; height: 9px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-3px); animation: nudge 1.8s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { translate: 0 0; opacity: .5; } 50% { translate: 0 4px; opacity: 1; } }
.type--left .next-cue, .product .next-cue { display: flex; width: max-content; }
a.cue { text-decoration: none; }
.eyebrow .count { color: var(--muted); margin-right: 4px; padding: 0; box-shadow: none; } .sheet .count { display: none; }
.deck { z-index: 1; box-shadow: 0 0 0 1.5px rgb(236 238 246 / .35); filter: saturate(.85); }
@media (prefers-reduced-motion: reduce) { .next-cue i { animation: none; } }
@media (max-width: 760px) { .next-cue { margin-top: 10px; min-height: 40px; } .product .next-cue { margin-top: 2px; } }



/* ---------- the open star: no box. The product builds in the sky out of its own star's light; the words write in beside it ---------- */
.sheet.peek[open] { display: grid; position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0;
  padding: 0 var(--gut); border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: hidden; animation: none;
  grid-template-columns: minmax(0, 560px); align-content: center; justify-content: start; gap: 0; color: var(--ink); }
.sheet.peek::backdrop { background: linear-gradient(90deg, rgb(5 6 10 / .7), rgb(5 6 10 / .3) 42%, transparent 58%); animation: peek-dim .9s var(--ease) both; }
.sheet.peek.leaving::backdrop { animation: peek-undim .7s var(--ease) both; }
.sheet.peek .sheet__img { display: none; }
.sheet.peek > :not(.sheet__close) { grid-column: 1; grid-row: auto; justify-self: start; align-self: auto;
  animation: peek-write .9s var(--ease) both; animation-delay: calc(.75s + var(--i, 0) * .12s); }
.sheet.peek .sheet__status { --i: 0; margin-top: 0; }
.sheet.peek h2 { --i: 1; font-size: clamp(40px, 6vw, 92px); margin-top: 18px; text-shadow: 0 2px 40px rgb(5 6 10 / .8); }
.sheet.peek .sheet__sub { --i: 2; font-size: 18px; color: #c3c6d8; margin-top: 14px; max-width: 34em; display: block; -webkit-line-clamp: none; }
.sheet.peek .sheet__link { --i: 3; margin-top: 24px; }
.sheet.peek .sheet__hint { --i: 4; margin-top: 22px; font: 500 10px/1.4 "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sheet__hint { display: none; } .sheet.peek .sheet__hint { display: block; }
.sheet.peek .touch-only { display: none; }
@media (hover: none) { .sheet.peek .touch-only { display: inline; } .sheet.peek .fine-only { display: none; } }
.sheet.peek .sheet__close { position: fixed; top: 18px; right: 18px; float: none; margin: 0; animation: peek-in .5s var(--ease) .9s both;
  background: rgb(13 15 24 / .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px rgb(236 238 246 / .2); }
.sheet.peek.leaving > * { animation: peek-out .35s var(--ease) both !important; }
@keyframes peek-write { from { opacity: 0; clip-path: inset(-30% 100% -30% -10%); } to { opacity: 1; clip-path: inset(-30% -10% -30% -10%); } }
@keyframes peek-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes peek-out { to { opacity: 0; } }
@keyframes peek-dim { from { opacity: 0; } to { opacity: 1; } }
@keyframes peek-undim { from { opacity: 1; } to { opacity: 0; } }
@media (max-width: 760px) {
  .sheet.peek[open] { align-content: end; grid-template-columns: minmax(0, 1fr); padding: 0 18px calc(26px + env(safe-area-inset-bottom, 0px)); }
  .sheet.peek::backdrop { background: linear-gradient(0deg, rgb(5 6 10 / .92), rgb(5 6 10 / .6) 34%, transparent 48%); }
  .sheet.peek h2 { font-size: clamp(32px, 9vw, 44px); margin-top: 8px; }
  .sheet.peek .sheet__sub { font-size: 15px; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 3; }
  .sheet.peek .sheet__link { justify-self: stretch; margin-top: 14px; }
  .sheet.peek .sheet__hint { justify-self: center; margin-top: 12px; }
  .sheet.peek .sheet__close { top: 12px; right: 12px; }
}
@media (prefers-reduced-motion: reduce) { .sheet.peek > *, .sheet.peek::backdrop, .sheet.peek.leaving > * { animation: none !important; } }
.bar { transition: opacity .5s var(--ease); }
html.peeking .bar { opacity: 0; pointer-events: none; } /* while a star is open, its close is the only control up top */
.sheet__link[hidden] { display: none !important; }
/* the hop map: the cross in miniature, where the logo was; the open star is lit */
.sheet__hop { display: none; }
.sheet.peek .sheet__hop { display: block; position: fixed; top: 10px; left: max(6px, calc(var(--gut) - 22px)); width: 112px; height: 128px; animation: peek-in .6s var(--ease) 1s both; }
.sheet__hop svg { position: absolute; inset: 22px; width: calc(100% - 44px); height: calc(100% - 44px); overflow: visible; }
.sheet__hop line { stroke: rgb(236 238 246 / .22); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sheet__hop button { position: absolute; width: 40px; height: 40px; margin: 0; padding: 0; border: 0; border-radius: 99px; background: none; cursor: pointer;
  transform: translate(-50%, -50%); }
.sheet__hop button::after { content: ""; position: absolute; inset: 14px; border-radius: 99px; background: var(--c); opacity: .5; transition: opacity var(--d2) var(--ease), transform var(--d2) var(--ease); }
.sheet__hop button:hover::after { opacity: .9; transform: scale(1.25); }
.sheet__hop button[aria-current]::after { opacity: 1; transform: scale(1.35); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 28%, transparent), 0 0 18px var(--c); }
.sheet__trail { display: none; }
.sheet.peek .sheet__trail { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; animation: none !important; overflow: visible; }
.sheet__trail path { fill: none; stroke-width: 1.5; stroke-dasharray: 1 1; stroke-linecap: round; filter: drop-shadow(0 0 4px currentColor); }
.sheet.peek.hopping > :not(.sheet__close):not(.sheet__hop):not(.sheet__trail) { animation: peek-out .3s var(--ease) both !important; }
.sheet.peek .sheet__hop, .sheet.peek .sheet__trail { grid-row: auto; }

/* ---------- the still version: tier 'low' (weak connection, Save-Data, low-end or software graphics) or no WebGL ----------
   A short, ordinary page: no tall scroll-through sections, nothing pinned, the real product shots inline. */
html.no-gl .scene { height: auto !important; }
html.no-gl .pin { position: static; height: auto !important; min-height: 0; padding-block: 112px 64px; }
html.no-gl #open .pin { min-height: 100svh; }
html.no-gl .poster { position: absolute; height: 100svh; }
html.no-gl .type { opacity: 1 !important; transform: none !important; }
html.no-gl .next-cue, html.no-gl .cue, html.no-gl .star-btn, html.no-gl .index-links, html.no-gl .shot-ov { display: none !important; }
