:root {
  --bg: #0b0c0e;
  --fg: rgba(255, 255, 255, 0.92);
  --fg-dim: rgba(255, 255, 255, 0.68);
  --line: rgba(255, 255, 255, 0.18);
  --overlay: rgba(0, 0, 0, 0.22);
  --overlay-strong: rgba(0, 0, 0, 0.72);
  --blur: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

a:hover {
  opacity: 0.92;
}

.hero {
  min-height: 100svh;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--bg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  filter: saturate(0.95) contrast(1.05);
}

.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  pointer-events: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.18) 45%, rgba(0, 0, 0, 0.52) 100%);
}

.hero--flat .hero__overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.header {
  padding: clamp(16px, 3vw, 28px);
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-family: "Integral CF", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 15.2px;
  text-transform: uppercase;
  color: var(--fg);
}

.vol-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.28);
  transition: color 0.2s;
  margin-top: 3px;
}

.vol-btn--muted {
  color: rgba(255, 255, 255, 0.28);
}

.vol-btn:not(.vol-btn--muted) {
  color: rgba(255, 255, 255, 0.88);
}

.vol-btn__on  { display: none; }
.vol-btn__off { display: block; }

.vol-btn--muted .vol-btn__on  { display: none; }
.vol-btn--muted .vol-btn__off { display: block; }

.vol-btn:not(.vol-btn--muted) .vol-btn__on  { display: block; }
.vol-btn:not(.vol-btn--muted) .vol-btn__off { display: none; }

.header__links {
  margin-left: auto;
  display: none;
  gap: 18px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
}

.header__links a {
  color: var(--fg);
}

.header__links a.is-active {
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
}

.menu-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(var(--blur));
  color: var(--fg);
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.menu-button__icon {
  width: 18px;
  height: 12px;
  position: relative;
}

.menu-button__icon::before,
.menu-button__icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--fg);
  opacity: 0.9;
}

.menu-button__icon::before {
  top: 0;
}

.menu-button__icon::after {
  bottom: 0;
}


.view[data-page="home"] {
  position: relative;
  padding: clamp(18px, 3vw, 28px);
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
}

/* content sections — prevent layout shift when toggling */
.view[hidden] {
  display: none;
}

.home__rail {
  justify-self: end;
  width: min(520px, 100%);
  display: grid;
  gap: 10px;
  padding-bottom: clamp(12px, 2vw, 22px);
}

.rail-item {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 0;
}

.panel {
  padding: clamp(18px, 3vw, 28px);
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.panel__title {
  margin: 0 0 18px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 21px;
  color: var(--fg);
}

.work-list {
  display: grid;
  gap: 10px;
}

.work-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact {
  max-width: 720px;
}

.contact__lead {
  margin: 0 0 22px;
  color: var(--fg-dim);
  line-height: 1.65;
  font-size: 14px;
}

.contact__grid {
  display: grid;
  gap: 18px;
}

.contact__block {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(var(--blur));
  border-radius: 14px;
  padding: 16px;
}

.contact__label {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--fg);
}

.contact__value {
  margin: 0;
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.5;
}

.menu {
  position: fixed;
  left: clamp(16px, 3vw, 28px);
  top: calc(clamp(16px, 3vw, 28px) + 44px + 10px);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 12px 14px;
}

.menu__close {
  display: none;
}

.menu__content {
  display: grid;
  gap: 10px;
  text-align: left;
}

.menu__link {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 6px 0;
}

body.is-menu-open .menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.about {
  max-width: 720px;
}

.about__text {
  margin: 0;
  color: var(--fg-dim);
  line-height: 1.75;
  font-size: 16px;
}

.contact__value {
  word-break: break-all;
}

/* ---- selected clients ---- */

.clients {
  max-width: 720px;
  margin-top: 48px;
}

.clients__label {
  margin: 0 0 24px;
  font-family: 'Space Mono', monospace;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.85);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.35);
  padding-bottom: 6px;
  display: inline-block;
}

.clients__row {
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.clients__logo {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.55;
  transition: opacity 0.3s ease;
}

.clients__logo:hover {
  opacity: 1;
}

.clients__logo--kitkat {
  filter: contrast(200%) invert(1);
  height: 72px;
  mix-blend-mode: screen;
}

.clients__logo--kitkat:hover {
  opacity: 1;
}

/* ---- video text overlays (mobile only) ---- */

.video-overlay {
  display: none;
}

@media (max-width: 880px) {
  .video-overlay {
    display: block;
    position: absolute;
    z-index: 5;
    font-family: 'Space Mono', monospace;
    text-transform: lowercase;
    color: rgba(255, 255, 255, 0.85);
    pointer-events: none;
    mix-blend-mode: difference;
  }

  .video-overlay--top-right {
    top: clamp(60px, 12vw, 90px);
    right: clamp(16px, 3vw, 28px);
    text-align: right;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.05em;
  }

  .video-overlay--bottom-left {
    bottom: clamp(70px, 14vw, 100px);
    left: clamp(16px, 3vw, 28px);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.08em;
    max-width: 280px;
    line-height: 1.3;
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 13px;
  }

  .about__text {
    font-size: 15px;
    line-height: 1.7;
  }

  .panel__title {
    font-size: 18px;
  }

  .clients {
    margin-top: 28px;
  }

  .contact__lead {
    font-size: 15px;
  }

  .contact__label {
    font-size: 11px;
  }

  .contact__value {
    font-size: 13px;
  }
}

@media (min-width: 880px) {
  .about__text {
    font-size: 17px;
  }

  .contact__grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact__grid .contact__block:last-child {
    grid-column: 1 / -1;
  }
}

/* ---- scene timeline ---- */

.timeline {
  display: none;
}

/* only show on home page */
body.page-home .timeline {
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0 clamp(16px, 3vw, 28px) clamp(8px, 2vw, 16px);
}

.timeline__track {
  position: relative;
  height: 40px;
  cursor: pointer;
}

/* thin base line */
.timeline__track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.timeline__progress {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 1px;
  background: rgba(255, 255, 255, 0.7);
  width: 0%;
  pointer-events: none;
  transition: width 0.3s linear;
}

.timeline__markers {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.timeline__marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
}

.timeline__marker:hover,
.timeline__marker:focus-visible {
  background: rgba(255, 255, 255, 0.9);
  transform: translate(-50%, -50%) scale(1.6);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  outline: none;
}

.timeline__marker.is-active {
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* tooltip — appears above the marker on hover */
.timeline__tooltip {
  position: absolute;
  bottom: 34px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  pointer-events: none;
}

.timeline__tooltip[hidden] {
  display: none;
}

@media (max-width: 880px) {
  /* push timeline up on mobile so it doesn't clash with bottom-left text */
  body.page-home .timeline {
    bottom: clamp(50px, 10vw, 80px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu {
    transition: none;
  }
}
