/* =============================================================
   Jonathan Lucia — Paintings
   Editorial catalogue. Fraunces + IBM Plex Mono on warm paper.
   ============================================================= */

:root {
  /* Colour — cool stone, graphite, and a quiet slate blue */
  --paper: #eceae5;
  --paper-deep: #dcd9d3;
  --ink: #14171c;
  --ink-soft: #2e333a;
  --muted: #7a8088;
  --rule: #c7c5c0;
  --accent: #2c3e4a;
  --accent-soft: #5a7387;
  --card: #f5f4f1;
  --card-border: #d9d6cf;

  /* Typography — Google Sans Flex (variable: opsz 6..144, wght 100..1000) */
  --display: "Google Sans Flex", system-ui, -apple-system, sans-serif;
  --mono: "Google Sans Flex", system-ui, -apple-system, sans-serif;

  /* Layout */
  --container-max: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-slow: cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================================
   Reset & base
   ============================================================= */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(0.9rem, 0.4vw + 0.8rem, 1rem);
  line-height: 1.6;
  letter-spacing: -0.005em;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 90% 60% at 15% 0%, rgba(44, 62, 74, 0.05), transparent 70%),
    radial-gradient(ellipse 70% 50% at 85% 100%, rgba(20, 23, 28, 0.06), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Paper grain overlay — subtle fractal noise pinned to viewport */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.09;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.08  0 0 0 0 0.09  0 0 0 0 0.11  0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  mix-blend-mode: multiply;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

input { font: inherit; color: inherit; }

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

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

.skip-link {
  position: absolute;
  top: -100px; left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 10000;
  transition: top 200ms var(--ease);
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   Typography scale
   ============================================================= */

h1, h2, h3 { margin: 0; font-weight: 400; }

.mono,
nav ul a,
.nav-mark em,
.hero-kicker,
.section-index,
.section-meta,
.works-note,
.studio-figure figcaption,
.list-lede,
.subscribe button,
.footer-meta,
.footer-mark em,
.popup-kicker,
.popup-note,
.wall-label dt,
.subscribe-status {
  font-family: var(--mono);
  font-weight: 400;
}

/* =============================================================
   Nav
   ============================================================= */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.25rem var(--gutter);
  color: var(--paper);
  background-color: #4f6878;
  /* Subtle painterly texture — layered noise + faint highlight gradient */
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.10)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.08  0 0 0 0 0.12  0 0 0 0 0.18  0 0 0 0.7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: auto, 220px 220px;
  background-blend-mode: normal, overlay;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  transition: box-shadow 400ms var(--ease);
}
.site-nav[data-scrolled="true"] {
  box-shadow: 0 6px 20px -18px rgba(0, 0, 0, 0.6);
}

