/* =========================================================
   Egor Thirteen - portfolio
   ========================================================= */

:root {
  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(0.7, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(18px, 4vw, 56px);
  --radius: 18px;
  --rec: #ff3b30;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-rgb: 10, 10, 10;
  --bg-2: #141414;
  --fg: #f2f2ee;
  --fg-rgb: 242, 242, 238;
  --muted: rgba(242, 242, 238, 0.56);
  --line: rgba(242, 242, 238, 0.14);
  --glass: rgba(18, 18, 18, 0.62);
  --shade: linear-gradient(180deg, rgba(10, 10, 10, 0.55) 0%, rgba(10, 10, 10, 0.25) 40%, rgba(10, 10, 10, 0.95) 100%);
  --video-filter: saturate(0.9) contrast(1.05);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f3f2ee;
  --bg-rgb: 243, 242, 238;
  --bg-2: #e7e6e1;
  --fg: #0c0c0c;
  --fg-rgb: 12, 12, 12;
  --muted: rgba(12, 12, 12, 0.56);
  --line: rgba(12, 12, 12, 0.14);
  --glass: rgba(243, 242, 238, 0.7);
  --shade: linear-gradient(180deg, rgba(243, 242, 238, 0.7) 0%, rgba(243, 242, 238, 0.45) 40%, rgba(243, 242, 238, 1) 100%);
  --video-filter: grayscale(1) contrast(1.15) brightness(1.1);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 6px;
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

/* ---------- theme switch: circular reveal (View Transitions) ---------- */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) {
  z-index: 1;
}
::view-transition-new(root) {
  z-index: 2;
}
html.vt-running *,
html.vt-running *::before,
html.vt-running *::after {
  transition: none !important;
}

/* =========================================================
   NAV
   ========================================================= */
/* full-width top bar, always visible. Soft and round: the site's own font,
   sentence case, rounded call-to-action, a round theme switch. */
.nav {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 18px var(--pad) 16px;
  font-size: 15px;
  transition: padding 0.4s var(--ease);
}
/* soft scrim once the page is scrolled, so the bar stays readable over content */
.nav::before {
  content: "";
  position: absolute;
  inset: 0 0 -28px;
  z-index: -1;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(var(--bg-rgb), 0.7) 55%, rgba(var(--bg-rgb), 0) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.nav.is-scrolled::before { opacity: 1; }
.nav.is-scrolled { padding-block: 12px 10px; }

.nav__logo {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nav__logo-mark {
  width: 26px;
  height: 26px;
  transition: transform 0.8s var(--ease-out);
}
.nav__logo:hover .nav__logo-mark { transform: rotate(-14deg) scale(1.08); }
.nav__name {
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* text roll on hover: the word slides up and a copy comes from below */
.roll {
  position: relative;
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  line-height: 1.2;
}
.roll > span {
  display: inline-block;
  transition: transform 0.55s var(--ease);
}
.roll > span::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 100%;
}
a:hover > .roll > span,
a:focus-visible > .roll > span { transform: translateY(-100%); }

.nav__links {
  display: flex;
  gap: clamp(18px, 2.6vw, 40px);
}
.nav__links a {
  position: relative;
  padding: 6px 0;
  color: var(--muted);
  transition: color 0.3s;
}
.nav__links a:hover,
.nav__links a.is-active { color: var(--fg); }
/* round dot under the current section */
.nav__links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--rec);
  transform: scale(0);
  transition: transform 0.45s var(--ease-out);
}
.nav__links a.is-active::after { transform: scale(1); }

.nav__right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(var(--fg-rgb), 0.28);
  overflow: hidden;
  isolation: isolate;
  font-weight: 500;
  transition: transform 0.5s var(--ease-out), color 0.4s var(--ease), border-color 0.4s;
}
/* fill grows as a circle from the REC dot */
.nav__cta::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 18px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--fg);
  transform: scale(0);
  transition: transform 0.6s var(--ease);
}
.nav__cta:hover { color: var(--bg); border-color: var(--fg); }
.nav__cta:hover::before { transform: scale(30); }
.nav__rec {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 10px var(--rec);
  animation: blink 1.2s steps(2) infinite;
}

/* round theme switch: a half-filled disc that turns over */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(var(--fg-rgb), 0.28);
  transition: border-color 0.3s, transform 0.5s var(--ease-out);
}
.theme-toggle:hover { border-color: var(--fg); }
.theme-toggle__disc {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  transition: transform 0.8s var(--ease);
}
[data-theme="light"] .theme-toggle__disc { transform: rotate(180deg); }
.theme-toggle:hover .theme-toggle__disc { transform: rotate(-35deg); }
[data-theme="light"] .theme-toggle:hover .theme-toggle__disc { transform: rotate(145deg); }

