/* ==========================================================
   WIELCO — Contemporary LEGO sculpture
   Monochrome gallery aesthetic. Mobile-first.
   ========================================================== */

:root {
  --ink: #101010;
  --paper: #ffffff;
  --stone: #f5f5f3;
  --mid: #7d7d78;
  --hairline: #e4e4e1;
  --hairline-dark: rgba(255, 255, 255, 0.25);

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Newsreader", Georgia, serif;

  --track-wide: 0.28em;
  --track-label: 0.18em;

  --pad: 24px;
  --max: 1320px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 768px) {
  :root { --pad: 48px; }
}
@media (min-width: 1200px) {
  :root { --pad: 72px; }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--ink); color: var(--paper); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- Typography utilities ---------- */

.label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--mid);
}

.display {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.05;
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
}

.nav-links {
  display: none;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  position: relative;
  padding: 6px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-burger { display: none; }
}

/* Nav themes */
.nav--light { color: #fff; }
.nav--solid,
.nav.scrolled {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--hairline);
}

/* Mobile menu */
.nav-burger {
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav-burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--pad);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.mobile-menu.open a { opacity: 1; transform: none; }
.mobile-menu.open a:nth-child(1) { transition-delay: 0.08s; }
.mobile-menu.open a:nth-child(2) { transition-delay: 0.14s; }
.mobile-menu.open a:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.open a:nth-child(4) { transition-delay: 0.26s; }

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

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: #fff;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  transform: scale(1.06);
  animation: heroSettle 2.8s var(--ease) forwards;
}

@keyframes heroSettle {
  to { transform: scale(1); }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(8, 8, 8, 0.62) 0%,
    rgba(8, 8, 8, 0.18) 38%,
    rgba(8, 8, 8, 0.06) 60%,
    rgba(8, 8, 8, 0.2) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: clamp(56px, 10vh, 120px);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 7vw, 88px);
  letter-spacing: clamp(0.08em, 1.2vw, 0.16em);
  text-transform: uppercase;
  line-height: 1;
  margin-left: -0.02em;
}

.hero-sub {
  margin-top: 20px;
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 300;
  font-style: italic;
  max-width: 32em;
  color: rgba(255, 255, 255, 0.88);
}

.hero-cta {
  margin-top: 36px;
}

/* Staged reveal */
.hero-title, .hero-sub, .hero-cta {
  opacity: 0;
  transform: translateY(24px);
  animation: rise 1.1s var(--ease) forwards;
}
.hero-title { animation-delay: 0.5s; }
.hero-sub { animation-delay: 0.75s; }
.hero-cta { animation-delay: 1s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

.hero-scroll {
  position: absolute;
  z-index: 2;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 40px;
  background: var(--hairline-dark);
  overflow: hidden;
}

/* Desktop: split hero — white text panel left, portrait photo right */
@media (min-width: 1000px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(440px, 5fr) 7fr;
    align-items: stretch;
    background: var(--paper);
    color: var(--ink);
  }
  .hero::after { display: none; }
  .hero-media {
    position: relative;
    inset: auto;
    grid-column: 2;
    grid-row: 1;
    overflow: hidden;
  }
  .hero-media img { object-position: center 30%; }
  .hero-content {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    padding-bottom: 0;
  }
  .hero-title { font-size: clamp(48px, 5.2vw, 76px); }
  .hero-sub { color: var(--mid); }
  .hero .btn--light { color: var(--ink); }
  .hero .btn--light:hover { background: var(--ink); color: #fff; }
  .hero-scroll { left: 20.8%; background: var(--hairline); }
  .hero-scroll::after { background: var(--ink); }

  /* Nav over the white hero: solid, dark */
  .nav--light {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--hairline);
  }
}
.hero-scroll::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  animation: scrollHint 2.2s ease-in-out infinite;
}
@keyframes scrollHint {
  0% { top: -100%; }
  60%, 100% { top: 100%; }
}

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

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  padding: 16px 34px;
  border: 1px solid currentColor;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
  cursor: pointer;
  background: transparent;
}

.btn--light:hover { background: #fff; color: var(--ink); }
.btn--dark { color: var(--ink); }
.btn--dark:hover { background: var(--ink); color: #fff; }

.textlink {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding-bottom: 4px;
}
.textlink::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0.35);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.textlink:hover::after { transform: scaleX(1); }

/* ---------- Sections ---------- */

.section { padding: clamp(80px, 12vw, 160px) 0; }
.section--stone { background: var(--stone); }

.section-head {
  margin-bottom: clamp(48px, 7vw, 96px);
}

.section-head .label { display: block; margin-bottom: 18px; }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(26px, 4.5vw, 44px);
  line-height: 1.1;
}

/* ---------- Featured works ---------- */

.works {
  display: grid;
  gap: clamp(64px, 9vw, 128px);
}

.work {
  display: grid;
  gap: 28px;
}

@media (min-width: 900px) {
  .work {
    grid-template-columns: 1fr 1fr;
    gap: clamp(48px, 6vw, 88px);
    align-items: center;
  }
  .work:nth-child(even) .work-media { order: 2; }
}

.work-media {
  position: relative;
  overflow: hidden;
  background: #e9e9e6;
  aspect-ratio: 4 / 5;
}

@media (min-width: 900px) {
  .work-media { width: 100%; max-width: 560px; }
  .work:nth-child(odd) .work-media { justify-self: start; }
  .work:nth-child(even) .work-media { justify-self: end; }
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.8s cubic-bezier(0.19, 1, 0.22, 1), filter 1.8s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: transform;
}

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

