/* ============================================================
   DESIGNER COLLABORATIONS (2026)
   /collaborations/lore-project — Amy Rich's Lore Project rugs.

   Runs on the shared anou-tokens.css variables (loaded in base.html).
   Everything is scoped under .clb so nothing leaks into the rest
   of the site.   Prefix: .clb-
   ============================================================ */

.clb {
  --clb-sand: #f6f3ee;
  --clb-rule: #e6e1d8;
  color: var(--ink-body);
  font-family: var(--font-body);
  line-height: 1.6;
}
.clb img { display: block; max-width: 100%; }
.clb a { color: var(--anou-blue); }

/* ---------- Type ---------- */
.clb-eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--anou-blue);
  margin: 0 0 10px;
}
.clb-eyebrow-light { color: #fff; opacity: 0.9; }
.clb-h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  color: #fff;
  margin: 0 0 16px;
}
.clb-x { font-weight: 400; opacity: 0.8; }
.clb-h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 14px;
}
.clb-h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 3vw, 36px);
  color: var(--ink);
  margin: 0 0 4px;
}
.clb-lede { font-size: 18px; color: #fff; max-width: 560px; margin: 0 0 24px; }

/* ---------- Buttons ---------- */
.clb-btn {
  display: inline-block;
  background: var(--anou-blue);
  color: #fff !important;
  border: 0;
  border-radius: 999px;
  padding: 14px 28px;
  font-family: var(--font-ui);
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.clb-btn:hover { background: var(--anou-blue-dark); }
.clb-btn:disabled { opacity: 0.6; cursor: default; }
.clb-btn-light { background: #fff; color: var(--ink) !important; }
.clb-btn-light:hover { background: var(--anou-blue-6); }

/* ---------- Hero ---------- */
.clb-hero {
  position: relative;
  min-height: min(78vh, 760px);
  background-size: cover;
  background-position: center 75%;
  display: flex;
  align-items: flex-end;
}
.clb-hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20, 18, 15, 0.72) 0%, rgba(20, 18, 15, 0.15) 60%, rgba(20, 18, 15, 0) 100%);
}
.clb-hero-text {
  position: relative;
  width: 100%;
  max-width: var(--page-max, 1200px);
  margin: 0 auto;
  padding: 0 var(--page-pad, 24px) 56px;
}

/* ---------- Shared section shell ---------- */
.clb-intro, .clb-collection, .clb-process, .clb-london, .clb-commission, .clb-about, .clb-thanks {
  max-width: var(--page-max, 1200px);
  margin: 0 auto;
  padding: 72px var(--page-pad, 24px);
}
.clb-section-head { max-width: 680px; margin-bottom: 40px; }
.clb-section-sub { color: var(--ink-muted); }

/* ---------- Designer intro ---------- */
.clb-intro {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
}
/* Photos are never cropped — artisan photos come in every shape, and cropping cut off
   rugs and heads. Each photo shows whole at its own proportions. */
.clb-intro-photo img { width: 100%; height: auto; }
.clb-intro-links a { margin-right: 20px; font-family: var(--font-ui); }

/* ---------- Rugs ---------- */
.clb-collection { border-top: 1px solid var(--clb-rule); }
.clb-rug {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: start;
  padding: 48px 0;
  border-bottom: 1px solid var(--clb-rule);
  scroll-margin-top: 90px;
}
.clb-rug:last-child { border-bottom: 0; }
.clb-rug-flip .clb-rug-media { order: 2; }

.clb-frame {
  position: relative;
  overflow: hidden;
  background: #fff;
}
/* The main photo keeps its own shape, capped in height so tall phone photos don't run
   off the screen; the "on the loom" photo sits over it, letterboxed, without cropping. */
.clb-frame-main { width: auto; height: auto; max-width: 100%; max-height: 680px; margin: 0 auto; }
.clb-frame-loom { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.clb-frame-loom,
.clb-frame-tag { position: absolute; opacity: 0; transition: opacity 0.35s ease; }
.clb-frame-loom { inset: 0; }
.clb-frame-tag {
  left: 14px; bottom: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
}
/* Hover (mouse) or the toggle button (touch) reveals the making-of photo */
@media (hover: hover) {
  .clb-frame:hover .clb-frame-loom,
  .clb-frame:hover .clb-frame-tag { opacity: 1; }
}
.clb-frame.show-loom .clb-frame-loom,
.clb-frame.show-loom .clb-frame-tag { opacity: 1; }

.clb-loom-toggle {
  position: absolute;
  right: 14px; top: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}
.clb-loom-toggle[aria-pressed="true"] { background: var(--anou-blue); color: #fff; }
.clb-sold-badge {
  position: absolute; left: 14px; top: 14px;
  background: var(--ink); color: #fff;
  font-family: var(--font-ui); font-size: 13px;
  padding: 6px 12px; border-radius: 999px;
}

.clb-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.clb-thumb {
  width: 64px; height: 64px;
  padding: 0; border: 2px solid transparent;
  background: none; cursor: pointer;
}
.clb-thumb img { width: 100%; height: 100%; object-fit: contain; background: #f4f2ee; }
.clb-thumb.is-active { border-color: var(--anou-blue); }
.clb-thumb-loom { position: relative; }
.clb-thumb-loom::after {
  content: 'loom';
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.55); color: #fff;
  font-family: var(--font-ui); font-size: 10px; text-align: center;
}

.clb-rug-size { font-family: var(--font-ui); color: var(--ink-muted); margin: 0 0 18px; }
.clb-rug-story { font-size: 17px; color: var(--ink-body); }
.clb-maker { font-size: 14px; color: var(--ink-muted); border-left: 3px solid var(--anou-blue-5); padding-left: 12px; }

.clb-buy { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--clb-rule); }
.clb-price { font-family: var(--font-display); font-weight: 900; font-size: 30px; color: var(--ink); margin: 0; }
.clb-buy-note { font-size: 14px; color: var(--success); margin: 2px 0 14px; }
.clb-dest { display: block; font-family: var(--font-ui); font-size: 13px; color: var(--ink-muted); margin-bottom: 6px; }
.clb-dest span { display: block; margin-bottom: 4px; }
.clb-dest select, .clb-calc select, .clb-calc input, .clb-calc textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--clb-rule);
  border-radius: 6px;
  font: inherit;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
  box-sizing: border-box;
}
.clb-buy-other { font-size: 13px; color: var(--ink-muted); margin: 0 0 16px; }
.clb-commission-link { display: block; margin-top: 16px; font-family: var(--font-ui); font-size: 14px; }

