/* ── Fonts ─────────────────────────────────────────────── */
@font-face {
  font-family: 'DiDA RECURAL';
  src: url('../fonts/DiDaRecural.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GT Haptik';
  src: url('../fonts/GTHaptik-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GT Haptik';
  src: url('../fonts/GTHaptik-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── Custom properties ─────────────────────────────────── */
:root {
  --yellow:   #FFF1B4;
  --sage:     #ECEBDC;
  --cyan:     #B7E0ED;
  --bordeaux: #82152E;
  --white:    #ffffff;
  --font-display: 'DiDA RECURAL', serif;
  --font-ui:      'GT Haptik', sans-serif;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; cursor: none; }
body {
  background-color: var(--sage);
  color: var(--bordeaux);
  font-family: var(--font-ui);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
ul { list-style: none; }
button { cursor: none; }

/* ── Typography ────────────────────────────────────────── */
h1 {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.9;
}
h2 { font-family: var(--font-ui); font-weight: 700; font-size: clamp(20px, 3vw, 36px); }
h3 { font-family: var(--font-ui); font-weight: 700; font-size: clamp(16px, 2vw, 24px); }
p  { font-family: var(--font-ui); font-weight: 400; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.6; }
.label {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Custom cursor ─────────────────────────────────────── */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 16px; height: 16px;
  border: 2px solid var(--bordeaux);
  border-radius: 50%;
  background-color: transparent;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
}
@media (pointer: coarse) {
  .cursor { display: none; }
  html, *, button { cursor: auto; }
}

/* ── Page transition overlay ───────────────────────────── */
.page-transition {
  position: fixed;
  inset: 0;
  background-color: var(--sage);
  z-index: 9998;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
  pointer-events: none;
}
.page-transition.active {
  transform: scaleY(1);
  transform-origin: top;
  pointer-events: all;
}

/* ── Navigation ────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background-color: transparent;
  transition: background-color 0.3s ease;
}
.nav.scrolled { background-color: var(--sage); }

.nav__logo img {
  width: 48px; height: 48px;
  transition: transform 0.6s ease;
}
.nav__logo:hover img { transform: rotate(360deg); }

.nav__links { display: flex; gap: 32px; }

.nav__link {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--bordeaux);
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background-color: var(--bordeaux);
  transition: width 0.3s ease;
}
.nav__link:hover::after,
.nav__link.active::after { width: 100%; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  padding: 4px;
  z-index: 101;
}
.nav__hamburger span {
  display: block;
  width: 24px; height: 2px;
  background-color: var(--bordeaux);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav__hamburger.open span:first-child { transform: rotate(45deg) translate(4px, 4px); }
.nav__hamburger.open span:last-child  { transform: rotate(-45deg) translate(4px, -4px); }

.nav__links.open {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0;
  background-color: var(--bordeaux);
  justify-content: center;
  align-items: center;
  gap: 40px;
  z-index: 99;
}
.nav__links.open .nav__link {
  font-family: var(--font-display);
  font-size: clamp(40px, 10vw, 72px);
  color: var(--white);
  letter-spacing: 0;
}
.nav__links.open .nav__link::after { background-color: var(--white); }

/* ── Feed (homepage) ───────────────────────────────────── */
.feed {
  padding-top: 120px;
  padding-bottom: 120px;
}
.feed__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 10%;
  margin-bottom: 80px;
}
.feed__title {
  font-family: var(--font-display);
  font-size: clamp(64px, 12vw, 160px);
  color: var(--bordeaux);
}

/* Filter pills */
.feed__filters { display: flex; gap: 12px; align-items: center; }
.filter-btn {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 8px 20px;
  border: 1.5px solid var(--bordeaux);
  border-radius: 999px;
  background-color: transparent;
  color: var(--bordeaux);
  transition: background-color 0.2s, color 0.2s;
}
.filter-btn.active,
.filter-btn:hover {
  background-color: var(--bordeaux);
  color: var(--white);
}

/* Project cards */
.feed__list { display: flex; flex-direction: column; gap: 100px; }

.project-card {
  width: 80%;
  position: relative;
  opacity: 0;
  transform: translateY(40px);
}
.project-card:nth-child(odd)  { margin-left: 10%; }
.project-card:nth-child(even) { margin-left: auto; margin-right: 10%; }

.project-card__link {
  display: flex;
  align-items: center;
  gap: 48px;
  position: relative;
}
.project-card:nth-child(even) .project-card__link { flex-direction: row-reverse; }

.project-card__media { flex: 0 0 55%; overflow: hidden; }
.project-card__media img,
.project-card__media video {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-card__media img,
.project-card:hover .project-card__media video { transform: scale(1.02); }

.project-card__info { flex: 1; display: flex; flex-direction: column; gap: 12px; }

.project-card__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 72px);
  line-height: 0.9;
  color: var(--bordeaux);
}
.project-card__subtitle { font-family: var(--font-ui); font-weight: 700; font-size: 16px; }
.project-card__tags { display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  color: var(--bordeaux);
}
.tag--branding { background-color: var(--yellow); }
.tag--motion   { background-color: var(--cyan); }

.project-card__meta { font-size: 14px; opacity: 0.65; }

/* Hover overlay — covers only the media area */
.project-card__overlay {
  position: absolute;
  top: 0; bottom: 0;
  left: 0; width: 55%;
  background-color: rgba(130, 21, 46, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.project-card:nth-child(even) .project-card__overlay { left: auto; right: 0; }
.project-card:hover .project-card__overlay { opacity: 1; }
.project-card__cta {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--white);
}

/* ── Project page ──────────────────────────────────────── */
.project__hero { height: 100vh; overflow: hidden; }
.project__hero-media { width: 100%; height: 100%; object-fit: cover; }

.project__header {
  background-color: var(--bordeaux);
  padding: 80px 10%;
}
.project__title {
  font-family: var(--font-display);
  font-size: clamp(64px, 10vw, 140px);
  color: var(--white);
  line-height: 0.85;
  clip-path: inset(0 0 0 0);
}
.project__category {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin-top: 24px;
}

.project__body {
  background-color: var(--sage);
  padding: 80px 10%;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
}
.project__meta { display: flex; flex-direction: column; gap: 24px; }
.project__meta-item { display: flex; flex-direction: column; gap: 4px; }
.project__meta-item .label { opacity: 0.5; }
.project__description { display: flex; flex-direction: column; gap: 20px; }

.gallery { padding: 40px 5%; background-color: var(--sage); }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.gallery__item--full { grid-column: 1 / -1; }
.gallery__item img,
.gallery__item video { width: 100%; height: 100%; object-fit: cover; }

.project__nav {
  background-color: var(--yellow);
  padding: 60px 10%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.project__nav-link {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  transition: opacity 0.2s;
}
.project__nav-link:hover { opacity: 0.6; }

/* ── About page ────────────────────────────────────────── */
.about {
  background-color: var(--yellow);
  min-height: 100vh;
  padding-top: 120px;
  padding-bottom: 80px;
}
.about__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10%;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 80px;
  align-items: start;
}
.about__photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  filter: grayscale(100%);
}
.about__content { display: flex; flex-direction: column; gap: 24px; padding-top: 40px; }
.about__name {
  font-family: var(--font-display);
  font-size: clamp(64px, 8vw, 120px);
  color: var(--bordeaux);
  line-height: 0.85;
}
.about__bio { max-width: 480px; }
.about__skills-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  opacity: 0.5;
  margin-bottom: 12px;
}
.about__skills-list { display: flex; flex-direction: column; gap: 8px; }
.about__skills-list li { font-family: var(--font-ui); font-weight: 700; font-size: 16px; }

.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  padding: 16px 32px;
  background-color: var(--bordeaux);
  color: var(--white);
  align-self: flex-start;
  transition: opacity 0.2s;
}
.btn:hover { opacity: 0.8; }

/* ── Contact page ──────────────────────────────────────── */
.contact {
  background-color: var(--sage);
  min-height: 100vh;
  padding-top: 120px;
  padding-bottom: 80px;
}
.contact__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact__title {
  font-family: var(--font-display);
  font-size: clamp(64px, 8vw, 120px);
  color: var(--bordeaux);
  line-height: 0.85;
  margin-bottom: 40px;
}
.contact__email {
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 24px);
  color: var(--bordeaux);
  display: block;
  margin-bottom: 32px;
  border-bottom: 1.5px solid var(--bordeaux);
  padding-bottom: 8px;
  width: fit-content;
}
.contact__socials { display: flex; gap: 20px; }
.contact__social { transition: opacity 0.2s; }
.contact__social:hover { opacity: 0.5; }

