/* ==========================================================================
   jo hart art — stylesheet
   Typeface: Helvetica throughout. Ground: white.
   ========================================================================== */

:root {
  --cerulean:  #007BA7;
  --pistachio: #93C572;
  --ink:       #0A0A0A;
  --paper:     #FFFFFF;
  /* Both greys carry 12px text, so they are set to clear WCAG AA 4.5:1
     against white (5.10:1 and 4.54:1) rather than to look as light as
     possible. --pistachio is used only in the wordmark, which is a logotype
     and exempt from the contrast requirement. */
  --grey:      #6E6E6E;
  --grey-soft: #767676;
  --hairline:  #E6E6E6;
  --wash:      #F6F6F4;

  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --maxw: 1560px;
  --header-h: 104px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* --------------------------------------------------------------- reset -- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--cerulean);
  outline-offset: 4px;
}

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; top: 0; left: 0; z-index: 200;
  transform: translateY(-110%);
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1.25rem;
  font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.skip-link:focus { transform: translateY(0); }

/* -------------------------------------------------------------- layout -- */

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { position: relative; }

.section-head { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }

/* ------------------------------------------------------------ typography */

.display {
  margin: 0;
  font-size: clamp(2.25rem, 5.4vw, 4.75rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 0.98;
}

.subhead {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
}

.lead {
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin: 0 0 2rem;
}

.prose p {
  margin: 0 0 1.4em;
  max-width: 33rem;
  color: #2A2A2A;
}
.prose p:last-child { margin-bottom: 0; }


/* -------------------------------------------------------------- header -- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0);
  transition: background 0.4s var(--ease-soft), box-shadow 0.4s var(--ease-soft);
}
.site-header::after {
  content: "";
  position: absolute; inset: auto 0 0 0;
  height: 1px; background: var(--hairline);
  opacity: 0;
  transition: opacity 0.4s var(--ease-soft);
}
.site-header.is-stuck {
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}
.site-header.is-stuck::after { opacity: 1; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
}

/* wordmark ------------------------------------------------------------- */

.wordmark {
  font-size: clamp(2.125rem, 3vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  gap: 0.28em;
}
.wordmark .jo   { color: var(--cerulean); }
.wordmark .art  { color: var(--pistachio); }

.wordmark span {
  transition: opacity 0.35s var(--ease-soft);
}
.wordmark:hover span { opacity: 0.62; }
.wordmark:hover span:hover { opacity: 1; }

/* nav ------------------------------------------------------------------ */

.nav { display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 3rem); }

.nav a {
  position: relative;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-block: 0.5rem;
  color: var(--ink);
}
.nav a::after {
  content: "";
  position: absolute; left: 0; bottom: 0.15rem;
  width: 100%; height: 1px;
  background: var(--cerulean);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav a:hover::after,
.nav a:focus-visible::after,
.nav a[aria-current="true"]::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav a[aria-current="true"] { color: var(--cerulean); }

/* ------------------------------------------------------------ carousel -- */

.carousel-section {
  padding-top: var(--header-h);
}

.carousel {
  position: relative;
  margin-top: clamp(0.75rem, 2vw, 1.75rem);
  /* Held narrower than the full grid: the pieces are photographed square-ish,
     so a tighter box means less letterboxing and reads as a gallery wall. */
  max-width: min(100%, 1000px);
  margin-inline: auto;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  background: var(--paper);
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.1s var(--ease-soft), visibility 0s linear 1.1s;
}
.slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 1.1s var(--ease-soft), visibility 0s;
  z-index: 2;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: scale(1.03);
  transition: transform 0s;
}
.slide.is-active img {
  transform: scale(1);
  transition: transform 7.5s linear;
}

/* click zones ---------------------------------------------------------- */

.carousel-nav {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
}
.carousel-nav button {
  flex: 0 0 22%;
  display: flex;
  align-items: center;
  padding-inline: clamp(1rem, 2.5vw, 2.5rem);
  color: var(--paper);
  opacity: 0;
  transition: opacity 0.4s var(--ease-soft);
}
.carousel-nav .prev { justify-content: flex-start; }
.carousel-nav .next { justify-content: flex-end; }
.carousel:hover .carousel-nav button,
.carousel-nav button:focus-visible { opacity: 1; }

.carousel-nav .arrow {
  display: grid;
  place-items: center;
  width: 3.25rem; height: 3.25rem;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.3s var(--ease-soft), transform 0.4s var(--ease);
}
.carousel-nav button:hover .arrow { background: var(--cerulean); transform: scale(1.08); }
.carousel-nav svg { width: 1rem; height: 1rem; }

/* carousel footer bar --------------------------------------------------- */

.carousel-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.25rem;
  flex-wrap: wrap;
}