.nav__links a,
.nav__cta,
.nav__name { white-space: nowrap; }

@media (max-width: 980px) {
  .nav { gap: 16px; font-size: 14px; }
  .nav__links { gap: 18px; }
}
@media (max-width: 720px) {
  .nav { grid-template-columns: 1fr auto; padding: 14px var(--pad) 12px; }
  .nav__links { display: none; }
  .nav__cta { padding: 9px 14px 9px 12px; }
  .theme-toggle { width: 38px; height: 38px; }
}
@media (max-width: 400px) {
  .nav__name { display: none; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 120px var(--pad) clamp(28px, 5vw, 64px);
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #000;
}
.hero__poster,
.hero__video {
  position: absolute;
  inset: 0;
  filter: var(--video-filter);
  transition: filter 0.6s var(--ease);
}
.hero__poster {
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
}
.hero__video {
  opacity: 0;
  transition: opacity 1.4s ease, filter 0.6s var(--ease);
}
.hero__video.is-ready {
  opacity: 1;
}
/* make a 16:9 iframe / video always cover the viewport */
.hero__video iframe,
.hero__video video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100%;
  min-width: 177.78svh;
  transform: translate(-50%, -50%) scale(1.22);
  border: 0;
  pointer-events: none;
}
.hero__video video {
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: cover;
  transform: translate(-50%, -50%);
}

.hero__shade {
  position: absolute;
  inset: 0;
  background: var(--shade);
  transition: background 0.6s var(--ease);
}
.hero__grain {
  position: absolute;
  inset: -50%;
  opacity: 0.09;
  pointer-events: none;
  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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-6%, 4%); }
  40% { transform: translate(5%, -7%); }
  60% { transform: translate(-3%, 8%); }
  80% { transform: translate(7%, 2%); }
  100% { transform: translate(0, 0); }
}

/* viewfinder HUD */
.hud {
  position: absolute;
  inset: 88px var(--pad) clamp(18px, 3vw, 36px);
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--fg);
}
.hud__corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 0 solid currentColor;
  opacity: 0.7;
}
.hud__corner--tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.hud__corner--tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.hud__corner--bl { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.hud__corner--br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.hud__top {
  position: absolute;
  top: 14px;
  left: 40px;
  right: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hud__rec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hud__rec i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 12px var(--rec);
  animation: blink 1.2s steps(2) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}
.hud__tc {
  font-variant-numeric: tabular-nums;
}
.hud__meta {
  opacity: 0.6;
}
.hud__cross {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%);
  opacity: 0.35;
}
.hud__cross::before,
.hud__cross::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.hud__cross::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.hud__cross::after { top: 50%; left: 0; right: 0; height: 1px; }

.hero__content {
  position: relative;
  z-index: 1;
}
.hero__kicker {
  margin: 0 0 clamp(4px, 1vw, 14px);
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.1vw, 14px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__title {
  margin: 0;
  font-weight: 900;
  font-stretch: 62%;
  font-size: clamp(64px, 13vw, 230px);
  line-height: 0.8;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.04em;
}
.hero__title .split {
  position: relative;
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1.2s var(--ease-out);
}
.hero__title .line:nth-child(2) .split {
  transition-delay: 0.12s;
}
.is-loaded .hero__title .split {
  transform: none;
}
.hero__title .dot {
  display: inline-block;
  color: var(--rec);
  transform: translateY(105%);
  transition: transform 1.2s 0.3s var(--ease-out);
}
.is-loaded .hero__title .dot {
  transform: none;
}

.hero__bottom {
  margin-top: clamp(18px, 3vw, 36px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.hero__lead {
  margin: 0;
  max-width: 440px;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.4;
}


/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  transition: transform 0.35s var(--ease-out), background-color 0.3s, color 0.3s;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn--ghost {
  background: rgba(var(--fg-rgb), 0.08);
  color: var(--fg);
  border: 1px solid var(--line);
  padding: 8px 22px 8px 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn--ghost:hover {
  background: var(--fg);
  color: var(--bg);
}
.btn__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  transition: background-color 0.3s, color 0.3s, transform 0.5s var(--ease-out);
}
.btn--ghost:hover .btn__icon {
  background: var(--bg);
  color: var(--fg);
  transform: rotate(120deg);
}
.btn__icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  margin-left: 2px;
}
.btn--ghost:hover .btn__icon svg {
  transform: rotate(-120deg);
}

/* =========================================================
   MARQUEE
   ========================================================= */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 18px 0;
  white-space: nowrap;
}
.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  padding-right: 32px;
  animation: marquee 32s linear infinite;
  font-weight: 800;
  font-stretch: 70%;
  font-size: clamp(28px, 4vw, 56px);
  text-transform: uppercase;
  line-height: 1;
}
.marquee__track span:nth-of-type(even) {
  color: transparent;
  -webkit-text-stroke: 1px var(--fg);
}
.marquee__track b {
  font-size: 0.5em;
  color: var(--rec);
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* =========================================================
   SECTIONS
   ========================================================= */
.section {
  padding: clamp(80px, 12vw, 180px) var(--pad) 0;
  max-width: 1440px;
  margin: 0 auto;
}
.section__head {
  display: grid;
  grid-template-columns: auto 1fr minmax(0, 360px);
  align-items: end;
  gap: 12px clamp(16px, 3vw, 48px);
  margin-bottom: clamp(36px, 5vw, 72px);
}
.section__num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  align-self: start;
  padding-top: 0.6em;
}
.section__title {
  margin: 0;
  font-weight: 900;
  font-stretch: 62%;
  font-size: clamp(56px, 9vw, 148px);
  line-height: 0.86;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
/* second word: same condensed caps, outlined (like the marquee / footer); fills on hover */
.section__title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: max(1px, 0.012em) var(--fg);
}
/* letters: cursor proximity (--p, set in JS) stretches them wider; outlined ones fill in */
.split-title { cursor: default; }
/* big display type is decoration + interaction, not text to copy:
   no selection (spam-clicking used to highlight letters) */