.contact__form { display: flex; flex-direction: column; gap: 24px; padding-top: 40px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-input,
.form-textarea {
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--bordeaux);
  background-color: transparent;
  border: none;
  border-bottom: 1.5px solid var(--bordeaux);
  padding: 12px 0;
  outline: none;
  resize: none;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--bordeaux); opacity: 0.4; }

/* ── Layer scroller (homepage) ─────────────────────────── */
.scroller {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: var(--sage);
  overflow: hidden;
  perspective: 2400px;
  perspective-origin: center center;
  user-select: none;
}

.scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.layer {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 210px;
  height: 280px;
  will-change: transform, opacity;
  transform-origin: center center;
  cursor: none;
}

.layer-inner {
  width: 100%;
  height: 100%;
  border-radius: 2px;
  overflow: hidden;
  transform-origin: 50% calc(100% + 40px);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--sage);
  box-shadow: 4px 16px 40px rgba(130, 21, 46, 0.18);
}

.layer-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.scroller__title {
  position: absolute;
  top: 100px;
  left: 8%;
  font-family: var(--font-display);
  font-size: clamp(64px, 12vw, 160px);
  color: var(--bordeaux);
  line-height: 0.9;
  z-index: 10;
  pointer-events: none;
}

.scroller__hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 11px;
  color: var(--bordeaux);
  opacity: 0.45;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { padding: 16px 24px; }
  .nav__links:not(.open) { display: none; }
  .nav__hamburger { display: flex; }

  .feed { padding-top: 100px; }
  .feed__header { flex-direction: column; gap: 24px; padding: 0 24px; margin-bottom: 48px; }
  .feed__list { gap: 64px; }
  .project-card { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
  .project-card__link { flex-direction: column !important; gap: 20px; }
  .project-card__media { flex: none; width: 100%; }
  .project-card__overlay { width: 100%; left: 0 !important; right: 0 !important; }

  .project__body { grid-template-columns: 1fr; gap: 40px; }
  .gallery__grid { grid-template-columns: 1fr; }

  .about__inner { grid-template-columns: 1fr; gap: 40px; }
  .about__photo { max-width: 280px; }

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

  .layer { width: 140px; height: 186px; }
  .scroller__title { top: 80px; left: 24px; }
}