/* Nav text colours for contrast on the blue */
.site-nav .nav-mark span { color: var(--paper); }
.site-nav .nav-mark em   { color: color-mix(in srgb, var(--paper) 70%, #4f6878); }
.site-nav ul a           { color: color-mix(in srgb, var(--paper) 85%, transparent); }
.site-nav ul a:hover     { color: var(--paper); }
.site-nav ul a::after    { background: var(--paper); }

.nav-mark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
}
.nav-mark span {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 500;
  font-variation-settings: "opsz" 36;
  letter-spacing: -0.01em;
}
.nav-mark em {
  font-style: normal;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav ul {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  list-style: none;
  margin: 0; padding: 0;
}
.site-nav ul a {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.25rem 0;
  position: relative;
  transition: color 200ms var(--ease);
}
.site-nav ul a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 400ms var(--ease);
}
.site-nav ul a:hover { color: var(--accent); }
.site-nav ul a:hover::after,
.site-nav ul a:focus-visible::after { transform: scaleX(1); }

/* =============================================================
   Hero
   ============================================================= */

.hero {
  position: relative;
  min-height: clamp(18rem, 55vh, 32rem);
  padding: clamp(2.5rem, 7vh, 5rem) var(--gutter) clamp(2.5rem, 6vh, 4rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.5vh, 2rem);
  max-width: var(--container-max);
  margin: 0 auto;
}

.hero-rule {
  width: clamp(6rem, 16vw, 14rem);
  height: 1px;
  background: var(--ink);
  opacity: 0.6;
  animation: drawRule 1400ms var(--ease-slow) both;
}

@keyframes drawRule {
  from { transform: scaleX(0); transform-origin: left; }
  to { transform: scaleX(1); transform-origin: left; }
}

.hero-kicker {
  margin: 1.5rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  animation: fadeUp 900ms 200ms var(--ease-slow) both;
}

.hero-title {
  font-size: clamp(2.25rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 620;
  font-variation-settings: "opsz" 144;
  margin: clamp(0.5rem, 2vh, 1.5rem) 0 clamp(0.25rem, 1vh, 0.75rem);
}
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title .line span,
.hero-title .line em {
  display: inline-block;
  animation: rise 1100ms var(--ease-slow) both;
}
.hero-title .line-1 { animation: rise 1100ms 400ms var(--ease-slow) both; }
.hero-title .line-2 em {
  font-style: normal;
  font-weight: 250;
  font-variation-settings: "opsz" 144;
  color: var(--accent);
  margin-left: clamp(0.75rem, 3vw, 2.5rem);
  letter-spacing: -0.04em;
  animation: rise 1100ms 650ms var(--ease-slow) both;
}

@keyframes rise {
  from { transform: translateY(110%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeUp {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.hero-blurb {
  max-width: 36ch;
  margin: 0;
  font-size: clamp(0.95rem, 0.6vw + 0.8rem, 1.15rem);
  line-height: 1.5;
  color: var(--ink-soft);
  font-variation-settings: "opsz" 24;
  animation: fadeUp 1000ms 900ms var(--ease-slow) both;
}

.hero-scroll {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(2rem, 6vh, 4rem);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  animation: fadeUp 1000ms 1200ms var(--ease-slow) both;
}
.hero-scroll span {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.hero-scroll svg {
  width: 14px;
  height: 36px;
  animation: nudge 2400ms ease-in-out infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* =============================================================
   Section heads — I. / II. / III. catalogue style
   ============================================================= */

.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 2.5rem);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: clamp(5rem, 12vh, 9rem) var(--gutter) clamp(2.5rem, 6vh, 5rem);
  border-top: 1px solid var(--rule);
  position: relative;
}
.section-head::before {
  content: "";
  position: absolute;
  top: -1px; left: var(--gutter);
  width: 3rem; height: 1px;
  background: var(--accent);
}

.section-index {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.025em;
  line-height: 1;
  font-weight: 500;
}

.section-meta {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}

/* =============================================================
   Works grid
   ============================================================= */

.works {
  max-width: var(--container-max);
  margin: 0 auto;
}

.grid {
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 3vw, 2.5rem);
  row-gap: clamp(2.5rem, 5vh, 4rem);
}

.piece { min-width: 0; }

.piece-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: clamp(1rem, 1.5vw, 1.25rem);
  transition: transform 600ms var(--ease), box-shadow 600ms var(--ease), border-color 300ms var(--ease);
}
.piece-card:hover {
  border-color: color-mix(in srgb, var(--ink) 30%, var(--card-border));
  box-shadow: 0 30px 60px -40px rgba(20, 23, 28, 0.35);
}

.piece-image {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper-deep);
  cursor: zoom-in;
  overflow: hidden;
  border-radius: 2px;
}
.piece-image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  transition: transform 1.6s var(--ease-slow);
}
.piece-card:hover .piece-image img,
.piece-card:focus-within .piece-image img { transform: scale(1.02); }

.piece-info {
  padding: 1.1rem 0.25rem 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.piece-dim {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.piece-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.piece-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.1rem, 0.6vw + 0.8rem, 1.35rem);
  font-weight: 500;
  font-variation-settings: "opsz" 36;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}
.piece-price {
  font-size: clamp(0.9rem, 0.3vw + 0.8rem, 1rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.piece-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.35rem;
}

.piece-details {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--accent);
  padding: 0.4rem 0;
  position: relative;
  transition: color 200ms var(--ease);
}
.piece-details::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.2rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 300ms var(--ease);
}
.piece-details:hover::after,
.piece-details:focus-visible::after { transform: scaleX(1); }

.piece-purchase {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 0.5rem 1.1rem;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.piece-purchase:hover,
.piece-purchase:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.works-note {
  max-width: 52ch;
  margin: clamp(4rem, 10vh, 7rem) var(--gutter) 0 auto;
  padding: 0 var(--gutter) 0 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  line-height: 1.7;
  color: var(--muted);
  text-align: right;
}
.works-note a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}
.works-note a:hover { color: var(--accent); border-color: var(--accent); }

/* =============================================================
   Studio (About)
   ============================================================= */

.studio {
  max-width: var(--container-max);
  margin: 0 auto;
}

.studio-body {
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.studio-figure { margin: 0; position: relative; }
.studio-figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  box-shadow: 0 40px 60px -50px rgba(31, 26, 20, 0.4);
}
.studio-figure figcaption {
  margin-top: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.studio-text p {
  margin: 0 0 1.25em;
  font-size: clamp(0.925rem, 0.3vw + 0.85rem, 1.05rem);
  line-height: 1.6;
  font-variation-settings: "opsz" 18;
  color: var(--ink-soft);
}
.studio-text .lede {
  font-size: clamp(1.1rem, 0.6vw + 0.9rem, 1.3rem);
  line-height: 1.45;
  color: var(--ink);
  font-variation-settings: "opsz" 36;
  margin-bottom: 1.5em;
  text-wrap: balance;
}
.studio-text .sign-off {
  font-variation-settings: "opsz" 24, "wght" 350;
  color: var(--accent);
  font-size: 1.25rem;
  margin-top: 2.5rem;
}

/* =============================================================
   The List (subscribe)
   ============================================================= */

.list {
  max-width: var(--container-max);
  margin: 0 auto;
}

.list-body {
  padding: 0 var(--gutter) clamp(6rem, 14vh, 10rem);
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: end;
}

.list-lede {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 42ch;
}

.subscribe {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  border-bottom: 1px solid var(--ink);
  position: relative;
  padding-bottom: 0.5rem;
}
.subscribe label { grid-column: 1; }
.subscribe input {
  width: 100%;
  padding: 1rem 0;
  background: transparent;
  border: 0;
  outline: none;
  font-family: var(--display);
  font-size: clamp(1.2rem, 0.5vw + 1rem, 1.5rem);
  font-variation-settings: "opsz" 36;
  color: var(--ink);
}
.subscribe input::placeholder { color: var(--muted); opacity: 0.6; }

.subscribe button {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.25rem 0 1.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 200ms var(--ease);
}
.subscribe button svg {
  width: 28px; height: 14px;
  transition: transform 400ms var(--ease);
}
.subscribe button:hover { color: var(--accent); }
.subscribe button:hover svg { transform: translateX(4px); }

.subscribe-status {
  grid-column: 1 / -1;
  margin: 0.75rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  min-height: 1.2em;
}

/* =============================================================
   Footer
   ============================================================= */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 3rem var(--gutter) 2rem;
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
}

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

.footer-mark {
  margin: 0;
  font-family: var(--display);
  font-size: 0.95rem;
  font-variation-settings: "opsz" 24;
  color: var(--ink-soft);
}
.footer-meta {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-asterism {
  position: absolute;
  top: -0.7em;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 1rem;
  background: var(--paper);
  color: var(--accent);
  font-size: 1.6rem;
  line-height: 1;
  font-variation-settings: "opsz" 72;
}

/* =============================================================
   Lightbox (native dialog)
   ============================================================= */

.lightbox {
  border: 0;
  padding: 0;
  margin: auto;
  max-width: min(1200px, 94vw);
  max-height: 92vh;
  width: 100%;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.55);
}
.lightbox::backdrop {
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  backdrop-filter: blur(2px);
}
.lightbox[open] {
  animation: lightboxIn 500ms var(--ease-slow);
}
@keyframes lightboxIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lightbox-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 2.5rem; height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-radius: 999px;
  z-index: 2;
  transition: background 200ms var(--ease), transform 200ms var(--ease);
}
.lightbox-close:hover { background: var(--paper-deep); transform: rotate(90deg); }
.lightbox-close svg { width: 18px; height: 18px; }

