/* custom-rugs.html: builds on tokens.css and site.css */
.page-custom { --cr-jute-hi: #E6D7B9; --cr-jute-lo: #B9A27A; }

/* ---------- cr-hero ---------- */
.cr-hero { position: relative; min-height: calc(100svh - 72px); overflow: hidden; display: flex; isolation: isolate; }
.cr-hero__photo { position: absolute; inset: 0; z-index: -1; transform-origin: 50% 60%; }
.cr-hero__photo img, .cr-hero__measure { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cr-hero__veil { position: absolute; inset: 0; background: rgba(35, 48, 94, .34); }
.cr-outline { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linejoin: round; }
.cr-dim path { fill: none; stroke: var(--bg); stroke-width: 4; stroke-linecap: round; }
.cr-mark { font-family: var(--font-label), monospace; font-weight: 700; font-size: 52px; letter-spacing: .18em; fill: var(--bg); text-anchor: middle; paint-order: stroke; stroke: var(--indigo); stroke-width: 10px; }
.cr-hero__veil { z-index: 0; }
.cr-hero__measure { z-index: 1; }
.cr-hero__inner { position: relative; z-index: 2; width: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding-top: 12svh; padding-bottom: clamp(20px, 3vw, 44px); }
.cr-hero__h1 {
  color: var(--bg); font-size: clamp(52px, min(9vw, 15svh), 180px); max-width: 12ch;
  text-shadow: 3px 3px 0 rgba(35, 48, 94, .55);
}
.cr-nw { white-space: nowrap; }
.cr-hero__plate {
  align-self: flex-start; width: min(100%, 41.6667%); min-width: min(100%, 460px);
  padding: clamp(20px, 2.4vw, 34px); border-radius: 20px; display: grid; gap: 14px;
}
.cr-hero__plate .kicker { color: var(--turmeric); }
.cr-hero__h2 { font-size: clamp(30px, 3vw, 44px); font-weight: 800; line-height: .95; }
.cr-hero__plate .pill { justify-self: start; margin-top: 6px; }
@media (max-width: 899px) {
  .cr-hero { min-height: calc(100svh - 64px); }
  .cr-hero__inner { padding-top: 14svh; }
  .cr-hero__plate { width: 100%; min-width: 0; }
  .cr-mark { font-size: 70px; }
}

/* ---------- cr-options ---------- */
.cr-options { padding-block: clamp(96px, 11vw, 180px); }
.cr-options__h { grid-column: 1 / 9; }
.cr-options__body { grid-column: 1 / 7; margin-top: 28px; }
.cr-weave { margin-top: clamp(56px, 6vw, 96px); row-gap: 40px; align-items: start; }
.cr-weave__index { grid-column: 1 / 5; }
.cr-weave__stage { grid-column: 5 / 13; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .52fr); gap: clamp(20px, 2.4vw, 36px); align-items: end; }
.cr-weave__item { border-top: 2px solid var(--ink); padding: 14px 0 22px; }
.cr-weave__item:last-child { border-bottom: 2px solid var(--ink); }
.cr-weave__tab {
  display: flex; align-items: baseline; gap: 16px; width: 100%; min-height: 56px; padding: 6px 0;
  border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink);
  transition: color var(--dur-quick) var(--ease-out);
}
.cr-weave__num { flex: none; width: 3ch; }
.cr-weave__name { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 2.8vw, 40px); letter-spacing: -.02em; line-height: 1; }
.cr-weave__tab:hover .cr-weave__name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.cr-weave__item.is-on .cr-weave__tab { color: var(--accent); }
.cr-weave__item.is-on .cr-weave__name::after { content: " ●"; font-size: .45em; vertical-align: middle; }
.cr-weave__line { font-size: 17px; max-width: 40ch; margin: 6px 0 10px calc(3ch + 16px * 1.5); }
.cr-weave__max { margin-left: calc(3ch + 16px * 1.5); }
.cr-weave__diagram { background: var(--bg); border-radius: 20px; padding: clamp(16px, 2vw, 28px); position: relative; }
.cr-weave__diagram svg { display: block; width: 100%; height: auto; }
.cr-weave__legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 10px; }
.cr-weave__legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.sw--indigo { background: var(--indigo); } .sw--madder { background: var(--accent); } .sw--turmeric { background: var(--turmeric); }
.cr-weave__stage[data-kind="flat"] .cr-pile-key { opacity: .35; }
.cr-weave__now { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 22px; }
.cr-weave__now b { font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: 28px; letter-spacing: -.02em; }
.cr-weave__size {
  position: absolute; right: -18px; top: -26px; width: 104px; font-size: 12px; line-height: 1.3;
  background: var(--leaf); color: var(--leaf-ink); transform: rotate(9deg);
}
.cr-weave__lens { --rim: var(--turmeric); --tilt: 3deg; margin: 0 0 40px; aspect-ratio: 3 / 4; }
.cr-weave__lens [data-island] { width: 100%; height: 100%; }
.cr-weave__lens [data-island] > div, .cr-weave__lens [role="region"] { width: 100%; height: 100%; border-radius: 0 !important; }
.cr-weave__lens img { width: 100%; height: 100%; object-fit: cover; }
.cr-weave svg .warp { stroke: var(--indigo); stroke-width: 16; stroke-linecap: round; }
.cr-weave svg .weft { fill: none; stroke: var(--accent); stroke-width: 20; stroke-linecap: round; stroke-linejoin: round; }
.cr-weave svg .weft--alt { stroke: #A8311F; }
.cr-weave svg .over { stroke: var(--indigo); stroke-width: 16; stroke-linecap: butt; }
.cr-weave svg .tuft { fill: none; stroke: var(--turmeric); stroke-width: 12; stroke-linecap: round; transform-box: fill-box; transform-origin: 50% 100%; }
.cr-weave svg .tuft--leaf { stroke: var(--leaf); }
.cr-weave svg .knot { fill: var(--turmeric); stroke: var(--indigo); stroke-width: 4; transform-box: fill-box; transform-origin: 50% 50%; }
.cr-weave svg .base { fill: none; stroke: rgba(35,48,94,.25); stroke-width: 2; stroke-dasharray: 6 8; }
@media (max-width: 899px) {
  .cr-weave__stage { grid-template-columns: minmax(0, 1fr); }
  .cr-weave__lens { width: 72%; justify-self: end; margin-bottom: 0; }
  .cr-weave__size { right: 6px; top: -36px; width: 88px; font-size: 11px; }
  .cr-weave__line, .cr-weave__max { margin-left: 0; }
}

/* ---------- cr-colour ---------- */
.cr-colour { padding-block: clamp(96px, 10vw, 170px) clamp(140px, 14vw, 240px); }
.cr-colour__grid { align-items: start; row-gap: 48px; }
.cr-colour__hold { grid-column: 1 / 7; position: sticky; top: calc(72px + 6svh); }
.cr-colour__photo { --rim: var(--turmeric); --tilt: -3deg; aspect-ratio: 4 / 3; }
.cr-colour__copy { grid-column: 7 / 13; padding-left: clamp(0px, 2vw, 32px); }
.cr-colour__body { margin-top: 28px; }
.cr-steps { margin-top: clamp(40px, 5vw, 72px); display: grid; gap: clamp(28px, 4vw, 56px); }
.cr-step {
  position: relative; border-top: 1px solid var(--ink); padding: 22px 0 6px 88px; max-width: 34rem;
}
.cr-step:nth-child(even) { margin-left: clamp(0px, 5vw, 80px); }
.cr-step__chip {
  position: absolute; left: 0; top: 22px; width: 64px; height: 64px; border-radius: 50%;
  background: var(--c); box-shadow: inset 0 0 0 3px rgba(35,48,94,.25), 2px 2px 0 rgba(35,48,94,.28);
}
.cr-step__chip::after { content: ""; position: absolute; inset: 20px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px rgba(35,48,94,.3); }
.cr-step__t { font-size: clamp(30px, 3vw, 46px); margin: 8px 0 10px; }
.cr-step__l { font-size: 18px; max-width: 44ch; }
.cr-step__time { margin-top: 14px; background: var(--c); color: var(--bg); }
.cr-step:nth-child(2) .cr-step__time { color: var(--ink); }
@media (max-width: 899px) {
  .cr-colour__hold { position: relative; top: 0; }
  .cr-colour__copy { padding-left: 0; }
  .cr-step { padding-left: 76px; }
  .cr-step__chip { width: 56px; height: 56px; }
  .cr-step__chip::after { inset: 17px; }
}

/* ---------- cr-hotel ---------- */
.cr-hotel { padding-top: clamp(48px, 9vw, 150px); }
.cr-hotel__still { width: 100%; height: auto; }
.cr-hotel__expand { display: block; }
.cr-hotel .scroll-expand__scrim { background: rgba(35, 48, 94, .5); }
.cr-hotel .scroll-expand__overlay { align-items: stretch; justify-content: space-between; text-align: left; padding: calc(72px + 4svh) max(16px, 6vw) clamp(24px, 4vw, 56px); }
.cr-hotel__over { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; height: 100%; color: var(--bg); }
.cr-hotel__h { font-size: clamp(56px, 11vw, 200px); color: var(--bg); max-width: 9ch; }
.cr-hotel__low { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cr-hotel__plate { background: var(--indigo); color: var(--indigo-ink); border-radius: 20px; padding: clamp(20px, 2.4vw, 32px); width: min(100%, 560px); display: grid; gap: 10px; }
.cr-hotel__item { color: var(--turmeric); }
.cr-hotel__line { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2vw, 28px); line-height: 1.1; }
.cr-hotel__body { font-size: 17px; max-width: 52ch; }
.cr-hotel__stickers { display: flex; gap: 14px; align-items: flex-end; margin-right: clamp(0px, 6vw, 120px); }
.cr-st { width: clamp(92px, 9vw, 136px); font-size: clamp(14px, 1.3vw, 20px); line-height: 1.1; }
.cr-st--turmeric { background: var(--turmeric); color: var(--ink); transform: rotate(-8deg); }
.cr-st--cotton { background: var(--bg); color: var(--accent); transform: rotate(7deg) translateY(-30px); }
/* no-island / no-JS: the overlay sits in flow below the photo */
.cr-hotel__expand:not(:has(.scroll-expand)) .cr-hotel__over { padding: 40px max(16px, 6vw) 120px; }
@media (max-width: 899px) {
  .cr-hotel .scroll-expand__overlay { padding-top: calc(64px + 3svh); }
  .cr-hotel__body { font-size: 16px; }
  .cr-hotel__stickers { position: absolute; right: 16px; top: calc(64px + 30svh); margin: 0; }
  .cr-st { width: 84px; font-size: 13px; }
}

/* ---------- cr-pair ---------- */
.cr-pair { position: relative; isolation: isolate; min-height: 80svh; padding-block: clamp(150px, 15vw, 250px) clamp(80px, 9vw, 140px); overflow: hidden; }
.cr-pair__paper { position: absolute; inset: 0; z-index: -1; }
.cr-pair__grid { align-items: center; row-gap: 56px; }
.cr-pair__copy { grid-column: 1 / 6; }
.cr-pair__copy .kicker { margin-bottom: 18px; }
.cr-pair__body { margin-top: 28px; }
.cr-num { font-family: var(--font-label); font-size: .82em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: var(--turmeric); padding: 0 .35em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.cr-pair__do { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.cr-board { grid-column: 6 / 13; position: relative; height: clamp(440px, 62svh, 640px); }
.cr-board__slot { position: absolute; inset: 0; pointer-events: none; }
.cr-board__still {
  position: absolute; border-radius: 50%; object-fit: cover; aspect-ratio: 1; height: auto;
  border: 8px solid var(--rim, var(--bg)); box-shadow: 2px 2px 0 rgba(35,48,94,.28);
}
.cr-board__slot--a { --rim: #FFF8EE; } .cr-board__slot--b { --rim: #E8A93B; } .cr-board__slot--c { --rim: #5E8C5A; }
.cr-board__slot--a .cr-board__still { width: 20vw; left: 4%; top: 6%; transform: rotate(-8deg); }
.cr-board__slot--b .cr-board__still { width: 16vw; left: 46%; top: 30%; transform: rotate(6deg); }
.cr-board__slot--c .cr-board__still { width: 14vw; left: 18%; top: 54%; transform: rotate(-3deg); }
.cr-board__slot .sticker-peel-hit { pointer-events: auto; cursor: grab; }
.cr-board__hint { position: absolute; right: 2%; bottom: 0; transform: rotate(-4deg); background: var(--bg); padding: 6px 12px; border-radius: 6px; box-shadow: 2px 2px 0 rgba(35,48,94,.28); }
@media (max-width: 899px) {
  .cr-board { height: 420px; }
  .cr-board__slot--a .cr-board__still { width: 52vw; left: 0; top: 0; }
  .cr-board__slot--b .cr-board__still { width: 42vw; left: 50%; top: 26%; }
  .cr-board__slot--c .cr-board__still { width: 38vw; left: 10%; top: 54%; }
}

/* ---------- cr-ask ---------- */
.cr-ask__h { font-size: clamp(56px, 12vw, 210px); grid-column: 1 / 12 !important; }
.cr-ask__mail { text-decoration: none; padding: 14px 0; border-bottom: 2px solid currentColor; }
.cr-ask__mail:hover { color: var(--turmeric); }

@media (prefers-reduced-motion: reduce) {
  .cr-hero__photo { transform: none !important; }
}
