/* Lela Maisy - static site. No build step, no dependencies. */

:root {
  --paper: #e9e7e2;
  --paper-2: #f2f1ed;
  --ink: #17171a;
  --ink-soft: #5c5b58;
  --ink-faint: #93918c;
  --rule: #cbc8c1;
  --max: 1180px;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.7 var(--sans);
  letter-spacing: 0.01em;
}

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

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

/* ---------------- top bar ---------------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 56px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.mark {
  font-size: 12px;
  letter-spacing: 0.42em;
  text-transform: lowercase;
}

.bar nav {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
}

.bar nav a:hover { color: var(--ink); }

/* ---------------- hero ---------------- */

.hero {
  margin: 0 auto;
  max-width: var(--max);
  padding: clamp(34px, 7vw, 78px) clamp(18px, 5vw, 56px) 0;
}

.hero img {
  width: 100%;
  max-height: 64vh;
  object-fit: cover;
  object-position: center 42%;
  filter: grayscale(1) contrast(1.02);
}

.hero-type {
  text-align: center;
  padding-bottom: clamp(26px, 5vw, 52px);
}

.hero-type h1 {
  margin: 0;
  font-size: clamp(20px, 4.6vw, 42px);
  font-weight: 200;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--ink);
}

.tagline {
  margin: 14px 0 0;
  font-size: 10px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------------- intro ---------------- */

.intro {
  max-width: 640px;
  margin: clamp(40px, 8vw, 96px) auto;
  padding: 0 clamp(18px, 5vw, 56px);
  text-align: center;
}

.intro p { margin: 0 0 18px; color: var(--ink-soft); }

.intro-links {
  display: flex;
  justify-content: center;
  gap: 26px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.intro-links a { border-bottom: 1px solid var(--rule); padding-bottom: 3px; }
.intro-links a:hover { border-color: var(--ink); }

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

.work { padding: 0 clamp(18px, 5vw, 56px); max-width: var(--max); margin: 0 auto; }

.collection { margin-bottom: clamp(48px, 9vw, 110px); }

.collection-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding-bottom: 14px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--rule);
}

.collection-head h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: lowercase;
}

.collection-head p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-faint);
  max-width: 46ch;
}

.grid {
  columns: 4 210px;
  column-gap: 16px;
}

.tile {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  position: relative;
  break-inside: avoid;
  text-align: left;
  font: inherit;
  color: inherit;
}

.tile img {
  width: 100%;
  filter: grayscale(1);
  transition: opacity 0.35s ease, transform 0.6s ease;
}

.tile:hover img, .tile:focus-visible img { opacity: 0.74; }

.tile figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px 12px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tile:hover figcaption, .tile:focus-visible figcaption { opacity: 1; }

.tile:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

/* ---------------- panels ---------------- */

.panel {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(44px, 8vw, 96px) clamp(18px, 5vw, 56px);
  border-top: 1px solid var(--rule);
}

.panel.alt { background: var(--paper-2); max-width: none; }
.panel.alt > * { max-width: var(--max); margin-left: auto; margin-right: auto; }

.panel h2, .about h2 {
  margin: 0 0 30px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: lowercase;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(20px, 4vw, 48px);
}

.card {
  border: 1px solid var(--rule);
  padding: 26px 24px 24px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.rate { list-style: none; margin: 0 0 16px; padding: 0; }

.rate li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px dotted var(--rule);
  font-size: 14px;
}

.rate li span:last-child { font-variant-numeric: tabular-nums; }

.rate-lead {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.fine { font-size: 12px; line-height: 1.75; color: var(--ink-faint); margin: 0 0 20px; }
.fine.center { text-align: center; margin: 34px auto 0; max-width: 50ch; }

.lede { max-width: 58ch; margin: 0 0 34px; color: var(--ink-soft); }

.tiers { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 1px; background: var(--rule); }

.tiers li {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 90px;
  gap: 8px 20px;
  padding: 18px 4px;
  background: var(--paper-2);
}

.tiers .tier-name { font-size: 14px; }
.tiers .tier-terms { grid-column: 1; font-size: 12px; color: var(--ink-faint); }
.tiers .tier-price { grid-row: 1; grid-column: 2; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------- buttons ---------------- */

.btn {
  display: inline-block;
  margin-top: auto;
  align-self: flex-start;
  padding: 11px 20px;
  border: 1px solid var(--ink);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover { background: var(--ink); color: var(--paper); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: transparent; color: var(--ink); }
.btn.ghost { border-color: var(--rule); color: var(--ink-soft); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }

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

.about {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(44px, 8vw, 96px) clamp(18px, 5vw, 56px);
  border-top: 1px solid var(--rule);
}

.about img { filter: grayscale(1); }
.about-type p { margin: 0 0 18px; color: var(--ink-soft); max-width: 56ch; }

.contact { font-size: 12px; letter-spacing: 0.14em; text-transform: lowercase; }
.contact a { border-bottom: 1px solid var(--rule); }
.contact a:hover { border-color: var(--ink); }

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

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  justify-content: space-between;
  padding: 26px clamp(18px, 5vw, 56px) 40px;
  border-top: 1px solid var(--rule);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(12, 12, 13, 0.94);
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
}

.lightbox[hidden] { display: none; }

.lb-figure {
  margin: 0;
  display: grid;
  gap: 18px;
  max-height: 100%;
  justify-items: center;
}

.lb-figure img {
  max-height: 68vh;
  max-width: 100%;
  object-fit: contain;
}

.lb-figure figcaption { color: #ddd9d2; text-align: center; }

.lb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: lowercase;
  margin-bottom: 16px;
}

.lb-series { color: #86837d; }

.lb-buy { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.lb-buy .btn {
  margin: 0;
  border-color: #6f6c66;
  color: #f0eee9;
}

.lb-buy .btn:hover { background: #f0eee9; color: #17171a; border-color: #f0eee9; }

.lb-close, .lb-nav {
  position: absolute;
  background: none;
  border: 0;
  color: #cfccc6;
  cursor: pointer;
  font: inherit;
  padding: 12px;
}

.lb-close {
  top: 10px;
  right: 14px;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.lb-nav { top: 50%; transform: translateY(-50%); font-size: 20px; }
.lb-nav.prev { left: 4px; }
.lb-nav.next { right: 4px; }
.lb-close:hover, .lb-nav:hover { color: #fff; }

/* ---------------- small screens ---------------- */

@media (max-width: 640px) {
  .grid { columns: 2 130px; column-gap: 10px; }
  .tile { margin-bottom: 10px; }
  .about { grid-template-columns: 1fr; }
  .about img { max-width: 240px; }
  .hero img { max-height: 60vh; }
  .bar { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------------- lightbox size picker ---------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.lb-print-pick { display: inline-flex; }

.lb-print-pick select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid #6f6c66;
  border-right: 0;
  color: #f0eee9;
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 11px 32px 11px 14px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #cfccc6 50%), linear-gradient(135deg, #cfccc6 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.lb-print-pick select:focus-visible { outline: 1px solid #f0eee9; outline-offset: 2px; }
.lb-print-pick + .btn { margin-left: -10px; }

[hidden] { display: none !important; }

/* ---------------- bag ---------------- */

.bag-bar {
  position: fixed;
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(14px, 3vw, 32px);
  z-index: 60;
}

.bag-bar button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.bag-bar button:hover { background: var(--paper); color: var(--ink); }
.bag-bar-sep { opacity: 0.5; }

.bag {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(23, 23, 26, 0.45);
  display: flex;
  justify-content: flex-end;
}

.bag-panel {
  width: min(440px, 100%);
  height: 100%;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  padding: 24px clamp(18px, 4vw, 32px) 28px;
  overflow-y: auto;
  border-left: 1px solid var(--rule);
}

.bag-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.bag-head h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: lowercase;
}

.bag-close {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
}

.bag-close:hover { color: var(--ink); }

.bag-lines { list-style: none; margin: 0; padding: 0; }

.bag-lines li {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  grid-template-areas: "img label price" "img remove price";
  gap: 4px 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px dotted var(--rule);
  font-size: 13px;
}

.bag-lines img { grid-area: img; width: 56px; height: 56px; object-fit: cover; filter: grayscale(1); }
.bag-lines .bag-label { grid-area: label; }
.bag-lines .bag-price { grid-area: price; font-variant-numeric: tabular-nums; }

.bag-remove {
  grid-area: remove;
  justify-self: start;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  cursor: pointer;
}

.bag-remove:hover { color: var(--ink); }

.bag-foot { margin-top: auto; padding-top: 20px; display: grid; gap: 14px; }

.bag-sums { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 20px; font-weight: 300; }
.bag-sums .fine { margin: 0; text-align: right; }

.bag-foot .btn { width: 100%; text-align: center; margin: 0; }
.bag-foot .btn:disabled { opacity: 0.4; cursor: default; }
.bag-foot .btn:disabled:hover { background: var(--ink); color: var(--paper); }
.bag-foot .fine { margin: 0; }

.bag-error { margin: 0; font-size: 12px; color: #8a2f2f; }

/* ---------------- thanks page ---------------- */

.thanks {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(44px, 8vw, 96px) clamp(18px, 5vw, 56px);
}

.thanks h1 {
  margin: 0 0 22px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: lowercase;
}

.thanks p { color: var(--ink-soft); margin: 0 0 16px; }

.order-lines { list-style: none; margin: 26px 0; padding: 0; border-top: 1px solid var(--rule); }
.order-lines li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dotted var(--rule); font-size: 14px; }
.order-lines li.total { border-bottom: 1px solid var(--rule); font-weight: 500; }
.order-lines span:last-child { font-variant-numeric: tabular-nums; }

.downloads { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 10px; }
.downloads .btn { margin: 0; }

.thanks .back { display: inline-block; margin-top: 30px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; border-bottom: 1px solid var(--rule); }
.thanks .back:hover { border-color: var(--ink); }
