/* ── Fonts ───────────────────────────────────────────────── */
@font-face {
  font-family: 'Clash Display';
  src: url('assets/fonts/WEB/fonts/ClashDisplay-Variable.woff2') format('woff2'),
       url('assets/fonts/WEB/fonts/ClashDisplay-Variable.woff')  format('woff'),
       url('assets/fonts/WEB/fonts/ClashDisplay-Variable.ttf')   format('truetype');
  font-weight: 200 700;
  font-style: normal;
  font-display: block;
}

/* ── Variables ───────────────────────────────────────────── */
:root {
  --bg:         #D8D8D8;
  --card-bg:    #C8C8C8;
  --text:       #111111;
  --muted:      #777777;
  --red:        #CC0000;
  --overlay-bg: #EDEDED;
  --gap:        10px;
  --pad:        40px;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Work Sans', sans-serif;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; padding: 0; font: inherit; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: var(--hero-h, 100svh);
  min-height: 560px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-img-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  top: -15%;
  left: 0;
  width: 100%;
  height: 130%;
  object-fit: cover;
  object-position: center top;
  will-change: transform;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-img.visible { opacity: 1; }

.hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  flex: 1;
  padding: var(--pad);
}

/* ── Wordmark ────────────────────────────────────────────── */
.wordmark {
  font-family: 'Clash Display', sans-serif;
  font-size: clamp(64px, 16.5vw, 230px);
  line-height: 0.9;
  letter-spacing: -0.015em;
  color: var(--red);
  cursor: default;
  user-select: none;
  display: block;
  transform: scaleX(1.2);
  transform-origin: center;
}

.wl {
  display: inline-block;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  /* font-variation-settings animated by JS RAF loop */
}

.wl.visible {
  opacity: 1;
  transform: none;
}

.subtitle {
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.subtitle.visible { opacity: 1; }

/* ── Tagline ─────────────────────────────────────────────── */
.tagline {
  font-family: 'Clash Display', sans-serif;
  font-variation-settings: "wght" 300;
  font-size: clamp(20px, 3.2vw, 48px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.tagline-diff {
  mix-blend-mode: difference;
  color: white;
}

.tagline.visible {
  opacity: 1;
  transform: none;
}

.tagline-accent {
  font-variation-settings: "wght" 600;
  color: var(--red);
}

/* ── Projects ────────────────────────────────────────────── */
.projects {
  padding: var(--gap);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}

/* ── Project Card ────────────────────────────────────────── */
.project-card {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--card-bg);
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity   0.5s ease,
    transform 0.5s ease;
}

.project-card.visible {
  opacity: 1;
  transform: none;
}

.card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.38s ease;
}

.card-img--default { opacity: 1; }
.card-img--hover   { opacity: 0; }

.project-card:hover .card-img--default { opacity: 0; }
.project-card:hover .card-img--hover   { opacity: 1; }

/* ── Behance Card ────────────────────────────────────────── */
.behance-card {
  grid-column: 2 / 4;
  aspect-ratio: 5 / 1;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  text-decoration: none;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity     0.5s ease,
    transform   0.5s ease,
    background  0.18s ease;
}

.behance-card:hover { background: #1769FF; }

.behance-card.visible {
  opacity: 1;
  transform: none;
}

.behance-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.13s ease;
}

.behance-wordmark {
  font-family: 'Clash Display', sans-serif;
  font-variation-settings: "wght" 600;
  font-size: clamp(22px, 3.6vw, 52px);
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1;
  transition: color 0.13s ease;
}

.behance-card:hover .behance-eyebrow,
.behance-card:hover .behance-wordmark { color: white; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  padding: 64px var(--pad) 36px;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.footer.visible { opacity: 1; }

.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
}

.footer-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.footer-body {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-direction: column;
}

.footer-links a {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding: 11px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
  transition: color 0.2s ease;
}

.footer-links a:first-of-type {
  border-top: 1px solid rgba(0, 0, 0, 0.14);
}

.footer-links a:hover { color: var(--red); }

.footer-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 36px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.clock {
  display: block;
  font-family: 'Clash Display', sans-serif;
  font-variation-settings: "wght" 600;
  font-size: clamp(28px, 4vw, 54px);
  color: var(--red);
  line-height: 1;
  letter-spacing: -0.01em;
}

.clock-city {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 5px;
}

.copyright {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}

/* ── Scrim ───────────────────────────────────────────────── */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.scrim.visible {
  opacity: 1;
  pointer-events: all;
}

/* ── Overlay ─────────────────────────────────────────────── */
.overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 8%;
  right: 0;
  z-index: 100;
  background: var(--overlay-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(105%);
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.overlay.open {
  transform: translateX(0);
}

.overlay-header { display: none; }
.overlay-back   { display: none; }

.overlay-close {
  position: absolute;
  top: 28px;
  right: 48px;
  z-index: 10;
  width: 32px;
  height: 32px;
  background: var(--red);
  color: white;
  font-size: 14px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: opacity 0.2s;
}

.overlay-close:hover { opacity: 0.85; }

.overlay-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ── Overlay Meta (white card, full slide width) ─────────── */
.overlay-meta {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 36px;
  padding: 28px 32px 28px;
  background: white;
  border-radius: 0;
  border-bottom: 2px solid var(--red);
  margin: 28px 48px 0;
}

.meta-left {}

.meta-title {
  font-family: 'Clash Display', sans-serif;
  font-variation-settings: "wght" 600;
  font-size: clamp(32px, 5vw, 72px);
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin-bottom: 24px;
  color: var(--text);
}

.meta-desc {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text);
  max-width: 500px;
}

.meta-right {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 6px;
}

.meta-item {}

.meta-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.meta-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}