.clb-error { display: none; color: var(--error); font-size: 14px; margin: 10px 0 0; }
.clb-success { display: none; color: var(--success); font-size: 15px; margin: 12px 0 0; }

/* ---------- Process ---------- */
.clb-process { border-top: 1px solid var(--clb-rule); }
.clb-process-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.clb-process-grid figure { margin: 0; }
.clb-process-grid { align-items: start; }
.clb-process-grid img { width: 100%; height: auto; }
.clb-process-grid figcaption { font-size: 14px; color: var(--ink-muted); margin-top: 8px; }

/* ---------- London ---------- */
.clb-london { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px; align-items: center; }
.clb-london-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.clb-london-photos { align-items: start; }
.clb-london-photos img { width: 100%; height: auto; }

/* ---------- Commission ---------- */
.clb-commission { background: var(--clb-sand); max-width: none; }
.clb-commission > * { max-width: 860px; margin-left: auto; margin-right: auto; }
.clb-calc label { display: block; font-family: var(--font-ui); font-size: 13px; color: var(--ink-muted); }
.clb-calc-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 16px; }
.clb-calc-notes { margin-bottom: 18px; }
.clb-calc-step { font-family: var(--font-ui); font-size: 14px; color: var(--ink); font-weight: 600; margin: 8px 0 10px; }
.clb-pick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.clb-pick-card {
  background: #fff;
  border: 2px solid var(--clb-rule);
  border-radius: 8px;
  padding: 6px 6px 8px;
  cursor: pointer;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink);
}
.clb-pick-card img { width: 100%; height: 90px; object-fit: contain; background: #f4f2ee; margin-bottom: 6px; }
.clb-pick-card.is-active { border-color: var(--anou-blue); box-shadow: 0 0 0 2px var(--anou-blue-6); }
.clb-calc-delivery { flex-basis: 100%; font-size: 14px; color: var(--success); }
.clb-calc-result {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px;
  background: #fff; padding: 18px 20px; margin: 4px 0 20px;
  border: 1px solid var(--clb-rule);
}
.clb-calc-label { font-family: var(--font-ui); font-size: 13px; color: var(--ink-muted); }
.clb-calc-price { font-family: var(--font-display); font-weight: 900; font-size: 30px; color: var(--ink); }
.clb-calc-note { font-size: 14px; color: var(--ink-muted); }
.clb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Designer collaboration program ---------- */
.clb-program {
  max-width: var(--page-max, 1200px);
  margin: 0 auto;
  padding: 72px var(--page-pad, 24px);
  border-top: 1px solid var(--clb-rule);
}
.clb-program-text { max-width: 720px; }
.clb-program.has-photo {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
}
.clb-program-photo img { width: 100%; height: auto; }
.clb-program-list { padding-left: 20px; margin: 0 0 18px; }
.clb-program-list li { margin-bottom: 8px; }
.clb-apply { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--clb-rule); }
.clb-apply-lede { font-family: var(--font-ui); color: var(--ink); margin: 0 0 14px; }
.clb-apply-form { margin-top: 4px; }
.clb-apply-form .clb-calc-notes input, .clb-apply-form .clb-calc-notes textarea { margin-top: 4px; }

.clb-program-videos {
  max-width: var(--page-max, 1200px);
  margin: 0 auto;
  padding: 0 var(--page-pad, 24px) 72px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 320px));
  gap: 24px;
  justify-content: center;
}
.clb-program-videos figure { margin: 0; }
.clb-program-videos video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: var(--clb-sand); display: block; }
.clb-program-videos figcaption { font-size: 14px; color: var(--ink-muted); margin-top: 8px; }

/* ---------- About / thanks ---------- */
.clb-about { max-width: 760px; text-align: center; color: var(--ink-muted); }
.clb-thanks { max-width: 640px; text-align: center; padding-top: 96px; padding-bottom: 120px; }

/* ---------- Phones ---------- */
@media (max-width: 860px) {
  .clb-frame-main { max-height: 520px; }
  .clb-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .clb-intro, .clb-rug, .clb-london, .clb-program.has-photo { grid-template-columns: 1fr; gap: 24px; }
  .clb-rug-flip .clb-rug-media { order: 0; }
  .clb-process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clb-program-videos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-bottom: 48px; }
  .clb-intro, .clb-collection, .clb-process, .clb-london, .clb-commission, .clb-about, .clb-program { padding-top: 48px; padding-bottom: 48px; }
  .clb-hero { min-height: min(70vh, 620px); background-position: 30% bottom; }
  .clb-hero-text { padding-bottom: 36px; }
}