.split-title,
.hero__title,
.footer__big,
.step__title,
.marquee,
.loader {
  -webkit-user-select: none;
  user-select: none;
}
/* --p = cursor proximity, --w = click wave; both set in JS, the stronger one wins */
.split-title .l {
  display: inline-block;
  font-stretch: calc(62% + max(var(--p, 0), var(--w, 0)) * 48%);
  transition: font-stretch 0.55s var(--ease-out), color 0.35s ease;
}
.split-title em .l {
  color: rgba(var(--fg-rgb), calc(max(var(--p, 0), var(--w, 0)) * 1.6));
}
/* while a wave runs, JS updates every frame - no CSS easing on top of it */
.split-title.is-waving .l { transition: none; }
.section__note {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

/* =========================================================
   WORK GRID
   ========================================================= */
.work__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: clamp(220px, 30vw, 460px);
  gap: clamp(12px, 1.6vw, 22px);
}
.card {
  position: relative;
  grid-column: span 6;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  cursor: none;
  isolation: isolate;
  outline-offset: 4px;
}
.card:nth-child(6n + 1) { grid-column: span 7; }
.card:nth-child(6n + 2) { grid-column: span 5; }
.card:nth-child(6n + 3) { grid-column: span 5; }
.card:nth-child(6n + 4) { grid-column: span 7; }

.card__frames {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.card__frames img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: grayscale(0.35) brightness(0.78);
  transition: transform 1s var(--ease-out), filter 0.6s;
}
/* scrub frames are 4:3 with the picture letterboxed; JS sizes them (by the
   video's aspect ratio) so only the picture is visible, centred in the card */
.card__frames img.f {
  inset: auto;
  top: 50%;
  left: 50%;
  max-width: none;
  object-fit: fill;
  opacity: 0;
  transform: translate(-50%, -50%);
}
.card__frames img.f.on {
  opacity: 1;
}
.card:hover .card__frames img,
.card:focus-visible .card__frames img {
  filter: none;
}
.card:hover .card__frames img:first-child {
  transform: scale(1.07);
}

.card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(14px, 1.6vw, 22px);
  color: #f2f2ee;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.8) 100%);
}
/* type of work: a plain line above the title, no pill */
.card__tag {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  opacity: 0.72;
}
.card__title {
  margin: 0;
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(22px, 2.4vw, 38px);
  line-height: 0.95;
  text-transform: uppercase;
  max-width: 90%;
}
.card__client {
  margin: 6px 0 0;
  font-size: 14px;
  opacity: 0.72;
}
/* scrub bar */
.card__scrub {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  opacity: 0;
  transition: opacity 0.3s;
}
.card__scrub i {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: var(--rec);
}
.card:hover .card__scrub {
  opacity: 1;
}

/* custom "Play" cursor over cards */
.cursor {
  position: fixed;
  z-index: 90;
  top: 0;
  left: 0;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-radius: 50%;
  background: #f2f2ee;
  color: #0a0a0a;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  pointer-events: none;
  transform: translate3d(var(--x, -200px), var(--y, -200px), 0) scale(0);
  transition: transform 0.35s var(--ease-out);
}
.cursor.is-on {
  transform: translate3d(var(--x), var(--y), 0) scale(1);
}