.lightbox-figure {
  margin: 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  min-height: 60vh;
}
.lightbox-figure img {
  width: 100%;
  height: 100%;
  max-height: 92vh;
  object-fit: contain;
  background: var(--paper-deep);
  padding: 1.5rem;
}

.wall-label {
  padding: clamp(1.75rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-left: 1px solid var(--rule);
  position: relative;
}
.wall-label::before {
  content: "";
  position: absolute;
  top: clamp(1.75rem, 4vw, 3rem);
  left: -1px;
  width: 1px; height: 2rem;
  background: var(--accent);
}
.wall-label h3 {
  font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem);
  font-variation-settings: "opsz" 48;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
}
.wall-label dl {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}
.wall-label dl > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed var(--rule);
}
.wall-label dt {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.15rem;
}
.wall-label dd {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-variation-settings: "opsz" 18;
}
.wall-price dd {
  font-size: 1.4rem;
  color: var(--accent);
  font-variation-settings: "opsz" 36, "wght" 450;
}
.wall-note {
  margin: 0;
  font-variation-settings: "opsz" 18, "wght" 350;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 40ch;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule);
}

/* =============================================================
   Studio popup — the "invitation" card
   ============================================================= */

.studio-popup {
  position: fixed;
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: clamp(1rem, 3vw, 2.5rem);
  width: min(26rem, calc(100vw - 2rem));
  z-index: 500;
  transform: translateY(calc(100% + 2rem)) rotate(-0.4deg);
  opacity: 0;
  transition: transform 700ms var(--ease-slow), opacity 500ms var(--ease-slow);
  pointer-events: none;
}
.studio-popup[data-visible="true"] {
  transform: translateY(0) rotate(-0.4deg);
  opacity: 1;
  pointer-events: auto;
}

