/* Dennis Kareta · gel site V9: four one-screen pages (home / about / work / contact), shared styles. Built on gel site V8.
   Palette: cream ground, plum ink for all type and UI; coral and pink only as small gel accents (never text, never big fills). */
@font-face { font-family: "DynaPuff"; src: url("/fonts/DynaPuff-VF.ttf") format("truetype"); font-weight: 400 700; font-stretch: 75% 100%; font-display: block; } /* OFL, from Den's font base */
:root { --plum: #2a0f2e; --coral: #f77062; --pink: #fe5196; --cream: #fff6f2; --blush: #ffe4ea; --soft: #5e3d61; --ease: cubic-bezier(.22,1,.36,1); }
* { box-sizing: border-box; margin: 0; }
/* every page is one sheet: no page scroll, no rubber band (flipping replaces scrolling) */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--cream); }
body { color: var(--plum); font: 300 17px/1.45 "Funnel Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
main { position: relative; height: 100svh; overflow: hidden; z-index: 1; } /* overflow: the 150% splash layers must not widen a phone page */
.mono { font: 12px/1.4 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .04em; }
header, .cap, #player .bar { font: 400 14px/1.4 "Funnel Sans", system-ui, sans-serif; letter-spacing: .01em; }
.sr, #player-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* screen readers only */
::selection { background: var(--plum); color: var(--cream); }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 4px; }

/* header: plum pills, cream text */
header { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 10px 4vw; z-index: 10; pointer-events: none; }
header nav, header > .name { pointer-events: auto; display: flex; gap: 4px; background: var(--plum); color: var(--cream); border-radius: 99px; padding: 0 8px; }
header > .name { padding: 0 18px; min-height: 44px; align-items: center; text-decoration: none; }
header :focus-visible { outline-color: var(--cream); outline-offset: -6px; } /* inside the plum pill: half outside it would land on cream */
.ctl { font: inherit; color: inherit; background: none; border: 0; padding: 14px 12px; min-height: 44px; cursor: pointer; text-decoration: none; text-underline-offset: 4px; white-space: nowrap; }
.ctl:hover, header > .name:hover { text-decoration: underline; text-underline-offset: 4px; }
header [aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* page indicator: four gel dots on the right edge, each a real link */
.dots { position: fixed; right: max(4px, 1.2vw); top: 50%; translate: 0 -50%; display: grid; z-index: 10; }
.dots a { display: grid; place-items: center; width: 44px; height: 44px; color: var(--plum); }
.dots a::before { content: ""; width: 11px; height: 11px; border: 2px solid currentColor; border-radius: 52% 48% 46% 54% / 50% 54% 46% 50%; transition: transform .4s var(--ease), background-color .3s; }
.dots a:hover::before { transform: scale(1.25); background: var(--pink); }
.dots a[aria-current]::before { background: currentColor; transform: scale(1.3); }

/* gel cursor (fine pointers only): difference against cream reads as near-black */
#cur { position: fixed; left: 0; top: 0; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--cream); mix-blend-mode: difference; pointer-events: none; z-index: 20; opacity: 0; transition: opacity .3s; }
.fine #cur { opacity: 1; }

h1 .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 .04em .06em; }
h1 .w > span { display: inline-block; }
h1 em { font-style: normal; color: var(--plum); }

