/*
Theme Name: The George KN
Author:     The George
Version:    2.0
Description: KN Case Studies — single-page archive with image gallery and Drive video embeds.
*/

/* ── RESET & VARIABLES ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:   #0d0d0d;
  --white:   #ffffff;
  --gray:    #9ca3af;
  --muted:   #6b7280;
  --border:  rgba(0,0,0,0.07);
  --sans:    'Instrument Sans', Arial, sans-serif;
  --display: 'Instrument Sans', Arial, sans-serif;
  --ease:    cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--black);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

/* ── SCROLL PROGRESS ────────────────────────────────────────────── */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--white);
  z-index: 2000;
  pointer-events: none;
  transition: width 0.08s linear;
}

/* ── NAVBAR ─────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 3rem;
  background: rgba(13,13,13,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.navbar__logo img { height: 30px; width: auto; filter: brightness(0) invert(1); }

.navbar__label {
  font-family: var(--display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}

.navbar__back {
  font-size: 0.76rem;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
  white-space: nowrap;
}
.navbar__back:hover { color: rgba(255,255,255,0.9); }

/* ── HERO ───────────────────────────────────────────────────────── */
.hero {
background: var(--black);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 0;
}
.hero__inner,
.hero__stats {
  position: relative;
  z-index: 1;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
  padding: 11rem 3rem 4.5rem;
}


.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  margin-bottom: 2.5rem;
}
.hero__eyebrow::before {
  content: '';
  display: block;
  width: 1.8rem;
  height: 1px;
  background: rgba(255,255,255,0.18);
  flex-shrink: 0;
}

.hero__title {
  font-family: var(--sans);
  font-size: clamp(3rem, 6vw, 8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 3rem;
}

.hero__sub {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.34);
  max-width: 360px;
  line-height: 1.9;
}

.hero__deco {
  font-family: var(--display);
  font-size: clamp(14rem, 24vw, 28rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.07em;
  color: rgba(255,255,255,0.03);
  user-select: none;
  pointer-events: none;
  display: block;
  margin-bottom: -0.07em;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 0 3rem;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  padding: 2.2rem 2.5rem 2.2rem 0;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.hero__stat:not(:first-child) { padding-left: 2.5rem; }
.hero__stat:last-child { border-right: none; }

.hero__stat-value {
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--white);
}

.hero__stat-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.24);
  margin-top: 0.6rem;
}

/* ── PROJECT ────────────────────────────────────────────────────── */
.project {
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.project.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── PROJECT HEADER ─────────────────────────────────────────────── */
.project__head {
  padding: 4rem 3rem 2.5rem;
  border-bottom: 1px solid var(--border);
}

.project__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.project__num {
  font-family: var(--display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.18);
}

.project__title {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 4.5rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--black);
  margin-bottom: 0.75rem;
}

.project__location {
  font-family: var(--sans);
  font-size: 0.96rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.01em;
  display: block;
}

/* ── CHIPS ──────────────────────────────────────────────────────── */
.cs-chips {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.cs-chip {
  font-family: var(--display);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.24rem 0.65rem;
  background: transparent;
  border: 1px solid rgba(0,0,0,0.13);
  border-radius: 100px;
  color: var(--muted);
}

/* ── COVER IMAGE ────────────────────────────────────────────────── */
.project__cover {
  width: 100%;
  overflow: hidden;
  cursor: zoom-in;
}

.project__cover img {
  width: 100%;
  aspect-ratio: 3/1;
  object-fit: cover;
  display: block;
  transition: transform 0.8s var(--ease);
}
.project__cover:hover img { transform: scale(1.025); }

/* ── BODY ───────────────────────────────────────────────────────── */
.project__body {
  padding: 2.5rem 3rem 3.5rem;
}

.project__intro {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.9;
  max-width: 640px;
  margin-bottom: 2.5rem;
}

/* ── GALLERY STRIP ──────────────────────────────────────────────── */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.gallery-strip__item {
  display: block;
  border-radius: 3px;
  overflow: hidden;
  cursor: zoom-in;
}

.gallery-strip__item img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s;
}
.gallery-strip__item:hover img { opacity: 0.82; }

/* ── VIDEO SECTION ──────────────────────────────────────────────── */
.video-section {
  background: var(--black);
  padding: 2.5rem 3rem 3.5rem;
}

.section-label {
  font-family: var(--display);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.22);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  flex-shrink: 0;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.video-card:only-child {
  grid-column: 1 / -1;
}

.vi-label {
  font-family: var(--display);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.vi-label::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  flex-shrink: 0;
}

.vi-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #1c1c1c;
  border-radius: 5px;
  overflow: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.vi-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Block Drive pop-out button */
.vi-embed.vi-loaded::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 52px;
  z-index: 2;
  pointer-events: all;
  cursor: default;
}

/* ── VIDEO FACADE ────────────────────────────────────────────────── */
.vi-thumb {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.vi-play-btn {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.3);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.22s;
}
.vi-play-btn:hover { background: rgba(0,0,0,0.15); }
.vi-play-btn:hover .vi-play-icon { transform: scale(1.1); }

.vi-play-icon {
  width: 62px;
  height: 62px;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.22);
  transition: transform 0.2s var(--ease);
}

/* ── LIGHTBOX ────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.97);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}
.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.8);
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 50%;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.16); }

/* ── FOOTER ─────────────────────────────────────────────────────── */
.footer {
  background: var(--black);
  padding: 3.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer__logo img {
  height: 24px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.3;
}
.footer__copy {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.22);
}
.footer__link {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
}
.footer__link:hover { color: rgba(255,255,255,0.9); }

/* ── ANIMATION ──────────────────────────────────────────────────── */
.hero { animation: fadeUp 0.7s var(--ease) both; }

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

/* ── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 1.2rem 1.5rem; }
  .navbar__label { display: none; }

  .hero__inner { grid-template-columns: 1fr; padding: 9rem 1.5rem 3.5rem; }
  .hero__deco { display: none; }
  .hero__title { font-size: clamp(2rem, 6vw, 3rem); }
  .hero__stats { padding: 0 1.5rem; }
  .hero__stat { padding: 1.5rem 0.75rem 1.5rem 0; }
  .hero__stat:not(:first-child) { padding-left: 0.75rem; }
  .hero__stat-value { font-size: 1.6rem; }

  .project__head { padding: 3rem 1.5rem 2rem; }
  .project__body { padding: 2rem 1.5rem 3rem; }

  .project__title { font-size: clamp(1.7rem, 7vw, 2.6rem); }

  .project__cover img { aspect-ratio: 16/9; max-height: 55vh; }


  .video-section { padding: 2rem 1.5rem 2.5rem; }
  .video-grid { grid-template-columns: 1fr; }

  .footer { padding: 2.5rem 1.5rem; }
}

@media (max-width: 480px) {
  .hero__title { font-size: clamp(1.6rem, 6.5vw, 2.2rem); }
  .gallery-strip { grid-template-columns: 1fr; }
  .vi-play-icon { width: 50px; height: 50px; }
  .vi-embed.vi-loaded::after { width: 60px; height: 44px; }
}
