/* Lizzi’s — shared styles: tokens, base, header, footer, dialogs, effects layer.
   Breakpoints: phone ≤700px · tablet 701–1199px · desktop ≥1200px. */

@font-face { font-family: Inter; src: url('/fonts/inter-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url('/fonts/inter-medium.woff2') format('woff2'); font-weight: 500 700; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/fonts/geist-mono.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'PF Pixelscript Pro'; src: url('/fonts/pf-pixelscript-pro.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #111111;
  --fg: #f2f2f2;
  --fg-80: rgba(242, 242, 242, .8);
  --fg-50: rgba(242, 242, 242, .5);
  --muted: #a0a0a0;
  --quiet: #787878;
  --dim: #545454;
  --line: #303030;
  --paper: #f9f9f9;
  --sans: Inter, Arial, sans-serif;
  --mono: 'Geist Mono', monospace;
  --display: 'PF Pixelscript Pro', serif;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --header-height: 88px;
  --edge: 42px;
}

*, *::before, *::after { box-sizing: border-box; }
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  padding-top: var(--header-height);
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
::selection { background: #f2f2f2; color: #111; }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--mono); font-weight: 400; }
a { color: inherit; text-decoration: none; }
button { border: 0; padding: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--fg); outline-offset: 6px; }
img, video { display: block; max-width: 100%; }
svg { flex-shrink: 0; }

.symbol-arrow { font-family: var(--mono); font-variant-emoji: text; }
.mobile-break { display: none; }

.skip { position: fixed; top: -80px; left: 20px; z-index: 300; padding: 12px; background: var(--fg); color: var(--bg); }
.skip:focus { top: 12px; }

/* ---------- Background glyph field ---------- */
.field { display: contents; }
.field canvas { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
main { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.header-wrap { position: fixed; inset: 0 0 auto; z-index: 100; padding-inline: var(--edge); isolation: isolate; }
.header-blur, .header-blur span { position: absolute; inset: 0; pointer-events: none; }
.header-blur { z-index: -1; background: linear-gradient(#11111103, transparent); }
.header-blur span,
.back-blur span {
  -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur));
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent var(--fade)); mask-image: linear-gradient(to bottom, #000, transparent var(--fade));
}
.header-blur span:nth-child(1), .back-blur span:nth-child(1) { --blur: 50px; --fade: 25%; }
.header-blur span:nth-child(2), .back-blur span:nth-child(2) { --blur: 25px; --fade: 45%; }
.header-blur span:nth-child(3), .back-blur span:nth-child(3) { --blur: 12px; --fade: 65%; }
.header-blur span:nth-child(4), .back-blur span:nth-child(4) { --blur: 6px; --fade: 85%; }
.header-blur span:nth-child(5), .back-blur span:nth-child(5) { --blur: 3px; --fade: 100%; }
.header-blur span:nth-child(6), .back-blur span:nth-child(6) { --blur: 1px; --fade: 100%; }

.site-header { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; width: 100%; height: var(--header-height); }
.brand { display: block; }
.brand img { width: 48px; height: 58px; max-width: none; }
.site-nav { display: flex; align-items: center; gap: 32px; font-size: 18px; line-height: 21.6px; }
.site-nav a { transition: color .2s; }
.site-nav a:hover { color: var(--muted); }

.effects { display: flex; align-items: center; gap: 24px; }
.effect-toggle { position: relative; display: block; flex-shrink: 0; width: 18px; height: 18px; }
.effect-toggle::before { content: ""; position: absolute; inset: -3px -7px; border-radius: 6px; background: transparent; transition: background .15s; }
.effect-toggle svg { position: absolute; inset: 0; width: 18px; height: 18px; overflow: visible; fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; stroke-opacity: .5; transition: stroke-opacity .15s, opacity .15s; }
.sound-toggle[aria-pressed=false] svg { stroke-opacity: .2; }
.motion-toggle[aria-pressed=false] svg { opacity: .35; }
@media (hover: hover) and (pointer: fine) {
  .effect-toggle:hover::before { background: rgba(255, 255, 255, .02); }
}

/* ---------- Footer ---------- */
.footer-wrap { padding: 28px var(--edge) 24px; }
.site-footer {
  position: relative; z-index: 1; overflow: hidden;
  width: 100%; height: 350px; padding: 24px; border-radius: 32px;
  background: var(--paper); color: var(--quiet);
  font: 400 18px/21.6px var(--sans);
}
.site-footer a { transition: color .2s; }
.site-footer a:hover { color: #111; }
.site-footer a:focus-visible { outline-color: #111; }
.footer-top, .footer-bottom { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer-bottom { position: absolute; inset: auto 24px 24px; }
.footer-bottom time { white-space: nowrap; }
.footer-contact { display: inline-flex; align-items: center; gap: 8px; }
.footer-back { white-space: nowrap; }
.footer-star { position: absolute; top: 50%; left: 50%; width: 206px; height: 248px; transform: translate(-50%, -50%); pointer-events: none; }

/* ---------- Contacts sheet ---------- */
dialog { color: var(--fg); }
.contacts {
  position: fixed; inset: 40px 0 auto; margin: 0 auto; overflow: auto;
  width: calc(100% - 128px); max-width: none; height: 120px; max-height: calc(100svh - 80px);
  padding: 32px 68px; border: 0; border-radius: 24px;
  background: var(--paper); color: #111;
}
.contacts[open] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 32px; }
.contacts::backdrop { background: #1118; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.contacts-close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #aaa; font: 300 24px/1 var(--sans); }
.contacts-close:focus, .contacts-close:focus-visible { outline: none; }
.contacts-close:focus-visible { color: #111; }
.contact-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0;
  margin: -12px -12px -12px -20px; padding: 12px 12px 12px 20px; border-radius: 16px;
  font: 400 18px/21.6px var(--sans); color: #111; text-align: left;
  -webkit-user-select: none; user-select: none; transition: background-color .15s ease;
}
.contact-item:focus-visible { outline-color: #111; }
.contact-label { display: flex; align-items: center; gap: 5px; font: 400 18px/21.6px var(--mono); color: #999; }
.contact-label svg { width: 20px; height: 20px; }
.contact-value.is-copied { color: #f192d9; }
@media (hover: hover) and (pointer: fine) {
  .contact-item:hover { background: rgba(0, 0, 0, .03); }
}

/* ---------- “Open” pointer label ---------- */
.open-cursor {
  position: fixed; top: 0; left: 0; z-index: 150; display: none;
  padding: 12px 19px; border-radius: 5px; background: #fff; color: #111; font: 400 14px/1 var(--sans);
  opacity: 0; pointer-events: none; transition: opacity .15s; will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  .open-cursor { display: block; }
  .cursor-over-case .open-cursor { opacity: 1; }
  .metric-panel { cursor: none; }
}

/* ---------- Shared scene pieces (home scenes and “Next project”) ---------- */
.metric-panel { position: relative; display: block; overflow: hidden; isolation: isolate; color: var(--fg); }
.metric-panel:focus-visible { outline-offset: 8px; }
.scene-meta { display: flex; align-items: baseline; justify-content: space-between; font-family: var(--mono); }
.scene-meta h2, .scene-meta h3 { font: inherit; color: var(--fg-50); }
.scene-meta h2 span, .scene-meta h3 span { color: var(--dim); }
.scene-meta p { flex-shrink: 0; color: var(--fg); }
.scene-summary { color: var(--fg); }
@keyframes levitate {
  0%, 50%, 100% { transform: translateY(0); }
  25% { transform: translateY(calc(var(--drift, 9px) * -1)); }
  75% { transform: translateY(var(--drift, 9px)); }
}

/* ---------- Phone ---------- */
@media (max-width: 700px) {
  :root { --header-height: 54px; --edge: 16px; }
  body { position: relative; padding-top: 0; background: transparent; }
  .mobile-break { display: block; }

  /* The field scrolls with the page here: one canvas tile per screen. */
  .field { display: block; position: absolute; inset: 0; z-index: 0; overflow: clip; pointer-events: none; }
  .field canvas { position: absolute; inset: 0 0 auto; height: auto; }

  .header-wrap { position: sticky; }
  .brand img { width: 30px; height: 38px; }
  .site-nav { gap: 20px; font-size: 14px; line-height: 16.8px; }
  .effects { gap: 16px; }

  .footer-wrap { position: relative; z-index: 1; padding: 16px; }
  .site-footer { height: 340px; font-size: 14px; line-height: 16.8px; }
  .footer-day { display: none; }
  .footer-star { width: 179px; height: 215px; }

  .contacts { inset: 24px 0 auto; width: calc(100% - 32px); height: 264px; max-height: calc(100svh - 48px); padding: 36px 28px 28px; }
  .contacts[open] { grid-template-columns: 1fr; gap: 28px; }
  .contact-item, .contact-label { font-size: 16px; line-height: 20px; }
}
@media (max-width: 360px) {
  .site-nav { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .field { display: none; }
}

/* FiZZ’s can artwork is clipped by the original Figma silhouettes. */
.can-sticker { --can-r: -30deg; --can-w: 61.88%; --can-h: 83.378%; aspect-ratio: 276.712 / 308.05; }
.can-sticker.can-original { --can-r: 12.82deg; --can-w: 76.458%; --can-h: 89.048%; aspect-ratio: 228.229 / 293.945; }
.can-inner { position: absolute; left: 50%; top: 50%; width: var(--can-w); height: var(--can-h); transform: translate(-50%,-50%) rotate(var(--can-r)); }
.can-outline, .can-art { position: absolute; inset: 4.44% 14.57%; }
.can-original .can-outline, .can-original .can-art { inset-inline: 14.8%; }
.can-outline { background: url('/assets/updated/fizz-cover/can-pink-outline.svg') center / 100% 100% no-repeat; }
.can-original .can-outline { background-image: url('/assets/updated/fizz-cover/can-original-outline.svg'); }
.can-art { -webkit-mask: url('/assets/updated/fizz-cover/can-pink-mask.svg') center / 100% 100% no-repeat; mask: url('/assets/updated/fizz-cover/can-pink-mask.svg') center / 100% 100% no-repeat; overflow: hidden; }
.can-original .can-art { -webkit-mask-image: url('/assets/updated/fizz-cover/can-original-mask.svg'); mask-image: url('/assets/updated/fizz-cover/can-original-mask.svg'); }
.can-sticker .can-art img { position: absolute; max-width: none; width: 228.69%; height: 121.3%; left: -61.48%; top: -12.17%; }
.can-sticker.can-original .can-art img { width: 237.5%; height: 122.34%; left: -65.34%; top: -12.78%; }

/* Grain remains sharp above the vector glow, as in the FiZZ artboards. */
.fizz-background { position: absolute; inset: 0; display: block; container-type: inline-size; isolation: isolate; pointer-events: none; }
.fizz-background picture, .fizz-background img { display: block; width: 100%; height: 100%; }
.fizz-grain { --grain-unit: calc(100cqw / 830); position: absolute; inset: 0; display: block; background: url('/assets/updated/fizz-cover/fizz-grain.webp') 0 0 / calc(392.533325 * var(--grain-unit)) calc(392.533325 * var(--grain-unit)) repeat; opacity: .25; mix-blend-mode: overlay; }
.next-fizz .fizz-grain { --grain-unit: calc(100cqw / 960); }
@media (min-width:701px) and (max-width:1199px) and (max-aspect-ratio:9/10) {
  .scene-fizz .fizz-grain { --grain-unit: calc(100cqw / 730); }
}
@media (max-width:700px) {
  .fizz-grain, .next-fizz .fizz-grain { --grain-unit: calc(100cqw / 343); }
}
