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

/* ── TOKENS ── */
:root {
  --bg: #EDEAE4;
  --ink: #1A1A18;
  --ink-mid: #5A5A54;
  --ink-light: #9A9A90;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --max: 860px;
  --pad: 48px;
}

/* ── BASE ── */
html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── LAYOUT ── */
.site-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ── HEADER ── */
header {
  padding: 56px 0 0;
  text-align: center;
}

.site-name {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
}

.name-rule {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--ink);
  margin: 12px auto 0;
}

/* ── SECTION LABELS ── */
.section-label {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 16px;
}

.section-rule {
  border: none;
  border-top: 1px solid var(--ink-light);
  margin-bottom: 40px;
  opacity: 0.4;
}

/* ── TILES ── */
.tile-wrap {
  display: block;
  text-decoration: none;
  color: var(--ink);
}

.tile-title {
  font-family: var(--sans);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
  line-height: 1.3;
}

.tile {
  display: block;
  position: relative;
  overflow: hidden;
  background: #2A2A26;
  aspect-ratio: 2 / 1;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.35s ease, transform 0.45s ease;
}

.tile-hover-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--sans);
  font-size: clamp(1.53rem, 5vw, 1.53rem);
  font-weight: 400;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.case-img-link .tile-hover-text {
  font-size: 1.25rem;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.tile.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile.placeholder .tile-placeholder-text {
  font-family: var(--serif);
  font-size: 1rem;
  color: rgba(255,255,255,0.18);
  font-style: italic;
  text-align: center;
  padding: 16px;
}

/* ── HOVER EFFECTS (pointer devices only) ── */
@media (hover: hover) {
  .site-name:hover { opacity: 0.6; }

  .tile-wrap:hover .tile img {
    opacity: 0.55;
    transform: scale(1.03);
  }

  .tile-wrap:hover .tile-hover-text {
    opacity: 1;
  }

  .case-img-link:hover img {
    opacity: 0.55;
    transform: scale(1.03);
  }

  .case-img-link:hover .tile-hover-text {
    opacity: 1;
  }

  .case-img-link:hover .play-button {
    background: rgba(20, 20, 18, 0.85);
  }

  .footer-icon:hover { opacity: 0.5; }
  footer:hover { opacity: 1; }
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--ink-light);
  padding: 28px 0 40px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.footer-icon {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--ink);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

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


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

.hero {
  padding: 24px 0 72px;
  text-align: center;
  animation: fadeUp 0.6s ease both;
}

.hero-headline {
  font-family: var(--sans);
  font-size: clamp(1.53rem, 5vw, 1.53em);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
  max-width: 640px;
  margin: 0 auto;
}

.hero-headline em {
  font-style: italic;
  color: var(--ink-mid);
}

@media (max-width: 600px) {
  .hero-headline { font-size: 1.0rem; }
}

/* Work grid */
.work-section {
  padding-bottom: 80px;
  animation: fadeUp 0.6s ease 0.1s both;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

/* About */
.about-section {
  padding-bottom: 96px;
  animation: fadeUp 0.6s ease 0.2s both;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 333px;
  gap: 56px;
  align-items: start;
}

.about-body p {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 1.1em;
}

.about-body p:last-child { margin-bottom: 0; }

.about-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
}

@media (max-width: 600px) {
  .about-inner { grid-template-columns: 1fr; }
  .about-photo { width: 140px; aspect-ratio: 1; border-radius: 50%; }
}


/* ================================================
   CASE STUDY PAGES
   ================================================ */

.case-hero {
  margin: 56px 0 0;
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: #6B3FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeUp 0.6s ease both;
}

.case-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.case-hero-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px;
}

.case-hero-fallback svg {
  width: 200px;
  height: auto;
}

.case-content {
  padding: 64px 0 80px;
  animation: fadeUp 0.6s ease 0.1s both;
}

.case-intro {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.case-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
  text-align: right;
  margin-top: -0.15rem;
}

.case-body p {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 350;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 1.1em;
}

.case-body p:last-child { margin-bottom: 0; }

.case-img-full {
  width: 100%;
  display: block;
  margin-bottom: 16px;
}

.case-img-full img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.case-img-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.case-img-pair img {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.case-img-link {
  display: block;
  overflow: hidden;
  background: #2A2A26;
  position: relative;
}

.case-img-link img {
  display: block;
  width: 100%;
  transition: opacity 0.35s ease, transform 0.45s ease;
}

.more-section {
  padding-bottom: 80px;
  animation: fadeUp 0.6s ease 0.2s both;
}

.more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 16px;
}

@media (max-width: 600px) {
  .case-intro { grid-template-columns: 1fr; gap: 24px; }
  .more-grid { grid-template-columns: 1fr; }
  .case-title { text-align: center; }
}

/* ── PLAY BUTTON ── */
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(20, 20, 18, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  pointer-events: none;
}

.play-button svg {
  width: 24px;
  height: 24px;
  margin-left: 3px;
}

.video-trigger {
  cursor: pointer;
}

.video-trigger * {
  pointer-events: none;
}

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.lightbox-inner {
  position: relative;
  width: 90vw;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  z-index: 1;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

@media (hover: hover) {
  .lightbox-close:hover { opacity: 1; }
}

#lightbox-iframe {
  width: 100%;
  height: 100%;
}