/* =========================================================
   ABOUT
   ========================================================= */
.about__body {
  display: grid;
  gap: clamp(40px, 6vw, 90px);
}
.about__statement {
  margin: 0;
  max-width: 1100px;
  font-size: clamp(28px, 4.2vw, 64px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.about__statement .hl {
  font-weight: 900;
  font-stretch: 62%;
  text-transform: uppercase;
  letter-spacing: 0;
}

.skills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.skill {
  padding: 28px 24px 32px 0;
  border-right: 1px solid var(--line);
  position: relative;
}
.skill + .skill {
  padding-left: 24px;
}
.skill:last-child {
  border-right: 0;
}
.skill__n {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.skill h3 {
  margin: 36px 0 10px;
  font-weight: 800;
  font-stretch: 70%;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1;
  text-transform: uppercase;
}
.skill p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.skill::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--fg);
  transition: width 0.7s var(--ease);
}
.skill:hover::before {
  width: 100%;
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
/* ---------- custom booking widget (data from the Cal.com API) ---------- */
.booking {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: clamp(18px, 2.2vw, 28px);
  overflow: hidden;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.booking__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.booking__who { display: flex; align-items: center; gap: 14px; }
.booking__logo {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  position: relative;
}
.booking__logo::after {
  content: "";
  position: absolute;
  inset: 10px;
  background: currentColor;
  -webkit-mask: url("assets/logo-mask.png") center / contain no-repeat;
  mask: url("assets/logo-mask.png") center / contain no-repeat;
}
.booking__title { margin: 0; font-weight: 600; font-size: 17px; }
.booking__meta { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.booking__tz select {
  appearance: none;
  -webkit-appearance: none;
  max-width: 220px;
  padding: 8px 30px 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.5'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.booking__tz select option { background: var(--bg-2); color: var(--fg); }

/* steps share one fixed-height stage, cross-fade instead of jumping */
.bk-step {
  display: none;
  animation: bk-in 0.45s var(--ease-out) both;
}
.bk-step.is-on { display: grid; }
@keyframes bk-in {
  from { opacity: 0; transform: translateY(8px); }
}

/* step 1: calendar + times */
.bk-step[data-step="pick"] {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 32px);
  min-height: 380px;
}
.bk-cal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.bk-cal__month { margin: 0; font-weight: 600; font-size: 17px; }
.bk-cal__nav { display: flex; gap: 6px; }
.bk-cal__nav button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  transition: border-color 0.25s, opacity 0.25s;
}
.bk-cal__nav button:hover:not(:disabled) { border-color: var(--fg); }
.bk-cal__nav button:disabled { opacity: 0.3; cursor: default; }
.bk-cal__dow,
.bk-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.bk-cal__dow span {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 6px;
}
.bk-day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 14px;
  color: var(--muted);
  opacity: 0.45;
  cursor: default;
  position: relative;
  transition: background-color 0.25s, color 0.25s, opacity 0.25s;
}
.bk-day.is-free {
  opacity: 1;
  color: var(--fg);
  font-weight: 600;
  cursor: pointer;
  background: rgba(var(--fg-rgb), 0.07);
}
.bk-day.is-free:hover { background: rgba(var(--fg-rgb), 0.16); }
.bk-day.is-today::after {
  content: "";
  position: absolute;
  bottom: 14%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--rec);
}
.bk-day.is-picked { background: var(--fg); color: var(--bg); }
.bk-day.is-picked:hover { background: var(--fg); }
.bk-cal__grid.is-loading .bk-day.is-free { opacity: 0.45; }

.bk-times { display: flex; flex-direction: column; min-height: 0; }
.bk-times__day { margin: 0 0 14px; font-weight: 600; font-size: 17px; min-height: 34px; display: flex; align-items: center; }
/* all slots visible at once: no inner scroll, as many columns as fit (3 on a normal desktop) */
.bk-times__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
  align-content: start;
}
.bk-time {
  padding: 10px 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.bk-time:hover { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.bk-times__empty { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 14px; }
/* shimmering placeholders while slots load (same size as real buttons, no jump) */
.bk-skel {
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--fg-rgb), 0.05), rgba(var(--fg-rgb), 0.11), rgba(var(--fg-rgb), 0.05)) 0 0 / 200% 100%;
  animation: bk-shimmer 1.2s linear infinite;
}
@keyframes bk-shimmer { to { background-position: -200% 0; } }

/* step 2: form */
.bk-form {
  gap: 14px;
  max-width: 520px;
  min-height: 380px;
  align-content: start;
}
.bk-back {
  justify-self: start;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}
