/* ============================================================
   BLAOSK — Design tokens
   ============================================================ */
:root {
  --bg: #0a0a0c;
  --bg-soft: #0e0e11;
  --surface: #131316;
  --surface-2: #1a1a1e;
  --line: rgba(255,255,255,0.09);
  --line-strong: rgba(255,255,255,0.16);

  --text: #f2f1ec;
  --text-dim: #a5a4a1;
  --text-faint: #6c6b69;

  --gold: #b8935a;
  --gold-bright: #dcb87d;
  --gold-dim: rgba(184,147,90,0.35);

  --ice: #6fd0d6;

  --display: 'Fjalla One', sans-serif;
  --body: 'Manrope', sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --ease: cubic-bezier(.22,.61,.36,1);
  --container: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

::selection { background: var(--gold); color: #0a0a0c; }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* film grain overlay */
.grain {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 18px;
}

.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 130px 40px;
}
.section__head { max-width: 760px; margin-bottom: 60px; }
.section__head h2, .about h2, .contact h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: 0.2px;
  color: var(--text);
}
.section__lede {
  margin-top: 20px;
  color: var(--text-dim);
  font-size: 17px;
  max-width: 620px;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 40px;
  transition: background 0.35s var(--ease), padding 0.35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10,10,12,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 16px 40px;
  border-bottom: 1px solid var(--line);
}
.nav__logo img { height: 20px; width: auto; }
.nav__links { display: flex; gap: 40px; }
.nav__links a {
  font-size: 14px; letter-spacing: 0.03em;
  color: var(--text-dim);
  transition: color .25s var(--ease);
  position: relative;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--gold-bright); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { transform: scaleX(1); }

.nav__right { display: flex; align-items: center; gap: 26px; }
.lang-switch {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 6px; color: var(--text-faint);
}
.lang-switch button { color: var(--text-faint); padding: 2px; transition: color .2s; }
.lang-switch button.active { color: var(--gold-bright); }
.lang-switch button:hover { color: var(--text); }

.nav__burger { display: none; flex-direction: column; gap: 5px; width: 24px; z-index: 401; position: relative; }
.nav__burger span { display: block; height: 1px; background: var(--text); width: 100%; transition: transform .3s var(--ease), opacity .3s; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100svh; min-height: 640px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 30%;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.6s ease;
  filter: saturate(0.9) brightness(0.74);
}
.hero__slide.is-active { opacity: 1; }
.hero__slide--bright { filter: saturate(0.82) brightness(0.6) contrast(1.04); }
.hero__slide.is-kenburns { animation: kenBurns 9s linear forwards; }
@keyframes kenBurns {
  from { transform: scale(1.0); }
  to { transform: scale(1.09); }
}

.hero__ticks {
  position: absolute; z-index: 2;
  right: 40px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px;
}
.hero__tick {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,0.28);
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.hero__tick.is-active { background: var(--gold-bright); transform: scale(1.6); }
@media (max-width: 780px) {
  .hero__ticks { right: 16px; gap: 8px; }
}

.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(10,10,12,0.55) 0%, rgba(10,10,12,0.35) 35%, rgba(10,10,12,0.75) 78%, #0a0a0c 100%);
}
.hero__vignette {
  position: absolute; inset: 0; z-index: 1;
  box-shadow: inset 0 0 220px 40px rgba(0,0,0,0.65);
}

.hero__content {
  position: relative; z-index: 2;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 26px;
  padding: 0 24px;
}
.hero__logo { height: clamp(46px, 8vw, 84px); width: auto; opacity: 0; animation: heroReveal 1.4s var(--ease) 0.2s forwards; }
.hero__tagline {
  font-family: var(--mono);
  font-size: clamp(12px, 1.4vw, 15px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0; animation: heroReveal 1.4s var(--ease) 0.5s forwards;
}
.hero__cta {
  margin-top: 10px;
  border: 1px solid var(--line-strong);
  padding: 14px 30px;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text);
  transition: border-color .3s var(--ease), background .3s var(--ease), color .3s;
  opacity: 0; animation: heroReveal 1.4s var(--ease) 0.8s forwards;
}
.hero__cta:hover { background: var(--gold-bright); border-color: var(--gold-bright); color: #0a0a0c; }

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__scroll {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-faint);
}
.hero__scroll-line { width: 1px; height: 40px; background: linear-gradient(var(--gold-bright), transparent); overflow: hidden; position: relative; }
.hero__scroll-line::after {
  content: ""; position: absolute; top: -40px; left: 0; width: 100%; height: 40px;
  background: linear-gradient(var(--gold-bright), transparent);
  animation: scrollDrop 2.2s ease-in-out infinite;
}
@keyframes scrollDrop { 0% { top: -40px; } 100% { top: 40px; } }

