/*
Theme Name: grain.wtf
Theme URI: https://grain.wtf
Author: Michael Lind
Description: Photographer portfolio theme. Blurred intro that flies the logo into the header, a crossfading banner slideshow, bottom nav, portfolio and quote form.
Version: 1.5.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: grain
*/

@font-face { font-family: "AeroDrip"; src: url("assets/fonts/drip.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "AeroBasic"; src: url("assets/fonts/basic.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "TypeIcons"; src: url("assets/fonts/icons.ttf") format("truetype"); font-display: swap; }

:root {
  --ink: #000000;
  --paper: #0d0707;
  --coral: #d9534f;
  --burgundy: #6b1220;
  --ash: #bdbdbd;
  --bone: #e8dfd8;
  --font-logo: "AeroDrip", "Sedgwick Ave Display", "Marker Felt", cursive;
  --font-nav: "AeroBasic", "Sedgwick Ave Display", "Marker Felt", cursive;
  --font-icon: "TypeIcons", sans-serif;
  --font-body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tsh: .05em .05em 0 #000;
  --wpbar: 0px;
  color-scheme: dark;
}
body.admin-bar { --wpbar: 32px; }
@media (max-width: 782px) { body.admin-bar { --wpbar: 46px; } }

[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { height: 100%; }
body { margin: 0; min-height: 100%; background: var(--ink); color: var(--bone); font-family: var(--font-body); font-size: 16px; line-height: 1.6; }
body.grain-front { height: 100%; overflow: hidden; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar (shared) ---------- */
.top { position: relative; z-index: 6; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 0 24px; min-height: clamp(84px, 10vw, 124px); background: var(--ink); }
.menu-btn { justify-self: start; display: grid; gap: 7px; width: 44px; padding: 8px 0; }
.menu-btn span { display: block; height: 5px; border-radius: 3px; background: var(--bone); transition: transform .25s, opacity .25s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(12px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-12px) rotate(-45deg); }
.insta { justify-self: end; display: inline-flex; align-items: center; gap: 10px; font-size: clamp(1rem, 2.2vw, 1.7rem); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.insta .ico { font-family: var(--font-icon); font-size: 2.4em; line-height: 1; text-decoration: none; display: inline-block; }

/* static logo on inner pages */
.brand-static { display: block; width: clamp(200px, 28vw, 380px); padding: 10px 0; }
.brand-static { transition: transform .35s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.brand-static img { display: block; width: 100%; height: auto; }
.brand-static .logo-b { display: none; }
html.skin-clean .brand-static .logo-a { display: none; }
html.skin-clean .brand-static .logo-b { display: block; }
body.no-flip .brand-static .logo-b { display: none !important; }
body.no-flip .brand-static .logo-a { display: block !important; }

/* ---------- front page: intro ---------- */
.intro { position: fixed; inset: var(--wpbar) 0 0 0; z-index: 30; display: grid; place-items: center; overflow: hidden; cursor: pointer; background: #1a0b0c; transition: opacity 1.1s ease, visibility 0s 1.1s; }
.intro .bg { position: absolute; inset: -6%; background: #1a0b0c center / cover no-repeat; filter: blur(22px) brightness(.8); transform: scale(1.05); transition: filter 1.1s ease, transform 1.4s ease; }
.intro .hint small { display: block; margin-top: 6px; font-size: .68rem; letter-spacing: .22em; opacity: .75; }
.intro .hint { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; text-align: center; font-size: .8rem; letter-spacing: .25em; text-transform: uppercase; color: var(--bone); opacity: .7; animation: nudge 2.2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(6px); opacity: 1; } }
.intro .tilt-btn { position: absolute; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); background: #0007; color: var(--bone); border: 1px solid #fff4; border-radius: 999px; padding: 9px 18px; font: inherit; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; }
.intro.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.intro.gone .bg { filter: blur(0) brightness(1); transform: scale(1); }

/* ---------- front page: main ---------- */
.site { position: fixed; inset: var(--wpbar) 0 0 0; display: grid; grid-template-rows: auto 1fr auto; background: var(--ink); overflow: hidden; }
.site > * { grid-column: 1; }
.site .top { grid-row: 1; } .hero { grid-row: 1 / 4; } .bottom { grid-row: 3; }
.bottom { position: relative; z-index: 6; background: var(--ink); }
/* cinematic: bars glide in from the screen edges, the photo settles, then the logo lands */
.site .top, .bottom { transition: transform 1.6s cubic-bezier(.16,.84,.24,1) .35s; }
.site .top { transform: translateY(-101%); } .bottom { transform: translateY(101%); }
.site.in .top, .site.in .bottom { transform: none; }
.brand { position: relative; align-self: stretch; width: clamp(260px, 40vw, 620px); display: block; }
.fly { position: fixed; left: 0; top: calc(var(--wpbar) + 8px); z-index: 40; margin: 0; max-width: none; height: auto; aspect-ratio: 2541 / 879; transform-origin: 50% 50%; pointer-events: none; filter: drop-shadow(0 8px 22px #000a); transition: transform 1.7s cubic-bezier(.7,0,.2,1) .1s; will-change: transform; }
.fly.live { pointer-events: auto; cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.fly.live.docked { cursor: pointer; }
.fly.dragging, .fly.dragging.docked { cursor: grabbing; }
.logo3d { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 50% 50%; will-change: transform; --th: 1.6px; }
.logo3d img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; max-width: none; pointer-events: none; -webkit-user-drag: none; }
.logo3d .face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.logo3d .front { transform: translateZ(calc(var(--th) * 3.2)); }
.logo3d .back { transform: rotateY(180deg) translateZ(calc(var(--th) * 3.2)); }
.logo3d .slab { backface-visibility: hidden; -webkit-backface-visibility: hidden; filter: brightness(.34) saturate(.7); }
.fly.docked { z-index: 7; }
.fly.loose { z-index: 45; cursor: grab; }
.fly.loose.dragging { cursor: grabbing; }
.mount { position: fixed; z-index: 8; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; pointer-events: none; opacity: 0; transform: scale(.5); transition: opacity .3s, transform .3s cubic-bezier(.2,1.6,.4,1); }
html.logo-ready .mount.bolt, html.logo-ready .mount.hole { opacity: 1; transform: none; }
/* an intact bolt head sitting on the sign */
.mount.bolt { background: radial-gradient(circle at 38% 32%, #d6d6d6 0 18%, #8d8d8d 45%, #4a4a4a 100%); box-shadow: 0 0 0 2px #00000099, 0 2px 4px #000a; }
.mount.bolt::after { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; margin-top: -1px; background: #2a2a2a; transform: rotate(-35deg); border-radius: 1px; }
/* the empty hole it leaves */
.mount.hole { background: radial-gradient(circle at 50% 38%, #000 0 42%, #150f0f 62%, #3a2d2d 100%); box-shadow: inset 0 2px 3px #000, 0 0 0 5px #ffffff12, 0 0 0 6px #00000066; transform: scale(.8); }
html.skin-clean .mount.bolt { background: radial-gradient(circle at 38% 32%, #f3e2b4 0 18%, #b8975a 45%, #6a5530 100%); }
html.skin-clean .mount.hole { background: radial-gradient(circle at 50% 38%, #000 0 42%, #14110d 62%, #3a3226 100%); }
/* page bits that have snapped off their mounts */
.free { pointer-events: auto !important; cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.free.dragging { cursor: grabbing; }
.foot-t { display: inline-block; }

.hero { position: relative; min-height: 0; overflow: hidden; }
.hero .stack { position: absolute; inset: 0; transform: scale(1.14); transition: transform 3.2s cubic-bezier(.16,.84,.24,1) .2s; }
.site.in .hero .stack { transform: scale(1); }
.slide { position: absolute; inset: 0; opacity: 0; background: #1a0b0c center / cover no-repeat; transition: opacity 2.2s ease; animation: drift 22s ease-in-out infinite alternate; }
.slide.on { opacity: 1; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.07); } }
.hero .vig { position: absolute; inset: 0; background: linear-gradient(#0008, transparent 22%, transparent 78%, #0008); pointer-events: none; }

/* bottom nav + menu lists */
.nav ul { list-style: none; margin: 0; display: flex; justify-content: center; align-items: baseline; gap: clamp(16px, 5vw, 80px); padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); flex-wrap: wrap; }
.nav a { display: inline-block; font-family: var(--font-nav); color: var(--ash); text-decoration: none; font-size: clamp(1.6rem, 4vw, 3.2rem); line-height: 1; padding: 6px 4px 10px; background-image: linear-gradient(var(--ash), var(--ash)); background-size: 100% 3px; background-repeat: no-repeat; background-position: 0 100%; transition: color .2s, transform .2s; }
.nav .is-primary a { font-size: clamp(2.1rem, 6vw, 4.6rem); }
.nav a:hover { color: #fff; transform: translateY(-2px); }
.foot { text-align: center; font-size: .75rem; color: #8a7f7a; padding: 0 16px 10px; margin-top: -8px; }

/* returning visitors skip the intro within a session */
.skip-intro .intro { display: none; }
.skip-intro .site .top, .skip-intro .bottom, .skip-intro .hero .stack, .skip-intro .fly { transition: none; transform: none; }
.skip-intro .site .top, .skip-intro .bottom { transform: none; }

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 20; background: #000d; backdrop-filter: blur(6px); display: grid; place-items: center; }
.drawer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; text-align: center; }
.drawer a { font-family: var(--font-nav); font-size: clamp(2.2rem, 8vw, 4rem); color: var(--bone); text-decoration: none; }
.drawer a:hover { color: var(--coral); }

/* ---------- inner pages ---------- */
.page { max-width: 980px; margin: 0 auto; padding: 32px 16px 72px; display: grid; gap: 24px; }
.page > * { min-width: 0; }
.page h1 { font-family: var(--font-logo); color: var(--coral); font-weight: 400; font-size: clamp(2.6rem, 8vw, 5rem); margin: 0; line-height: 1; text-shadow: var(--tsh); }
.entry { max-width: 68ch; font-size: 1.05rem; }
.entry > * { margin: 0 0 1.1em; }
.entry h2, .entry h3 { font-family: var(--font-nav); font-weight: 400; color: var(--bone); line-height: 1.1; }
.entry a { color: var(--coral); }
.entry.wide { max-width: none; }
.muted { color: #a89c96; }
.site-foot { text-align: center; font-size: .75rem; color: #8a7f7a; padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-block; border: 2px solid var(--ash); border-radius: 999px; padding: 6px 16px; font-size: .9rem; text-decoration: none; }
.chip[aria-current="page"] { background: var(--coral); border-color: var(--coral); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; background: linear-gradient(160deg, #2a0f14, #7a1f1a); text-decoration: none; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile:hover img { transform: scale(1.04); }
.tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 12px; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; background: linear-gradient(transparent, #000a); }
.pagination { display: flex; gap: 12px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 14px; border: 2px solid var(--ash); border-radius: 999px; text-decoration: none; }
.pagination .current { background: var(--coral); border-color: var(--coral); color: #fff; }

.entry .wp-block-gallery, .entry .gallery { max-width: none; }
.wp-block-image img { border-radius: 2px; }

form.quote { display: grid; gap: 14px; max-width: 560px; }
label { display: grid; gap: 6px; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ash); }
input, select, textarea { font: inherit; font-size: 1rem; letter-spacing: 0; text-transform: none; color: var(--bone); background: #1a1010; border: 2px solid #4a3a3a; border-radius: 4px; padding: 12px; width: 100%; }
textarea { min-height: 120px; resize: vertical; }
.send { justify-self: start; font-family: var(--font-logo); font-size: 2rem; color: #fff; background: var(--coral); padding: 8px 28px 12px; border-radius: 4px; text-shadow: var(--tsh); }
.send:hover { background: #e8605c; }
.note { font-size: .95rem; padding: 12px 14px; border-left: 4px solid var(--coral); background: #1a1010; max-width: 560px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* lightbox */
.entry img { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 99990; background: #000e; display: grid; place-items: center; }
.lightbox img { max-width: 96vw; max-height: 88vh; width: auto; height: auto; object-fit: contain; }
.lightbox button { position: absolute; color: var(--bone); font-size: 2.4rem; line-height: 1; padding: 12px 18px; }
.lightbox .lb-close { top: 8px; right: 8px; } .lightbox .lb-prev { left: 4px; top: 50%; } .lightbox .lb-next { right: 4px; top: 50%; }
.lightbox button:hover { color: var(--coral); }
.lightbox .lb-count { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; text-align: center; font-size: .8rem; letter-spacing: .2em; color: var(--ash); }

@media (max-width: 640px) {
  .brand { width: 240px; }
  .top { grid-template-columns: auto 1fr auto; padding: 10px 16px; }
  .insta span:not(.ico) { display: none; }
  /* get a quote sits on its own row above the other two */
  .nav ul { display: grid; grid-template-columns: auto auto; justify-content: center; justify-items: center; gap: 4px 36px; }
  .nav .is-primary { grid-column: 1 / -1; order: -1; }
  .nav .is-primary a { font-size: clamp(2.6rem, 13vw, 3.4rem); }
  .nav a { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .brand-static { margin-inline: auto; }
}
/* tall screens crop the banner sides, so pan across it instead of the slow zoom */
@media (max-aspect-ratio: 1/1) {
  .slide { animation: none; background-position: 0% 50%; }
  .slide.pan { animation: pan 12s linear forwards; }
  @keyframes pan { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01s !important; }
}

/* ---------- southrngrain skin (clean) ----------
   Flipped to by spinning the logo. Same layout; new paint, fonts, hard shadows gone. */
html.skin-clean {
  --ink: #0f0e0d; --paper: #14120f; --coral: #c9a45c; --burgundy: #3a3226; --ash: #cfc6b8; --bone: #efe8dc;
  --font-logo: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-nav: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --tsh: none;
}
html.skin-clean .intro { background: #12100d; }
html.skin-clean .intro .bg { background-color: #12100d; filter: blur(22px) brightness(.7) sepia(.25); }
html.skin-clean .intro .hint { font-family: var(--font-nav); font-size: .95rem; letter-spacing: .3em; }
html.skin-clean .nav a { font-weight: 500; letter-spacing: .03em; background-size: 100% 1px; font-size: clamp(1.9rem, 4.6vw, 3.7rem); padding-bottom: 8px; }
html.skin-clean .nav .is-primary a { font-size: clamp(2.5rem, 6.8vw, 5.2rem); font-weight: 600; }
html.skin-clean .nav a:hover { color: var(--coral); }
html.skin-clean .drawer a { font-weight: 500; letter-spacing: .03em; }
html.skin-clean .insta { text-decoration-thickness: 1px; font-family: var(--font-body); }
html.skin-clean .menu-btn span { height: 2px; border-radius: 0; }
html.skin-clean .hero .vig { background: linear-gradient(#000a, transparent 22%, transparent 78%, #000a); }
html.skin-clean .slide { filter: saturate(.9) contrast(1.02); }
html.skin-clean .page h1 { font-weight: 600; letter-spacing: .01em; }
html.skin-clean .entry h2, html.skin-clean .entry h3 { font-weight: 600; }
html.skin-clean .tile { border-radius: 2px; background: linear-gradient(160deg, #1d1a15, #3a3226); }
html.skin-clean .tile .cap { font-family: var(--font-nav); font-size: .95rem; letter-spacing: .18em; }
html.skin-clean .chip, html.skin-clean .pagination a, html.skin-clean .pagination span { border-width: 1px; }
html.skin-clean .chip[aria-current="page"], html.skin-clean .pagination .current { color: #15110a; }
html.skin-clean input, html.skin-clean select, html.skin-clean textarea { background: #181613; border: 1px solid #3b352b; border-radius: 2px; }
html.skin-clean .send { color: #15110a; border-radius: 2px; font-weight: 600; letter-spacing: .06em; }
html.skin-clean .send:hover { background: #d8b774; }
html.skin-clean .note { background: #181613; border-left-width: 2px; }
html.skin-clean .foot, html.skin-clean .site-foot { color: #8b8374; }
html.skin-clean .muted { color: #a59a88; }
html.skin-clean .tile img, html.skin-clean .wp-block-image img { filter: none; }

/* soft colour change when the skin flips with the site already showing */
html.skin-anim body, html.skin-anim .site, html.skin-anim .top, html.skin-anim .bottom, html.skin-anim .foot, html.skin-anim .intro,
html.skin-anim .menu-btn span, html.skin-anim .insta { transition: background-color .8s ease, color .8s ease, border-color .8s ease; }

/* ---------- version button + hidden menu (see assets/js/eggs.js) ---------- */
.ver { position: fixed; left: 10px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 35; padding: 4px 6px; font: 600 .68rem/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .08em; color: var(--bone); opacity: .38; transition: opacity .2s; -webkit-tap-highlight-color: transparent; }
.ver:hover, .ver:focus-visible { opacity: .85; }
#eggfx { position: fixed; inset: 0; z-index: 99995; pointer-events: none; overflow: hidden; }
.egg-toast { position: fixed; left: 50%; bottom: calc(46px + env(safe-area-inset-bottom, 0px)); z-index: 99996; transform: translate(-50%, 12px); max-width: 90vw; padding: 9px 16px; border-radius: 3px; background: #000d; color: var(--bone); border: 1px solid var(--coral); font: 600 .85rem/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.egg-toast.on { opacity: 1; transform: translate(-50%, 0); }
.egg-menu { position: fixed; left: 50%; bottom: calc(40px + env(safe-area-inset-bottom, 0px)); z-index: 99997; transform: translateX(-50%); width: min(340px, calc(100vw - 32px)); background: #000e; border: 1px solid var(--coral); border-radius: 3px; padding: 10px 12px; box-shadow: 0 10px 40px #000a; animation: eggIn .22s ease-out; }
.egg-menu form { display: flex; gap: 8px; align-items: center; margin: 0; }
.egg-menu .egg-pr { color: var(--coral); font: 700 1rem ui-monospace, Menlo, Consolas, monospace; }
.egg-menu input { flex: 1; min-width: 0; background: transparent; border: 0; border-radius: 0; padding: 4px 0; color: var(--bone); font: 600 1rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; outline: 0; caret-color: var(--coral); }
.egg-menu.nope { animation: eggNope .35s; border-color: #e74c3c; }
@keyframes eggIn { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes eggNope { 20%, 60% { transform: translateX(calc(-50% - 7px)); } 40%, 80% { transform: translateX(calc(-50% + 7px)); } }

.egg-smoke { position: absolute; inset: 0; }
/* effects use the individual translate/rotate/scale properties (never a transform on body or the logo), and the shake only moves one
   layer: the site (or the page on inner pages), so it stays cheap */
html.egg-shake .site, html.egg-shake .page, html.egg-shake header.top { animation: eggShake .09s infinite; }
@keyframes eggShake { 0% { translate: 2px 1px; } 25% { translate: -3px 2px; } 50% { translate: 1px -2px; } 75% { translate: -2px -1px; } 100% { translate: 2px 2px; } }
html.egg-knock .site, html.egg-knock .page, html.egg-knock header.top, html.egg-knock .fly { animation: eggKnock 2.8s steps(1, end); }
@keyframes eggKnock { 0%, 16%, 28%, 56%, 70%, 82% { translate: 0 0; rotate: 0deg; } 1%, 17%, 29%, 57%, 71%, 83% { translate: 0 -9px; rotate: -.25deg; } 4%, 20%, 32%, 60%, 74%, 86% { translate: 0 3px; rotate: 0deg; } 8%, 24%, 36%, 64%, 78%, 90% { translate: 0 0; rotate: 0deg; } }
.egg-cops { position: absolute; inset: 0; background: radial-gradient(circle at 0% 50%, #ff1a2acc, transparent 55%), radial-gradient(circle at 100% 50%, #1a4dffcc, transparent 55%); mix-blend-mode: screen; animation: eggCops .5s steps(1) infinite, eggFade 4.2s linear forwards; }
.egg-cops.still { animation: eggFade 4.2s linear forwards; opacity: .4; }
@keyframes eggCops { 0% { transform: none; } 50% { transform: scaleX(-1); } }
@keyframes eggFade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
.egg-grain { position: absolute; inset: -50px; opacity: .85; mix-blend-mode: overlay; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); animation: eggGrain .25s steps(1) infinite, eggFade 6.2s linear forwards; }
.egg-grain.still { animation: eggFade 6.2s linear forwards; opacity: .5; }
@keyframes eggGrain { 0% { transform: translate(0, 0); } 20% { transform: translate(-30px, 20px); } 40% { transform: translate(25px, -35px); } 60% { transform: translate(-15px, -10px); } 80% { transform: translate(35px, 30px); } }
html.egg-focus { animation: eggFocus 2.5s ease-out; }
@keyframes eggFocus { 0% { filter: blur(22px); } 55% { filter: blur(14px); } 72% { filter: blur(0); } 82% { filter: blur(4px); } 100% { filter: blur(0); } }
.egg-flash { position: absolute; inset: 0; background: #fff; animation: eggFlash .9s ease-out forwards; }
@keyframes eggFlash { 0% { opacity: 1; } 100% { opacity: 0; } }
html.egg-low .site, html.egg-low .page, html.egg-low header.top, html.egg-low .site-foot { transform-origin: 50% 100%; animation: eggLow 4.6s ease-in-out; }
html.egg-low .fly { animation: eggLowFly 4.6s ease-in-out; }
@keyframes eggLow { 0% { scale: 1 1; } 18%, 78% { scale: 1 .42; } 100% { scale: 1 1; } }
@keyframes eggLowFly { 0% { scale: 1 1; translate: 0 0; } 18%, 78% { scale: 1 .42; translate: 0 var(--low-dy, 0px); } 100% { scale: 1 1; translate: 0 0; } }
.egg-shift { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; padding: 10px 14px; background: #000c; border-radius: 40px; animation: eggFade 3.6s linear forwards; }
.egg-shift i { width: clamp(14px, 3.4vw, 26px); height: clamp(14px, 3.4vw, 26px); border-radius: 50%; background: #222; animation: eggLed .01s linear var(--d) forwards, eggBlink .18s steps(1) 2.4s 5; }
.egg-shift.still i { background: var(--c); animation: none; }
@keyframes eggLed { to { background: var(--c); box-shadow: 0 0 14px var(--c); } }
@keyframes eggBlink { 50% { background: #222; box-shadow: none; } }

/* dvd screensaver */
.egg-dvd { position: fixed; inset: 0; z-index: 99990; background: #000; overflow: hidden; cursor: pointer; }
.egg-dvd img { position: absolute; left: 0; top: 0; max-width: none; will-change: transform; filter: hue-rotate(var(--h, 0deg)) saturate(1.15); user-select: none; -webkit-user-drag: none; }
.egg-dvd .egg-corners { position: absolute; left: 14px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); font: 600 .75rem/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; color: #fff; opacity: .5; }
.egg-dvd .egg-hit { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 700 clamp(2rem, 9vw, 5rem)/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .1em; color: #fff; opacity: 0; pointer-events: none; }
.egg-dvd .egg-hit.on { animation: eggHit 1.1s ease-out; }
@keyframes eggHit { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.8); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); } }
