/* ── Fonts ──────────────────────────────────── */
@font-face {
  font-family: 'PP Kyoto';
  src: url('fonts/PPKyoto-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'PP Kyoto';
  src: url('fonts/PPKyoto-MediumItalic.otf') format('opentype');
  font-weight: 500;
  font-style: italic;
}
@font-face {
  font-family: 'PP Mori';
  src: url('fonts/PPMori-Extralight.otf') format('opentype');
  font-weight: 200;
  font-style: normal;
}
@font-face {
  font-family: 'PP Mori';
  src: url('fonts/PPMori-ExtralightItalic.otf') format('opentype');
  font-weight: 200;
  font-style: italic;
}
@font-face {
  font-family: 'PP Mori';
  src: url('fonts/PPMori-Regular.otf') format('opentype');
  font-weight: 400;
}
@font-face {
  font-family: 'PP Mori';
  src: url('fonts/PPMori-SemiBold.otf') format('opentype');
  font-weight: 600;
}

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

/* ── Tokens ─────────────────────────────────── */
:root {
  --red:    #ad2c1c;
  --blue:   #1d5091;
  --green:  #1d6f31;
  --orange: #d35b2c;
  --bg: #151515;
  --fg: #F1F1F1;
  --project-color: #ad2c1c;
}

/* ── Base ───────────────────────────────────── */
html {
  overflow-y: scroll;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'PP Mori', sans-serif;
}


.page {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* ── Fade-in animation ──────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s cubic-bezier(.12, .23, .5, 1),
              transform 1s cubic-bezier(.12, .23, .5, 1);
}

.fade-in.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Section header (pill + line) ───────────── */
.section-header {
  display: flex;
  align-items: center;
  padding-inline: 20px;
  padding-block: clamp(24px, 4vw, 40px); 
}

.section-header__label {
  font-size: 24px;
  font-weight: 600;
  border: 1.5px solid var(--fg);
  border-radius: 999px;
  padding: 14px 22px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}

.section-header__line {
  flex: 1;
  height: 1px;
  background: #999999;
  margin-left: 6px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.25s cubic-bezier(0, 0, 0.15, 1);
}

.section-header.animate-in .section-header__line {
  transform: scaleX(1);
}

.section-header.fade-in {
  opacity: 1;
  transform: none;
}

/* ── Index: Header ──────────────────────────── */
.header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0 20px;
  min-height: clamp(200px, 50vh, 420px);
}

