/* ============================================================
   STYLE.CSS — global, CRT TV frame, boot sequence, transitions,
   and all page-specific styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;700&family=Bebas+Neue&family=Barlow+Condensed:wght@400;700;900&family=VT323&display=swap');

:root {
  --c-home-bg: #e8e4dc;
  --c-work-bg: #ef4444;
  --c-contact-bg: #0f0f12;
  --c-tv-outer: #0a0a0a;
  --c-tv-inner: #111111;
  --c-boot-bg: #111111;
  --c-boot-text: #b8960c;
  --c-white: #ffffff;
  --c-dark: #1a1a1a;
  --c-body: #3a3a3a;
  --c-gold: #c4a96a;
  --c-footer: #888888;
  --radius-desktop: 38px;
  --radius-mobile: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--c-tv-outer);
  color: var(--c-dark);
  overflow: hidden;
  height: 100%;
  width: 100%;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  padding: 14px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  body { padding: 8px; }
}

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: #fff;
  color: #000;
  padding: 8px 14px;
  z-index: 999;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

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

button { font-family: inherit; }

/* ============================================================
   CRT TV FRAME SHELL
   ============================================================ */

.page-tv-frame {
  position: relative;
  width: calc(100vw - 28px);
  height: calc(100vh - 28px);
  margin: 0 auto;
  border-radius: var(--radius-desktop);
  background: var(--c-tv-inner);
  overflow: hidden;
  box-shadow:
    0 0 60px 20px rgba(0, 0, 0, 0.8) inset,
    0 30px 80px rgba(0, 0, 0, 0.6);
}

.page-tv-frame__content {
  position: relative;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

#pageGrainCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
}

.page-crt-bevel {
  position: absolute;
  inset: 0;
  z-index: 91;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 0 2px 1px rgba(255, 255, 255, 0.08),
    inset 0 0 40px 6px rgba(0, 0, 0, 0.55);
}

.page-scanner-lines {
  position: absolute;
  inset: 0;
  z-index: 92;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 4px
  );
}

@media (max-width: 768px) {
  .page-tv-frame {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    border-radius: var(--radius-mobile);
    box-shadow:
      0 0 40px 14px rgba(0, 0, 0, 0.8) inset;
  }
}

/* stream HUD — homepage only */
.stream-hud {
  position: absolute;
  top: 18px;
  left: 24px;
  z-index: 35;
  font-family: 'VT323', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(0, 0, 0, 0.25);
  display: flex;
  gap: 10px;
  pointer-events: none;
}

/* ============================================================
   BOOT SEQUENCE
   ============================================================ */

.boot-screen {
  position: absolute;
  inset: 0;
  z-index: 500;
  background: var(--c-boot-bg);
  color: var(--c-boot-text);
  font-family: 'VT323', monospace;
  letter-spacing: 0.04em;
  display: flex;
  flex-direction: column;
  padding: 6vh 6vw;
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.18, 1), opacity 0.6s ease;
}

.boot-screen.is-leaving {
  transform: translateY(-100%);
  opacity: 0;
}

.boot-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--c-boot-text);
  transition: width 0.2s linear;
}

.boot-title {
  font-size: clamp(28px, 6vw, 64px);
  text-align: center;
  letter-spacing: 0.5em;
  margin: 2vh 0 0;
}

.boot-subtitle {
  text-align: center;
  font-size: clamp(12px, 1.6vw, 18px);
  opacity: 0.7;
  margin: 6px 0 4vh;
  letter-spacing: 0.2em;
}

.boot-log {
  flex: 1;
  overflow: hidden;
  font-size: clamp(11px, 1.5vw, 16px);
  line-height: 1.5;
  white-space: pre;
}

.boot-log__line {
  opacity: 0;
  transform: translateY(4px);
  animation: boot-line-in 0.25s forwards;
}

@keyframes boot-line-in {
  to { opacity: 1; transform: translateY(0); }
}

.boot-skip {
  text-align: center;
  font-size: clamp(10px, 1.3vw, 13px);
  opacity: 0.45;
  letter-spacing: 0.2em;
}

/* ============================================================
   PAGE TRANSITION OVERLAY
   ============================================================ */

.tx-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  visibility: hidden;
}

.tx-overlay.is-active {
  pointer-events: all;
  visibility: visible;
}

.tx-p {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 33.34%;
  transform: translateY(105%);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.tx-p--l { left: 0; }
.tx-p--c { left: 33.33%; }
.tx-p--r { left: 66.66%; }

.tx-p__label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 7vw;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  letter-spacing: 0.05em;
  clip-path: inset(0 0 100% 0);
  display: flex;
}

.tx-p__label span {
  padding: 0 0.6em;
}

/* ============================================================
   HOMEPAGE
   ============================================================ */

.home-page .page-tv-frame { background: var(--c-home-bg); }
.work-page .page-tv-frame { background: var(--c-work-bg); }
.contact-page .page-tv-frame { background: var(--c-contact-bg); }

