/* ==================================================================
   VALUNEC — styles.css  (design only — edit content in content.js)
   ================================================================== */

:root {
  --ink: #12110e;
  --panel: #191813;
  --bone: #e7e2d4;
  --muted: #8f8a7b;
  --gold: #c2ac77;
  --hairline: rgba(231, 226, 212, 0.14);
  --display: "Cormorant Garamond", "Times New Roman", serif;
  --utility: "Inter", -apple-system, "Helvetica Neue", sans-serif;
  --max: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--utility);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* ------------------------------------------------------------------
   Header
   ------------------------------------------------------------------ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.6rem;
  background: color-mix(in srgb, var(--ink) 84%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.wordmark {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.4em;
  color: var(--gold);
}

.header-nav { display: flex; gap: 2.4rem; }

.header-nav a {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.35s ease;
}

.header-nav a:hover, .header-nav a:focus-visible { color: var(--bone); }

.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.4rem; }
.menu-toggle span { display: block; width: 24px; height: 1px; background: var(--bone); margin: 6px 0; }

.overlay-menu {
  position: fixed; inset: 0; z-index: 90;
  background: color-mix(in srgb, var(--ink) 96%, black);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.overlay-menu.is-open { opacity: 1; visibility: visible; }
.overlay-menu nav { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.overlay-menu nav a {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
  letter-spacing: 0.14em;
  color: var(--bone);
  transition: color 0.35s ease;
}
.overlay-menu nav a:hover { color: var(--gold); }
.menu-close {
  position: absolute; top: 1.2rem; right: 1.6rem;
  background: none; border: 0; color: var(--bone);
  font-size: 2.2rem; font-weight: 300; cursor: pointer; line-height: 1;
}

/* ------------------------------------------------------------------
   Hero — private viewing room
   ------------------------------------------------------------------ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6.2rem 1.5rem 3rem;
}

.hero-room {
  position: relative;
  width: min(100%, 1060px);
  height: min(74svh, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-still,
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;      /* the artwork is never cropped */
  object-position: center;
}

.hero-video { opacity: 0; transition: opacity 1.8s ease; }
.hero-video.is-playing { opacity: 1; }

/* Elegant dark placeholder if hero files are missing */
.hero-ph {
  display: none;
  width: min(100%, 760px);
  height: 100%;
  border: 1px solid var(--hairline);
  background:
    repeating-radial-gradient(
      circle at 50% 46%,
      rgba(231,226,212,0.04) 0px,
      rgba(231,226,212,0.04) 1px,
      transparent 1px,
      transparent 9px
    ),
    var(--panel);
}

.hero-room.is-empty .hero-still,
.hero-room.is-empty .hero-video { display: none; }
.hero-room.is-empty .hero-ph { display: block; }

.hero-line {
  margin-top: 2.2rem;
  font-family: var(--display);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 400;
  color: var(--muted);
  text-align: center;
  max-width: 38em;
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------ */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 6.5rem 1.5rem 3rem;
}

.section-rule { border-top: 1px solid var(--hairline); margin-top: 4rem; }

.section-title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.26em;
  margin-right: -0.26em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 3.2rem;
}

.section-title-sm {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  margin-bottom: 2.4rem;
}

/* ------------------------------------------------------------------
   Square work cards — 3 / 2 / 1 columns
   ------------------------------------------------------------------ */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 1024px) { .works-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .works-grid { grid-template-columns: 1fr; } }

.work {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  display: block;
  width: 100%;
}

.work.is-hidden { display: none; }

.work-media {
  position: relative;
  aspect-ratio: 1 / 1;      /* every thumbnail identical */
  overflow: hidden;
  background: var(--panel);
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;        /* square crop in grids only */
  filter: saturate(0.96);
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.work:hover .work-media img { transform: scale(1.025); }

.work-media img.is-missing { display: none; }

.work-ph {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--hairline);
  background:
    repeating-radial-gradient(
      circle at 50% 44%,
      rgba(231,226,212,0.045) 0px,
      rgba(231,226,212,0.045) 1px,
      transparent 1px,
      transparent 8px
    ),
    var(--panel);
}

.work-media.is-empty .work-ph { display: flex; }

.work-ph span {
  font-family: var(--display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--muted);
}

.work-tag {
  position: absolute;
  left: 0.9rem;
  bottom: 0.8rem;
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bone);
  background: rgba(18,17,14,0.6);
  padding: 0.35rem 0.7rem;
  backdrop-filter: blur(6px);
}

.work-caption { margin-top: 0.9rem; min-height: 3.2rem; }

