/* ==========================================================================
   RAUMIK STUDIO — Website
   Dark only. Palette & typography per styleguide.
   ========================================================================== */

@font-face { font-family: "Avenir Raumik"; src: url("../assets/fonts/RAUMIK-Font-Avenir-L.ttf") format("truetype");  font-weight: 300; font-display: swap; }
@font-face { font-family: "Avenir Raumik"; src: url("../assets/fonts/RAUMIK-Font-Avenir-Bo.ttf") format("truetype"); font-weight: 350; font-display: swap; }
@font-face { font-family: "Avenir Raumik"; src: url("../assets/fonts/RAUMIK-Font-Avenir-Rg.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Avenir Raumik"; src: url("../assets/fonts/RAUMIK-Font-Avenir-Md.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Avenir Raumik"; src: url("../assets/fonts/RAUMIK-Font-Avenir-He.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Avenir Raumik"; src: url("../assets/fonts/RAUMIK-Font-Avenir-Bl.ttf") format("truetype"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Steelfish Raumik"; src: url("../assets/fonts/RAUMIK-Font-Steelfish-Bd-It.otf") format("opentype"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Steelfish Raumik"; src: url("../assets/fonts/RAUMIK-Font-Steelfish-Bd.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* Corporate palette */
  --c-black: #000000;
  --c-ink: #141414;
  --c-graphite: #2d2d2d;
  --c-white: #ffffff;
  --c-mist: #e2e2e2;
  --c-grey: #868686;

  --text: var(--c-white);
  --text-2: rgba(255,255,255,.88);
  --text-3: rgba(255,255,255,.7);
  --line: rgba(255,255,255,.17);
  --line-2: rgba(255,255,255,.3);
  --surface: #0b0b0b;
  --surface-2: var(--c-ink);
  --surface-3: #1e1e1e;

  /* macOS traffic lights (UI element) */
  --tl-red: #ff5f57;
  --tl-yellow: #febc2e;
  --tl-green: #28c840;

  --font: "Avenir Raumik", "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  --font-display: "Steelfish Raumik", "Avenir Raumik", Impact, sans-serif;

  --menubar-h: 30px;
  --dock-size: 54px;
  --dock-zone: 92px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--c-black);
  color: var(--text);
  font-family: var(--font);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.55;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none; /* never fake bold/italic — use the real Avenir/Steelfish cuts */
  text-rendering: optimizeLegibility;
  user-select: none;
  -webkit-user-select: none;
}
img, video, iframe { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
::selection { background: rgba(255,255,255,.85); color: #000; }
:focus-visible { outline: 2px solid rgba(255,255,255,.8); outline-offset: 2px; border-radius: 6px; }

/* ==========================================================================
   Boot
   ========================================================================== */
#boot {
  position: fixed; inset: 0; z-index: 9999;
  background: #000;
  display: grid; place-items: center; align-content: center; gap: 48px;
  transition: opacity .6s ease, visibility .6s;
}
#boot.done { opacity: 0; visibility: hidden; }
.boot-logo { width: 96px; height: auto; animation: bootIn 1s var(--ease-out) both; }
.boot-bar { width: 180px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 0; background: #fff; border-radius: inherit; animation: bootBar 1.3s .2s cubic-bezier(.6,0,.2,1) forwards; }
@keyframes bootIn { from { opacity: 0; transform: scale(.85); } }
@keyframes bootBar { 0% { width: 0 } 40% { width: 45% } 70% { width: 62% } 100% { width: 100% } }

/* ==========================================================================
   Menubar
   ========================================================================== */
#menubar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--menubar-h); z-index: 5000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  background: rgba(20,20,20,.55);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 13.5px; font-weight: 400;
}
.mb-left, .mb-right { display: flex; align-items: center; gap: 4px; min-width: 0; }
.mb-logo { width: 30px; height: 22px; display: grid; place-items: center; border-radius: 5px; }
.mb-logo img { width: 16px; height: auto; }
.mb-logo:hover, .mb-logo[aria-expanded="true"], .mb-item:hover, .mb-item.open { background: rgba(255,255,255,.14); }
.mb-app { font-weight: 500; color: #fff; padding: 0 8px; white-space: nowrap; letter-spacing: .01em; }
.mb-items { display: flex; gap: 2px; }
.mb-item { padding: 1px 9px; border-radius: 5px; white-space: nowrap; color: #fff; }
.mb-right { gap: 16px; color: rgba(255,255,255,.9); white-space: nowrap; }
.mb-status { display: flex; align-items: center; gap: 7px; }
.mb-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tl-green); box-shadow: 0 0 8px var(--tl-green); }
.mb-status:empty { display: none; }
.mb-admin { display: grid; place-items: center; width: 26px; height: 22px; margin-right: -6px; border-radius: 5px; color: #fff; opacity: .85; }
.mb-admin:hover { background: rgba(255,255,255,.14); opacity: 1; }
.mb-admin svg { width: 14px; height: 14px; }

/* dropdown lives directly in <body> (moved by ui.js) and is placed in plain screen pixels;
   on large screens it is only scaled visually — works the same in every browser */
.mb-menu {
  position: fixed; top: 32px; left: 10px; z-index: 5001;
  transform-origin: 0 0;
  min-width: 240px; padding: 5px;
  font-size: 13.5px; font-weight: 400;
  background: rgba(36,36,36,.82);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,.55);
  opacity: 0; transform: translateY(-4px) scale(var(--chrome, 1)); pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
}
.mb-menu.open { opacity: 1; transform: scale(var(--chrome, 1)); pointer-events: auto; }
.mb-menu button, .mb-menu a {
  display: flex; justify-content: space-between; gap: 24px; width: 100%;
  padding: 4px 10px; border-radius: 5px; text-align: left; text-decoration: none;
  font-size: 13.5px; font-weight: 400;
}
.mb-menu button:hover, .mb-menu a:hover { background: rgba(255,255,255,.9); color: #000; }
.mb-menu kbd { font: inherit; opacity: .5; }
.mb-menu hr { border: 0; border-top: 1px solid rgba(255,255,255,.12); margin: 5px 8px; }

/* ==========================================================================
   Desktop + wallpaper
   ========================================================================== */
#desktop { position: fixed; inset: 0; overflow: hidden; }
.wallpaper { position: absolute; inset: 0; overflow: hidden; contain: strict; background: radial-gradient(120% 90% at 50% 110%, #1a1a1a 0%, #070707 45%, #000 75%); }
/* contrast: the desktop steps back while windows are open */
.wallpaper::after {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: #000; opacity: 0; transition: opacity .5s ease;
}
#desktop.has-windows .wallpaper::after { opacity: .45; }
/* Performance: glow, slogan and cube are moved with transforms only (set in ui.js),
   so mouse movement never triggers a repaint of the whole screen */
.wp-glow {
  position: absolute; left: -600px; top: -600px; width: 1200px; height: 1200px;
  background: radial-gradient(600px circle at 50% 50%, rgba(255,255,255,.075), transparent 60%);
  transform: translate3d(50vw, 40vh, 0);
  transition: transform .2s linear;
  will-change: transform;
}
.wp-type {
  position: absolute; left: 50%; top: 50%; width: min(88vw, 1500px);
  transform: translate(-50%, -50%);
  opacity: .08;
  pointer-events: none;
  will-change: transform;
}
.wp-scene {
  position: absolute; right: 8vw; top: 18vh; width: 220px; height: 220px;
  perspective: 1200px;
  will-change: transform;
}
.wp-cube {
  position: absolute; inset: 0; transform-style: preserve-3d;
  animation: cubeSpin 38s linear infinite;
}
.wp-cube i { position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.012); }
.wp-cube .f1 { transform: translateZ(var(--ch, 110px)); }
.wp-cube .f2 { transform: rotateY(180deg) translateZ(var(--ch, 110px)); }
.wp-cube .f3 { transform: rotateY(90deg) translateZ(var(--ch, 110px)); }
.wp-cube .f4 { transform: rotateY(-90deg) translateZ(var(--ch, 110px)); }
.wp-cube .f5 { transform: rotateX(90deg) translateZ(var(--ch, 110px)); background: rgba(255,255,255,.04); }
.wp-cube .f6 { transform: rotateX(-90deg) translateZ(var(--ch, 110px)); }
@keyframes cubeSpin { from { transform: rotateX(-24deg) rotateY(0) } to { transform: rotateX(-24deg) rotateY(360deg) } }
.wp-grain {
  position: absolute; inset: -10%; /* large enough for the ±4% jitter, much smaller layer than before */
  will-change: transform;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  /* same subtle look as the former overlay blend (.07) — but without the costly blend mode */
  opacity: .025;
  animation: grain 1.2s steps(6) infinite;
  pointer-events: none;
}
@keyframes grain { 0%,100% { transform: translate(0,0) } 20% { transform: translate(-3%,2%) } 40% { transform: translate(2%,-4%) } 60% { transform: translate(-4%,-1%) } 80% { transform: translate(3%,3%) } }

/* Desktop icons */
#desktopIcons {
  position: absolute; right: 18px; top: calc(var(--menubar-h) + 18px);
  display: flex; flex-direction: column; gap: 14px; align-items: center;
}
.desk-icon {
  width: 92px; padding: 6px 4px; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; text-align: center; line-height: 1.25;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
}
.desk-icon .thumb {
  width: 64px; height: 46px; border-radius: 4px; overflow: hidden;
  background: linear-gradient(135deg, #2d2d2d, #0d0d0d);
  border: 2px solid rgba(255,255,255,.9);
  display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0,0,0,.5);
}
.desk-icon .thumb svg { width: 20px; height: 20px; }
.desk-icon span { padding: 1px 5px; border-radius: 4px; }
.desk-icon:focus-visible span, .desk-icon.selected span { background: #0a59d1; }
.desk-icon.selected .thumb { outline: 2px solid rgba(255,255,255,.35); outline-offset: 3px; }

/* ==========================================================================
   Windows
   ========================================================================== */
#windows { position: absolute; inset: 0; pointer-events: none; }
.win {
  position: absolute;
  display: flex; flex-direction: column;
  min-width: 380px; min-height: 280px;
  background: var(--surface);
  border-radius: 12px;
  /* contrast: dark edge + light hairline + soft halo lift the window off the black desktop */
  box-shadow:
    0 0 0 1px rgba(0,0,0,.95),
    0 0 0 2px rgba(255,255,255,.11),
    inset 0 0 0 1px rgba(255,255,255,.2),
    0 40px 110px rgba(0,0,0,.85),
    0 0 90px rgba(255,255,255,.045);
  overflow: hidden;
  pointer-events: auto;
  transform-origin: 0 0;
  user-select: text; -webkit-user-select: text;
  /* performance: layout/style changes inside a window never affect other windows */
  contain: layout style;
  isolation: isolate;
}
.win:not(.active) { box-shadow: 0 0 0 1px rgba(0,0,0,.95), 0 0 0 2px rgba(255,255,255,.05), inset 0 0 0 1px rgba(255,255,255,.09), 0 18px 46px rgba(0,0,0,.6); }
/* inactive windows are dimmed so the active one clearly stands out */
.win::after {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: rgba(0,0,0,.28); border-radius: inherit;
  opacity: 0; transition: opacity .25s ease;
}
.win:not(.active)::after { opacity: 1; }
#desktop.expose .win::after { opacity: 0; }
.win.geom-anim { transition: left .42s var(--ease-out), top .42s var(--ease-out), width .42s var(--ease-out), height .42s var(--ease-out), border-radius .42s; }
.win.maximized { border-radius: 10px; }
.win.hidden { display: none; }

.win-bar {
  position: relative; z-index: 3;
  flex: none; height: 52px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px 0 18px;
  background: rgba(50,50,50,.97);
  border-bottom: 1px solid rgba(0,0,0,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
  cursor: default;
  user-select: none; -webkit-user-select: none;
  touch-action: none;
}
.win:not(.active) .win-bar { background: rgba(38,38,38,.96); }

.tl { display: flex; gap: 8px; margin-right: 10px; }
.tl button {
  width: 12px; height: 12px; border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 .5px rgba(0,0,0,.25);
}
.tl .tl-close { background: var(--tl-red); }
.tl .tl-min { background: var(--tl-yellow); }
.tl .tl-max { background: var(--tl-green); }
.tl svg { width: 8px; height: 8px; opacity: 0; stroke: rgba(0,0,0,.6); stroke-width: 1.6; fill: none; }
.tl .tl-max svg { fill: rgba(0,0,0,.6); stroke: none; }
.tl:hover svg { opacity: 1; }
.win:not(.active) .tl button:not(:hover) { background: #4a4a4a; }
.tl button[disabled] { background: #4a4a4a !important; cursor: default; }
.tl button[disabled] svg { opacity: 0 !important; }

.wb-nav { display: flex; gap: 2px; }
.wb-btn {
  width: 30px; height: 26px; border-radius: 6px;
  display: grid; place-items: center; color: rgba(255,255,255,.88);
}
.wb-btn svg { width: 16px; height: 16px; }
.wb-btn:hover:not([disabled]) { background: rgba(255,255,255,.08); color: #fff; }
.wb-btn[disabled] { opacity: .38; cursor: default; }

.wb-address {
  flex: 1; min-width: 0; max-width: 560px; margin: 0 auto;
  height: 30px; border-radius: 8px;
  display: flex; align-items: center; gap: 8px; padding: 0 10px;
  background: rgba(0,0,0,.34);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  color: #fff;
  font-size: 13px; font-weight: 400;
}
.wb-address svg { width: 13px; height: 13px; flex: none; opacity: .6; }
.wb-address input {
  flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0;
  color: inherit; font: inherit; text-align: center;
}
.wb-address input:focus { text-align: left; }
.wb-address:focus-within { box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 0 0 3px rgba(255,255,255,.22); }
.wb-right { display: flex; gap: 2px; }

.win-body {
  position: relative; flex: 1; min-height: 0;
  overflow: auto; overscroll-behavior: contain;
  background: var(--surface);
  scroll-behavior: smooth;
  contain: layout paint style; /* repaints while scrolling stay inside this window */
}

/* ---------- Performance ---------- */
/* sections outside the visible part of a window are not rendered at all
   (the browser remembers their real size after the first render) */
.page > section:not(.scene):not(.home-hero):not(.about-hero),
.page > .foot {
  content-visibility: auto;
  contain-intrinsic-size: auto 700px;
}
/* endless decorative loops only run in the active window */
.win:not(.active) .ph::before,
.win:not(.active) .marquee-track,
.win:not(.active) .cta-cube,
.win:not(.active) .avail::before,
.win:not(.active) .hero-scroll i { animation-play-state: paused; }
/* wallpaper loops stop while it is completely covered (maximized window / phone) */
#desktop.covered .wp-grain,
#desktop.covered .wp-cube { animation-play-state: paused; }
/* behind the dimmed desktop the grain flicker is invisible anyway */
#desktop.has-windows .wp-grain { animation-play-state: paused; }
.win-body::-webkit-scrollbar { width: 10px; height: 10px; }
.win-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
.win-body::-webkit-scrollbar-track { background: transparent; }

.win-layout { display: flex; flex: 1; min-height: 0; }
.win-side {
  flex: none; width: 0; overflow: hidden;
  background: rgba(30,30,30,.96);
  border-right: 1px solid rgba(0,0,0,.6);
  transition: width .32s var(--ease-out);
  font-size: 13px; font-weight: 400;
}
.win.side-open .win-side { width: 210px; }
.win-side-inner { width: 210px; padding: 16px 10px; }
.win-side h6 { margin: 14px 10px 6px; font-size: 11px; font-weight: 500; color: var(--text-3); letter-spacing: .02em; }
.win-side h6:first-child { margin-top: 0; }
.win-side button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 6px 10px; border-radius: 6px; text-align: left; color: rgba(255,255,255,.85);
}
.win-side button svg { width: 16px; height: 16px; opacity: .8; }
.win-side button:hover { background: rgba(255,255,255,.06); }
.win-side button.current { background: rgba(255,255,255,.12); color: #fff; }

/* Resize handles */
.rz { position: absolute; z-index: 5; touch-action: none; }
.rz-e { right: -4px; top: 10px; bottom: 10px; width: 8px; cursor: ew-resize; }
.rz-w { left: -4px; top: 10px; bottom: 10px; width: 8px; cursor: ew-resize; }
.rz-s { bottom: -4px; left: 10px; right: 10px; height: 8px; cursor: ns-resize; }
.rz-se { right: -4px; bottom: -4px; width: 16px; height: 16px; cursor: nwse-resize; }
.rz-sw { left: -4px; bottom: -4px; width: 16px; height: 16px; cursor: nesw-resize; }
.win.maximized .rz { display: none; }

body.dragging, body.dragging * { cursor: grabbing !important; user-select: none !important; }
body.dragging iframe, body.resizing iframe { pointer-events: none; }

/* Exposé / Mission Control */
#desktop.expose .wallpaper { filter: brightness(.45) blur(6px); transition: filter .4s ease; }
.wallpaper { transition: filter .4s ease; }
#desktop.expose .win { transition: transform .45s var(--ease-out), box-shadow .2s; cursor: pointer; }
#desktop.expose .win:hover { box-shadow: 0 0 0 4px rgba(255,255,255,.6), 0 30px 80px rgba(0,0,0,.65); }
#desktop.expose .win > * { pointer-events: none; }
#desktop.expose-out .win { transition: transform .45s var(--ease-out); }
#exposeLabel {
  position: absolute; pointer-events: none; z-index: 4000;
  padding: 4px 10px; border-radius: 6px; background: rgba(0,0,0,.7);
  font-size: 13px; font-weight: 500; opacity: 0; transform: translateX(-50%);
  transition: opacity .15s;
}
#exposeLabel.show { opacity: 1; }

/* ==========================================================================
   Dock
   ========================================================================== */
#dock {
  /* centred without translateX(-50%) to avoid half-pixel (blurry) rendering */
  position: fixed; left: 0; right: 0; bottom: 8px; z-index: 4500;
  width: fit-content; margin: 0 auto;
  max-width: calc(100vw - 16px);
  transition: transform .45s var(--ease-out);
}
/* window maximized → dock slides down out of view; mouse at the bottom edge brings it back */
body.dock-autohide #dock:not(.reveal) { transform: translate3d(0, calc(100% + 18px), 0); }
body.dock-autohide #dock.reveal { transition-duration: .3s; }
.dock-inner {
  display: flex; align-items: flex-end; gap: 4px;
  padding: 6px 7px;
  height: calc(var(--dock-size) + 14px);
  background: rgba(40,40,40,.42);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 22px;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.7), 0 16px 40px rgba(0,0,0,.45);
}
.dock-item {
  --s: var(--dock-size);
  position: relative; flex: none;
  width: var(--s); height: var(--s);
  display: flex; align-items: flex-end; justify-content: center;
  transition: width .22s var(--ease-out), height .22s var(--ease-out);
}
.dock-inner.hovering .dock-item { transition: width .07s linear, height .07s linear; }
.dock-item.entering { animation: dockEnter .38s var(--ease-out) both; }
.dock-item.leaving { animation: dockLeave .3s ease forwards; }
@keyframes dockEnter { from { width: 0; opacity: 0; } }
@keyframes dockLeave { to { width: 0; opacity: 0; margin: 0 -2px; } }

.dock-btn {
  position: relative; display: block; width: 100%; height: 100%;
  border-radius: 23%;
}
.dock-btn:active .app-icon { filter: brightness(.7); }
.dock-btn.bounce { animation: bounce .62s cubic-bezier(.3,.6,.4,1) 1; }
@keyframes bounce {
  0%, 100% { transform: translateY(0) }
  45% { transform: translateY(-34%) }
  70% { transform: translateY(0) }
  82% { transform: translateY(-4%) }
}
.dock-dot {
  position: absolute; left: 50%; bottom: -5px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: rgba(255,255,255,.85);
  opacity: 0; transition: opacity .25s;
}
.dock-item.running .dock-dot { opacity: 1; }
.dock-tip {
  position: absolute; bottom: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 4px 11px; border-radius: 7px;
  background: rgba(30,30,30,.82);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.14);
  font-size: 13px; font-weight: 400; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .12s, transform .12s;
}
.dock-tip::after {
  content: ""; position: absolute; left: 50%; top: 100%; margin-left: -6px;
  border: 6px solid transparent; border-top-color: rgba(30,30,30,.82);
}
.dock-item:hover .dock-tip, .dock-btn:focus-visible + .dock-tip { opacity: 1; transform: translateX(-50%); }
.dock-sep { flex: none; width: 1px; align-self: stretch; margin: 4px 6px; background: rgba(255,255,255,.2); }

/* App icons (squircle) */
.app-icon {
  width: 100%; height: 100%;
  border-radius: 23%;
  display: grid; place-items: center;
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #3a3a3a 0%, #141414 55%, #000 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), inset 0 1px 0 rgba(255,255,255,.22), 0 4px 12px rgba(0,0,0,.45);
}
.app-icon::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.14), transparent 45%);
  pointer-events: none;
}
.app-icon svg { width: 54%; height: 54%; color: #fff; }
.app-icon img { width: 70%; height: auto; }
.app-icon.i-home { background: radial-gradient(120% 100% at 30% 0%, #2d2d2d, #000 70%); }
.app-icon.i-work { background: linear-gradient(160deg, #f4f4f4, #bcbcbc); }
.app-icon.i-work svg { color: #000; }
.app-icon.i-about { background: linear-gradient(160deg, #2d2d2d, #0a0a0a); }
.app-icon.i-clients { background: linear-gradient(160deg, #868686, #2d2d2d); }
.app-icon.i-contact { background: linear-gradient(160deg, #e2e2e2, #868686); }
.app-icon.i-contact svg { color: #000; }
.app-icon.i-reel { background: linear-gradient(160deg, #1d1d1d, #000); }
.app-icon.i-client { background: linear-gradient(160deg, #ffffff, #c9c9c9); }
.app-icon.i-client svg { color: #000; }

/* ==========================================================================
   Client area (js/client.js)
   ========================================================================== */
.client-login { min-height: var(--win-h, 600px); display: grid; place-items: center; padding: 40px var(--pad) !important; }
.client-card { width: min(440px, 100%); text-align: center; }
.client-cube { width: 72px; margin: 0 auto 22px; }
.client-card .lead { margin: 12px auto 28px; font-size: 17px; }
.client-form { text-align: left; }
.client-btn { width: 100%; justify-content: center; height: 50px; margin-top: 4px; }
.client-btn[disabled] { opacity: .6; pointer-events: none; }
.client-msg { min-height: 22px; margin: 12px 0 0; text-align: center; color: #ff9a94; font-size: 14.5px; }
.client-note {
  margin: 34px auto 0; max-width: 520px; padding: 12px 16px; border-radius: 12px;
  background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-2); font-size: 13.5px; line-height: 1.5; text-align: center;
}
.client-tl { padding-top: 34px !important; }
.client-wrap { max-width: 720px; margin: 0 auto; }
.client-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 30px; }
.client-back, .client-refresh { display: flex; width: fit-content; height: 38px; padding: 0 16px 0 12px; }
.client-refresh svg { width: 15px; height: 15px; }
.client-refresh.spinning svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cdocs { margin-top: 42px; }
.cdocs .h-m { margin-bottom: 14px; }
.cdoc-group h3 { margin: 18px 0 8px; font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.cdoc {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 8px;
  border-radius: 14px; background: #1a1a1a; box-shadow: inset 0 0 0 1px var(--line);
  text-decoration: none; transition: background .2s, box-shadow .2s;
}
.cdoc:hover { background: #222; box-shadow: inset 0 0 0 1px var(--line-2); }
.cdoc-ext { flex: none; min-width: 46px; padding: 4px 6px; border-radius: 8px; background: rgba(255,255,255,.1); font-size: 11.5px; font-weight: 500; text-align: center; }
.cdoc-name { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.cdoc-name small { display: block; color: var(--text-3); font-weight: 400; font-size: 13px; }
.cdoc-dl { flex: none; padding: 6px 14px; border-radius: 99px; background: #fff; color: #000; font-size: 13.5px; font-weight: 500; }
.client-wrap > .eyebrow { display: block; }
.client-back svg { width: 15px; height: 15px; }
.client-wrap .h-xl { margin-bottom: 36px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 30px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--line-2), rgba(255,255,255,.06)); border-radius: 2px; }
.tl-item { position: relative; margin-bottom: 18px; }
.tl-dot { position: absolute; left: -30px; top: 22px; width: 16px; height: 16px; border-radius: 50%; background: #1a1a1a; box-shadow: inset 0 0 0 2px rgba(255,255,255,.4); }
.tl-item.latest .tl-dot { background: #fff; box-shadow: 0 0 0 5px rgba(255,255,255,.12); }
.tl-card { padding: 18px 20px; border-radius: 18px; background: #1a1a1a; box-shadow: inset 0 0 0 1px var(--line); }
.tl-item.latest .tl-card { box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 50px rgba(0,0,0,.4); }
.tl-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.tl-meta time { color: var(--text-3); font-size: 13.5px; font-weight: 500; }
.tl-latest { padding: 2px 9px; border-radius: 99px; background: #fff; color: #000; font-size: 11.5px; font-weight: 500; }
.tl-card h3 { margin: 0 0 6px; font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.tl-card p { margin: 0; color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; }
.tl-empty { padding: 34px 20px; border-radius: 18px; text-align: center; color: var(--text-3); background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); }
.app-icon.i-social { background: linear-gradient(160deg, #262626, #050505); }
.app-icon.i-social svg { width: 46%; height: 46%; }

/* ==========================================================================
   iPad-style cursor (js/cursor.js)
   ========================================================================== */
html.has-cursor, html.has-cursor *:not(.rz) { cursor: none !important; }
#cursor {
  position: fixed; left: 0; top: 0; z-index: 99999;
  width: 18px; height: 18px; border-radius: 9px;
  pointer-events: none;
  background: rgba(200,200,200,.55);
  box-shadow: 0 0 0 .5px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.25);
  opacity: 0;
  transition: opacity .2s ease, background .25s ease, box-shadow .25s ease;
  will-change: transform, width, height;
}
#cursor.on { opacity: 1; }
#cursor.snap {
  background: rgba(255,255,255,.13);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
#cursor.snap.down { background: rgba(255,255,255,.2); }
#cursor.text { background: rgba(220,220,220,.85); box-shadow: none; }

/* ==========================================================================
   Toast
   ========================================================================== */
#toast {
  position: fixed; left: 50%; top: calc(var(--menubar-h) + 16px); z-index: 6000;
  transform: translate(-50%, -12px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 12px;
  background: rgba(40,40,40,.85); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255,255,255,.14);
  font-size: 14px; font-weight: 500;
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
  transition: opacity .25s, transform .35s var(--ease-out);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Page content — shared
   ========================================================================== */
.page { --pad: clamp(22px, 5vw, 64px); color: var(--text); }
.page section { padding: clamp(56px, 9vh, 110px) var(--pad); }
.wrap { max-width: 1120px; margin: 0 auto; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 18px; }
.h-xxl { font-weight: 800; font-size: clamp(44px, 7.4vw, 104px); line-height: .98; letter-spacing: -.035em; margin: 0; }
.h-xl  { font-weight: 800; font-size: clamp(36px, 5.2vw, 72px); line-height: 1.02; letter-spacing: -.03em; margin: 0; }
.h-l   { font-weight: 800; font-size: clamp(26px, 3.2vw, 42px); line-height: 1.1; letter-spacing: -.02em; margin: 0; }
.h-m   { font-weight: 800; font-size: 22px; line-height: 1.2; letter-spacing: -.01em; margin: 0; }
.lead  { font-size: clamp(18px, 1.8vw, 24px); line-height: 1.45; color: var(--text-2); font-weight: 300; max-width: 720px; }
.muted { color: var(--text-3); }
.display { font-family: var(--font-display); font-style: normal; font-weight: 700; letter-spacing: 0; line-height: .85; text-transform: uppercase; }
.grad-text {
  background: linear-gradient(180deg, #fff 30%, #868686 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  /* room for descenders (g, p, y) — background-clip would cut them off */
  padding-bottom: .14em; margin-bottom: -.14em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 999px;
  font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease-out), background .2s, color .2s, box-shadow .2s;
}
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { background: var(--c-mist); }
.btn-ghost { box-shadow: inset 0 0 0 1px rgba(255,255,255,.42); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.link { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.3); transition: border-color .2s; }
.link:hover { border-color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 34px; padding: 0 15px; border-radius: 999px;
  display: inline-flex; align-items: center;
  font-size: 14px; font-weight: 400; color: var(--text-2);
  background: rgba(255,255,255,.09);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  transition: background .2s, color .2s, transform .2s var(--ease-out);
}
.chip:hover { background: rgba(255,255,255,.12); color: #fff; }
.chip.on { background: #fff; color: #000; box-shadow: none; }
.tag { display: inline-block; font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }

/* Reveal on scroll (inside windows) */
.rv { opacity: 0; transform: translateY(36px); transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }
.rv-scale { opacity: 0; transform: scale(.94); transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); }
.rv-scale.in { opacity: 1; transform: none; }

/* Word scrub */
.scrub .w { opacity: .26; transition: opacity .25s linear; }
.scrub .w.on { opacity: 1; }

/* Media placeholder (when no image in table) */
.ph {
  position: relative; overflow: hidden; width: 100%; height: 100%;
  background:
    repeating-linear-gradient(104deg, transparent 0 46px, rgba(255,255,255,.035) 46px 48px),
    radial-gradient(120% 120% at 15% 0%, var(--tint, #2d2d2d) 0%, #0c0c0c 55%, #000 100%);
  display: flex; align-items: flex-end; padding: 6%;
}
.ph::before {
  content: ""; position: absolute; inset: -20%;
  background: linear-gradient(104deg, transparent 40%, rgba(255,255,255,.06) 50%, transparent 60%);
  transform: translateX(-60%);
  animation: phSweep 5.5s ease-in-out infinite;
}
@keyframes phSweep { 50%, 100% { transform: translateX(60%); } }
/* sizes relate to the placeholder box itself, so text always fits the card */
.ph { container-type: size; }
.ph-title {
  position: relative; display: block; max-width: 100%;
  font-family: var(--font-display); font-style: normal; font-weight: 700; text-transform: uppercase;
  line-height: .86; padding-right: .08em;
  font-size: clamp(18px, min(12cqw, 22cqh), 170px);
  color: rgba(255,255,255,.92); overflow-wrap: anywhere;
}
.ph-sub { position: absolute; left: 6%; right: 6%; top: 6%; font-size: clamp(9px, 3.2cqw, 12px); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.66); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Load error */
.load-error { margin: 40px auto; max-width: 560px; padding: 28px; border-radius: 16px; background: #1a1a1a; box-shadow: inset 0 0 0 1px var(--line-2); }
.load-error h3 { margin: 0 0 8px; font-weight: 800; }
.load-error code { font-size: 13px; background: #000; padding: 2px 6px; border-radius: 4px; }

/* ==========================================================================
   HOME
   ========================================================================== */
.home-hero {
  position: relative; min-height: var(--win-h, 650px);
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 40px !important; padding-bottom: 40px !important;
  overflow: hidden;
}
.home-hero .stripes {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(97deg, transparent 0 9%, rgba(255,255,255,.025) 9% 9.25%);
  mask-image: radial-gradient(80% 70% at 60% 40%, #000, transparent);
  -webkit-mask-image: radial-gradient(80% 70% at 60% 40%, #000, transparent);
}
.hero-logo-wrap { position: relative; max-width: min(900px, calc(var(--win-h, 650px) * 1.05)); }
/* logo flies in from the left (with a little motion blur & lean, like the slanted logotype) */
.hero-logo {
  width: 100%; height: auto;
  opacity: 0;
  transform: translate3d(-115%, 0, 0) skewX(-14deg);
  filter: blur(14px);
  animation: flyIn .7s .15s cubic-bezier(.16, 1, .3, 1) forwards;
}
@keyframes flyIn {
  60% { opacity: 1; filter: blur(0); }
  to { opacity: 1; transform: none; filter: none; }
}
.hero-meta { margin-top: clamp(24px, 4vh, 44px); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px; }
.hero-meta .lead { margin: 0; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-scroll { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); font-size: 12px; color: var(--text-3); letter-spacing: .14em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hero-scroll i { width: 1px; height: 32px; background: linear-gradient(#fff, transparent); animation: scrollHint 2s ease-in-out infinite; transform-origin: top; }
@keyframes scrollHint { 0% { transform: scaleY(0) } 50% { transform: scaleY(1) } 100% { transform: scaleY(1); opacity: 0 } }
.fade-up { opacity: 0; transform: translateY(20px); animation: fadeUp 1s var(--ease-out) forwards; animation-delay: var(--d, 1s); }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

.reel-frame {
  position: relative; aspect-ratio: 16/9; border-radius: 22px; overflow: hidden;
  background: #000; box-shadow: 0 0 0 1px var(--line), 0 40px 100px rgba(0,0,0,.6);
  transform-origin: 50% 0;
}
.reel-frame iframe, .reel-frame video, .reel-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.reel-play {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 2;
}
.reel-play span {
  width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.14); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
  transition: transform .35s var(--ease-spring), background .2s;
}
.reel-play svg { width: 30px; height: 30px; margin-left: 4px; }
.reel-play:hover span { transform: scale(1.1); background: rgba(255,255,255,.24); }
.reel-label { position: absolute; left: 24px; bottom: 20px; z-index: 2; font-family: var(--font-display); font-style: normal; font-weight: 700; font-size: clamp(40px, 7vw, 96px); line-height: .8; text-transform: uppercase; }

/* Sticky scene */
.scene { position: relative; height: calc(var(--win-h, 700px) * 3.2); padding: 0 !important; }
.scene-sticky {
  position: sticky; top: 0; height: var(--win-h, 650px);
  display: grid; place-items: center; overflow: hidden;
  padding: 0 var(--pad);
}
.scene-bg { position: absolute; inset: 0; display: flex; justify-content: center; gap: 2.2%; transform: skewX(-12deg) scale(1.3); opacity: .5; }
.scene-bg i { width: 3.2%; height: 100%; background: linear-gradient(180deg, transparent, rgba(255,255,255,.07), transparent); } /* moved by ui.js */
.scene-items { position: relative; width: 100%; max-width: 1100px; height: 70%; }
.scene-item {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  opacity: 0; transform: scale(.9) translateY(30px); filter: blur(10px);
  transition: opacity .6s var(--ease-out), transform .8s var(--ease-out), filter .6s;
}
.scene-item.on { opacity: 1; transform: none; filter: none; }
.scene-item .num { font-family: var(--font-display); font-style: normal; font-weight: 700; font-size: 22px; color: var(--text-3); margin-bottom: 14px; }
.scene-items { container-type: inline-size; }
.scene-item h2 { font-weight: 800; font-size: clamp(40px, 14cqw, 150px); line-height: 1; letter-spacing: -.045em; margin: 0; max-width: 100%; }
.scene-item p { margin: 26px auto 0; max-width: 560px; color: var(--text-2); font-size: clamp(17px, 1.6vw, 21px); }
.scene-progress { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.scene-progress i { width: 26px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; position: relative; }
.scene-progress i::after { content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(var(--f, 0)); transform-origin: left; }

/* Focus split */
.focus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.focus-card {
  position: relative; min-height: 420px; border-radius: 26px; overflow: hidden;
  padding: 34px; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, #1c1c1c, #0f0f0f);
  box-shadow: inset 0 0 0 1px var(--line);
  isolation: isolate;
}
.focus-card .big {
  position: absolute; top: 14px; left: 22px; right: 0; z-index: -1;
  font-family: var(--font-display); font-style: normal; font-weight: 700; text-transform: uppercase;
  font-size: clamp(110px, 16vw, 230px); line-height: .8; color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.16);
  transition: transform 1.2s var(--ease-out), color .6s;
}
.focus-card:hover .big { transform: translateX(-4%); color: rgba(255,255,255,.05); }
.focus-card p { color: var(--text-2); margin: 10px 0 0; max-width: 380px; }
.spot::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--sx, 50%) var(--sy, 50%), rgba(255,255,255,.08), transparent 60%);
  opacity: 0; transition: opacity .3s;
}
.spot:hover::before { opacity: 1; }

/* Featured rail */
.rail-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
.rail-ctrl { display: flex; gap: 8px; }
.round-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px var(--line);
  transition: background .2s, transform .2s;
}
.round-btn:hover { background: rgba(255,255,255,.16); }
.round-btn svg { width: 16px; height: 16px; }
/* full window width: only the window edges cut the slider, the first card lines up with the content */
.rail {
  --rail-inset: calc(var(--pad) + max(0px, (100% - 1120px) / 2));
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 520px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  margin: 0 calc(var(--pad) * -1);
  padding: 6px var(--rail-inset) 18px;
  /* (scroll-padding % refers to the rail itself, which is 2 × pad wider than the content) */
  scroll-padding-inline: calc(var(--pad) + max(0px, (100% - 2 * var(--pad) - 1120px) / 2));
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* Project card */
.p-card { display: block; text-align: left; width: 100%; cursor: pointer; }
.p-card .media {
  position: relative; aspect-ratio: 4/3; border-radius: 20px; overflow: hidden; background: #1a1a1a;
  box-shadow: inset 0 0 0 1px var(--line);
  transform: translateZ(0);
}
.p-card .media > img, .p-card .media > video, .p-card .media > .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out), opacity .4s; }
.p-card .media > video { opacity: 0; }
.p-card:hover .media > video.ready { opacity: 1; }
.p-card:hover .media > img, .p-card:hover .media > .ph { transform: scale(1.045); }
.p-card .media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.55));
}
.p-card .open-pill {
  position: absolute; right: 14px; bottom: 14px; z-index: 2;
  height: 34px; padding: 0 14px; border-radius: 99px;
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.92); color: #000; font-size: 13px; font-weight: 500;
  opacity: 0; transform: translateY(8px) scale(.95);
  transition: opacity .3s, transform .4s var(--ease-out);
}
.p-card .open-pill svg { width: 13px; height: 13px; }
.p-card:hover .open-pill, .p-card:focus-visible .open-pill { opacity: 1; transform: none; }
.p-card .info { display: flex; justify-content: space-between; gap: 14px; padding: 14px 4px 0; }
.p-card .info h3 { margin: 0; font-weight: 800; font-size: 19px; letter-spacing: -.01em; line-height: 1.25; }
.p-card .info .tag { white-space: nowrap; margin-top: 3px; }
.p-card .info p { margin: 2px 0 0; color: var(--text-3); font-size: 15px; }

/* Marquee */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 64px; align-items: center; animation: marquee var(--dur, 40s) linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.brand-mark { flex: none; height: 44px; display: flex; align-items: center; opacity: .55; transition: opacity .3s; }
.brand-mark:hover { opacity: 1; }
.brand-mark img { height: 100%; width: auto; max-width: 160px; object-fit: contain; filter: brightness(0) invert(1); }
.brand-mark span { font-weight: 800; font-size: 24px; letter-spacing: -.02em; white-space: nowrap; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat { padding: 28px; border-radius: 22px; background: #1a1a1a; box-shadow: inset 0 0 0 1px var(--line); }
.stat b { display: block; font-family: var(--font-display); font-style: normal; font-weight: 700; font-size: clamp(64px, 7vw, 96px); line-height: .85; }
.stat span { display: block; margin-top: 10px; color: var(--text-2); }

/* CTA */
.cta {
  position: relative; overflow: hidden; text-align: center;
  border-radius: 32px; padding: clamp(60px, 10vh, 120px) 24px;
  background: radial-gradient(120% 140% at 50% 0%, #2d2d2d 0%, #0d0d0d 55%, #000 100%);
  box-shadow: inset 0 0 0 1px var(--line);
}
.cta img.cta-cube { width: 110px; margin: 0 auto 30px; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-3deg); } }
.cta .lead { margin: 18px auto 32px; }

.foot { padding: 30px var(--pad) 40px !important; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; color: var(--text-3); font-size: 13px; border-top: 1px solid var(--line); }
.foot img { height: 16px; width: auto; opacity: .7; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a, .foot button { color: var(--text-3); text-decoration: none; font-size: 13px; }
.foot a:hover, .foot button:hover { color: #fff; }

/* ==========================================================================
   WORK
   ========================================================================== */
.work-head { padding-bottom: 28px !important; }
.work-head .row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 22px; }
.toolbar { position: sticky; top: 0; z-index: 4; padding: 12px var(--pad) !important; background: rgba(11,11,11,.86); backdrop-filter: blur(10px) saturate(160%); -webkit-backdrop-filter: blur(10px) saturate(160%); border-bottom: 1px solid var(--line); }
.toolbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: rgba(255,255,255,.1); }
.seg button { width: 34px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--text-2); }
.seg button.on { background: rgba(255,255,255,.18); color: #fff; }
.seg svg { width: 15px; height: 15px; }
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 34px 20px; padding-top: 34px !important; }
.work-grid.list { grid-template-columns: 1fr; gap: 0; }
.work-grid.list .p-card { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.work-grid.list .p-card .media { border-radius: 12px; }
.work-grid.list .p-card .open-pill { display: none; }
.work-grid.list .p-card .info { padding: 0; }
.p-card.flip { animation: cardIn .6s var(--ease-out) both; animation-delay: var(--d, 0s); }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.empty { padding: 60px 0; text-align: center; color: var(--text-3); grid-column: 1 / -1; }
.filter-note { display: flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--text-2); font-size: 15px; }
.filter-note button { font-size: 13px; padding: 4px 12px; border-radius: 99px; background: rgba(255,255,255,.1); }

/* Project detail */
.pd-hero { padding-bottom: 0 !important; }
.pd-hero .tag { margin-bottom: 14px; display: block; }
.pd-media { margin-top: 36px; aspect-ratio: 16/9; border-radius: 22px; overflow: hidden; position: relative; background: #000; box-shadow: inset 0 0 0 1px var(--line); }
.pd-media > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.pd-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.pd-facts { display: grid; gap: 22px; align-content: start; }
.pd-facts div span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); margin-bottom: 4px; font-weight: 500; }
.pd-facts div b { font-weight: 500; }
.pd-text p { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.55; color: var(--text-2); margin: 0 0 1em; white-space: pre-line; }
.pd-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pd-gallery figure { margin: 0; border-radius: 18px; overflow: hidden; aspect-ratio: 4/3; background: #111; }
.pd-gallery figure:first-child:nth-last-child(odd) { grid-column: 1 / -1; aspect-ratio: 16/8; }
.pd-gallery img, .pd-gallery video { width: 100%; height: 100%; object-fit: cover; }
.pd-next { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pd-next .p-card .media { aspect-ratio: 16/9; }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-hero { min-height: var(--win-h, 650px); display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.about-hero .cube3d { position: absolute; right: -7%; top: 50%; width: min(34vw, 420px); transform: translateY(-50%); opacity: .85; transition: transform .2s linear; pointer-events: none; will-change: transform; }
.about-hero .copy { position: relative; max-width: min(62%, 760px); }
@media (max-width: 900px) { .about-hero .copy { max-width: none; } }
.scrub-text { font-weight: 800; font-size: clamp(30px, 4.2vw, 58px); line-height: 1.12; letter-spacing: -.025em; margin: 0; max-width: 1000px; }
.services { display: grid; gap: 0; border-top: 1px solid var(--line); }
.svc {
  display: grid; grid-template-columns: 90px 1.1fr 1.4fr; gap: 24px; align-items: baseline;
  padding: 34px 0; border-bottom: 1px solid var(--line); position: relative;
}
.svc .n { font-family: var(--font-display); font-style: normal; font-weight: 700; font-size: 34px; color: var(--text-3); }
.svc h3 { margin: 0; font-weight: 800; font-size: clamp(28px, 3.4vw, 46px); letter-spacing: -.025em; line-height: 1; transition: transform .5s var(--ease-out); }
.svc:hover h3 { transform: translateX(10px); }
.svc p { margin: 0 0 12px; color: var(--text-2); }
.svc .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.svc .tags span { font-size: 12.5px; padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,.1); color: var(--text-2); }
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: step; }
.step { padding: 26px; border-radius: 22px; background: #1a1a1a; box-shadow: inset 0 0 0 1px var(--line); min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; }
.step b { font-family: var(--font-display); font-style: normal; font-weight: 700; font-size: 54px; line-height: .8; color: rgba(255,255,255,.25); }
.step h4 { margin: 0 0 6px; font-weight: 800; font-size: 20px; }
.step p { margin: 0; color: var(--text-2); font-size: 15px; }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.member .portrait { aspect-ratio: 4/5; border-radius: 20px; overflow: hidden; background: #1a1a1a; position: relative; box-shadow: inset 0 0 0 1px var(--line); }
.member .portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .6s, transform 1s var(--ease-out); }
.member:hover .portrait img { filter: grayscale(0); transform: scale(1.04); }
.member h4 { margin: 14px 0 0; font-weight: 800; font-size: 19px; }
.member p { margin: 2px 0 0; color: var(--text-3); font-size: 15px; }
.member .bio { margin-top: 8px; color: var(--text-2); font-size: 14.5px; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.value { padding: 30px; border-radius: 22px; background: linear-gradient(180deg, #1d1d1d, #101010); box-shadow: inset 0 0 0 1px var(--line); position: relative; overflow: hidden; isolation: isolate; }
.value h4 { margin: 0 0 8px; font-weight: 800; font-size: 22px; }
.value p { margin: 0; color: var(--text-2); }

/* ==========================================================================
   CLIENTS
   ========================================================================== */
.clients-head .count { font-family: var(--font-display); font-style: normal; font-weight: 700; font-size: clamp(120px, 18vw, 240px); line-height: .78; display: block; margin-bottom: 16px; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.brand-tile {
  position: relative; aspect-ratio: 5/4; border-radius: 20px; overflow: hidden; isolation: isolate;
  background: #181818; box-shadow: inset 0 0 0 1px var(--line);
  display: grid; place-items: center; padding: 18%;
  transition: transform .5s var(--ease-out), box-shadow .3s, background .3s;
  text-align: center; cursor: pointer;
}
.brand-tile:hover { transform: translateY(-4px); background: #1b1b1b; box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 40px rgba(0,0,0,.4); }
.brand-tile img { max-width: 100%; max-height: 70px; width: auto; object-fit: contain; filter: brightness(0) invert(1); opacity: .7; transition: opacity .3s, transform .5s var(--ease-out); }
.brand-tile .bname { font-weight: 800; font-size: clamp(18px, 2vw, 24px); letter-spacing: -.02em; line-height: 1.1; opacity: .8; transition: opacity .3s, transform .5s var(--ease-out); }
.brand-tile:hover img, .brand-tile:hover .bname { opacity: 1; transform: translateY(-10px); }
.brand-tile .meta {
  position: absolute; left: 16px; right: 16px; bottom: 14px;
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 12.5px; color: var(--text-3);
  opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .4s var(--ease-out);
}
.brand-tile:hover .meta { opacity: 1; transform: none; }
.brand-tile .meta b { font-weight: 500; color: #fff; }
.brand-tile.flip { animation: cardIn .55s var(--ease-out) both; animation-delay: var(--d, 0s); }
.quote-wrap { text-align: center; }
.quote { font-weight: 800; font-size: clamp(26px, 3.4vw, 44px); line-height: 1.15; letter-spacing: -.02em; margin: 0 auto; max-width: 900px; }
.quote-by { margin-top: 18px; color: var(--text-3); }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.contact-info { position: sticky; top: 30px; }
.contact-lines { margin-top: 36px; display: grid; gap: 4px; }
.cline {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 18px; border-radius: 14px; text-decoration: none; text-align: left; width: 100%;
  transition: background .2s;
}
.cline:hover { background: rgba(255,255,255,.06); }
.cline small { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); font-weight: 500; }
.cline span { font-size: 19px; font-weight: 500; word-break: break-all; }
.cline svg { width: 18px; height: 18px; flex: none; opacity: .5; transition: opacity .2s, transform .3s var(--ease-out); }
.cline:hover svg { opacity: 1; transform: translateX(3px); }
.socials { display: flex; gap: 8px; margin-top: 22px; padding-left: 18px; }
.socials a { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.07); transition: background .2s, transform .3s var(--ease-spring); }
.socials a:hover { background: #fff; color: #000; transform: translateY(-3px); }
.socials svg { width: 18px; height: 18px; }
.avail { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 99px; background: rgba(40,200,64,.1); color: #9de6a8; font-size: 14px; font-weight: 500; margin-bottom: 26px; }
.avail::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tl-green); box-shadow: 0 0 0 0 rgba(40,200,64,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(40,200,64,0); } 100% { box-shadow: 0 0 0 0 rgba(40,200,64,0); } }

.form { padding: clamp(22px, 3vw, 36px); border-radius: 26px; background: #1a1a1a; box-shadow: inset 0 0 0 1px var(--line); }
.form h3 { margin: 0 0 22px; font-weight: 800; font-size: 24px; }
.field { position: relative; margin-bottom: 14px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 22px 16px 8px; border-radius: 12px;
  background: #0a0a0a; border: 1px solid rgba(255,255,255,.22); color: #fff;
  font: inherit; font-weight: 400; font-size: 16px; outline: 0;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 140px; resize: vertical; }
.field select { padding-top: 22px; cursor: pointer; }
.field label { position: absolute; left: 17px; top: 16px; color: var(--text-3); font-size: 16px; pointer-events: none; transition: transform .2s var(--ease-out), font-size .2s, top .2s; transform-origin: 0 0; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: rgba(255,255,255,.5); box-shadow: 0 0 0 4px rgba(255,255,255,.08); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field select + label { top: 7px; font-size: 12px; }
.field .chev { position: absolute; right: 16px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); pointer-events: none; opacity: .5; }

/* Custom dropdown */
.select-field { z-index: 1; }
.select-field.open { z-index: 20; }
.select-btn {
  display: block; width: 100%; text-align: left;
  padding: 22px 40px 8px 16px; border-radius: 12px;
  background: #0a0a0a; border: 1px solid rgba(255,255,255,.22); color: #fff;
  font-weight: 400; font-size: 16px; line-height: 1.55;
  transition: border-color .2s, box-shadow .2s;
}
.select-btn .select-val { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.select-btn:focus-visible, .select-field.open .select-btn { outline: 0; border-color: rgba(255,255,255,.5); box-shadow: 0 0 0 4px rgba(255,255,255,.08); }
.select-field label { top: 7px; font-size: 12px; }
.select-field .chev { transition: transform .25s var(--ease-out), opacity .2s; }
.select-field.open .chev { transform: translateY(-50%) rotate(180deg); opacity: .9; }
.select-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 5px; list-style: none;
  max-height: 260px; overflow-y: auto; overscroll-behavior: contain;
  background: #1e1e1e;
  border: 1px solid rgba(255,255,255,.14); border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,.6), 0 4px 14px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: 50% 0;
  pointer-events: none; visibility: hidden;
  transition: opacity .16s ease, transform .22s var(--ease-out), visibility 0s .22s;
}
.select-field.up .select-list { top: auto; bottom: calc(100% + 6px); transform-origin: 50% 100%; transform: translateY(6px) scale(.98); }
.select-field.open .select-list { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .16s ease, transform .22s var(--ease-out), visibility 0s; }
.select-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 15px; font-weight: 400; color: rgba(255,255,255,.94);
}
.select-list li.active { background: rgba(255,255,255,.14); color: #fff; }
.select-list li svg { width: 15px; height: 15px; flex: none; opacity: 0; }
.select-list li[aria-selected="true"] svg { opacity: 1; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .chips { margin: 4px 0 18px; }
.form-label { display: block; font-size: 13px; color: var(--text-3); margin: 6px 0 10px; }
.form .btn { width: 100%; justify-content: center; height: 52px; font-size: 16px; margin-top: 6px; }
.form small { display: block; margin-top: 12px; color: var(--text-3); font-size: 12.5px; text-align: center; }
.form-done { text-align: center; padding: 50px 10px; }
.form-done svg { width: 64px; height: 64px; margin: 0 auto 18px; animation: sent 1s var(--ease-spring) both; }
@keyframes sent { from { transform: translate(-40px, 40px) scale(.5); opacity: 0; } }
.hp { position: absolute; left: -9999px; }

/* ==========================================================================
   YouTube video blocks
   ========================================================================== */
.video { position: relative; }
.video-frame { position: relative; }
.video-frame > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; z-index: 3; }
.video.playing .video-frame { box-shadow: 0 0 0 1px var(--line-2), 0 40px 100px rgba(0,0,0,.7); }
.video-bar {
  display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 12px;
}
.vbtn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
  background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); color: #fff;
  transition: background .2s, transform .25s var(--ease-out), opacity .3s;
}
.vbtn svg { width: 15px; height: 15px; }
.vbtn:hover { background: rgba(255,255,255,.16); }
.vbtn:active { transform: scale(.96); }
.vbtn-close { margin-right: auto; background: #fff; color: #000; box-shadow: none; }
.vbtn-close:hover { background: var(--c-mist); }
.video:not(.playing) .vbtn-close { display: none; }
.video.playing .video-bar { animation: barIn .45s var(--ease-out); }
@keyframes barIn { from { opacity: 0; transform: translateY(-6px); } }
.pd-gallery { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.pd-gallery .pd-media { margin-top: 0; }
.yt-badge {
  position: absolute; left: 14px; top: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px; border-radius: 99px;
  background: rgba(0,0,0,.66);
  font-size: 12px; font-weight: 500;
}
.yt-badge svg { width: 11px; height: 11px; }

/* Showreel window (QuickTime-style) */
.player { position: absolute; inset: 0; background: #000; display: flex; flex-direction: column; }
.player-frame { position: relative; flex: 1; min-height: 0; }
.player-frame > iframe, .player-frame > .ph { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .ph { align-items: center; justify-content: center; text-align: center; flex-direction: column; gap: 14px; }
.player .ph p { position: relative; color: var(--text-3); margin: 0; font-size: 14px; }
.player .video-bar { margin: 0; padding: 10px 14px; background: #111; border-top: 1px solid var(--line); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .focus-grid, .pd-grid, .contact-grid { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr 1fr; }
  .values { grid-template-columns: 1fr; }
  .svc { grid-template-columns: 60px 1fr; }
  .svc > div { grid-column: 2; }
  .contact-info { position: static; }
}

/* Phone: page content in one column (the phone system itself: see "Phone" below) */
@media (max-width: 760px) {
  .row2, .pd-next, .pd-gallery { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .work-grid.list .p-card { grid-template-columns: 110px 1fr; gap: 14px; }
  .scene { height: calc(var(--win-h, 600px) * 2.6); }
  .about-hero .cube3d { opacity: .25; width: 80vw; right: -30%; }
}

/* ==========================================================================
   Phone: own iOS-like system, slightly RAUMIK-ified (html.phone is set in ui.js)
   status bar with "RAUMIK Island" · home screen with widget + app grid · dock ·
   full-screen apps with a navigation bar · home indicator (tap / swipe up)
   ========================================================================== */
#springboard, .mb-island, #homeBar, .wb-title, .wb-lbl { display: none; }

/* --spring-bouncy / --spring-soft: real spring curves, set in ui.js (fallbacks for older browsers) */
html.phone { --menubar-h: 46px; --dock-size: 60px; --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); }
html.phone #desktopIcons, html.phone .wp-scene, html.phone #mbMenu, html.phone #toast { display: none; }

/* the slogan (PNG) sits on the home screen itself, see .sb-slogan-bg */
html.phone .wp-type { display: none; }

/* screen edges fade to pure black — no visible edge to the browser bars, on every screen.
   bottom: behind the dock / over the end of an app (home indicator stays on top) */
html.phone body::after {
  content: ""; position: fixed; left: 0; right: 0; bottom: 0; z-index: 4400; pointer-events: none;
  height: calc(190px + var(--safe-b));
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,.75) 45%, #000 80%);
  transition: height .4s ease;
}
html.phone body.app-open::after { height: calc(96px + var(--safe-b)); background: linear-gradient(to bottom, transparent, rgba(0,0,0,.8) 55%, #000); }
/* added to the iPhone home screen (no Safari bars): iOS shows its own clock above ours */
@media (display-mode: standalone) { html.phone #mbClock { visibility: hidden; } }

/* status bar — top: black behind the island, fading out into the home screen;
   with an app open it flows seamlessly into the (black) navigation bar */
html.phone #menubar {
  height: calc(var(--menubar-h) + var(--safe-t)); padding: var(--safe-t) 24px 0;
  background: transparent; border-bottom-color: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
html.phone #menubar::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; z-index: -1; pointer-events: none;
  height: calc(100% + 24px);
  background: linear-gradient(to bottom, #000 calc(100% - 40px), rgba(0,0,0,.6) calc(100% - 18px), transparent);
  transition: height .35s ease;
}
html.phone body.app-open #menubar::before { height: 100%; background: #000; }
html.phone .mb-left { display: none; }
html.phone .mb-right { flex: 1; justify-content: flex-end; gap: 14px; }
html.phone #mbClock { order: -1; margin-right: auto; font-size: 15.5px; font-weight: 500; letter-spacing: .01em; color: #fff; }
html.phone .mb-status { font-size: 0; gap: 0; }               /* only the green "available" dot */
html.phone .mb-admin { margin-right: -8px; opacity: .7; }
html.phone .mb-island {
  display: flex; align-items: center; justify-content: center; gap: 0;
  position: absolute; left: 0; right: 0; top: calc(var(--safe-t) + 6px); margin: 0 auto;
  width: fit-content; min-width: 128px; max-width: calc(100vw - 140px); height: 35px; padding: 0 14px;
  border-radius: 99px; background: #000; color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 8px 24px rgba(0,0,0,.55);
  font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden;
  transition: min-width .7s var(--spring-bouncy, var(--ease-spring)), height .7s var(--spring-bouncy, var(--ease-spring)),
              padding .7s var(--spring-bouncy, var(--ease-spring)), transform .7s var(--spring-bouncy, var(--ease-spring));
}
html.phone .mb-island:active { transform: scale(.94); }
html.phone .mb-island img { width: 18px; height: auto; flex: none; }
html.phone .isl-txt {
  display: inline-flex; align-items: center; gap: 7px; overflow: hidden; text-overflow: ellipsis;
  max-width: 0; opacity: 0; transition: max-width .7s var(--spring-soft, var(--ease-out)), opacity .25s ease, margin .7s var(--spring-soft, var(--ease-out));
}
html.phone .mb-island.expanded { min-width: 200px; height: 42px; padding: 0 18px; }
html.phone #menubar:has(.mb-island.expanded) .mb-status { opacity: 0; }
html.phone .mb-island.expanded .isl-txt { max-width: calc(100vw - 190px); opacity: 1; margin-left: 10px; transition-delay: 0s, .12s, 0s; }
.isl-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--tl-green); box-shadow: 0 0 8px var(--tl-green); }

/* home screen */
html.phone #springboard {
  display: flex; flex-direction: column; gap: 28px;
  position: absolute; inset: calc(var(--menubar-h) + var(--safe-t) + 16px) 0 0;
  padding: 0 22px calc(150px + var(--safe-b));
  overflow-y: auto; scrollbar-width: none;
  transition: transform .7s var(--spring-soft, var(--ease-out)), opacity .35s ease;
}
html.phone body.app-open #springboard { transform: scale(1.1); opacity: 0; pointer-events: none; }
.sb-widget {
  position: relative; flex: none; height: 172px; padding: 18px 20px;
  display: flex; flex-direction: column; align-items: flex-start; text-align: left;
  border-radius: 26px; overflow: hidden;
  background: linear-gradient(155deg, rgba(70,70,70,.5), rgba(18,18,18,.65) 60%);
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13), inset 0 1px 0 rgba(255,255,255,.2), 0 14px 34px rgba(0,0,0,.45);
  transition: transform .2s ease;
}
.sb-widget:active, .sb-app:active .app-icon, .sb-pill:active { transform: scale(.95); }
.sb-cube { position: absolute; right: 30px; top: 50%; width: 92px; height: 92px; margin-top: -46px; perspective: 700px; --ch: 46px; }
.sb-cube .wp-cube i { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.03); }
.sb-eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.sb-slogan { margin-top: 10px; font-family: var(--font-display); font-weight: 700; font-size: 38px; line-height: .92; letter-spacing: .01em; text-transform: uppercase; }
.sb-status {
  margin-top: auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 11px 4px 9px; border-radius: 99px; background: rgba(255,255,255,.1);
  font-size: 12px; font-weight: 500;
}
.sb-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tl-green); box-shadow: 0 0 8px var(--tl-green); }
.sb-grid { display: grid; grid-template-columns: repeat(4, 1fr); row-gap: 24px; }
.sb-app {
  display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0;
  font-size: 12px; font-weight: 400; line-height: 1.2; color: #fff; text-decoration: none; text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
}
.sb-app .app-icon { width: 62px; height: 62px; border-radius: 15px; transition: transform .2s ease; }
.sb-app span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-pill {
  position: fixed; left: 0; right: 0; bottom: calc(112px + var(--safe-b)); margin: 0 auto; width: fit-content; z-index: 4450;
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px;
  border-radius: 99px; background: rgba(60,60,60,.42);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  font-size: 12.5px; font-weight: 500; color: rgba(255,255,255,.88);
  transition: transform .2s ease;
}
.sb-pill svg { width: 12px; height: 12px; }
/* slogan: centred in the free space between the app grid and the search pill */
.sb-slogan-bg { flex: 1 0 70px; display: grid; place-items: center; margin-bottom: -10px; pointer-events: none; }
.sb-slogan-bg img { width: min(92%, 420px); opacity: .16; }
@media (min-width: 600px) { html.phone .sb-grid { grid-template-columns: repeat(6, 1fr); } }

/* dock: only the four main apps, larger, no labels */
html.phone #dock {
  left: 10px; right: 10px; bottom: calc(10px + var(--safe-b));
  width: auto; max-width: none; margin: 0;
  transition: transform .7s var(--spring-soft, var(--ease-out)), opacity .3s ease;
}
html.phone body.app-open #dock { transform: translate3d(0, calc(100% + 30px), 0); opacity: 0; pointer-events: none; }
html.phone .dock-inner { height: auto; padding: 14px 16px; gap: 0; justify-content: space-around; border-radius: 34px; background: rgba(60,60,60,.36); -webkit-touch-callout: none; }
html.phone .dock-btn { transition: transform .5s var(--spring-bouncy, var(--ease-spring)); }
html.phone .dock-btn:active { transform: scale(.9); }
html.phone .dock-item:not(.pd), html.phone .dock-sep, html.phone .dock-apps-end, html.phone .dock-dot { display: none; }
/* app names: bubbles above the icons — shown once on the first visit of the home screen
   and whenever an icon is pressed and held (no sticky hover on touch screens) */
html.phone .dock-tip {
  bottom: calc(100% + 30px); padding: 4px 10px; font-size: 12.5px; font-weight: 500;
  transform: translateX(-50%) translateY(8px) scale(.6); transform-origin: 50% 100%;
  transition: opacity .2s ease, transform .6s var(--spring-bouncy, var(--ease-spring));
}
html.phone .dock-item:hover .dock-tip { opacity: 0; transform: translateX(-50%) translateY(8px) scale(.6); }
html.phone .dock-item.tip .dock-tip,
html.phone .dock-inner.show-tips .dock-tip { opacity: 1; transform: translateX(-50%); }
.dock-tip .tip-m, html.phone .dock-tip .tip-d { display: none; }
html.phone .dock-tip .tip-m { display: inline; }
/* the search pill makes room for the name bubbles */
.sb-pill { transition: transform .2s ease, opacity .25s ease; }
html.phone body.dock-tips .sb-pill { opacity: 0; transform: scale(.9); }
html.phone .dock-inner.show-tips .dock-item:nth-child(2) .dock-tip { transition-delay: .07s; }
html.phone .dock-inner.show-tips .dock-item:nth-child(3) .dock-tip { transition-delay: .14s; }
html.phone .dock-inner.show-tips .dock-item:nth-child(4) .dock-tip { transition-delay: .21s; }
html.phone .dock-btn.bounce { animation: none; }

/* apps: full screen below the status bar */
html.phone .win {
  left: 0 !important; top: calc(var(--menubar-h) + var(--safe-t)) !important; right: 0; bottom: 0;
  width: auto !important; height: auto !important;
  min-width: 0; min-height: 0; border-radius: 0; box-shadow: none !important;
}
html.phone .win::after { display: none; }
html.phone .win-bar {
  height: 48px; padding: 0 6px; gap: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  background: #000; border-bottom: 1px solid rgba(255,255,255,.08); box-shadow: none;
}
html.phone .tl, html.phone .rz, html.phone .wb-side-btn, html.phone .wb-address,
html.phone [data-act="fwd"], html.phone [data-act="expose"] { display: none !important; }
html.phone .wb-nav { justify-self: start; }
html.phone .wb-right { justify-self: end; }
html.phone .wb-title { display: block; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 500; }
html.phone .wb-btn { width: auto; height: 38px; padding: 0 8px; display: flex; align-items: center; gap: 1px; color: #fff; font-size: 16px; font-weight: 400; }
html.phone .wb-btn svg { width: 22px; height: 22px; }
html.phone .wb-lbl { display: inline; }
html.phone .win-body { padding-bottom: calc(26px + var(--safe-b)); }

/* home indicator */
html.phone body.app-open #homeBar {
  display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 4600;
  height: calc(24px + var(--safe-b)); touch-action: none;
}
#homeBar i {
  position: absolute; left: 50%; bottom: calc(8px + var(--safe-b));
  width: 134px; height: 5px; margin-left: -67px; border-radius: 3px;
  background: rgba(255,255,255,.88); box-shadow: 0 0 0 1px rgba(0,0,0,.4);
}

/* Animations always run — the system setting "reduce motion" is intentionally not applied. */

/* ==========================================================================
   Large screens: everything scales up proportionally (values set in ui.js)
   --chrome: menu bar, dock, window bars, desktop icons (1 … 1.6)
   --ui:     the content of each window, based on its width (1 … 1.75)
   ========================================================================== */
#menubar, #dock, .win-bar, #desktopIcons, #toast, #exposeLabel { zoom: var(--chrome, 1); }
.win-body > .page { zoom: var(--ui, 1); }