.counter {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  color: var(--grey);
}
.counter .current { color: var(--ink); }


.progress {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0; padding: 0;
}
.progress button {
  display: block;
  width: clamp(1.75rem, 4vw, 2.75rem);
  height: 2px;
  background: var(--hairline);
  position: relative;
  overflow: hidden;
  padding: 0;
}
.progress button::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--cerulean);
  transform: scaleX(0);
  transform-origin: left;
}
.progress button[aria-current="true"]::after {
  animation: fill var(--slide-duration, 5600ms) linear forwards;
}
.progress button.is-seen::after { transform: scaleX(1); }
.carousel.is-paused .progress button[aria-current="true"]::after {
  animation-play-state: paused;
}
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------------------------------------------------------------- about -- */

.about {
  padding-block: clamp(5rem, 12vw, 11rem);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: stretch;
}
.about-head {
  grid-column: 1 / span 4;
  display: flex;
  flex-direction: column;
}
.about-body { grid-column: 6 / span 7; }

.about-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
  white-space: nowrap;
}

/* The portrait grows to fill whatever height the bio leaves, so the two
   columns end level. Cropping is vertical and centred on the face. */
.portrait {
  flex: 1 1 0;
  margin: 2.25rem 0 0;
  min-height: 14rem;
}
.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}


/* ----------------------------------------------------------------- work -- */

.work { padding-bottom: clamp(5rem, 12vw, 11rem); }

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

.work-item figure { margin: 0; }

.tile {
  display: block;
  width: 100%;
  padding: 0;
  text-align: center;
}

.work-item .frame {
  display: block;          /* <span> wrapper — inline would collapse the ratio */
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--wash);
}
.work-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.tile:hover img,
.tile:focus-visible img { transform: scale(1.045); }

.tile-label {
  display: block;
  margin-top: 1.5rem;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #4A4A4A;
  transition: color 0.35s var(--ease-soft);
}
.tile:hover .tile-label,
.tile:focus-visible .tile-label { color: var(--cerulean); }

/* -------------------------------------------------------------- contact -- */

.contact {
  padding-block: clamp(5rem, 12vw, 10rem);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
.contact-head { grid-column: 1 / span 5; }
.contact-form { grid-column: 7 / span 6; }

.contact-head .lead { color: #2A2A2A; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.field {
  position: relative;
  margin-bottom: 2.25rem;
}

.field label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 0.65rem;
  transition: color 0.3s var(--ease-soft);
}
.field:focus-within label { color: var(--cerulean); }
.field label .req { color: var(--pistachio); }

.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.35rem 0 0.75rem;
  transition: border-color 0.3s var(--ease-soft);
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 8rem; }

.field input::placeholder,
.field textarea::placeholder { color: var(--grey-soft); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--cerulean);
  border-bottom-width: 2px;
  padding-bottom: calc(0.75rem - 1px);
}