.popup-inner {
  position: relative;
  padding: 2rem 2rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow:
    0 40px 80px -30px rgba(31, 26, 20, 0.5),
    0 0 0 6px var(--paper),
    0 0 0 7px var(--rule);
}

.popup-close {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  width: 2rem; height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  opacity: 0.6;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.popup-close:hover { opacity: 1; transform: rotate(90deg); }
.popup-close svg { width: 14px; height: 14px; }

.popup-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}

.popup-title {
  font-size: clamp(1.6rem, 1.4vw + 1.1rem, 2.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 48;
  margin: 0 0 1rem;
  padding-right: 2rem;
}
.popup-title em {
  display: block;
  color: var(--accent);
  font-variation-settings: "opsz" 48, "wght" 350;
}

.popup-body {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
  font-variation-settings: "opsz" 14;
  text-wrap: pretty;
}

.popup-form {
  display: grid;
  gap: 0.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.75rem;
}
.popup-form input {
  width: 100%;
  padding: 0.5rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  outline: none;
  font-family: var(--display);
  font-size: 1.1rem;
  font-variation-settings: "opsz" 18;
}
.popup-form input:focus { border-bottom-color: var(--accent); }
.popup-form input::placeholder { color: var(--muted); }
.popup-form button {
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background 200ms var(--ease);
}
.popup-form button:hover { background: var(--accent); }

.popup-note {
  margin: 0.9rem 0 0;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.popup-seal {
  position: absolute;
  bottom: -1.25rem;
  right: -1.25rem;
  width: 3.75rem; height: 3.75rem;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--display);
  font-variation-settings: "opsz" 36, "wght" 400;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  border-radius: 999px;
  box-shadow: 0 6px 20px -6px rgba(155, 58, 42, 0.6);
  transform: rotate(-8deg);
}

/* =============================================================
   Reveal on scroll
   ============================================================= */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 900ms var(--ease-slow), transform 900ms var(--ease-slow); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* =============================================================
   Responsive
   ============================================================= */

@media (max-width: 900px) {
  .site-nav {
    padding: 0.9rem var(--gutter);
  }
  .nav-mark em { display: none; }

  .hero {
    min-height: auto;
    padding-block: 4rem 5rem;
  }
  .hero-scroll { display: none; }

  .section-head {
    grid-template-columns: auto 1fr;
    padding-block: 5rem 2.5rem;
  }
  .section-meta { grid-column: 1 / -1; text-align: left; }

  .grid {
    grid-template-columns: 1fr;
    row-gap: 2.5rem;
  }

  .studio-body,
  .list-body {
    grid-template-columns: 1fr;
  }

  .lightbox-figure {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .wall-label {
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .wall-label::before { display: none; }
  .wall-label dl > div { grid-template-columns: 5rem 1fr; }

  .studio-popup {
    right: 1rem; left: 1rem;
    width: auto;
  }
}

@media (max-width: 520px) {
  .hero-title .line-2 em { margin-left: 0; }
  .piece-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.6rem;
  }
  .piece-purchase { text-align: center; }
  .piece-details { text-align: left; }
}

/* =============================================================
   Accessibility
   ============================================================= */

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

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