/* ============================================================
   WORK GRID
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 260px;
  gap: 14px;
}
.tile--feat { grid-column: span 2; grid-row: span 2; }
.tile--tall { grid-column: span 1; grid-row: span 2; }
.tile--wide { grid-column: span 2; grid-row: span 1; }
.tile--norm { grid-column: span 1; grid-row: span 1; }

.tile {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  text-align: left;
  display: block;
  width: 100%; height: 100%;
  border: 1px solid var(--line);
}
.tile::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.86) 100%);
  transition: opacity .35s var(--ease);
}
.tile__scrim { position: absolute; inset: 0; background: rgba(10,10,12,0); transition: background .35s var(--ease); }
.tile:hover .tile__scrim { background: rgba(10,10,12,0.12); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.tile__meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 20px;
  display: flex; flex-direction: column; gap: 6px;
  transform: translateY(8px);
  transition: transform .35s var(--ease);
  z-index: 2;
}
.tile:hover .tile__meta { transform: translateY(0); }
.tile__cat {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold-bright);
}
.tile__title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(16px, 1.6vw, 21px);
  color: var(--text);
  line-height: 1.15;
}
.tile__play {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(10,10,12,0.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text);
  backdrop-filter: blur(6px);
}
.tile:hover .tile__play { border-color: var(--gold-bright); color: var(--gold-bright); }

.tile:focus-visible { outline-offset: 2px; }

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; }
  .tile--feat { grid-column: span 2; grid-row: span 2; }
  .tile--tall { grid-column: span 1; grid-row: span 2; }
  .tile--wide { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; grid-auto-rows: 300px; }
  .tile--feat, .tile--tall, .tile--wide, .tile--norm { grid-column: span 1; grid-row: span 1; }
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(6,6,8,0.94);
  backdrop-filter: blur(10px);
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto;
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease);
  padding: 90px 20px 60px;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__close {
  position: fixed; top: 26px; right: 30px; z-index: 2;
  font-size: 16px; color: var(--text-dim);
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  transition: color .2s, border-color .2s;
}
.lightbox__close:hover { color: var(--text); border-color: var(--gold-bright); }
.lightbox__inner { max-width: 880px; width: 100%; }
.lightbox__head { max-width: 640px; margin: 0 auto 34px; text-align: center; }
.lightbox__cat {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-bright);
}
.lightbox__head h3 {
  font-family: var(--display); font-weight: 400; font-size: clamp(24px,3vw,36px);
  margin: 12px 0 14px;
}
.lightbox__head p { color: var(--text-dim); font-size: 15.5px; }

.lightbox__media { display: flex; flex-direction: column; gap: 26px; }
.lightbox__video { position: relative; width: 100%; padding-top: 56.25%; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.lightbox__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.lightbox__yt-link {
  display: inline-block; margin-top: 12px;
  font-family: var(--mono); font-size: 12.5px; color: var(--text-faint);
  transition: color .2s;
}
.lightbox__yt-link:hover { color: var(--gold-bright); }
.lightbox__image img { border-radius: 4px; border: 1px solid var(--line); }

/* ============================================================
   PROCESS / PIPELINE
   ============================================================ */
.pipeline {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 60px;
}
.pipeline__step {
  background: var(--bg);
  padding: 34px 36px;
  display: flex; gap: 22px;
}
.pipeline__num {
  font-family: var(--mono); font-size: 13px; color: var(--gold-bright);
  padding-top: 4px; flex-shrink: 0;
}
.pipeline__body h3 {
  font-family: var(--display); font-weight: 400; font-size: 19px; margin-bottom: 10px;
}
.pipeline__body p { color: var(--text-dim); font-size: 14.5px; max-width: 380px; }

@media (max-width: 780px) {
  .pipeline { grid-template-columns: 1fr; }
}

.start-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.start-card {
  border: 1px solid var(--line); padding: 30px;
  background: var(--surface);
  position: relative;
}
.start-card__num {
  font-family: var(--display); font-size: 13px; color: var(--gold-bright);
  border: 1px solid var(--gold-dim); width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  margin-bottom: 18px;
}
.start-card h3 { font-family: var(--display); font-weight: 400; font-size: 18px; margin-bottom: 10px; }
.start-card p { color: var(--text-dim); font-size: 14.5px; }