.home-hero {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--c-home-bg);
}

.home-hero__texture {
  position: absolute;
  inset: 0;
  background-image: url('../images/texture.svg');
  background-size: 300px;
  opacity: 0.05;
  pointer-events: none;
  z-index: 1;
}

#fluidCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.home-hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-bg.svg');
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  z-index: 3;
  will-change: transform;
}

.home-hero__ellipse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38vw;
  height: 50vh;
  transform: translate(-50%, -55%);
  z-index: 5;
  pointer-events: none;
}

.home-hero__ellipse svg { width: 100%; height: 100%; }

.home-hero__blob {
  position: absolute;
  top: 48%;
  left: 50%;
  width: 36vw;
  height: 36vw;
  background: radial-gradient(circle, #d9a8b3 0%, rgba(217, 168, 179, 0) 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  opacity: 0.65;
  pointer-events: none;
}

.home-hero__emblem-glow {
  position: absolute;
  top: 38%;
  left: 50%;
  width: 26vw;
  height: 26vw;
  background: radial-gradient(circle, rgba(184, 150, 12, 0.55) 0%, rgba(184, 150, 12, 0) 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  opacity: 0.25;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.home-hero__emblem {
  position: absolute;
  top: 16%;
  left: 50%;
  width: 13vw;
  max-width: 160px;
  transform: translateX(-50%);
  z-index: 6;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.25));
}

.home-hero__name {
  position: absolute;
  bottom: -1.6vw;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 11vw;
  color: #2a2a2a;
  white-space: nowrap;
  letter-spacing: 0.02em;
  z-index: 8;
  pointer-events: none;
  user-select: none;
}

.home-hero__tagline {
  position: absolute;
  top: 36%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4vw;
  letter-spacing: 0.5em;
  color: #2a2a2a;
  opacity: 0.55;
  white-space: nowrap;
  z-index: 8;
  pointer-events: none;
  user-select: none;
}

/* ============================================================
   SHARED INNER-PAGE HERO
   ============================================================ */

.page-hero {
  position: relative;
  padding: 110px 34px 70px;
  overflow: hidden;
}

.page-hero__texture {
  position: absolute;
  inset: 0;
  background-image: url('../images/texture.svg');
  background-size: 300px;
  opacity: 0.08;
  pointer-events: none;
}

.page-hero__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 15vw;
  line-height: 0.9;
  color: #fff;
  margin: 0;
  position: relative;
  z-index: 2;
}

.page-hero__sub {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin-top: 24px;
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 16px;
  line-height: 1.5;
}

.page-hero__ellipse {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 50vw;
  opacity: 0.15;
  pointer-events: none;
}

/* ============================================================
   WORK PAGE
   ============================================================ */

.marquee-section {
  padding: 70px 0;
  position: relative;
  z-index: 2;
}

.marquee-section__heading {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 30px;
}

.marquee {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}

.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 60px;
  animation: scroll 22s linear infinite;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marquee__track img {
  height: 32px;
  filter: grayscale(1) brightness(0) invert(1);
  opacity: 0.7;
}

.marquee__track--text {
  gap: 50px;
}

.marquee__track--text span {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  letter-spacing: 0.15em;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.75);
}

.journey-section {
  background: var(--c-home-bg);
  padding: 90px 34px;
  position: relative;
  z-index: 2;
}

.journey-section__heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 6vw;
  margin: 0;
}

.journey-section__sub {
  margin-top: 8px;
  color: var(--c-body);
  font-size: 14px;
}

.stats-grid {
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.stat-card__num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.2rem;
  color: var(--c-gold);
  line-height: 1;
}

.stat-card__label {
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--c-body);
  max-width: 220px;
}

.skills-section {
  background: var(--c-home-bg);
  padding: 0 34px 90px;
  position: relative;
  z-index: 2;
}

.skills-section__heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 5vw;
  margin: 0 0 30px;
}

.skills-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.skill-pill {
  flex-shrink: 0;
  border: 1px solid var(--c-dark);
  background: var(--c-dark);
  color: #fff;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 13px;
  white-space: nowrap;
}

.cta-section {
  background: var(--c-home-bg);
  padding: 100px 34px 140px;
  position: relative;
  z-index: 2;
}

.cta-section__small {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-footer);
}

.cta-section__big {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 9vw;
  margin: 10px 0 30px;
}

.cta-section__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  padding-bottom: 4px;
}

/* ============================================================
   WORK GRID + VIDEO LIGHTBOX
   ============================================================ */

.work-frame {
  margin: 10px 20px 60px;
  padding: 16px;
  background: #0a0a0a;
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 20px 50px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 2;
}

.work-columns {
  display: flex;
  gap: 3px;
  height: 80vh;
  overflow: hidden;
  position: relative;
  border-radius: 10px;
  mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent);
}