.bk-back:hover { color: var(--fg); }
.bk-form__when { margin: 0 0 6px; font-weight: 600; font-size: clamp(18px, 1.6vw, 22px); }
.bk-field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.bk-field em { font-style: normal; opacity: 0.7; }
.bk-field input,
.bk-field textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  resize: vertical;
  transition: border-color 0.2s;
}
.bk-field input:focus,
.bk-field textarea:focus { outline: none; border-color: var(--fg); }
.bk-field input.is-bad { border-color: var(--rec); }
.bk-error { margin: 0; color: var(--rec); font-size: 14px; }
.bk-submit {
  justify-self: start;
  margin-top: 6px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  transition: opacity 0.2s, transform 0.4s var(--ease-out);
}
.bk-submit:hover { transform: translateY(-2px); }
.bk-submit:disabled { opacity: 0.5; cursor: progress; transform: none; }

/* step 3: done */
.bk-done {
  min-height: 380px;
  align-content: center;
  justify-items: start;
  gap: 10px;
}
.bk-done__check {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--fg);
  position: relative;
  margin-bottom: 6px;
}
.bk-done__check::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 13px;
  width: 12px;
  height: 20px;
  border: solid var(--bg);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.bk-done__title { margin: 0; font-weight: 800; font-stretch: 70%; font-size: clamp(32px, 3.4vw, 52px); text-transform: uppercase; line-height: 1; }
.bk-done__when { margin: 0; font-size: 18px; font-weight: 600; }
.bk-done__note { margin: 0; color: var(--muted); max-width: 420px; }
.bk-done__link { margin-top: 8px; font-size: 14px; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.bk-done__link:hover { border-color: var(--fg); }

.bk-fallback { margin: 0; color: var(--muted); }
.bk-fallback a { color: var(--fg); border-bottom: 1px solid var(--line); }

@media (max-width: 720px) {
  .bk-step[data-step="pick"] { grid-template-columns: 1fr; min-height: 0; }
  .bk-times__list { grid-template-columns: repeat(3, 1fr); }
  .booking__tz select { max-width: 100%; }
}

.socials {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.social {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 24px 6px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  transition: color 0.45s var(--ease), padding 0.45s var(--ease);
}
.social::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fg);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease);
}
.social:hover {
  color: var(--bg);
  padding-inline: 18px;
}
.social:hover::before {
  transform: scaleY(1);
}
.social__name {
  font-weight: 800;
  font-stretch: 70%;
  font-size: clamp(26px, 2.6vw, 40px);
  line-height: 1;
  text-transform: uppercase;
}
.social__handle {
  font-family: var(--font-mono);
  font-size: 13px;
  opacity: 0.6;
}
.social__arrow {
  font-size: 22px;
  transition: transform 0.45s var(--ease);
}
.social:hover .social__arrow {
  transform: rotate(45deg);
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  padding: clamp(80px, 12vw, 160px) var(--pad) 90px;
  overflow: hidden;
}
.footer__big {
  display: block;
  font-weight: 900;
  font-stretch: 62%;
  font-size: 26.5vw;
  line-height: 0.8;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  user-select: none;
  letter-spacing: -0.02em;
}
.footer__row {
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}
.footer__row a:hover {
  color: var(--fg);
}

/* =========================================================
   TIMELINE (fixed scroll scrubber)
   ========================================================= */
.timeline {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 16px;
  width: min(620px, calc(100% - 24px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 12px;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  font-family: var(--font-mono);
  font-size: 11px;
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform 0.6s var(--ease-out), opacity 0.4s, background-color 0.5s;
  user-select: none;
  touch-action: none;
}
.timeline.is-on {
  transform: translate(-50%, 0);
  opacity: 1;
}
.timeline__tc {
  min-width: 62px;
  font-variant-numeric: tabular-nums;
}
.timeline__label {
  color: var(--muted);
}
.timeline__track {
  position: relative;
  flex: 1;
  height: 26px;
  cursor: ew-resize;
}
.timeline__clips {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 2px;
}
.timeline__clip {
  position: relative;
  height: 100%;
  border-radius: 4px;
  background: rgba(var(--fg-rgb), 0.1);
  border: 1px solid rgba(var(--fg-rgb), 0.16);
  overflow: hidden;
  padding: 0 6px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: background-color 0.3s, color 0.3s;
}
.timeline__clip.is-active {
  background: rgba(var(--fg-rgb), 0.22);
  color: var(--fg);
}
.timeline__playhead {
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--rec);
  pointer-events: none;
  will-change: transform;
}
.timeline__playhead i {
  position: absolute;
  top: 0;
  left: 50%;
  width: 10px;
  height: 8px;
  transform: translateX(-50%);
  background: var(--rec);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--pad);
}
.lightbox[hidden] {
  display: none;
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade 0.4s ease both;
}
.lightbox__frame {
  position: relative;
  width: min(1200px, 100%, calc((100svh - 140px) * 16 / 9));
  animation: pop 0.55s var(--ease-out) both;
}
.lightbox__player {
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}
.lightbox__player iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.lightbox__caption {
  margin: 14px 0 0;
  color: #f2f2ee;
  font-family: var(--font-mono);
  font-size: 13px;
  opacity: 0.7;
}
.lightbox__close {
  position: absolute;
  top: -52px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f2f2ee;
  color: #0a0a0a;
  font-size: 16px;
  transition: transform 0.4s var(--ease-out);
}
.lightbox__close:hover {
  transform: rotate(90deg);
}
@keyframes fade {
  from { opacity: 0; }
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.94) translateY(20px); }
}