/* a drop = media clipped by a living path + a rim drawn on top + a splash layer behind */
.drop { position: relative; aspect-ratio: 4 / 3; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.drop .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #5c1f4c; } /* plum lifted toward pink while a poster loads */
.drop video.media { opacity: 0; transition: opacity .5s var(--ease); background: none; }
.drop.playing video.media, .drop video.media.on { opacity: 1; }
.drop svg.rim, .drop svg.goo { position: absolute; overflow: visible; pointer-events: none; }
.drop svg.rim { inset: 0; width: 100%; height: 100%; }
.drop svg.goo { left: -25%; top: -25%; width: 150%; height: 150%; }
/* caption pill holds only the action: film titles stay off screen */
.drop .cap { position: absolute; left: 50%; bottom: -38px; translate: -50% 0; white-space: nowrap; background: rgb(42 15 46 / .92); padding: 4px; border-radius: 99px; color: var(--cream); }
.cap .act { display: inline-block; padding: 3px 9px; border: 1px solid currentColor; border-radius: 99px; }
.drop.hot .cap .act { background: var(--cream); color: var(--plum); }
.drop-btn { position: absolute; inset: 6%; z-index: 2; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.drop-btn:focus-visible { outline: 2px dashed var(--plum); outline-offset: 24px; } /* clear of the rim */

/* ---------- home ---------- */
.hero { padding: 0 4vw; }
.role { position: absolute; left: 4vw; top: 11vh; z-index: 3; }
.role .lp { font: 500 clamp(44px, 5.4vw, 92px)/.92 "DynaPuff", sans-serif; letter-spacing: -.01em; }
.role .where { display: inline-block; margin: 1rem 0 .9rem; padding: 3px 12px; border: 1px solid var(--soft); border-radius: 99px; color: var(--soft); }
.role .lead { max-width: 27rem; }
.hero h1 { position: absolute; left: 3.4vw; bottom: 8vh; font: 600 clamp(72px, 12vw, 210px)/.86 "DynaPuff", sans-serif; letter-spacing: -.02em; z-index: 3; pointer-events: none; }
.hero .drop { position: absolute; right: 8vw; top: 16vh; width: min(48vw, 74vh); aspect-ratio: 1 / .94; }

/* ---------- about: Off Camera. Text column left, the bubble tank right ---------- */
.about { display: flex; }
.off { position: relative; z-index: 2; width: 34vw; padding: 15vh 0 4vh 4vw; display: flex; flex-direction: column; gap: 1.4rem; }
.off h1 { font: 600 clamp(64px, 8vw, 150px)/.86 "DynaPuff", sans-serif; letter-spacing: -.02em; margin-left: -.04em; }
.off .about-text { font-size: 19px; line-height: 1.45; max-width: 30rem; font-weight: 400; }
.companies, .services { list-style: none; padding: 0; }
.companies { display: grid; gap: .5rem; }
.companies b { font-weight: 500; }
.companies .mono { color: var(--soft); }
.services { display: flex; flex-wrap: wrap; gap: 6px; max-width: 30rem; }
.services li { font-size: 13.5px; line-height: 1.2; font-weight: 400; padding: 6px 11px; border: 1px solid rgb(42 15 46 / .45); border-radius: 99px; }
.tank { position: absolute; left: 38vw; right: calc(4vw + 28px); top: 15vh; bottom: 5vh; }
.tank #routes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--plum); stroke-opacity: .32; stroke-width: 1.2; stroke-dasharray: 1 7; stroke-linecap: round; }
.cities { position: absolute; inset: 0; list-style: none; padding: 0; }
.city { position: absolute; left: 0; top: 0; display: grid; place-content: center; justify-items: center; text-align: center; will-change: transform; border-radius: 50%; cursor: default; }
.city:focus-visible { outline-offset: 2px; }
.city svg.b { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.city .bf { fill: var(--blush); fill-opacity: .9; transition: fill .35s var(--ease); }
.city .bs { opacity: .9; }
.city .br { stroke: var(--plum); stroke-opacity: .7; stroke-width: 1; }
.city.on .bf { fill: #ffd0dc; } /* hover: a soft pink tint, plum text stays */
.city .n { position: relative; font: 500 16px/1.15 "Funnel Sans", system-ui, sans-serif; white-space: nowrap; }
.city .t { position: relative; color: var(--soft); white-space: nowrap; margin-top: 2px; }
.city.home .bf { fill: var(--plum); fill-opacity: 1; }
.city.home .br { stroke: var(--coral); stroke-opacity: .9; }
.city.home .n { color: var(--cream); font-size: 20px; }
.city.home .t { color: var(--cream); }
.city.home:focus-visible { outline-color: var(--plum); }
.city.on, .city:focus-visible { z-index: 3; }
.city .more { position: absolute; top: calc(100% - 4px); left: 50%; translate: -50% 0; white-space: nowrap; font: 400 12.5px/1 "Funnel Sans", system-ui, sans-serif; background: var(--plum); color: var(--cream); padding: 6px 10px; border-radius: 99px; opacity: 0; transition: opacity .25s var(--ease); pointer-events: none; }
.city.up .more { top: auto; bottom: calc(100% - 4px); }
.city.on .more, .city:focus-visible .more { opacity: 1; }
.city.home .more { background: var(--coral); color: var(--plum); } /* plum on coral: 6.18:1 */

/* ---------- work: an editing timeline; the preview gel rides the playhead ---------- */
.work { --gel: min(30vw, 46vh); --gel-top: 11vh; --track-top: 60svh; --track-h: 16svh; --x0: 4vw; --x1: calc(4vw + 28px); --ph-in: .64; } /* --ph-in: where the playhead enters the gel, as a share of its width (near its lower edge) */
.work h1 { position: absolute; left: 3.4vw; bottom: 3.5vh; font: 600 clamp(56px, 7.5vw, 140px)/.86 "DynaPuff", sans-serif; letter-spacing: -.02em; z-index: 1; pointer-events: none; white-space: nowrap; }
.work .big { position: absolute; left: 0; top: var(--gel-top); width: var(--gel); z-index: 3; transform-origin: 50% 0; will-change: transform; }
.playhead { position: absolute; left: 0; top: calc(var(--gel-top) + var(--gel) * var(--ph-in)); bottom: calc(100svh - var(--track-top) - var(--track-h) - 6px); width: 2px; background: var(--plum); z-index: 2; pointer-events: none; will-change: transform; }
.playhead::after { content: ""; position: absolute; left: -5px; bottom: calc(var(--track-h) + 1px); width: 12px; height: 12px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--plum); }
.deck { position: absolute; left: var(--x0); right: var(--x1); top: calc(var(--track-top) - 6.5svh); height: calc(var(--track-h) + 6.5svh); touch-action: none; z-index: 1; cursor: ew-resize; }
.ruler { position: absolute; left: 0; right: 0; top: 0; height: 5svh; border-bottom: 1px solid rgb(42 15 46 / .35); }
.ruler .tk { position: absolute; bottom: 0; width: 1px; height: 7px; background: rgb(42 15 46 / .45); }
.ruler .tk.major { height: 14px; background: var(--plum); }
.ruler .lb { position: absolute; bottom: 17px; translate: 3px 0; color: var(--soft); white-space: nowrap; }
.track { position: absolute; left: 0; right: 0; bottom: 0; height: var(--track-h); display: flex; gap: 2px; list-style: none; padding: 0; }
.track li { flex: none; height: 100%; }
.clip { display: block; position: relative; width: 100%; min-width: 1px; height: 100%; padding: 0; border: 0; border-radius: 3px; background: #5c1f4c; overflow: hidden; cursor: pointer; opacity: .55; transition: opacity .25s var(--ease); -webkit-tap-highlight-color: transparent; }
.clip img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.clip:hover { opacity: .8; }
.clip[aria-current] { opacity: 1; outline: 2px solid var(--plum); outline-offset: 1px; z-index: 1; }
.clip:focus-visible { opacity: 1; outline: 2px dashed var(--plum); outline-offset: 4px; z-index: 2; }
.readout { position: absolute; left: var(--x0); right: var(--x1); top: calc(var(--track-top) + var(--track-h) + 1.6svh); display: flex; justify-content: space-between; gap: 1rem; font-size: 13px; z-index: 1; }
#big-drop .cap { bottom: auto; top: 9%; } /* inside the drop, near its top */

/* ---------- contact: cream ground, plum ink ---------- */
.contact { display: flex; flex-direction: column; justify-content: center; gap: 7vh; padding: 10vh 9vw 12vh 4vw; }
.contact h1 { font: 600 clamp(64px, 13vw, 240px)/.88 "DynaPuff", sans-serif; letter-spacing: -.02em; margin-left: -.04em; }
.ways { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 3.5rem; font-size: clamp(22px, 2.5vw, 38px); }
.ways p { display: flex; align-items: center; gap: 4rem; }
.way { position: relative; z-index: 1; color: var(--plum); padding: .15em .1em; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; transition: color .25s var(--ease); }
.way:hover { text-decoration-thickness: 2px; }
.way.lit { color: var(--cream); text-decoration-color: transparent; }
.copy { position: relative; font: 400 14px/1 "Funnel Sans", system-ui, sans-serif; color: var(--plum); background: none; border: 1px solid currentColor; border-radius: 99px; min-height: 30px; min-width: 0; padding: 0 11px; font-size: 12px; cursor: pointer; }
.copy::after { content: ""; position: absolute; inset: -8px -6px; } /* the button looks small, the touch area stays 44px */
.copy:hover { background: var(--plum); color: var(--cream); }
.copy.done { background: var(--plum); color: var(--cream); }
#ink { position: fixed; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.spl { position: fixed; left: 0; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; pointer-events: none; z-index: 5; }
body > footer { position: fixed; left: 4vw; right: 9vw; bottom: 4vh; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--soft); z-index: 1; }

/* ---------- flip: the liquid flood overlay and its no-WebGL stand-in ---------- */
#flood, .flood-fb { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 100; }
#flood { pointer-events: none; }
#flood.idle { visibility: hidden; } /* compiled ahead and kept for the next flip; invisible until it runs */

/* ---------- film player (stays plum: the films play on the dark) ---------- */
/* V14: the panel stops short of the edges so the site stays faintly visible around it (veil below); it grows out of the gel in script */
#player { width: calc(100vw - 4vw); height: calc(100dvh - 4vh); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; border-radius: 28px; overflow: hidden; background: #000; color: var(--cream); }
#player::backdrop { background: transparent; }
#veil { position: fixed; inset: 0; z-index: 30; background: rgb(255 246 242 / .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; pointer-events: none; }
#player .ctl.x { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; opacity: .85; filter: drop-shadow(0 1px 6px rgb(0 0 0 / .55)); transition: opacity .2s, transform .25s; }
#player .ctl.x:hover { opacity: 1; transform: rotate(90deg); text-decoration: none; }
#player :focus-visible { outline-color: var(--cream); }
#player .bar { position: absolute; inset: 0 0 auto; z-index: 2; background: linear-gradient(rgb(0 0 0 / .45), transparent); pointer-events: none; display: flex; justify-content: flex-end; align-items: center; gap: 1rem; padding: 6px 4vw; min-height: 56px; }
#player .bar nav { display: flex; flex: none; pointer-events: auto; text-shadow: 0 1px 6px rgb(0 0 0 / .55); }
#player video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
#player .err { position: absolute; inset: 0; display: grid; place-content: center; gap: 1rem; text-align: center; padding: 0 6vw; background: #1a0820; }
#player .err[hidden] { display: none; }
#player .err .ctl { border: 1px solid currentColor; border-radius: 99px; justify-self: center; }

/* ---------- laptop heights: the Off Camera column must fit one screen (1366x768, 1280x800) ---------- */
@media (min-width: 761px) and (max-height: 880px) {
  .off { width: 37vw; gap: 1rem; padding-top: 15vh; }
  .off h1 { font-size: clamp(64px, min(8vw, 12vh), 150px); }
  .off .about-text { font-size: 17px; }
  .services { gap: 5px; }
  .services li { font-size: 12.5px; padding: 5px 9px; }
  .tank { left: 40vw; }
  .work h1 { font-size: clamp(56px, min(7.5vw, 12vh), 140px); }
}
/* V11: desktop Off Camera text column sits in the vertical middle of the screen at any height (was a fixed 15vh from the top, so it rode high on tall screens) */
@media (min-width: 761px) { .off { justify-content: center; padding-top: 64px; padding-bottom: 64px; } }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .ctl { padding: 14px 7px; }
  header { justify-content: flex-end; padding: 10px 3vw; }
  header nav { padding: 0 6px; gap: 0; }
  header > .name { display: none; } /* the dots and the home page name carry it */
  .dots { right: 0; top: auto; bottom: max(12px, env(safe-area-inset-bottom)); translate: none; }
  .role { top: 10vh; }
  .role .lead { display: none; }
  .hero .drop { right: 13vw; top: 27vh; width: 64vw; }
  .hero h1 { bottom: 8vh; }
  /* about: heading, text, then the tank below; companies and services stay off (the text already names them) */
  .about { display: block; }
  .off { width: auto; padding: 76px 6vw 0; gap: .9rem; }
  .off h1 { font-size: clamp(52px, 15vw, 80px); }
  .off .about-text { font-size: 15.5px; }
  .companies, .services { display: none; }
  .tank { left: 4vw; right: 48px; top: auto; bottom: 4svh; height: 45svh; }
  .city .n { font-size: 13px; }
  .city.home .n { font-size: 15px; }
  .city .t { font-size: 11px; }
  /* work */
  .work { --gel: 56vw; --gel-top: 12vh; --track-top: 60svh; --track-h: 12svh; --x0: 4vw; --x1: 4vw; --ph-in: .77; }
  .work .big { aspect-ratio: 1 / .9; }
  .readout { right: 52px; }
  .work h1 { font-size: clamp(40px, 11vw, 64px); bottom: 5svh; }
  .contact { padding: 12vh 12vw 14vh 6vw; gap: 5vh; }
  .ways { flex-direction: column; align-items: flex-start; gap: .6rem; font-size: 21px; }
  .ways p { flex-wrap: wrap; gap: .4rem 1rem; }
  .way { display: inline-flex; align-items: center; min-height: 44px; }
  body > footer { left: 6vw; right: 12vw; flex-direction: column; }
}

/* V10 copy additions */
.tank-cap { position: absolute; left: 0; top: 0; z-index: 2; opacity: .75; pointer-events: none; }
.readout .ro-sub { opacity: .75; }
@media (max-width: 760px) { .readout .ro-sub { display: none; } }

header { justify-content: flex-end; } /* V10: the name pill is gone, the menu stays on the right */
/* V10 phone pass (Den's iPhone check): centred menu, home as a column so the name never meets the drop, bubbles kept clear of their caption, work heading lifted */
@media (max-width: 760px) {
  header { justify-content: center; }
  .hero { display: flex; flex-direction: column; align-items: flex-start; padding: 78px 6vw calc(max(12px, env(safe-area-inset-bottom)) + 64px) 4vw; }
  .role, .hero h1 { position: static; }
  .hero .drop { position: relative; top: auto; right: auto; } /* the media layers are absolute inside it */
  .role .where { margin: .7rem 0 0; }
  .hero .drop { align-self: center; flex: none; --d: min(52vw, 30svh); width: var(--d); height: calc(var(--d) * .94); aspect-ratio: auto; margin: 3.5svh 0 44px; }
  .hero h1 { margin-top: auto; font-size: clamp(56px, 16vw, 84px); }
  .tank { bottom: 7svh; height: 40svh; }
  .tank-cap { top: -26px; }
  .work h1 { bottom: 10svh; }
}
/* V10 phone pass 2: gel on top as a wide oval, the title block sits low and centred; Off Camera lower and centred */
@media (max-width: 760px) {
  .hero { align-items: center; text-align: center; padding-top: 70px; }
  .hero .drop { order: 1; width: 88vw; height: 52vw; margin: 3svh 0 40px; }
  .role { order: 2; margin-top: auto; }
  .hero h1 { order: 3; margin-top: 1.2svh; align-self: center; }
  .off { padding-top: 15svh; text-align: center; align-items: center; }
  .off .about-text { text-align: center; font-size: 15px; }
  .tank-cap { left: 50%; translate: -50% 0; white-space: nowrap; }
  .tank { height: 37svh; bottom: 6svh; }
}
/* V10 phone pass 3: bigger oval, title block lower so the two groups read apart */
@media (max-width: 760px) {
  .hero { padding-bottom: calc(max(12px, env(safe-area-inset-bottom)) + 34px); }
  .hero .drop { width: 94vw; height: 60vw; margin: 2svh 0 40px; }
  .hero h1 { margin-top: 0; }
}
/* V10 phone pass 4: title block lower, equal gaps above and below the pill */
@media (max-width: 760px) {
  .hero { padding-bottom: calc(max(12px, env(safe-area-inset-bottom)) + 14px); }
  .hero h1 { margin-top: 12px; }
}
/* V10 phone pass 5: title block a touch lower, spacing unchanged */
@media (max-width: 760px) { .hero { padding-bottom: calc(max(12px, env(safe-area-inset-bottom)) + 2px); } }

/* V10: the finger can play with the gel (no page pan or swipe-flip starts on it) */
.hero .drop, .work .big { touch-action: none; }

/* V11 phone: no "Play film" pill on the Work gel (tap on the gel still plays the film) */
@media (max-width: 760px) { #big-drop .cap { display: none; } }

/* V13: on narrow desktop windows the intro text must stop before the gel drop (the drop starts at 44vw), so it wraps instead of running under it */
@media (min-width: 761px) { .role .lead { max-width: min(27rem, calc(40vw - 20px)); } }