/* Elegant placeholder when a photo is not yet uploaded */
.work-media .ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ececea;
}
.work-media .ph span {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: #b9b9b4;
}

.work-info .work-pos {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--mid);
  display: block;
  margin-bottom: 16px;
}

.work-title {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(20px, 2.6vw, 27px);
  line-height: 1.2;
  margin-bottom: 16px;
}

.work-desc {
  color: #3d3d3a;
  max-width: 30em;
  margin-bottom: 28px;
  font-size: 16.5px;
}

/* ---------- Statement band ---------- */

.statement {
  background: var(--ink);
  color: #fff;
  text-align: center;
}

.statement p {
  font-size: clamp(22px, 3.4vw, 36px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.45;
  max-width: 26em;
  margin: 0 auto;
}

.statement .label { color: rgba(255,255,255,0.5); display: block; margin-bottom: 28px; }

/* ---------- About teaser / about page ---------- */

.about-grid {
  display: grid;
  gap: 48px;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 5fr 6fr;
    gap: clamp(56px, 8vw, 120px);
    align-items: start;
  }
}

.about-media {
  background: #e9e9e6;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.about-media img { width: 100%; height: 100%; object-fit: cover; }

.prose p { margin-bottom: 1.4em; color: #2c2c29; }
.prose p:last-child { margin-bottom: 0; }
.prose .lede {
  font-size: clamp(20px, 2.4vw, 25px);
  line-height: 1.5;
  font-weight: 300;
  color: var(--ink);
}

/* ---------- Page header (inner pages) ---------- */

.page-head {
  padding: calc(72px + clamp(64px, 10vw, 128px)) 0 clamp(48px, 7vw, 88px);
}

.page-head .label { display: block; margin-bottom: 20px; }

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(34px, 7vw, 76px);
  line-height: 1.02;
}

/* ---------- Portfolio grid ---------- */

.pf-grid {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
}

@media (min-width: 700px) {
  .pf-grid { grid-template-columns: 1fr 1fr; }
}

.pf-item .work-title { margin-top: 22px; margin-bottom: 8px; font-size: clamp(17px, 2vw, 21px); }
.pf-item .label { display: block; }

/* ---------- Artwork detail ---------- */

.art-hero {
  padding-top: 72px;
  background: var(--stone);
}
.art-hero-media {
  max-height: 86vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  background: #e9e9e6;
}
.art-hero-media img {
  object-fit: contain;
  max-height: 86vh;
  width: auto;
}
.art-hero-media .ph {
  width: 100%;
  aspect-ratio: 16/10;
  display: flex; align-items: center; justify-content: center;
}
.art-hero-media .ph span {
  font-family: var(--font-display);
  font-size: 10px; font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: #b9b9b4;
}

.art-body {
  display: grid;
  gap: 56px;
}

@media (min-width: 900px) {
  .art-body {
    grid-template-columns: 7fr 4fr;
    gap: clamp(64px, 9vw, 140px);
  }
}

.art-desc h1 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(28px, 4.3vw, 43px);
  line-height: 1.12;
  margin-bottom: 28px;
}

/* Specification — set like a race classification sheet */
.spec { border-top: 1px solid var(--ink); }
.spec-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}
.spec-row dt {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--mid);
  padding-top: 4px;
}
.spec-row dd { font-size: 16px; color: #2c2c29; }

.spec-note {
  margin-top: 28px;
  padding: 22px 24px;
  background: var(--stone);
  font-size: 15.5px;
  color: #3d3d3a;
}
.spec-note .label { display: block; margin-bottom: 10px; }

.spec-cta { margin-top: 32px; }

/* Gallery */
.art-gallery {
  margin-top: clamp(64px, 9vw, 120px);
  display: grid;
  gap: 20px;
}
@media (min-width: 700px) {
  .art-gallery { grid-template-columns: 1fr 1fr; }
}
.art-gallery figure {
  background: #ececea;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  position: relative;
}
.art-gallery img { width: 100%; height: 100%; object-fit: cover; }
.art-gallery .ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.art-gallery .ph span {
  font-family: var(--font-display);
  font-size: 10px; font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: #b9b9b4;
}

/* Prev / next */
.art-nav {
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 0;
}

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

.contact-list { margin-top: 16px; }
.contact-row {
  display: block;
  padding: 32px 0;
  border-bottom: 1px solid var(--hairline);
}
.contact-row:first-child { border-top: 1px solid var(--ink); }
.contact-row .label { display: block; margin-bottom: 12px; }
.contact-row a.big {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: clamp(19px, 3.4vw, 32px);
  transition: color 0.3s var(--ease);
}
.contact-row a.big:hover { color: var(--mid); }

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

.footer {
  background: var(--ink);
  color: #fff;
  padding: clamp(56px, 8vw, 96px) 0 40px;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

@media (min-width: 700px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
}

.footer-tag {
  margin-top: 12px;
  font-style: italic;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  font-size: 15.5px;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  transition: color 0.3s;
}
.footer-links a:hover { color: #fff; }

.footer-bottom {
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

@media (min-width: 700px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Accessibility ---------- */

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.nav--light :focus-visible,
.footer :focus-visible,
.statement :focus-visible {
  outline-color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-title, .hero-sub, .hero-cta { opacity: 1; transform: none; }
}
