/* ==========================================================================
   Luka Negoita — site styles
   Black and white palette, Public Sans (text) and Allerta (logo).
   ========================================================================== */

:root {
  --black: #000;
  --white: #fff;
  --accent: hsl(0, 0%, 85%);        /* light gray buttons on black */
  --dark-accent: hsl(0, 0%, 47%);   /* muted text */
  --light-accent: hsl(0, 0%, 96%);  /* light gray header on scroll */

  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-logo: "Allerta", var(--font-body);

  --gutter: 4vw;
  --gap: 2vw;
  --section-pad: clamp(2.5rem, 3.2vw, 4rem);

  --fs-display: clamp(2.6rem, 4.7vw, 5.2rem);
  --fs-display-xl: clamp(3.2rem, 6.6vw, 7.5rem);
  --fs-h3: clamp(1.6rem, 2.32vw, 2.6rem);
  --fs-statement: clamp(1.2rem, 1.75vw, 1.9rem);
  --fs-body: clamp(1.05rem, 1.36vw, 1.4rem);
  --fs-small: 0.85rem;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.04em;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
picture > source { display: none; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.05em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--black);
  color: var(--white);
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.icon { width: 1.4rem; height: 1.4rem; display: block; }

/* ---------- Type helpers ---------- */

.display {
  font-size: var(--fs-display);
  line-height: 0.97;
}
.display--xl { font-size: var(--fs-display-xl); }

h3 {
  font-size: var(--fs-h3);
  line-height: 1.06;
  margin-bottom: 0.3em;
}

.statement {
  font-size: var(--fs-statement);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.plain-link { text-decoration: none; }
@media (hover: hover) {
  .plain-link:hover { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
}

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  margin-top: 2.2em;
  padding: 1.2em 2em;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  background: var(--black);
  color: var(--white);
  transition: opacity 0.15s ease;
}
.button:hover { opacity: 0.8; }
.button--light { background: var(--accent); color: var(--black); }

/* ---------- Layout ---------- */

.container { padding-inline: var(--gutter); }
.container--narrow { max-width: 52rem; margin-inline: auto; }

.section { padding-block: var(--section-pad); }
.section--tall { padding-block: calc(var(--section-pad) * 2); }
.section--page-top { padding-top: clamp(1.5rem, 3vw, 3rem); }
.section--flush-top { padding-top: 0; }

.section--black { background: var(--black); color: var(--white); }
.section--white { background: var(--white); color: var(--black); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  color: var(--black);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--gutter);
}

.site-header__logo {
  font-family: var(--font-logo);
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  letter-spacing: 0.03em;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 2.6vw, 2.8rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__list a {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  text-decoration: none;
}
.site-nav__list a:hover,
.site-nav__list a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.site-nav__toggle { display: none; }

/* Header on top of a full-screen photo (home page, Windowsill page). */
.site-header--overlay {
  position: fixed;
  left: 0; right: 0;
  background: transparent;
}
.site-header--dark { color: var(--white); }
.site-header--dark.is-scrolled { background: var(--black); }
.site-header--light { color: var(--black); }
.site-header--light.is-scrolled { background: var(--light-accent); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dark layer over the photo, so the white menu and title stay readable.
   The live Squarespace site uses the same 22% black overlay. */
.hero:not(.hero--light)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.hero__text {
  position: relative;
  z-index: 2;
  max-width: 72vw;
  /* The top padding keeps the title below the fixed header. If the title
     needs more room, the hero gets taller. */
  padding: 6rem var(--gutter) 13vh;
  text-align: center;
}

.hero__title {
  font-size: var(--fs-display);
  line-height: 0.97;
  text-shadow: 0 0 2rem rgba(0, 0, 0, 0.35);
}

.hero--light { background: var(--white); color: var(--black); }
.hero__img--contain-right { object-position: 70% center; }
.hero__text--top-left {
  align-self: flex-start;
  margin-right: auto;
  padding: clamp(6rem, 18vh, 10rem) var(--gutter) 0;
  text-align: left;
}

/* ---------- Home: series features ---------- */

.feature {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  align-items: start;
}

.feature--text-left .feature__text { grid-column: 2 / 6; grid-row: 1; }
.feature--text-left .feature__media { grid-column: 7 / 13; grid-row: 1; }
.feature--text-right .feature__media { grid-column: 1 / 7; grid-row: 1; }
.feature--text-right .feature__text { grid-column: 8 / 12; grid-row: 1; }
.feature--align-right .feature__text { text-align: right; }

.feature__text { padding-top: 0.4em; }

/* ---------- Home: about teaser ---------- */

.about-teaser {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  align-items: start;
}
.about-teaser__media { grid-column: 2 / 5; }
.about-teaser__text { grid-column: 6 / 11; }
.about-teaser__text .display { color: var(--accent); margin-bottom: 1.2em; }

/* ---------- Series index ---------- */

.series-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6vw;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.series-grid__item a {
  position: relative;
  display: block;
  text-decoration: none;
  overflow: hidden;
}

.series-grid__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.series-grid__title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-size: var(--fs-h3);
  line-height: 1.06;
  text-align: center;
  color: var(--black);
  background: rgba(255, 255, 255, 0.82);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.series-grid__item a:hover .series-grid__title,
.series-grid__item a:focus-visible .series-grid__title { opacity: 1; }

@media (hover: none) {
  .series-grid__title {
    position: static;
    justify-content: flex-start;
    padding: 0.6rem 0 0;
    background: none;
    opacity: 1;
    font-size: 1.3rem;
  }
}

/* ---------- Series detail ---------- */

.series-title {
  font-size: var(--fs-h3);
  line-height: 1.06;
  margin: 0.5em 0 0.35em;
}

.series-intro { max-width: 46rem; margin-bottom: 2rem; }

.masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 2.3vw;
  align-items: start;
}
.masonry__item { margin: 0 0 2.3vw; }
.masonry__link { display: block; cursor: zoom-in; }

.pager__inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.pager__link {
  font-size: var(--fs-h3);
  font-weight: 700;
  letter-spacing: -0.05em;
  text-decoration: none;
}
.pager__link span { font-size: 1.3em; font-weight: 300; line-height: 0; margin-inline: 0.3em; }
.pager__link:hover { text-decoration: underline; text-decoration-thickness: 0.05em; }

/* Windowsill: two-column rows */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 4.5vw;
  align-items: center;
}
.split__text--center { padding-inline: 3vw; }

.triptych {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7vw;
}
.triptych img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; }