@media (max-width: 780px) {
  .start-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 80px;
}
.about p { color: var(--text-dim); font-size: 16px; margin-top: 22px; max-width: 560px; }
.stats { display: flex; gap: 46px; margin-top: 46px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat strong { font-family: var(--display); font-weight: 400; font-size: 40px; color: var(--gold-bright); }
.stat span { font-size: 13px; color: var(--text-faint); max-width: 140px; }

.about__col-tools { border-left: 1px solid var(--line); padding-left: 46px; }
.tool-list { display: flex; flex-direction: column; gap: 0; margin-top: 4px; }
.tool-list li {
  font-family: var(--mono); font-size: 14px; color: var(--text-dim);
  padding: 13px 0; border-bottom: 1px solid var(--line);
  transition: color .2s, padding-left .2s var(--ease);
}
.tool-list li:hover { color: var(--gold-bright); padding-left: 6px; }

@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; gap: 50px; }
  .about__col-tools { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 40px; }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact { text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact h2 { max-width: 700px; }
.contact .section__lede { margin-left: auto; margin-right: auto; }
.contact__email {
  margin-top: 40px;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(22px, 3vw, 34px);
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 8px;
  transition: color .25s, border-color .25s;
}
.contact__email:hover { color: var(--gold-bright); border-color: var(--gold-bright); }
.contact__socials { display: flex; gap: 34px; margin-top: 34px; flex-wrap: wrap; justify-content: center; }
.contact__socials a {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; color: var(--text-dim);
  transition: color .2s;
}
.contact__socials a:hover { color: var(--gold-bright); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  padding: 34px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
}
.footer__mark { height: 22px; width: auto; opacity: 0.7; }
.footer p { color: var(--text-faint); font-size: 12.5px; font-family: var(--mono); }

/* Floating game trigger — top-right, always visible */
.game-fab {
  position: fixed; top: 90px; right: 24px; z-index: 480;
  font-family: var(--mono); font-size: 12px; color: var(--text-dim);
  border: 1px solid var(--line-strong); padding: 9px 16px; border-radius: 20px;
  background: rgba(10,10,12,0.55);
  backdrop-filter: blur(8px);
  transition: color .2s, border-color .2s, transform .2s var(--ease);
}
.game-fab:hover { color: var(--gold-bright); border-color: var(--gold-bright); transform: translateY(-2px); }
@media (max-width: 860px) {
  .game-fab { top: 78px; right: 16px; padding: 7px 13px; font-size: 11px; }
}

/* ============================================================
   GAME OVERLAY
   ============================================================ */
.game-overlay {
  position: fixed; inset: 0; z-index: 950;
  background: rgba(6,6,8,0.94);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease);
  padding: 20px;
}
.game-overlay.is-open { opacity: 1; pointer-events: auto; }
.game-panel {
  width: 100%; max-width: 940px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 20px;
  position: relative;
  transition: background .6s ease;
}
.game-panel__close {
  position: absolute; top: 14px; right: 16px;
  color: var(--text-dim); font-size: 15px;
  z-index: 2;
}
.game-panel__close:hover { color: var(--gold-bright); }
.game-panel__head {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  font-family: var(--mono); font-size: 12px; color: var(--text-dim);
  padding: 0 4px 14px; letter-spacing: 0.04em;
}
.game-panel__title { color: var(--gold-bright); }
.game-panel__phase {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--line-strong); padding: 4px 12px; border-radius: 20px;
  color: var(--gold-bright);
}
.game-panel__score b { color: var(--text); }
#gameCanvas {
  width: 100%; height: auto; aspect-ratio: 900/450;
  background: var(--bg);
  border: 1px solid var(--line);
  display: block;
  touch-action: manipulation;
}
.game-panel__hint {
  text-align: center; margin-top: 14px;
  font-family: var(--mono); font-size: 12px; color: var(--text-faint);
}

/* ============================================================
   RESPONSIVE NAV (mobile)
   ============================================================ */
@media (max-width: 860px) {
  .nav { padding: 20px 22px; }
  .nav.is-scrolled { padding: 14px 22px; }
  .nav__burger { display: flex; }
  .nav__links {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(78vw, 320px);
    background: var(--bg-soft); border-left: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 30px; padding: 40px;
    transform: translateX(100%); transition: transform .4s var(--ease);
    z-index: 400;
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__links a { font-size: 18px; }
  .lang-switch { order: -1; }
  .section { padding: 90px 22px; }
}

@media (max-width: 560px) {
  .hero__cta { padding: 12px 22px; }
}