.work-title {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.work-meta {
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* ------------------------------------------------------------------
   Projects — two-level archive: year → project → works
   ------------------------------------------------------------------ */
.year-archive { border-top: 1px solid var(--hairline); }

.year-row { border-bottom: 1px solid var(--hairline); }

.year-head {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.6rem 0.2rem;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.year-head:hover .year-num { color: var(--gold); }

.year-num {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  transition: color 0.35s ease;
}

.year-count {
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.year-body { display: none; padding: 0 0 2rem; }
.year-row.is-open .year-body { display: block; }
.year-row.is-open .year-num { color: var(--gold); }

/* Project rows inside a year */
.project-row { border-top: 1px solid var(--hairline); margin: 0 0 0 0.2rem; }

.project-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.15rem 0.1rem;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.project-name {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  transition: color 0.35s ease;
}

.project-head:hover .project-name { color: var(--gold); }

.project-mark {
  font-family: var(--display);
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.35s ease;
}

.project-row.is-open .project-mark { transform: rotate(45deg); }
.project-row.is-open .project-name { color: var(--gold); }

.project-body { display: none; padding: 0.2rem 0.1rem 2.6rem; }
.project-row.is-open .project-body { display: block; }

.project-text {
  color: var(--muted);
  font-size: 0.93rem;
  max-width: 46em;
}

.project-note {
  font-family: var(--display);
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  margin-top: 1.6rem;
}

@media (max-width: 1024px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .project-grid { grid-template-columns: repeat(2, 1fr); gap: 0.9rem; } }

/* ------------------------------------------------------------------
   About
   ------------------------------------------------------------------ */
.prose {
  max-width: 46em;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.97rem;
}

.prose p + p { margin-top: 1.3rem; }

/* ------------------------------------------------------------------
   Contact
   ------------------------------------------------------------------ */
.contact-form {
  max-width: 34em;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.field { display: flex; flex-direction: column; gap: 0.5rem; }

.field span {
  font-size: 0.64rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--bone);
  font-family: var(--utility);
  font-weight: 300;
  font-size: 0.98rem;
  padding: 0.5rem 0.1rem;
  border-radius: 0;
  transition: border-color 0.35s ease;
}

.field textarea { resize: vertical; line-height: 1.6; }

.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--gold); }

.btn-submit {
  align-self: center;
  margin-top: 0.6rem;
  background: none;
  border: 1px solid var(--hairline);
  color: var(--bone);
  font-family: var(--utility);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 0.85rem 2.6rem;
  cursor: pointer;
  transition: border-color 0.4s ease, color 0.4s ease;
}

.btn-submit:hover, .btn-submit:focus-visible { border-color: var(--gold); color: var(--gold); }

.form-note {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.contact-under {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.contact-email-line { font-size: 0.82rem; letter-spacing: 0.08em; color: var(--muted); }
.contact-email-line a { color: var(--bone); transition: color 0.35s ease; }
.contact-email-line a:hover { color: var(--gold); }

.ig-link { color: var(--muted); transition: color 0.35s ease; display: inline-flex; }
.ig-link:hover, .ig-link:focus-visible { color: var(--gold); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 5rem;
  padding: 2.2rem 1.5rem 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------
   Lightbox — real aspect ratio, no crop
   ------------------------------------------------------------------ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 9, 7, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lightbox.is-open { opacity: 1; visibility: visible; }

.lb-figure {
  max-width: min(94vw, 1200px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lb-media { display: flex; align-items: center; justify-content: center; }

.lb-media img,
.lb-media video {
  max-width: min(92vw, 1150px);
  max-height: 74svh;
  width: auto;
  height: auto;
  object-fit: contain;   /* square stays square, vertical vertical … */
}

.lb-media.aspect-video-16-9 video,
.lb-media.aspect-video-16-9 img {
  aspect-ratio: 16 / 9;
  width: min(92vw, calc(74svh * 16 / 9));
  max-height: none;
}

.lb-media .lb-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  background:
    repeating-radial-gradient(
      circle at 50% 44%,
      rgba(231,226,212,0.045) 0px,
      rgba(231,226,212,0.045) 1px,
      transparent 1px,
      transparent 8px
    ),
    var(--panel);
  font-family: var(--display);
  font-style: italic;
  color: var(--muted);
  font-size: 1.2rem;
  text-align: center;
  padding: 1.5rem;
  width: min(84vw, 520px);
  aspect-ratio: 1 / 1;
}

.lb-ph.aspect-vertical   { aspect-ratio: 4 / 5; }
.lb-ph.aspect-horizontal { aspect-ratio: 5 / 4; width: min(88vw, 680px); }
.lb-ph.aspect-video-16-9 { aspect-ratio: 16 / 9; width: min(88vw, 760px); }

.lb-caption { margin-top: 1.3rem; text-align: center; color: var(--bone); }
.lb-caption .t { font-family: var(--display); font-size: 1.25rem; letter-spacing: 0.05em; display: block; }
.lb-caption .s {
  font-size: 0.64rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--muted); display: block; margin-top: 0.45rem;
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--display);
  line-height: 1;
  transition: color 0.3s ease;
  z-index: 2;
}

.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: var(--gold); }

.lb-close { top: 1.1rem; right: 1.4rem; font-size: 1.9rem; font-weight: 300; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 2.6rem; padding: 1rem; }
.lb-prev { left: 0.4rem; }
.lb-next { right: 0.4rem; }

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 760px) {
  .header-nav { display: none; }
  .menu-toggle { display: block; }
  .site-header { padding: 0.9rem 1.1rem; }
  .hero { padding-top: 5rem; }
  .hero-room { height: min(62svh, 640px); }
  .section { padding-top: 5rem; }
  .year-head { padding: 1.2rem 0.1rem; }
  .lb-prev, .lb-next { font-size: 2.1rem; padding: 0.6rem; }
}

:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }
