/* ————————————————————————————————————————————————
   Kristen Terrano — Fine Art Prints
   ———————————————————————————————————————————————— */

:root {
  --paper: #faf7f2;
  --paper-deep: #f1ece3;
  --ink: #1c1a17;
  --ink-soft: #5b544b;
  --ink-faint: #8a8177;
  --line: #e4ddd1;
  --accent: #97682f;
  --sage: #46543f;
  --sage-soft: #67765c;
  --wall: #ece7de;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow-card: 0 1px 2px rgba(28, 26, 23, 0.06), 0 12px 32px -12px rgba(28, 26, 23, 0.22);
  --shadow-float: 0 24px 64px -16px rgba(28, 26, 23, 0.38);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

body.locked { overflow: hidden; }

::selection { background: rgba(151, 104, 47, 0.25); }

/* ————— typography helpers ————— */

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; }

h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); letter-spacing: -0.01em; }

/* ————— header ————— */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  background: var(--sage);
  color: #f2efe6;
  transition: background 0.35s, box-shadow 0.35s, padding 0.35s,
              opacity 0.5s var(--ease), transform 0.5s var(--ease), visibility 0.5s;

  /* the landing screen is left uninterrupted — the bar arrives with the
     collection, and app.js adds .revealed once that heading is reached */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100%);
}

.site-header.revealed {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.site-header.scrolled {
  background: #3b4735;
  box-shadow: 0 2px 18px rgba(28, 26, 23, 0.22);
  padding-block: 0.8rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand em { font-style: italic; font-weight: 300; }

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 1.8rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-nav a { opacity: 0.85; transition: opacity 0.2s; position: relative; }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -4px;
  height: 1px;
  background: currentColor;
  transition: right 0.3s var(--ease);
}
.site-nav a:hover { opacity: 1; }
.site-nav a:hover::after { right: 0; }

@media (max-width: 700px) {
  .site-nav { display: none; }
  .site-header { gap: 1rem; }
  .cart-btn { margin-left: auto; }
}

.cart-btn { position: relative; padding: 0.4rem; display: grid; place-items: center; }
.cart-btn svg { width: 22px; height: 22px; }
.cart-count {
  position: absolute;
  top: -2px; right: -6px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--paper);
  color: var(--sage);
  font-size: 0.68rem;
  font-weight: 600;
  display: grid;
  place-items: center;
  transition: transform 0.2s var(--ease);
}
.cart-count.bump { animation: bump 0.4s var(--ease); }
@keyframes bump { 40% { transform: scale(1.45); } }

/* ————— hero ————— */

.hero {
  position: relative;
  min-height: clamp(480px, 78svh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  padding: clamp(140px, 17svh, 178px) 0 0;
}

/* ————— aurora & stars ————— */

.hero-sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  will-change: opacity, transform;
  animation: fadein 2.4s 0.6s var(--ease) both;
}

/* night backdrop: black at the top, holding dark through the ridgeline,
   dissolving to paper just past the mountains */
.hero-sky::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    #080e12 0%,
    #0b1620 26%,
    #112834 44%,
    #1a3a45 58%,
    #2b5058 70%,
    #476468 80%,
    #6d8280 88%,
    #9aa8a1 95%,
    #c2c8bd 100%);
}

.stars { position: absolute; inset: 0; }
.stars span {
  position: absolute;
  border-radius: 50%;
  background: #eaf4ef;
  opacity: var(--tw, 0.5);
  box-shadow: 0 0 4px rgba(220, 244, 234, 0.5);
  animation: twinkle 8s ease-in-out infinite;
}
@keyframes twinkle {
  50% { opacity: 0.07; transform: scale(0.7); }
}

/* shooting stars — spawned by app.js with a fresh trajectory each time, so
   they never fall into a visible pattern */
.meteors { position: absolute; inset: 0; overflow: hidden; }

.meteor {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  border-radius: 2px;
  /* tapered at both ends so it reads as a streak, not a bar */
  background: linear-gradient(90deg,
    rgba(233, 245, 255, 0) 0%,
    rgba(233, 245, 255, 0.14) 18%,
    rgba(240, 250, 255, 0.6) 62%,
    rgba(255, 255, 255, 0.95) 92%,
    rgba(255, 255, 255, 0) 100%);
  transform-origin: 0 50%;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.meteor::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 3px;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 7px 2px rgba(226, 242, 255, 0.85);
}

/* three broad aurora ribbons on the night sky — built entirely from
   elliptical gradients so no edge is ever a straight line, then warped
   organic by the turbulence filter. They reach down behind the text and
   the ridgeline. */
.ribbon {
  position: absolute;
  filter: url(#aurora-warp) blur(10px);
  will-change: transform, opacity;
}

.r1 {
  top: 2%;
  left: -8%;
  width: 92%;
  height: 26%;
  background:
    radial-gradient(55% 46% at 48% 66%, rgba(96, 204, 164, 0.42) 0%, rgba(96, 204, 164, 0.14) 52%, transparent 76%),
    radial-gradient(60% 60% at 54% 40%, rgba(122, 206, 200, 0.18) 0%, transparent 74%);
  transform: rotate(-7deg);
  animation: ribbon-sway1 38s ease-in-out infinite alternate;
}

.r2 {
  top: 22%;
  left: 14%;
  width: 96%;
  height: 24%;
  background:
    radial-gradient(52% 44% at 52% 68%, rgba(88, 192, 172, 0.36) 0%, rgba(88, 192, 172, 0.12) 50%, transparent 75%),
    radial-gradient(44% 50% at 70% 44%, rgba(154, 150, 214, 0.16) 0%, transparent 72%),
    radial-gradient(58% 56% at 38% 46%, rgba(104, 196, 186, 0.15) 0%, transparent 74%);
  transform: rotate(5deg);
  opacity: 0.9;
  animation: ribbon-sway2 50s ease-in-out infinite alternate;
}

.r3 {
  top: 47%;
  left: -10%;
  width: 88%;
  height: 20%;
  background:
    radial-gradient(56% 48% at 46% 60%, rgba(104, 198, 168, 0.30) 0%, rgba(104, 198, 168, 0.10) 52%, transparent 76%);
  transform: rotate(-4deg);
  opacity: 0.8;
  animation: ribbon-sway3 60s ease-in-out infinite alternate;
}

@keyframes ribbon-sway1 {
  from { transform: rotate(-7deg) translateX(-2.5%) scaleY(1); opacity: 0.75; }
  50%  { opacity: 1; }
  to   { transform: rotate(-5.5deg) translateX(3%) scaleY(1.15); opacity: 0.82; }
}
@keyframes ribbon-sway2 {
  from { transform: rotate(5deg) translateX(2.5%) scaleY(1.1); opacity: 0.65; }
  55%  { opacity: 0.95; }
  to   { transform: rotate(3.5deg) translateX(-3%) scaleY(0.96); opacity: 0.72; }
}
@keyframes ribbon-sway3 {
  from { transform: rotate(-4deg) translateX(-2%) scaleY(1); opacity: 0.55; }
  50%  { opacity: 0.85; }
  to   { transform: rotate(-2.5deg) translateX(2.5%) scaleY(1.12); opacity: 0.62; }
}

/* In normal flow below the text, so the resting layout can never overlap
   at any viewport size — overlap only happens via the scroll transform. */
.hero-art {
  position: relative;
  z-index: 2;
  width: 100%;
  height: clamp(300px, 42vw, 620px);
  pointer-events: none;
  will-change: opacity, transform;
  animation: fadein 1.8s 0.35s var(--ease) both;
}

/* three painted ranges, stacked back to front. Each is stretched to span
   the full width — silhouettes take the distortion gracefully — and its
   base is masked away so the mist can take over. */
.range-layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  display: block;
  object-fit: fill;
}

.rl-far {
  height: 100%;
  -webkit-mask-image: linear-gradient(180deg, #000 74%, rgba(0,0,0,.5) 90%, transparent 99%);
  mask-image: linear-gradient(180deg, #000 74%, rgba(0,0,0,.5) 90%, transparent 99%);
}
.rl-mid {
  height: 92%;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, rgba(0,0,0,.5) 89%, transparent 99%);
  mask-image: linear-gradient(180deg, #000 72%, rgba(0,0,0,.5) 89%, transparent 99%);
}
.rl-hills {
  height: 72%;
  -webkit-mask-image: linear-gradient(180deg, #000 68%, rgba(0,0,0,.5) 87%, transparent 98%);
  mask-image: linear-gradient(180deg, #000 68%, rgba(0,0,0,.5) 87%, transparent 98%);
}

/* drifting banks of mist sitting in front of the ridges */
.fog {
  position: absolute;
  left: -20%;
  right: -20%;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(250, 247, 242, 0.92), rgba(250, 247, 242, 0.55) 55%, rgba(250, 247, 242, 0) 100%);
  filter: blur(14px);
  will-change: transform;
}
.f1 { bottom: 14%; height: 24%; opacity: 0.22; animation: drift1 74s ease-in-out infinite alternate; }
.f2 { bottom: 0%;  height: 30%; opacity: 0.34; animation: drift2 96s ease-in-out infinite alternate; }
.f3 { bottom: 24%; height: 16%; opacity: 0.14; animation: drift3 62s ease-in-out infinite alternate; }

@keyframes drift1 {
  from { transform: translate3d(-5%, 2%, 0) scaleX(1); }
  to   { transform: translate3d(6%, -2%, 0) scaleX(1.14); }
}
@keyframes drift2 {
  from { transform: translate3d(5%, 0, 0) scaleX(1.1); }
  to   { transform: translate3d(-6%, 2%, 0) scaleX(0.94); }
}
@keyframes drift3 {
  from { transform: translate3d(-8%, -1%, 0) scaleX(0.95); }
  to   { transform: translate3d(7%, 3%, 0) scaleX(1.2); }
}

/* the final, unbroken hand-off from mist to paper */
.range-wash {
  position: absolute;
  inset: auto 0 -1px 0;
  height: 38%;
  background: linear-gradient(180deg,
    rgba(250, 247, 242, 0) 0%,
    rgba(250, 247, 242, 0.18) 32%,
    rgba(250, 247, 242, 0.58) 62%,
    rgba(250, 247, 242, 0.92) 82%,
    var(--paper) 97%);
}

@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.hero-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  place-content: center;
  padding: 0 1.5rem 1.5rem;
  will-change: transform, opacity;
}

.hero h1 {
  font-size: clamp(2.7rem, 7.5vw, 5.6rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: #f6f3ea;
  text-shadow: 0 1px 22px rgba(10, 18, 20, 0.35);
  animation: rise 1s 0.15s var(--ease) both;
}
.hero h1 em { font-style: italic; font-weight: 300; }

.hero-sub {
  font-family: var(--sans);
  font-size: clamp(0.72rem, 1.5vw, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: #b9c9ae;
  margin-top: 1.2rem;
  animation: rise 1s 0.35s var(--ease) both;
}

@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

@media (max-width: 700px) {
  .hero { min-height: clamp(500px, 74svh, 700px); padding-top: clamp(120px, 16svh, 160px); }
  .hero-art { height: clamp(245px, 60vw, 350px); }
  .fog { filter: blur(10px); }
}

/* ————— buttons ————— */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 2.1rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(28, 26, 23, 0.5); }
.btn:active { transform: none; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn-block { width: 100%; }

/* ————— sections ————— */

.section { padding: clamp(4.5rem, 9vw, 8rem) clamp(1.25rem, 4vw, 3rem); }
.section-tinted { background: var(--paper-deep); }

.section-head { text-align: center; max-width: 44rem; margin: 0 auto clamp(2.5rem, 5vw, 4rem); }
.section-sub { color: var(--ink-soft); margin-top: 1rem; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ————— filters ————— */

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.chip {
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: all 0.25s var(--ease);
}
.chip:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-faint); }
.chip.active { background: var(--sage); color: #f2efe6; box-shadow: none; }

/* ————— masonry gallery ————— */

.masonry {
  columns: 3 280px;
  column-gap: 1.6rem;
  max-width: 90rem;
  margin: 0 auto;
}

.card {
  display: block;
  width: 100%;
  break-inside: avoid;
  margin: 0 0 1.6rem;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--paper-deep);
  box-shadow: var(--shadow-card);
  text-align: left;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), box-shadow 0.35s var(--ease);
}
.card.in { opacity: 1; transform: none; }
.card:hover { box-shadow: var(--shadow-float); }

.card img {
  width: 100%;
  height: auto;
  transition: transform 0.9s var(--ease);
}
.card:hover img { transform: scale(1.045); }

.card-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 14, 12, 0.72), rgba(15, 14, 12, 0.12) 45%, transparent 65%);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}
.card:hover .card-veil { opacity: 1; }

.card-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.4rem 1.5rem;
  color: #fff;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease);
}
.card:hover .card-info { transform: none; opacity: 1; }

.card-title { font-family: var(--serif); font-size: 1.35rem; font-weight: 400; }
.card-loc { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; margin-top: 0.2rem; }
.card-price {
  margin-top: 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #f0c894;
}

@media (hover: none) {
  .card-veil, .card-info { opacity: 1; transform: none; }
  .card-veil { background: linear-gradient(to top, rgba(15, 14, 12, 0.62), transparent 42%); }
}

/* ————— examples (“in your home”) ————— */

.examples {
  max-width: 80rem;
  margin: 0 auto;
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.example {
  display: grid;
  grid-template-columns: 7fr 4fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.example:nth-child(even) .example-media { order: 2; }

.example-media {
  overflow: hidden;
  border-radius: 6px;
  box-shadow: var(--shadow-card);
}
.example-media img { width: 100%; height: auto; transition: transform 1.2s var(--ease); }
.example:hover .example-media img { transform: scale(1.03); }

.example-caption h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 0.8rem; }
.example-caption p { color: var(--ink-soft); max-width: 30em; }

@media (max-width: 760px) {
  .example, .example:nth-child(even) { grid-template-columns: 1fr; }
  .example:nth-child(even) .example-media { order: 0; }
  .example-caption { text-align: center; }
  .example-caption p { margin: 0 auto; }
}

/* ————— about ————— */

.about-grid {
  max-width: 74rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.about-media { border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-card); }
.about-media img { width: 100%; height: 100%; object-fit: cover; }

.about-text h2 { margin-bottom: 1.2rem; }
.about-text > p { color: var(--ink-soft); max-width: 38em; }

.about-text blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.5rem;
  line-height: 1.35;
  margin: 1.8rem 0;
  padding-left: 1.4rem;
  border-left: 2px solid var(--accent);
  color: var(--ink);
}

.craft-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem 2rem;
  margin-top: 2rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}
.craft-list div { display: grid; gap: 0.15rem; }
.craft-list strong { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); }
.craft-list span { font-size: 0.88rem; color: var(--ink-soft); }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-media { max-height: 420px; }
}

/* ————— footer ————— */

.site-footer { border-top: 1px solid var(--line); padding: 2.5rem clamp(1.25rem, 4vw, 3rem); }
.footer-inner {
  max-width: 90rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  align-items: center;
}
.site-footer nav { display: flex; gap: 1.6rem; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.site-footer nav a:hover { color: var(--ink); }
.footer-meta { margin-left: auto; display: grid; gap: 0.1rem; text-align: right; font-size: 0.8rem; color: var(--ink-faint); }

@media (max-width: 700px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-meta { margin: 0; text-align: center; }
}

/* ————— scrim / overlays ————— */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(20, 18, 15, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.35s;
}
.scrim.show { opacity: 1; }

/* ————— detail modal ————— */

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: clamp(0rem, 2vw, 2.5rem);
}

.modal-inner {
  position: relative;
  width: min(1180px, 100%);
  max-height: 100%;
  overflow: hidden;
  background: var(--paper);
  border-radius: 8px;
  box-shadow: var(--shadow-float);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(340px, 5fr);
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.modal.show .modal-inner { opacity: 1; transform: none; }

.modal-close {
  position: absolute;
  top: 0.9rem; right: 0.9rem;
  z-index: 5;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(250, 247, 242, 0.92);
  box-shadow: 0 2px 12px rgba(28, 26, 23, 0.2);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  transition: transform 0.2s var(--ease);
}
.modal-close:hover { transform: rotate(90deg); }

.detail-media {
  position: relative;
  background: var(--wall);
  background-image: radial-gradient(140% 100% at 50% 0%, rgba(255, 255, 255, 0.55), transparent 55%);
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  min-height: 320px;
}

.detail-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(250, 247, 242, 0.92);
  box-shadow: 0 2px 12px rgba(28, 26, 23, 0.18);
  display: grid;
  place-items: center;
  z-index: 4;
  transition: transform 0.2s var(--ease), background 0.2s;
}
.detail-nav:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.detail-nav.prev { left: 0.9rem; }
.detail-nav.next { right: 0.9rem; }
.detail-nav svg { width: 18px; height: 18px; }

/* the framed-preview stage — scales with the real print dimensions */
.stage-wrap {
  --print-scale: 1;
  position: relative;
  display: inline-block;
  max-width: 100%;
  transition: transform 0.45s var(--ease);
}

/* dimension callouts, so the size is legible as well as visible */
.stage-wrap::after,
.stage-wrap::before {
  position: absolute;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.stage-wrap::after {
  content: attr(data-w);
  left: 0; right: 0;
  top: calc(100% + 9px);
  text-align: center;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}
.stage-wrap::before {
  content: attr(data-h);
  top: 0; bottom: 0;
  right: calc(100% + 9px);
  display: grid;
  place-items: center;
  writing-mode: vertical-rl;
  border-right: 1px solid var(--line);
  padding-right: 6px;
}
.detail-media:hover .stage-wrap::after,
.detail-media:hover .stage-wrap::before { opacity: 1; }

.stage { max-width: 100%; transition: padding 0.35s var(--ease), background 0.35s, box-shadow 0.35s, border-width 0.35s var(--ease); }
.stage img {
  max-width: 100%;
  max-height: min(58vh, 600px);
  width: auto;
  height: auto;
  transition: max-height 0.45s var(--ease), max-width 0.45s var(--ease);
}

/* caption under the preview */
.stage-scale {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(0.7rem, 2vw, 1.2rem);
  text-align: center;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  pointer-events: none;
}

.stage[data-frame="none"] {
  padding: 0;
  box-shadow: 0 18px 50px -18px rgba(28, 26, 23, 0.45);
}

/* the frame finish comes from the admin as a gradient, so any frame works */
.stage[data-frame="framed"] {
  /* moulding and mat are a fixed physical width, so they scale with the print */
  border: calc(15px * var(--print-scale, 1)) solid;
  border-image: var(--frame-image) 1;
  padding: calc(clamp(0.9rem, 2.6vw, 2rem) * var(--print-scale, 1));
  background: #fcfbf8;
  box-shadow:
    inset 0 0 0 1px rgba(28, 26, 23, 0.12),
    inset 0 10px 26px -12px rgba(28, 26, 23, 0.35),
    0 24px 60px -20px rgba(28, 26, 23, 0.5);
}
.stage[data-frame="framed"] img { box-shadow: 0 0 0 1px rgba(28, 26, 23, 0.08); }
.stage[data-frame="none"] img { box-shadow: none; }

/* details panel */
.detail-panel {
  padding: clamp(1.6rem, 3vw, 2.6rem);
  overflow-y: auto;
  max-height: min(92vh, 860px);
}

.detail-loc { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.detail-title { font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 0.4rem 0 0.7rem; }
.detail-desc { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 1.6rem; }

.opt-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 1.4rem 0 0.7rem;
}
.opt-label small { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.02em; text-transform: none; color: var(--ink-faint); }

.size-grid { display: grid; gap: 0.5rem; }
.size-opt {
  padding: 0.7rem 0.9rem;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--line);
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  transition: all 0.2s var(--ease);
}
.size-opt:hover { box-shadow: inset 0 0 0 1px var(--ink-faint); }
.size-opt.active { box-shadow: inset 0 0 0 2px var(--ink); background: #fff; }

/* little to-scale rectangle so the sizes are comparable at a glance */
.size-opt .s-chip {
  justify-self: center;
  border: 1px solid var(--ink-faint);
  background: var(--paper-deep);
  border-radius: 1px;
  transition: background 0.2s, border-color 0.2s;
}
.size-opt.active .s-chip { background: var(--ink); border-color: var(--ink); }

.size-opt .s-text { display: grid; gap: 0.05rem; }
.size-opt .s-dim { font-size: 0.9rem; font-weight: 600; }
.size-opt .s-name { font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
.size-opt .s-price { font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); }
.size-opt.active .s-price { color: var(--ink); }

.frame-row { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.frame-opt { display: grid; justify-items: center; gap: 0.4rem; width: 64px; }
.frame-swatch {
  width: 46px; height: 46px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(28, 26, 23, 0.14), 0 2px 6px rgba(28, 26, 23, 0.12);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
  position: relative;
}
.frame-opt:hover .frame-swatch { transform: scale(1.08); }
.frame-opt.active .frame-swatch { box-shadow: inset 0 0 0 1px rgba(28,26,23,0.14), 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.frame-opt span { font-size: 0.62rem; font-weight: 500; letter-spacing: 0.04em; text-align: center; color: var(--ink-soft); line-height: 1.25; }

.sw-none { background: var(--paper); }
.sw-none::after {
  content: "";
  position: absolute; inset: 10px;
  border-radius: 50%;
  border: 1.5px dashed var(--ink-faint);
}

.qty-row { display: flex; align-items: center; gap: 1rem; }
.qty {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.qty button { width: 38px; height: 38px; font-size: 1.1rem; color: var(--ink-soft); }
.qty button:hover { color: var(--ink); }
.qty output { min-width: 2ch; text-align: center; font-weight: 600; font-size: 0.95rem; }

.detail-cta { margin-top: 1.6rem; display: grid; gap: 0.8rem; }
.price-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--serif);
  font-size: 1.05rem;
}
.price-line .amount { font-size: 1.7rem; }

.detail-notes {
  margin-top: 1.5rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--ink-faint);
}
.detail-notes li { list-style: none; display: flex; gap: 0.6rem; align-items: baseline; }
.detail-notes li::before { content: "—"; color: var(--accent); }

@media (max-width: 900px) {
  .modal { padding: 0; align-items: stretch; }
  .modal-inner {
    grid-template-columns: 1fr;
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    overflow-y: auto;
    display: block;
  }
  .detail-media { min-height: 46vh; padding: 2.2rem 1.25rem; }
  .stage img { max-height: 40vh; }
  .detail-panel { max-height: none; overflow: visible; padding-bottom: 3rem; }
}

/* ————— cart drawer ————— */

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 95;
  width: min(430px, 100vw);
  background: var(--paper);
  box-shadow: var(--shadow-float);
  transform: translateX(102%);
  transition: transform 0.45s var(--ease);
  display: flex;
}
.drawer.show { transform: none; }
.drawer-inner { display: flex; flex-direction: column; width: 100%; }

.drawer-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.5rem 1.6rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-size: 1.5rem; }
.drawer-head button { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.drawer-head button:hover { color: var(--ink); }

.cart-items { flex: 1; overflow-y: auto; padding: 1.2rem 1.6rem; display: grid; gap: 1.2rem; align-content: start; }

.cart-item { display: grid; grid-template-columns: 88px 1fr auto; gap: 1rem; align-items: start; }

/* thumbnails are sized from the real print dimensions — a Gallery print
   genuinely looks bigger in the cart than a Small one */
.ci-thumb {
  display: grid;
  place-items: center;
  min-height: var(--t, 64px);
}
.ci-thumb img {
  width: var(--t, 64px);
  height: var(--t, 64px);
  object-fit: cover;
  border-radius: 3px;
  box-shadow: var(--shadow-card);
  transition: width 0.3s var(--ease), height 0.3s var(--ease);
}
.ci-title { font-family: var(--serif); font-size: 1.05rem; line-height: 1.2; }
.ci-meta { font-size: 0.75rem; color: var(--ink-faint); margin-top: 0.2rem; }
.ci-actions { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.55rem; }
.ci-actions .qty { transform: scale(0.88); transform-origin: left center; }
.ci-remove { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
.ci-remove:hover { color: #a33; }
.ci-price { font-weight: 600; font-size: 0.92rem; }

.cart-empty { text-align: center; padding: 3rem 1rem; color: var(--ink-soft); display: grid; gap: 1.2rem; justify-items: center; }
.cart-empty svg { width: 54px; height: 54px; opacity: 0.35; }
.cart-empty h4 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; color: var(--ink); }

.drawer-foot { padding: 1.3rem 1.6rem 1.6rem; border-top: 1px solid var(--line); display: grid; gap: 0.9rem; }
.subtotal { display: flex; justify-content: space-between; font-family: var(--serif); font-size: 1.1rem; }
.subtotal strong { font-size: 1.35rem; font-weight: 500; }
.drawer-foot small { color: var(--ink-faint); text-align: center; }

/* free-shipping progress */
.ship-meter { display: grid; gap: 0.5rem; }
.ship-meter small.earned { color: var(--sage); font-weight: 500; }
.meter { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter span {
  display: block;
  height: 100%;
  background: var(--sage);
  border-radius: 3px;
  transition: width 0.5s var(--ease);
}

.link-btn {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0.2rem;
}
.link-btn:hover { color: var(--ink); }

/* ————— checkout ————— */

.checkout {
  position: fixed;
  inset: 0;
  z-index: 96;
  overflow-y: auto;
  background: var(--paper);
  opacity: 0;
  transition: opacity 0.35s;
}
.checkout.show { opacity: 1; }

.checkout-inner { max-width: 1080px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3.5rem) 1.5rem 5rem; }

/* checkout layout: form on the left, order summary riding along on the right */
.co-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
  gap: clamp(1.2rem, 3vw, 2.4rem);
  align-items: start;
}
.co-grid-solo { grid-template-columns: minmax(0, 1fr); max-width: 640px; margin: 0 auto; }

.co-summary {
  position: sticky;
  top: 1.5rem;
  background: var(--paper-deep);
  border-radius: 10px;
  padding: 1.4rem;
}
.co-summary h4 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 1.1rem;
}
.sum-items { display: grid; gap: 1rem; margin-bottom: 1.2rem; }
.sum-item {
  display: grid;
  grid-template-columns: 66px 1fr auto;
  gap: 0.8rem;
  align-items: center;
  font-size: 0.85rem;
}
.sum-item .ci-title { font-size: 0.95rem; }
.sum-item strong { font-size: 0.85rem; }

.co-lede { color: var(--ink-soft); font-size: 0.9rem; margin: -0.7rem 0 1.5rem; max-width: 46ch; }

.review-block { margin-bottom: 1.3rem; }
.rb-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.5rem;
}
.addr-email { color: var(--ink-faint); }

@media (max-width: 860px) {
  .co-grid { grid-template-columns: minmax(0, 1fr); }
  .co-summary { position: static; order: -1; }
  .sum-items { gap: 0.8rem; }
}

.co-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.2rem; }
.co-top .brand { font-size: 1.2rem; }
.co-close { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.co-close:hover { color: var(--ink); }

.steps { display: flex; gap: 0.4rem; align-items: center; margin-bottom: 2.4rem; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
.step .dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.step.done .dot, .step.active .dot { background: var(--ink); color: var(--paper); box-shadow: none; }
.step.active { color: var(--ink); font-weight: 600; }
.step-sep { width: 26px; height: 1px; background: var(--line); }

.co-card { background: #fff; border-radius: 10px; box-shadow: var(--shadow-card); padding: clamp(1.4rem, 3vw, 2.2rem); }
.co-card h3 { font-size: 1.6rem; margin-bottom: 1.4rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.field label i { font-style: normal; font-weight: 500; letter-spacing: 0.04em; text-transform: none; color: var(--ink-faint); }
.field input, .field select {
  font: inherit;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(28, 26, 23, 0.08); }
.field.invalid input { border-color: #b34a3a; }
.field .err { font-size: 0.72rem; color: #b34a3a; display: none; }
.field.invalid .err { display: block; }

.ship-opt {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--line);
  margin-bottom: 0.8rem;
  width: 100%;
  text-align: left;
  transition: all 0.2s var(--ease);
}
.ship-opt:hover { box-shadow: inset 0 0 0 1px var(--ink-faint); }
.ship-opt.active { box-shadow: inset 0 0 0 2px var(--ink); background: var(--paper); }
.ship-opt .radio { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-faint); flex: none; }
.ship-opt.active .radio { box-shadow: inset 0 0 0 5px var(--ink); }
.ship-opt .so-body { flex: 1; }
.ship-opt .so-label { font-weight: 600; font-size: 0.95rem; }
.ship-opt .so-sub { font-size: 0.78rem; color: var(--ink-faint); }
.ship-opt .so-price { font-weight: 600; }

.totals { border-top: 1px solid var(--line); padding-top: 1rem; display: grid; gap: 0.45rem; font-size: 0.92rem; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-family: var(--serif); font-size: 1.25rem; margin-top: 0.4rem; }
.totals .free { color: #3d7a45; font-weight: 600; }

.addr-block { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.5; margin-bottom: 1.4rem; }
.addr-block strong { color: var(--ink); }
.edit-link { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-left: 0.6rem; }

.pay-note {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: var(--paper-deep);
  border-radius: 8px;
  padding: 1.1rem 1.2rem;
  margin: 1.4rem 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.pay-note svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--accent); }

.co-actions { display: flex; gap: 0.8rem; margin-top: 1.6rem; flex-wrap: wrap; }
.co-actions .btn { flex: 1; min-width: 200px; }

.confirm { text-align: center; padding: 2rem 0 1rem; }
.confirm .tick {
  width: 74px; height: 74px;
  margin: 0 auto 1.4rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
}
.confirm .tick svg { width: 32px; height: 32px; }
.confirm h3 { font-size: 2.2rem; margin-bottom: 0.6rem; }
.confirm p { color: var(--ink-soft); max-width: 34em; margin: 0 auto; }
.confirm .order-no { font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin: 1.2rem 0 1.8rem; font-weight: 600; }

@media (max-width: 620px) {
  .form-grid { grid-template-columns: 1fr; }
  .size-grid { grid-template-columns: 1fr 1fr; }
}

/* ————— toast ————— */

.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 150%);
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-size: 0.85rem;
  box-shadow: var(--shadow-float);
  transition: transform 0.45s var(--ease), visibility 0.45s;
  max-width: min(92vw, 480px);
  text-align: center;
  visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }

/* ————— image protection ————— */

.p-img {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

/* capture guard: photos vanish the moment focus is lost or a capture is
   suspected; layout stays put so nothing jumps when they return */
body.shield .p-img { visibility: hidden !important; }
body.shield .stage-shield::before { color: rgba(28, 26, 23, 0.35); }

/* faint diagonal watermark across gallery cards */
.card::after {
  content: attr(data-wm);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform: rotate(-16deg);
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.14);
  text-shadow: 0 1px 2px rgba(28, 26, 23, 0.12);
  pointer-events: none;
  white-space: nowrap;
}

/* detail view: interaction shield + watermarks over the print preview */
.stage { position: relative; }
.stage-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.stage-shield::before {
  content: attr(data-wm);
  transform: rotate(-18deg);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.6vw, 2.6rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(28, 26, 23, 0.06);
  white-space: nowrap;
}
.stage-shield::after {
  content: "© " attr(data-wm);
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  text-shadow: 0 1px 5px rgba(28, 26, 23, 0.55);
}

@media print {
  .p-img, .masonry, .detail-media, .examples, .about-media, .hero-art {
    display: none !important;
  }
  body::before {
    content: "Photographs are protected and unavailable in print preview.";
    display: block;
    padding: 2rem;
    font-family: Georgia, serif;
  }
}

/* ————— reduced motion ————— */

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