.insect {
  display: grid;
  grid-template-columns: 2fr 5fr;
  column-gap: 0.7vw;
  align-items: start;
}
.insect--title-right { grid-template-columns: 5fr 2fr; column-gap: 4.5vw; }
.insect--title-right .insect__side { align-self: start; }
.insect .display { color: var(--accent); margin-bottom: 0.6em; }
.insect__side img { margin-top: 1vw; }
.insect--title-left .insect__main { padding-top: 0; }

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  align-items: start;
  margin-top: clamp(2rem, 4vw, 4rem);
}
.about__text { grid-column: 1 / 8; }
.about__media { grid-column: 9 / 13; margin: 0; }
.about__media figcaption { margin-top: 0.6rem; font-size: var(--fs-small); letter-spacing: -0.02em; }

.prose p { margin-bottom: 1em; }
.prose a { text-underline-offset: 0.15em; }

/* ---------- Contact ---------- */

.contact {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  align-items: start;
  padding-bottom: 4rem;
}
.contact__intro { grid-column: 1 / 6; }
.contact__intro .display { margin-bottom: 0.35em; }
.contact__form { grid-column: 7 / 12; padding-top: 1rem; }
.contact__pending { color: var(--dark-accent); }

/* Contact form (Netlify Forms), styled like the old Squarespace form:
   labels above, a line under each field, a black SEND button. */
.contact-form { margin: 0; font-size: 1.2rem; }
.contact-form__fields { display: grid; gap: 1.6rem; }
.contact-form__group { display: block; min-width: 0; margin: 0; padding: 0; border: 0; }
.contact-form__label { display: block; padding: 0; margin-bottom: 0.3rem; font-size: 1.25em; font-weight: 400; }
.contact-form__req { margin-left: 0.25em; font-size: 0.95rem; font-weight: 300; color: var(--dark-accent); }
.contact-form__input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0;
  border: 0;
  border-bottom: 1px solid var(--black);
  border-radius: 0;
  background: transparent;
  color: var(--black);
  font: inherit;
  font-size: 1.1em;
  letter-spacing: inherit;
}
.contact-form__input:focus { outline: none; border-bottom-width: 2px; margin-bottom: -1px; }
.contact-form__input:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }
.contact-form__textarea { min-height: 5.5rem; resize: vertical; }
.contact-form__submit {
  justify-self: start;
  padding: 1rem 1.25rem;
  border: 0;
  border-radius: 0;
  background: var(--black);
  color: var(--white);
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  text-transform: uppercase;
  cursor: pointer;
}
.contact-form__submit:hover, .contact-form__submit:focus-visible { background: hsl(0, 0%, 20%); }
.contact-form__submit:disabled { opacity: 0.5; cursor: progress; }
.contact-form__errors { margin: 0 0 1rem; padding: 0; list-style: none; color: #b00020; }
.contact-form__errors:empty { display: none; }
.contact-form__done { margin: 0; padding: 1.5rem 0; font-size: 1.25em; font-weight: 400; }

/* ---------- Exhibits ---------- */

/* Home page band for the next exhibit. A light gray band, so it stands out
   against the dark hero photo. The hero gets shorter, so the band shows on
   the first screen. */
.hero--with-band { min-height: calc(100vh - 8.5rem); min-height: calc(100svh - 8.5rem); }
.exhibit-band { padding-block: 1.4rem; background: var(--accent); color: var(--black); }
.exhibit-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.exhibit-band__text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1.2rem; margin: 0; }
.exhibit-band__label {
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(0, 0%, 30%);
}
.exhibit-band__title { font-size: var(--fs-h3); font-weight: 700; line-height: 1.1; color: var(--black); }
.exhibit-band__meta { flex-basis: 100%; color: hsl(0, 0%, 20%); }
.exhibit-band__button { margin-top: 0; flex-shrink: 0; }