.work-col {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.work-col__track {
  display: flex;
  flex-direction: column;
  gap: 18px;
  will-change: transform;
  animation: work-scroll-up linear infinite;
}

.work-col--fast .work-col__track { animation-duration: 20s; }
.work-col--slow .work-col__track { animation-duration: 36s; }

.work-col:hover .work-col__track {
  animation-play-state: paused;
}

@keyframes work-scroll-up {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

@media (max-width: 1024px) {
  .work-columns { height: 74vh; }
}

@media (max-width: 768px) {
  .work-frame { margin: 8px 10px 40px; padding: 8px; }
  .work-columns { height: 62vh; gap: 2px; }
  .work-col:nth-child(n + 3) { display: none; }
}

.work-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.work-card-ref {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.32);
  padding-left: 2px;
}

.artwork-cell {
  position: relative;
  aspect-ratio: 3 / 4;
  flex-shrink: 0;
  overflow: hidden;
  background: #15287a;
  cursor: pointer;
}

.artwork-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.artwork-cell:hover img {
  transform: scale(1.04);
}

.artwork-cell__corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
  z-index: 1;
}

.artwork-cell__corner--tl { top: 8px; left: 8px; border-top: 1px solid; border-left: 1px solid; }
.artwork-cell__corner--tr { top: 8px; right: 8px; border-top: 1px solid; border-right: 1px solid; }
.artwork-cell__corner--bl { bottom: 8px; left: 8px; border-bottom: 1px solid; border-left: 1px solid; }
.artwork-cell__corner--br { bottom: 8px; right: 8px; border-bottom: 1px solid; border-right: 1px solid; }

.artwork-cell__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 40, 0.75);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.artwork-cell:hover .artwork-cell__overlay {
  opacity: 1;
}

.artwork-cell__ref {
  font-size: 11px;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.artwork-cell__title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
}

.artwork-cell__view {
  align-self: flex-start;
  border: 1px solid #fff;
  padding: 6px 14px;
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* lightbox */
.artwork-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: none;
  padding: 0;
  background: rgba(5, 5, 8, 0.97);
  z-index: 300;
  color: #fff;
}

.artwork-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.8);
}

.artwork-lightbox__inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
}

.artwork-lightbox__ref {
  position: absolute;
  top: 24px;
  left: 24px;
  font-size: 12px;
  letter-spacing: 0.1em;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 6px 12px;
  border-radius: 20px;
}

.artwork-lightbox__close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

.artwork-lightbox__video {
  width: min(80vw, 960px);
  aspect-ratio: 16 / 9;
  border: none;
  background: #000;
}

.artwork-lightbox__caption {
  text-align: center;
  margin-top: 20px;
}

.artwork-lightbox__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
}

.artwork-lightbox__medium {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

.artwork-lightbox__buy {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.1em;
  border-bottom: 1px solid #fff;
  text-decoration: none;
  color: #fff;
}

.artwork-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  opacity: 0.6;
  padding: 10px;
}

.artwork-lightbox__nav:hover { opacity: 1; }
.artwork-lightbox__nav--prev { left: 14px; }
.artwork-lightbox__nav--next { right: 14px; }

/* ============================================================
   CONTACT PAGE
   ============================================================ */

.contact-hero {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 34px;
  overflow: hidden;
}

.contact-starfield {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.contact-ghost-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 19vw;
  line-height: 0.92;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.12);
  text-stroke: 1px rgba(255, 255, 255, 0.12);
  margin: 0;
  position: relative;
  z-index: 2;
}

.contact-info {
  position: absolute;
  right: 6%;
  bottom: 14%;
  z-index: 3;
  text-align: right;
}

.contact-info__email {
  font-size: clamp(20px, 3rem, 3rem);
  color: #fff;
  text-decoration: none;
  display: block;
  margin-bottom: 18px;
}

.contact-info__socials {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
}

.contact-info__socials a {
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  opacity: 0.75;
}

.contact-info__socials a:hover { opacity: 1; }

@media (max-width: 768px) {
  .contact-ghost-text { font-size: 22vw; }
  .contact-info { left: 6%; right: 6%; text-align: left; bottom: 8%; }
  .contact-info__socials { justify-content: flex-start; }
}

/* ============================================================
   EASTER EGG GAME OVERLAYS
   ============================================================ */

.game-overlay {
  position: absolute;
  inset: 0;
  z-index: 600;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'VT323', monospace;
}

.game-overlay.is-active { display: flex; }

.game-hud {
  display: flex;
  gap: 30px;
  font-size: 18px;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.game-canvas {
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: #000;
}

.game-controls {
  margin-top: 14px;
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.game-controls button {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 6px 14px;
  cursor: pointer;
  font-family: inherit;
}

.game-modes {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.game-modes button.is-selected {
  background: #fff;
  color: #000;
}

.game-paddle-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (max-width: 768px) {
  .home-hero__name { font-size: 15vw; bottom: -1.6vw; }
  .home-hero__tagline { font-size: 3.2vw; top: 33%; }
  .home-hero__emblem { width: 22vw; top: 14%; }
  .page-hero__title { font-size: 20vw; }
  .tx-p__label { font-size: 12vw; }
}
