/* ============================================================
   OKTAV — creative agency
   Moxey-style single screen: black, tiny bold uppercase type,
   crossfading stills, hover project list, [ View ] cursor.
   ============================================================ */

:root {
  --white: #fff;
  --black: #000;
  --fs: 11px;
  --pad: 14px;
  --sans: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --serif: "Instrument Serif", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--black); }
body {
  font-family: var(--sans);
  font-weight: 700;
  font-size: var(--fs);
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: var(--white);
  background: var(--black);
  text-transform: uppercase;
  height: 100dvh;
  overflow: hidden;
  user-select: none;
  opacity: 0;
  transition: opacity 0.9s ease;
  -webkit-font-smoothing: antialiased;
}
body.is-ready { opacity: 1; }
a { color: inherit; text-decoration: none; }
sup { font-size: 0.55em; }

.hov { opacity: 1; transition: opacity 0.15s ease; cursor: pointer; }
.hov:hover { opacity: 0.5; }

/* ============ BACKGROUND ============ */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.bg__slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.8s ease, transform 9s linear;
}
.bg__slide.is-on { opacity: 1; transform: scale(1); }
.bg__tint { position: absolute; inset: 0; background: #000; opacity: 0.42; }

/* ============ PROJECT STILLS ============ */
.stills { position: fixed; inset: 0; z-index: 0; }
.still {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 0.5s ease;
}
.still.is-active { opacity: 1; }
.stills::after {
  content: ""; position: absolute; inset: 0; background: #000; opacity: 0;
  transition: opacity 0.5s ease; pointer-events: none;
}
.stills.is-active::after { opacity: 0.25; }

/* ============ BARS ============ */
.bar { position: fixed; left: 0; width: 100%; z-index: 10; padding: 10px var(--pad); }
.bar--top { top: 0; }
.bar--bottom { bottom: 0; }
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 16px;
  align-items: start;
}
.cell { grid-column: span 2; white-space: nowrap; }
.cell:first-child { grid-column: span 2; }
.cell--time { grid-column: 11 / span 2; text-align: right; }
@media (max-width: 767px) {
  .cell { grid-column: span 3; }
  .cell--time { grid-column: 10 / span 3; }
  .hide-m { display: none; }
}

/* ============ MAIN SCREEN ============ */
.screen { position: relative; z-index: 1; height: 100dvh; display: flex; }
.screen__grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 16px;
  align-items: center;
  padding: 48px var(--pad);
}
.wordmark {
  grid-column: 1 / span 2;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: 0.06em;
  line-height: 1;
}
.wordmark sup { margin-left: 2px; }

.projects {
  grid-column: 3 / span 3;
  display: flex; flex-direction: column;
  justify-content: space-evenly;
  align-self: stretch;
  padding: 12vh 0;
}
.project { display: block; height: 36px; }
.project__name {
  display: block; white-space: nowrap;
  opacity: 0.25; transition: opacity 0.5s ease;
}
.project__meta { position: relative; display: block; }
.project__client, .project__time {
  position: absolute; top: 0; left: 0; white-space: nowrap;
  transition: opacity 0.5s ease;
}
.project__client { opacity: 0.25; }
.project__time { opacity: 0; }
.project:hover .project__name, .project.is-active .project__name { opacity: 1; }
.project:hover .project__client, .project.is-active .project__client { opacity: 0; }
.project:hover .project__time, .project.is-active .project__time { opacity: 1; }

.statement {
  grid-column: 9 / span 4;
  max-width: 430px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.3vw, 33px);
  line-height: 1.12;
  letter-spacing: 0.02em;
  text-transform: none;
}

@media (max-width: 767px) {
  .screen__grid { grid-template-columns: 1fr; align-items: stretch; padding: 70px var(--pad) 90px; }
  .wordmark { grid-column: 1; align-self: start; }
  .projects { grid-column: 1; padding: 5vh 0; }
  .statement { display: none; }
}

/* ============ [ VIEW ] CURSOR ============ */
.viewcursor {
  position: fixed; z-index: 20; top: 0; left: 0;
  pointer-events: none; white-space: nowrap;
  transform: translate(-50%, -50%);
  opacity: 0; transition: opacity 0.2s ease;
}
.viewcursor.is-active { opacity: 1; }
@media (max-width: 767px), (hover: none) { .viewcursor { display: none; } }

/* ============ PANELS ============ */
.panel {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(0, 0, 0, 0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  overflow-y: auto;
}
.panel.is-open { opacity: 1; visibility: visible; }
.panel__close { position: absolute; top: 10px; right: var(--pad); background: none; border: none; font: inherit; color: inherit; text-transform: uppercase; letter-spacing: 0.02em; }
.panel__inner { width: 100%; max-width: 860px; padding: 80px var(--pad); }
.panel__kicker { opacity: 0.5; margin-bottom: 26px; }
.panel__serif {
  font-family: var(--serif); font-weight: 400; text-transform: none;
  font-size: clamp(26px, 3.6vw, 44px); line-height: 1.15; letter-spacing: 0.01em;
  margin-bottom: 56px;
}
.panel__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.panel__h { opacity: 0.5; margin-bottom: 10px; }
.panel__cols p { line-height: 2; }
@media (max-width: 640px) { .panel__cols { grid-template-columns: 1fr; gap: 30px; } }