.header__headline {
  font-family: 'PP Mori', sans-serif;
  font-size: clamp(42px, 7vw, 120px);
  font-weight: 600;
  line-height: 0.80;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.hl-c1 { color: #F0C020; }
.hl-c2 { color: #E07820; }
.hl-c3 { color: #CC2820; }
.hl-c4 { color: #1E6828; }

@media (max-width: 1024px) {
  .header__headline { font-size: clamp(42px, 10vw, 120px); }
}

@media (max-width: 768px) {
  .header { min-height: unset; }
  .header__headline { font-size: clamp(28px, 10vw, 48px); }

  .featured-projects { padding-bottom: 0; }
  .featured-grid { gap: 8px; padding: 0; }
  .feature-card { gap: 8px; }
  .feature-desc span:not(.feature-desc__title) { display: none; }
}

/* ── Index: Featured Projects ───────────────── */
.featured-projects {
  padding-bottom: 0;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 0.58vw, 10px);
  padding: 0 clamp(10px, 1.16vw, 20px);
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  min-width: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s cubic-bezier(.12, .23, .5, 1),
              transform 1s cubic-bezier(.12, .23, .5, 1);
}

.feature-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.feature-image {
  /*Define gap here*/
  --frame-gap: clamp(10px, 4vw, 40px);
  --inner-radius: 12px;
  
  position: relative;
  width: 100%;
  aspect-ratio: 690 / 600;
  border-radius: 16px;
  overflow: hidden;
  transition: opacity 0.2s;
}

.feature-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.5;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1;
}

.feature-image__video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - (var(--frame-gap) * 2));
  height: calc(100% - (var(--frame-gap) * 2));
  object-fit: cover;
  border-radius: var(--inner-radius);
  z-index: 2;
}

.feature-card:nth-child(1) .feature-image { background: linear-gradient(135deg, #E04EA0 -30%, #3850E0 130%); }
.feature-card:nth-child(2) .feature-image { background: linear-gradient(120deg, #C07FE0 -30%, #1A9040 130%); }
.feature-card:nth-child(3) .feature-image { background: linear-gradient(160deg, #F0B020 -30%, #E82020 130%); }
.feature-card:nth-child(4) .feature-image { background: linear-gradient(145deg, #E87020 -30%, #6040C8 130%); }

.feature-card:hover .feature-image {
  opacity: 0.85;
}

.feature-desc {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 16px;
  line-height: 1;
  padding: clamp(14px, 0.93vw, 16px) 0;
}

.feature-desc__title {
  font-weight: 600;
}

.feature-desc span:not(.feature-desc__title) {
  color: #999999;
}

/* ── Index: Additional Creative ─────────────── */
.additional-creative {
  padding: 0 0 20px;
}

.filter-row {
  display: flex;
  gap: 8px;
  padding: 0 20px 40px;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: 'PP Mori', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  background: transparent;
  border: 1.5px solid var(--fg);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  transition: background 0.3s cubic-bezier(.12, .23, .5, 1),
              color 0.3s cubic-bezier(.12, .23, .5, 1);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--fg);
  color: var(--bg);
}

/* ── Index: Project list ────────────────────── */
.projects {
  padding: 0 20px;
  margin-bottom: 80px;
  min-height: 40vh;
}

.project-item {
  display: block;
  text-decoration: none;
  color: inherit;
  font-family: 'PP Kyoto', sans-serif;
  font-size: clamp(22px, 3.33vw, 30px);
  font-weight: 500;
  line-height: 2;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s cubic-bezier(.12, .23, .5, 1),
              transform 1s cubic-bezier(.12, .23, .5, 1);
  /* Added for image positioning */
  position: relative;
  z-index: 1;
}

.project-item::before,
.project-item:last-child::after {
  content: '';
  display: block;
  height: 1px;
  background: #999999;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.25s cubic-bezier(0, 0, 0.15, 1);
}

.project-item.animate-in::before,
.project-item:last-child.animate-in::after {
  transform: scaleX(1);
}

.project-item.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.project-item span {
  transition: opacity 0.5s ease, filter 0.5s ease, color 0.6s cubic-bezier(0, 0, 0.15, 1);
}

.project-item.dim span {
  color: #333;
}

.project-item.filtered-out {
  display: none;
}

/* ── New Reveal Image Logic ── */

.project-reveal-img {
  position: absolute;
  right: 12%; 
  bottom: 0%;
  width: clamp(200px, 22vw, 340px);
  height: auto;
  pointer-events: none; 
  z-index: 100;
  
  /* Initial State (Mouse Off) */
  opacity: 0;
  transform: translateY(100px);
  transform-origin: bottom center;
  
  /* Fast Exit: 0.15s */
  transition: opacity 0.4s cubic-bezier(.12, .23, .5, 1), transform 0.4s cubic-bezier(.12, .23, .5, 1);
}

.project-item:hover .project-reveal-img {
  /* Hover State (Mouse Over) */
  opacity: 1;
  transform: translateY(0) scale(1);
  
  /* Smooth Reveal: 0.35s */
  /* transition: opacity .5s cubic-bezier(.12, .23, .5, 1), transform .5s cubic-bezier(.12, .23, .5, 1); */
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);

}

/* Performance/Cleanliness: Hide on mobile */
@media (max-width: 768px) {
  .project-reveal-img {
    display: none;
  }
}

/* ── Project: Intro ─────────────────────────── */
.intro {
  padding: 20px;
}

.intro__title {
  font-family: 'PP Kyoto', sans-serif;
  font-size: clamp(42px, 6.67vw, 96px);
  font-weight: 700;
  line-height: 0.88;
  max-width: 800px;
  text-transform: capitalize;
  margin-bottom: clamp(12px, 2vw, 20px); 
}

.intro__deliverable {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: clamp(24px, 4vw, 40px); 
}

.intro__csl {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: clamp(20px, 3vw, 40px); 
}

.intro__csl-item {
  border-top: 1px solid #999999;
  padding-top: 16px;
  margin-bottom: clamp(24px, 4vw, 40px);
}

.intro__csl-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.intro__csl-body {
  font-size: 16px;
  line-height: 1.4;
}

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

/* ── Project: Image grids ───────────────────── */
.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 10px 20px;
}

.image-grid-1 { grid-template-columns: 1fr; }
.image-grid-2 { grid-template-columns: repeat(2, 1fr); }
.image-grid-3 { grid-template-columns: repeat(3, 1fr); }
.image-grid-4 { grid-template-columns: repeat(4, 1fr); }
.image-grid-5 { grid-template-columns: repeat(5, 1fr); }

.image-thumb {
  background: var(--project-color);
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

img.image-thumb {
  aspect-ratio: auto;
  height: auto;
}

.image-grid--capped {
  grid-template-columns: repeat(var(--image-columns, 2), auto);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.image-grid--capped img.image-thumb {
  width: auto;
  height: auto;
  max-height: var(--image-max-height);
}

@media (max-width: 768px) {
  .image-grid--capped {
    grid-template-columns: repeat(2, 1fr);
    justify-items: stretch;
  }
  .image-grid--capped img.image-thumb {
    width: 100%;
    max-height: none;
  }
}

/* ── Project: Video ─────────────────────────── */
#movie-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  justify-items: center;
}

.video-embed {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ── Project: Image note ────────────────────── */
.image-note {
  font-size: 16px;
  color: #999999;
  line-height: 1.4;
  padding-inline: 20px; 
  /* Halved from 24px/4vw/40px to keep it tight and consistent with text */
  padding-block: clamp(12px, 2vw, 20px); 
}

.image-note a {
  color: #999999;
  text-decoration: none;
}

.image-note a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .image-note a {
    text-decoration: underline;
  }
}

/* ── Project: Movie section ─────────────────── */
.movie-section {
  padding: 0 20px;
}

.movie-placeholder {
  background: var(--project-color);
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  width: 100%;
}

.motion-intro {
  font-size: 16px;
  line-height: 1.4;
  padding: 0 20px 40px;
}

.motion-concepts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 20px 20px 40px;
}

.motion-concept__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.motion-concept__body {
  font-size: 16px;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .motion-concepts { grid-template-columns: 1fr; }
}

/* ── Project: Footer ────────────────────────── */
.page-footer {
  display: flex;
  align-items: center;
  padding-inline: 20px;
  padding-top: clamp(24px, 4vw, 50px);
  padding-bottom: clamp(80px, 20vh, 150px);
}

.footer-line {
  flex: 1;
  height: 1px;
  background: #999999;
}

.footer-btn {
  font-size: 24px;
  font-weight: 600;
  border: 1.5px solid var(--fg);
  border-radius: 999px;
  padding: 14px 22px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
  text-decoration: none;
  color: var(--fg);
  background: transparent;
  margin: 0 6px;
  transition: background 0.3s cubic-bezier(.12, .23, .5, 1),
              color 0.3s cubic-bezier(.12, .23, .5, 1);
}

.footer-btn:hover {
  background: var(--fg);
  color: var(--bg);
}

/* ── Project: Sections block system ─────────── */
.section-block-video {
  padding: 20px;
}

.section-block-video .video-embed { border-radius: 12px; overflow: hidden; }

.credits-block {
  padding: 20px;
}

.credits-block .credits-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  color: #333;
  margin-bottom: 12px;
}

.credits-block p:not(.credits-label) {
  font-size: 16px;
  line-height: 1.4;
  color: #999999;
}

.credits-block a {
  color: #999999;
  text-decoration: none;
}

.credits-block a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .credits-block a {
    text-decoration: underline;
  }
}

.section-text a {
  color: #999999;
  text-decoration: none;
}

.section-text a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .section-text a {
    text-decoration: underline;
  }
}

.section-text {
  padding-inline: 20px;
  padding-block: clamp(12px, 2vw, 20px); 
  
  font-size: 16px;
  line-height: 1.4;
  color: #999999;
}

.section-caption {
  padding: 12px 20px 32px;
  font-size: 16px;
  line-height: 1.4;
  color: #999999;
}

.quote-block {
  padding: 40px 20px;
  text-align: center;
}

.quote-block p {
  font-family: 'PP Mori', sans-serif;
  font-weight: 200;
  font-style: italic;
  font-size: clamp(24px, 3vw, 48px);
  line-height: 1.05;
  max-width: 760px;
  margin: 0 auto;
}

/* ── Project nav arrows ─────────────────────── */
.project-nav-btn {
  position: fixed;
  top: 50%;
  width: 65px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  z-index: 100;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 0;
}

.project-nav-btn img {
  width: 65px;
  height: 65px;
  filter: invert(1);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-nav-btn--prev img {
  transform: scaleX(-1);
}

.project-nav-btn--prev:hover img {
  transform: scaleX(-1) translateX(-10px);
}

.project-nav-btn--next:hover img {
  transform: translateX(10px);
}

.project-nav-btn--prev { left: max(16px, calc(50% - 792px)); }
.project-nav-btn--next { right: max(16px, calc(50% - 792px)); }

@media (max-width: 768px) {
  .site-bar {
    gap: 12px;
  }

  .site-bar__email {
    width: 30px;
    height: 30px;
  }

  .site-bar__email img {
    width: 30px;
    height: 30px;
  }

  .project-nav-btn {
    top: auto !important;
    bottom: 24px;
    transform: none !important;
    width: 45px;
    height: 45px;
  }

  .project-nav-btn img {
    width: 45px;
    height: 45px;
  }

  .project-nav-btn--prev { left: calc(50% - 55px); }
  .project-nav-btn--next { left: calc(50% + 5px); right: auto; }
  .image-grid { gap: 10px; }
}

/* ── Lightbox ───────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21, 21, 21, 0);
  pointer-events: none;
  transition: background 0.3s cubic-bezier(.12, .23, .5, 1);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox-overlay.open {
  background: rgba(21, 21, 21, 0.9);
  pointer-events: all;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  transform: scale(0.94);
  transition: transform 0.3s cubic-bezier(.12, .23, .5, 1);
  opacity: 0;
  pointer-events: none;
}

.lightbox-overlay.open img {
  opacity: 1;
}

.lightbox-overlay.open img {
  opacity: 1;
  transform: scale(1);
}

.lightbox-close {
  position: fixed;
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.lightbox-overlay.open .lightbox-close {
  opacity: 0.7;
  pointer-events: all;
}

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

.lightbox-close svg {
  width: 28px;
  height: 28px;
}

/* ── Email icon bars ────────────────────────── */
.site-bar {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px;
}

.site-bar__email {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  text-decoration: none;
  position: relative;
}

.site-bar__email img {
  width: 50px;
  height: 50px;
  position: absolute;
  transition: opacity 0.3s cubic-bezier(.12, .23, .5, 1);
}

.site-bar__email .email-default {
  filter: invert(1);
}

.site-bar__email .email-default {
  opacity: 1;
}

.site-bar__email .email-hover {
  opacity: 0;
}

.site-bar__email:hover .email-default {
  opacity: 0;
}

.site-bar__email:hover .email-hover {
  opacity: 1;
}

.site-bar__email {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

/* ── Contact Modal ──────────────────────────── */
.contact-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(.12, .23, .5, 1);
}

.contact-modal.active {
  opacity: 1;
  pointer-events: all;
}

.contact-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(21, 21, 21, 0.9);
}

.contact-modal__content {
  position: relative;
  z-index: 1001;
  background: rgba(21, 21, 21, 0.9);
  border: 1px solid var(--fg);
  border-radius: 12px;
  padding: 40px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.94);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(.12, .23, .5, 1), opacity 0.3s cubic-bezier(.12, .23, .5, 1);
}

.contact-modal.active .contact-modal__content {
  transform: scale(1);
  opacity: 1;
}

.contact-modal__title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 30px;
  line-height: 1.2;
}

.contact-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--fg);
  font-size: 28px;
  cursor: pointer;
  transition: opacity 0.3s cubic-bezier(.12, .23, .5, 1);
}

.contact-modal__close:hover {
  opacity: 0.6;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group input,
.form-group textarea {
  background: transparent;
  border: 1px solid #666;
  border-radius: 4px;
  padding: 12px 16px;
  color: var(--fg);
  font-family: 'PP Mori', sans-serif;
  font-size: 16px;
  transition: border-color 0.3s cubic-bezier(.12, .23, .5, 1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #999;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--fg);
}

.contact-form__submit {
  background: var(--fg);
  color: var(--bg);
  border: 1.5px solid var(--fg);
  border-radius: 999px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s cubic-bezier(.12, .23, .5, 1),
              color 0.3s cubic-bezier(.12, .23, .5, 1);
  font-family: 'PP Mori', sans-serif;
}

.contact-form__submit:hover {
  background: transparent;
  color: var(--fg);
}

.contact-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-form__status {
  font-size: 14px;
  text-align: center;
  min-height: 20px;
  color: #999;
}

.contact-form__status.success {
  color: #4ade80;
}

.contact-form__status.error {
  color: #f87171;
}