/* =========================================================
   REVEAL ON SCROLL
   ========================================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}
.js .card {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.js .card.in {
  opacity: 1;
  transform: none;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .section__head {
    grid-template-columns: auto 1fr;
  }
  .section__note {
    grid-column: 1 / -1;
  }
  .skills {
    grid-template-columns: repeat(2, 1fr);
  }
  .skill:nth-child(2) { border-right: 0; }
  .skill:nth-child(3) { padding-left: 0; }
  .skill:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .contact__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .hud__meta { display: none; }
  .hud__top { left: 34px; right: 34px; }
  .work__grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .card,
  .card:nth-child(n) {
    grid-column: auto;
    aspect-ratio: 16 / 10;
    cursor: pointer;
  }
  .skills {
    grid-template-columns: 1fr;
  }
  .skill,
  .skill + .skill {
    padding: 24px 0;
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .skill:first-child { border-top: 0; }
  .skill h3 { margin-top: 16px; }
  .social { grid-template-columns: 1fr auto; }
  .social__handle { display: none; }
  .footer__hint { display: none; }
  .timeline__clip { font-size: 0; padding: 0; }
  .lightbox__close { top: -50px; }
}

@media (hover: none) {
  .cursor { display: none; }
  .card { cursor: pointer; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
}

/* =========================================================
   v2 - INTERACTIONS
   ========================================================= */

/* ---------- smooth scroll (Lenis) ---------- */
html.lenis,
html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- magnetic ---------- */
[data-magnetic] {
  transition: transform 0.5s var(--ease-out), background-color 0.3s, color 0.3s;
  will-change: transform;
}