/* Exhibits list. */
.exhibits__heading {
  margin: 2.5rem 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--black);
  font-size: var(--fs-h3);
}
.exhibits__empty { color: var(--dark-accent); }
.exhibit-card .exhibit-card__media img { aspect-ratio: 3 / 4; object-position: top; }
.exhibit-card .post-card__title { margin-bottom: 0.5rem; }
.exhibit-card__place { margin: 0; color: var(--dark-accent); }

/* Exhibit page. */
.exhibit {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: var(--gap);
  align-items: start;
  padding-bottom: 3rem;
}
.exhibit__info { grid-column: 1 / 7; grid-row: 1; }
.exhibit__body { grid-column: 1 / 7; grid-row: 2; }
.exhibit__poster { grid-column: 8 / 13; grid-row: 1 / 3; margin: 0; position: sticky; top: 6rem; }
.exhibit__poster img { width: 100%; height: auto; }
.exhibit__kicker {
  margin: 0 0 0.8rem;
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dark-accent);
}
.exhibit__title { margin: 0; font-size: var(--fs-display); line-height: 0.97; }
.exhibit__subtitle { margin: 0.8rem 0 0; font-size: var(--fs-statement); }
.exhibit__details { margin: 2.2rem 0 0; border-top: 1px solid var(--black); }
.exhibit__details > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--black);
}
.exhibit__details dt { font-weight: 700; }
.exhibit__details dd { margin: 0; }
.exhibit__text { margin-top: 2.5rem; }

/* Work for sale (/works/<slug>/), opened from the QR code on the wall label. */
.work {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  align-items: start;
  padding-bottom: 3rem;
}
.work__media { grid-column: 1 / 8; margin: 0; }
.work__media img { width: 100%; height: auto; }
.work__info { grid-column: 9 / 13; position: sticky; top: 6rem; }
.work__title { margin: 0; font-size: var(--fs-h3); line-height: 1.05; }
.work__title::after { content: ""; display: block; width: 3rem; height: 3px; margin-top: 1rem; background: var(--black); }
.work__lines { margin: 1.2rem 0 0; line-height: 1.45; }
.work__price { margin: 1rem 0 0; font-size: var(--fs-h3); font-weight: 700; }
.work__forsale { margin: 0.4rem 0 0; }
.work__price--sold { color: var(--dark-accent); }
.work-card__sold { color: var(--black); font-weight: 700; }
.work__caption { margin: 1rem 0 0; font-style: italic; color: hsl(0, 0%, 25%); }
.work__stock { margin: 1.4rem 0 0; font-weight: 700; }
.work__stock--sold { color: var(--dark-accent); }
.work__buy { margin-top: 1.2rem; }
.work__soon { margin: 1.4rem 0 0; }
.work__note { margin: 1.4rem 0 0; font-size: 0.95rem; line-height: 1.4; color: var(--dark-accent); }
.work-card__meta { margin: 0; color: var(--dark-accent); font-size: var(--fs-small); }
.works-grid .post-card__title { margin-bottom: 0.4rem; }

/* ---------- Blog ---------- */

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 2vw;
  margin: 1rem 0 3rem;
  padding: 0;
  list-style: none;
}

.post-card { text-align: center; }
.post-card__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.post-card__date {
  display: block;
  margin-top: 1.4rem;
  font-size: var(--fs-small);
  color: var(--dark-accent);
}
.post-card__title { margin: 0.6rem 0 1.4rem; font-size: clamp(1.4rem, 1.9vw, 2rem); line-height: 1.1; }
.post-card__title a { text-decoration: none; }
.post-card__more { font-size: var(--fs-small); }