.meta-link {
  color: var(--red);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s;
}

.meta-link:hover { text-decoration-color: var(--red); }

/* ── Overlay Images ──────────────────────────────────────── */
.overlay-rule {
  display: none;
}

.overlay-images {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px 60px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.overlay-img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

/* ── Lightbox ────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lb-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.lb-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.lb-close {
  position: absolute;
  top: 14px;
  right: 18px;
  color: white;
  font-size: 22px;
  z-index: 10;
  opacity: 0.7;
  padding: 10px;
  line-height: 1;
  transition: opacity 0.2s;
}

.lb-close:hover { opacity: 1; }

.lb-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0 18px;
}

.lb-track {
  width: 200px;
  height: 3px;
  background: rgba(180, 180, 180, 0.35);
  border-radius: 2px;
  overflow: hidden;
}

.lb-fill {
  height: 100%;
  background: linear-gradient(90deg, #8a1515 0%, var(--red) 55%, #e84343 100%);
  width: 0%;
  transition: width 0.25s ease;
}

/* Desktop arrows — hidden on touch screens */
.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 52px;
  font-weight: 300;
  line-height: 1;
  opacity: 0.5;
  z-index: 10;
  padding: 16px 20px;
  transition: opacity 0.2s;
}

.lb-arrow:hover { opacity: 1; }
.lb-arrow--prev { left: 8px; }
.lb-arrow--next { right: 8px; }

@media (pointer: coarse) {
  .lb-arrow { display: none; }
}

/* Tutorial tap-zone hint */
.lb-tutorial {
  position: absolute;
  inset: 0;
  display: flex;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 15;
}

.lb-tutorial.visible { opacity: 1; }

.lb-tut-left {
  width: 30%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.lb-tut-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.placeholder-msg {
  padding: 80px 0;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Overlay end buttons ─────────────────────────────────── */
.overlay-end {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 40px 48px 64px;
}

.overlay-end-btn {
  padding: 11px 28px;
  font-family: 'Work Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
  transition: opacity 0.2s;
}

.overlay-end-btn:hover { opacity: 0.75; }

.overlay-end-btn {
  background: var(--red);
  color: white;
  border: none;
}

.overlay-end-btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(0, 0, 0, 0.18);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 860px) {
  :root { --pad: 24px; }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .behance-card {
    grid-column: 1 / -1;
    aspect-ratio: 4 / 1;
  }

  .overlay {
    left: 0;
  }

  .overlay-meta {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px 22px 22px;
    margin: 20px 28px 0;
  }

  .overlay-close { top: 20px; right: 28px; }

  .overlay-rule { display: none; }

  .overlay-images { padding: 0 28px 48px; }

  .footer-cols { grid-template-columns: 1fr; }
}

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

  .behance-card {
    grid-column: auto;
    aspect-ratio: 2 / 1;
  }

  .wordmark { font-size: clamp(52px, 20vw, 100px); }
}