.field input:user-invalid,
.field textarea:user-invalid { border-bottom-color: #C0392B; }

/* honeypot — hidden from humans, visible to naive bots */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

.submit {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 0.75rem;
  padding: 1.05rem 2.25rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 0.4s var(--ease-soft), transform 0.4s var(--ease);
}
.submit:hover:not(:disabled) { background: var(--cerulean); transform: translateY(-2px); }
.submit:disabled { opacity: 0.55; cursor: progress; }
.submit svg { width: 0.9rem; height: 0.9rem; transition: transform 0.4s var(--ease); }
.submit:hover:not(:disabled) svg { transform: translateX(4px); }

.form-status {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  min-height: 1.5rem;
}
.form-status.is-ok    { color: #2E7D4F; }
.form-status.is-error { color: #C0392B; }

/* --------------------------------------------------------------- footer -- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey);
  transition: color 0.35s var(--ease-soft);
}
.social:hover { color: var(--cerulean); }
.social svg {
  width: 1.375rem; height: 1.375rem;
  transition: transform 0.45s var(--ease);
}
.social:hover svg { transform: scale(1.12) rotate(-4deg); }

.copyright {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ------------------------------------------------------------- reveals -- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-soft), transform 0.9s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* ---------------------------------------------------------- responsive -- */

@media (max-width: 1024px) {
  .about-head, .contact-head { grid-column: 1 / -1; }

  /* stacked: no column to match, so let the portrait be itself */
  .portrait { flex: 0 0 auto; max-width: 380px; min-height: 0; }
  .portrait img { height: auto; object-fit: contain; }
  .about-body, .contact-form { grid-column: 1 / -1; }
  .carousel-viewport { aspect-ratio: 5 / 4; }
}

@media (max-width: 760px) {
  :root { --header-h: 84px; }

  .wordmark { font-size: 2rem; }

  .nav { gap: 0.9rem; }
  .nav a { font-size: 0.625rem; letter-spacing: 0.08em; }

  .carousel-viewport { aspect-ratio: 1 / 1; }
  .carousel-nav button { flex-basis: 34%; opacity: 0; }
  .carousel-nav button:focus-visible { opacity: 1; }
  .carousel-nav .arrow { width: 2.5rem; height: 2.5rem; }

  .carousel-meta { gap: 0.85rem; }

  .work-grid { grid-template-columns: repeat(2, 1fr); }

  .field-row { grid-template-columns: 1fr; gap: 0; }
  .submit { width: 100%; justify-content: center; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1.75rem; }
}

@media (max-width: 460px) {
  /* six labelled category tiles stay two-up — one column would make the
     section an unnecessarily long scroll */
  .work-grid { gap: 1.75rem 1rem; }
  .tile-label { font-size: 0.5625rem; letter-spacing: 0.12em; }
}

/* ------------------------------------------------------- reduced motion -- */

@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; }
  .slide img, .slide.is-active img { transform: none; }
  .progress button[aria-current="true"]::after { transform: scaleX(1); animation: none; }
}

/* ---------------------------------------------------------------- print -- */

@media print {
  .site-header, .carousel-nav, .progress, .submit { display: none; }
  body { color: #000; }
}


/* ------------------------------------------------------------- lightbox -- */

/* A dark ground is a deliberate break from the white site: it switches the
   page into viewing mode and lets the glaze colour carry the frame. */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  background: #0A0A0A;
  color: #FFFFFF;
  opacity: 0;
  transition: opacity 0.35s var(--ease-soft);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

body.lb-open { overflow: hidden; }

.lb-bar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem) var(--gutter);
}

.lb-series {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.lb-counter {
  margin: 0;
  justify-self: center;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.55);
}
.lb-counter .current { color: #FFFFFF; }

.lb-close {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  color: #FFFFFF;
  transition: background 0.3s var(--ease-soft), transform 0.4s var(--ease);
}
.lb-close:hover { background: rgba(255, 255, 255, 0.12); transform: rotate(90deg); }
.lb-close svg { width: 1.25rem; height: 1.25rem; }

.lb-stage {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 2rem);
  min-height: 0;
  padding: 0 var(--gutter) clamp(1.5rem, 4vw, 3rem);
}

.lb-arrow {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.3s var(--ease-soft), transform 0.4s var(--ease);
}
.lb-arrow:hover { background: var(--cerulean); transform: scale(1.08); }
.lb-arrow svg { width: 1rem; height: 1rem; }

.lb-figure {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin: 0;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.lb-figure img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s var(--ease-soft);
}
.lb-figure img.is-loaded { opacity: 1; }

.lb-caption {
  flex: 0 0 auto;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  text-align: center;
}

@media (max-width: 760px) {
  .lb-stage {
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1.25rem;
  }
  /* arrows move below the piece so they never cover it */
  .lb-arrow { position: absolute; bottom: 1.25rem; }
  .lb-prev { left: var(--gutter); }
  .lb-next { right: var(--gutter); }
  .lb-figure { padding-bottom: 4.5rem; }
  .lb-caption { max-width: 60vw; }
}