/* ---------- preloader: film leader countdown ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #0a0a0a;
  color: #f2f2ee;
  clip-path: inset(0 0 0 0);
  transition: clip-path 1s var(--ease);
}
.loader.is-done { clip-path: inset(0 0 100% 0); pointer-events: none; }
.loader[hidden] { display: none; }
html.is-loading { overflow: hidden; }

.loader__leader {
  position: relative;
  width: min(58vmin, 420px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.loader__sweep {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: conic-gradient(rgba(242, 242, 238, 0.16) var(--a, 0deg), transparent 0);
}
.loader__rings { position: absolute; inset: 0; width: 100%; height: 100%; }
.loader__rings circle { fill: none; stroke: rgba(242, 242, 238, 0.5); stroke-width: 1; }
.loader__x, .loader__y { position: absolute; background: rgba(242, 242, 238, 0.35); }
.loader__x { left: -30%; right: -30%; top: 50%; height: 1px; }
.loader__y { top: -30%; bottom: -30%; left: 50%; width: 1px; }
.loader__num {
  position: relative;
  font-weight: 900;
  font-stretch: 62%;
  font-size: min(36vmin, 260px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.loader__meta {
  position: absolute;
  bottom: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  opacity: 0.6;
}
.loader__meta--l { left: var(--pad); }
.loader__meta--r { right: var(--pad); }

/* ---------- hero: speed ramp ---------- */
.hero { cursor: none; user-select: none; -webkit-touch-callout: none; }
.hero a, .hero button { cursor: pointer; }
@media (hover: none) { .hero { cursor: auto; } }
.hero__media { transition: transform 1s var(--ease-out); }
.hero.is-ramp .hero__media { transform: scale(1.06); }
.hero.is-ramp .hero__grain { opacity: 0.2; }
.hud__hint {
  position: absolute;
  left: 50%;
  top: 44px;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
}
.hud__hint-text { opacity: 0.6; }
.hud__hint b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: 4px;
  transition: color 0.3s, background-color 0.3s;
}
.hero.is-ramp .hud__hint b { background: var(--rec); border-color: var(--rec); color: #fff; }

/* cursor variants */
.cursor { transition: transform 0.35s var(--ease-out), width 0.3s, height 0.3s, margin 0.3s, background-color 0.3s, color 0.3s; }
.cursor.is-small { width: 50px; height: 50px; margin: -25px 0 0 -25px; font-size: 9px; }
.cursor.is-ramp { background: var(--rec); color: #fff; }

/* ---------- marquee driven by JS (scroll velocity) ---------- */
.marquee--js .marquee__track { animation: none; will-change: transform; }

/* ---------- section titles: entrance ---------- */
.js .split-title .w,
.js .split-title .w > span { display: inline-block; }

/* "focus pull": letters appear in place, out of a soft blur into sharp focus,
   left to right. No vertical movement; transform/filter only, so nothing reflows. */
.js .split-title .l {
  opacity: 0;
  transform-origin: 50% 60%;
}
.js .split-title.in .l {
  opacity: 1;
  animation: letter-in 1.1s var(--ease-out) backwards;
  animation-delay: calc(var(--j, 0) * 38ms);
}
.js .split-title.in em .l { animation-name: letter-in-fill; }
@keyframes letter-in {
  from { opacity: 0; filter: blur(14px); transform: scale(1.12); }
  40% { opacity: 1; }
  to { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes letter-in-fill {
  from { opacity: 0; filter: blur(14px); transform: scale(1.12); color: var(--fg); }
  40% { opacity: 1; color: var(--fg); }
  to { opacity: 1; filter: blur(0); transform: none; color: rgba(var(--fg-rgb), 0); }
}
/* desktop: lines never re-wrap while letters change width on hover */
@media (min-width: 721px) {
  .split-title { white-space: nowrap; }
}

/* ---------- process: pinned horizontal scroll ---------- */
.process { position: relative; margin-top: clamp(80px, 12vw, 180px); }
.process__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.process__track {
  display: flex;
  align-items: stretch;
  gap: clamp(24px, 3vw, 48px);
  width: max-content;
  padding: 40px var(--pad) 0;
  will-change: transform;
}
.process__intro {
  flex: none;
  width: min(520px, 80vw);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding-right: 3vw;
}
.process__intro .section__num { padding: 0; }
.process__drag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.process__drag i { display: inline-block; font-style: normal; animation: nudge 1.4s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateX(8px); } }

.step {
  flex: none;
  width: clamp(300px, 32vw, 470px);
  display: flex;
  flex-direction: column;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.step__frame {
  position: relative;
  margin: 0 0 28px;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-2);
}
.step__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateX(calc(var(--px, 0) * -24px)) scale(1.4);
  filter: grayscale(0.6) brightness(0.85);
  transition: filter 0.6s;
}
.step:hover .step__frame img { filter: none; }
.step__frame figcaption {
  position: absolute;
  left: 12px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #f2f2ee;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.step__frame figcaption::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rec);
}
.step__n { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.step__title {
  margin: 10px 0 12px;
  font-weight: 900;
  font-stretch: 62%;
  font-size: clamp(36px, 3.8vw, 68px); /* longest title ("Motion & color") fits one line */
  line-height: 0.9;
  text-transform: uppercase;
  white-space: nowrap;
}
.step p { margin: 0; color: var(--muted); max-width: 380px; }
.process__bar {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: 84px;
  height: 2px;
  background: var(--line);
}
.process__bar i { display: block; height: 100%; width: 0; background: var(--fg); }

/* ---------- footer: interactive letters ---------- */
.footer__big { display: flex; justify-content: center; cursor: crosshair; }
/* one continuous 16:9 frame sits behind the whole word; letters near the cursor reveal it.
   --p = cursor proximity, --f = click wave (both set in JS); the stronger one wins */
.footer__big .ch {
  position: relative;
  display: inline-block;
  padding-block: 0.14em;
  margin-block: -0.14em;
  transform-origin: 50% 100%;
  transform: translateY(calc(max(var(--p, 0), var(--f, 0)) * -8%));
  -webkit-text-stroke: 1px rgba(var(--fg-rgb), calc(0.14 + max(var(--p, 0), var(--f, 0)) * 0.5));
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.footer__big .ch::before {
  content: attr(data-ch);
  position: absolute;
  inset: 0;
  padding: inherit;
  color: transparent;
  -webkit-text-stroke: 0;
  background-image: var(--img);
  background-repeat: no-repeat;
  background-size: var(--bw, 100vw) auto;
  background-position: var(--ox, 0px) 50%;
  -webkit-background-clip: text;
  background-clip: text;
  opacity: max(calc(var(--p, 0) * 1.8), var(--f, 0));
  transition: opacity 0.5s ease;
}
/* while a click wave runs, JS drives every frame - no CSS easing on top */
.footer__big.is-waving .ch,
.footer__big.is-waving .ch::before { transition: none; }
.footer__big-hint {
  margin: 14px 0 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 720px) {
  .process { margin-top: 80px; padding: 0 var(--pad); }
  .process__sticky { position: static; height: auto; overflow: visible; }
  .process__track { flex-direction: column; width: auto; padding: 0; transform: none !important; }
  .process__intro { width: auto; padding: 0 0 12px; }
  .step { width: auto; padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .process__bar, .process__drag { display: none; }
  .hud__hint-text { display: none; }
}

/* ---------- logo (mask, so it takes the current text color) ---------- */
.logo {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: currentColor;
  -webkit-mask: url("assets/logo-mask.png") center / contain no-repeat;
  mask: url("assets/logo-mask.png") center / contain no-repeat;
}
.footer__copy { display: inline-flex; align-items: center; gap: 10px; }
.footer__copy .logo { width: 18px; height: 18px; color: var(--fg); }
/* end of the countdown: the leader dissolves, the logo is revealed bottom-up from a soft blur */
.loader__sweep,
.loader__rings,
.loader__x,
.loader__y {
  transition: opacity 0.45s ease, transform 0.9s var(--ease-out);
}
.loader.is-logo .loader__sweep,
.loader.is-logo .loader__rings {
  opacity: 0;
  transform: scale(1.12);
}
.loader.is-logo .loader__x { opacity: 0; transform: scaleX(0.2); }
.loader.is-logo .loader__y { opacity: 0; transform: scaleY(0.2); }

.loader__num { transition: opacity 0.25s ease, transform 0.5s var(--ease-out), filter 0.4s; }
.loader.is-logo .loader__num { opacity: 0; transform: translateY(-14%); filter: blur(6px); }

.loader__logo {
  position: absolute;
  width: 30%;
  height: 30%;
  opacity: 0;
  clip-path: inset(100% 0 0 0);
  transform: translateY(10%);
  filter: blur(8px);
  transition:
    clip-path 0.9s var(--ease) 0.15s,
    transform 1.1s var(--ease-out) 0.15s,
    filter 0.9s ease 0.15s,
    opacity 0.3s ease 0.15s;
}
.loader.is-logo .loader__logo {
  opacity: 1;
  clip-path: inset(0 0 0 0);
  transform: none;
  filter: none;
}

/* =========================================================
   CUSTOM DROPDOWN (replaces native <select> visuals site-wide)
   ========================================================= */
.cselect {
  position: relative;
  display: inline-block;
}
.cselect__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.cselect__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 240px;
  padding: 9px 14px 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--fg);
  transition: border-color 0.25s;
}
.cselect__btn:hover,
.cselect.is-open .cselect__btn { border-color: rgba(var(--fg-rgb), 0.5); }
.cselect__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cselect__chev {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.6;
  transform: rotate(45deg);
  transition: transform 0.35s var(--ease), margin 0.35s var(--ease);
}
.cselect.is-open .cselect__chev { transform: rotate(225deg); margin-top: 3px; }

.cselect__pop {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: max(100%, 280px);
  padding: 6px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.2s ease, transform 0.3s var(--ease-out), visibility 0s linear 0.3s;
}
.cselect.is-open .cselect__pop {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.2s ease, transform 0.3s var(--ease-out), visibility 0s;
}
.cselect.is-left .cselect__pop { right: auto; left: 0; transform-origin: top left; }

.cselect__search {
  width: 100%;
  margin-bottom: 6px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(var(--fg-rgb), 0.04);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
}
.cselect__search:focus { outline: none; border-color: rgba(var(--fg-rgb), 0.5); }
.cselect__list {
  max-height: 260px;
  margin: 0;
  padding: 0 2px 0 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.cselect__opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.cselect__opt.is-active { background: rgba(var(--fg-rgb), 0.08); color: var(--fg); }
.cselect__opt[aria-selected="true"] { color: var(--fg); }
.cselect__opt[aria-selected="true"]::after {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rec);
}
.cselect__opt[hidden] { display: none; }
.cselect__empty { padding: 10px 12px; font-size: 14px; color: var(--muted); }

/* =========================================================
   SCROLLBARS - thin, rounded, no arrows (page + inner lists)
   ========================================================= */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(var(--fg-rgb), 0.18);
  border: 2px solid transparent;
  border-radius: 99px;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(var(--fg-rgb), 0.35); }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: transparent; }
/* Firefox (Chromium keeps the ::-webkit styles above) */
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: rgba(var(--fg-rgb), 0.22) transparent; }
}
