/* ============================================================
   Daniel Sturman — Photography
   Palette: warm off-white background, warm near-black ink.
   Type:    Fraunces (display) + Inter (body / UI).
   ============================================================ */

:root {
  --bg:      #faf8f4;   /* warm off-white, not pure white */
  --card:    #ffffff;   /* photo "print" surface          */
  --ink:     #232020;   /* warm near-black text            */
  --muted:   #8c857b;   /* warm grey for secondary text    */
  --hair:    #e4ded4;   /* hairline / dividers             */
  --wire:    #9aa0a6;   /* metallic wire                   */
  --green:   #2fb83f;   /* active-category accent          */

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;   /* never scroll sideways; keeps centered content centered on the viewport */
}

/* ---------- Header ---------- */
.site-header {
  text-align: center;
  padding: 3.2rem 1rem 1.4rem;
}
.site-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.3rem);
  letter-spacing: 0.01em;
  margin: 0;
  font-optical-sizing: auto;
}
.site-sub {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0.7rem 0 0;
  padding-left: 0.42em; /* optical centering for the tracking */
}

/* ---------- Bead-on-a-wire filter ---------- */
.filter {
  max-width: 920px;
  margin: 0.5rem auto 0.5rem;
  padding: 0 1rem;
}
.wire {
  width: 100%;
  height: auto;
  overflow: visible;          /* don't clip the labels */
  display: block;
  touch-action: none;         /* let us own the drag gesture */
}
.wire-track {
  fill: none;
  stroke: var(--wire);
  stroke-width: 3;
  stroke-linecap: round;
}
.wire-stop {
  fill: #cfd3d6;
  stroke: var(--bg);
  stroke-width: 2;
  transition: fill 0.25s ease;
  cursor: pointer;
}
.wire-stop.is-active { fill: var(--green); }

.wire-label {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  fill: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: fill 0.25s ease;
}
.wire-label.is-active { fill: var(--green); font-weight: 600; }

.bead {
  cursor: grab;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.3));
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 1;
}
.bead.grabbing { cursor: grabbing; }
.bead:focus { outline: none; }
.bead:focus-visible { stroke: var(--ink); stroke-width: 2; }

/* ---------- Gallery (coverflow) ---------- */
.gallery {
  position: relative;
  margin: 0.5rem auto 0;
  max-width: 1500px;
}
.coverflow {
  position: relative;
  height: 70vh;
  min-height: 380px;
  overflow: hidden;
  touch-action: pan-y;          /* we own horizontal swipes; browser keeps vertical scroll */
}

.card {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  transform-origin: top left;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 0.5s ease;
  cursor: pointer;
  will-change: transform, opacity;
  background: var(--card);
  padding: 8px;
  box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.45);
}
.card.is-active {
  cursor: default;
  box-shadow: 0 38px 70px -28px rgba(0, 0, 0, 0.55);
}
.card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

/* ---------- Arrows ---------- */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 300;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(2px);
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.38;
  transition: opacity 0.25s ease, background 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-arrow:hover { opacity: 1; background: #fff; }
.nav-prev { left: 14px; }
.nav-next { right: 14px; }

/* ---------- Caption / count ---------- */
.gallery-info {
  max-width: 1500px;
  margin: 1.4rem auto 0;
  padding: 0 2rem;
  text-align: center;
  min-height: 2.4rem;
}
.caption {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  margin: 0;
}
.caption .cap-hint {
  font-family: var(--sans);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--muted);
}
.count {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0.5rem 0 0;
}

/* ---------- Artist statement ---------- */
.statement {
  max-width: 640px;
  margin: 4.5rem auto;
  padding: 0 1.5rem;
  text-align: center;
}
.statement-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  margin: 0 0 1.1rem;
}
.statement p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.22rem;
  line-height: 1.75;
  margin: 0;
}
.statement p + p { margin-top: 1.1rem; }   /* space between multiple paragraphs */
.statement em { font-style: italic; }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

/* ---------- Smaller screens ---------- */
@media (max-width: 700px) {
  .site-header { padding: 2rem 1rem 0.8rem; }
  .site-title { font-size: clamp(1.6rem, 8vw, 2.6rem); }  /* scales with width; won't clip on phones */
  .coverflow { height: 62vh; min-height: 320px; }
  .nav-arrow { display: none; }    /* swipe replaces the arrows on touch screens */
  .wire-label { font-size: 14px; }
  .statement p { font-size: 1.08rem; }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}