.post-header { margin: 1rem 0 2.5rem; }
.post-title { font-size: var(--fs-display); line-height: 0.97; }
.post-meta { margin-top: 1rem; font-size: var(--fs-small); color: var(--dark-accent); }
.post-meta span[aria-hidden] { margin-inline: 0.4em; }
.post-back { margin-top: 3rem; font-size: var(--fs-small); }

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 2rem 0;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--black);
  color: var(--white);
  padding-block: clamp(3rem, 4vw, 4.5rem);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  align-items: start;
  padding-inline: var(--gutter);
}

.site-footer__newsletter { grid-column: 1 / 7; min-height: 1px; }
.site-footer__copy { grid-column: 7 / 10; }
.site-footer__social { grid-column: 11 / 13; align-self: center; }
.site-footer__copy p { margin-bottom: 1em; }

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100vw; height: 100vh;
  max-width: none; max-height: none;
  margin: 0; padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.97);
}
.lightbox::backdrop { background: rgba(255, 255, 255, 0.97); }
.lightbox__img {
  position: absolute;
  inset: 4rem 5rem;
  width: calc(100% - 10rem);
  height: calc(100% - 8rem);
  object-fit: contain;
}
.lightbox button {
  position: absolute;
  border: 0;
  background: none;
  font: inherit;
  font-size: 2.5rem;
  font-weight: 300;
  line-height: 1;
  color: var(--black);
  cursor: pointer;
  padding: 0.5rem 1rem;
}
.lightbox__close { top: 0.5rem; right: 0.5rem; }
.lightbox__prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 0.5rem; top: 50%; transform: translateY(-50%); }

/* ---------- Small screens ---------- */

@media (max-width: 767px) {
  .exhibit { display: flex; flex-direction: column; gap: 2rem; }
  .work { display: flex; flex-direction: column; gap: 1.5rem; }
  .work__info { position: static; }
  .exhibit__poster { position: static; order: 1; }
  .exhibit__body { order: 2; }
  .exhibit__text { margin-top: 0; }
  .exhibit__details > div { grid-template-columns: 5.5rem 1fr; }
  .hero--with-band { min-height: calc(100vh - 13rem); min-height: calc(100svh - 13rem); }
  .exhibit-band__inner { flex-direction: column; align-items: flex-start; gap: 1rem; }

  :root { --gutter: 6vw; --gap: 0; }

  .site-nav__toggle {
    display: block;
    position: relative;
    z-index: 60;
    width: 2rem; height: 2rem;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
  }
  .site-nav__bars,
  .site-nav__bars::before,
  .site-nav__bars::after {
    position: absolute;
    left: 0.25rem; right: 0.25rem;
    height: 2px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .site-nav__bars { top: 50%; }
  .site-nav__bars::before { content: ""; top: -7px; }
  .site-nav__bars::after { content: ""; top: 7px; }
  .nav-open .site-nav__bars { background: transparent; }
  .nav-open .site-nav__bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-open .site-nav__bars::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav__list {
    position: fixed;
    inset: 0;
    z-index: 55;
    flex-direction: column;
    justify-content: center;
    gap: 1.6rem;
    background: var(--white);
    color: var(--black);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s;
  }
  .site-nav__list a { font-size: 2rem; }
  .nav-open .site-nav__list { visibility: visible; opacity: 1; }
  .nav-open .site-header { color: var(--black); }
  .site-header__logo { position: relative; z-index: 60; }
  .nav-open { overflow: hidden; }

  .hero__text { max-width: none; padding-top: 5.5rem; padding-bottom: 14vh; }
  .hero__title { font-size: clamp(2.1rem, 10.5vw, 3.2rem); }
  .hero--with-band .hero__text { padding-bottom: 2.5rem; }

  .feature,
  .about-teaser,
  .about,
  .contact,
  .site-footer__inner { display: flex; flex-direction: column; gap: 1.5rem; }
  .feature__media, .about-teaser__media { order: -1; }
  .feature--align-right .feature__text { text-align: left; }
  .about-teaser__media { max-width: 70%; }

  .split, .insect, .insect--title-right { grid-template-columns: 1fr; row-gap: 1.5rem; }
  .split__text--center { padding-inline: 0; }
  .insect--title-right .insect__side { grid-row: 1; }

  .series-grid, .post-grid { grid-template-columns: 1fr; gap: 2rem; }
  .masonry { display: flex; flex-direction: column; }
  .masonry__col { display: contents; }
  .masonry__item { margin-bottom: 1rem; }

  .pager__link { font-size: 1.3rem; }

  .lightbox__img { inset: 3.5rem 0.5rem; width: calc(100% - 1rem); height: calc(100% - 7rem); }
}

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