/* Home adaptations (v2): the lead service page. Design plan: _work/design-plan.md */

/* Headings take the full width and wrap only when the words do not fit (no balanced wrapping) */

/* ---------- Opener: the room LEFT, bleeding to the edge; the promise on limewash; key facts along the foot ---------- */
.aop { position: relative; background: var(--lime); }
.aop__grid { display: grid; grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); min-height: max(500px, calc(76svh - var(--facts-h, 88px))); padding-top: var(--header-h); }
.aop__media { position: relative; }
.aop__frame { position: absolute; inset: 0 0 0 0; margin: 0; overflow: clip; border-radius: var(--r); background: var(--ink-2); }
.aop__frame .ink { position: absolute; inset: -2%; width: 104%; height: 104%; }
.aop__notes { position: absolute; inset: -2%; width: 104%; height: 104%; z-index: 2; pointer-events: none; overflow: visible; }
.aop__lead { fill: none; stroke: var(--lime); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 1px 2px rgba(22, 35, 58, .45)); }
.aop__dot { fill: var(--honey); stroke: var(--lime); stroke-width: 3; }
.aop__tag { fill: var(--lime); }
.aop__txt { font-family: var(--display); font-style: italic; font-size: 38px; fill: var(--ink); }
html.no-js .aop__notes, html.rm .aop__notes, html.no-motion .aop__notes { display: none; }
@media (max-width: 900px) { .aop__notes { display: none; } }
.aop__cap { position: absolute; left: var(--gutter); bottom: 0; z-index: 3; margin: 0; padding: .75em 1.2em; background: var(--lime); color: var(--ink); font-family: var(--display); font-style: italic; font-size: 1.05rem; line-height: 1.3; border-radius: 0 var(--corner) 0 0; }
.aop__copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 4vh, 56px) var(--gutter) clamp(28px, 4vh, 56px) clamp(36px, 4.4vw, 84px); }
.aop__h { font-size: clamp(2.6rem, 4.3vw, 4.7rem); line-height: 1.02; letter-spacing: -.018em; margin-bottom: clamp(18px, 2.6vh, 28px); }
.aop__lede { margin-bottom: clamp(22px, 3.4vh, 34px); color: var(--soft); }
.aop__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

/* Key facts: a strip of Oxford ink along the foot, each fact with a drawn line icon */
.aop__facts { position: relative; background: var(--ink); color: var(--lime); overflow: clip; }
.aop__facts-list { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; min-height: var(--facts-h, 88px); padding-block: 14px; }
.aop__fact { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 1rem; line-height: 1.25; white-space: nowrap; }
.aop__icon { flex: none; width: 36px; height: 36px; color: var(--honey); }
.aop__fact + .aop__fact { position: relative; }
.aop__fact + .aop__fact::before { content: ""; position: absolute; left: -15px; top: 50%; width: 1px; height: 26px; transform: translateY(-50%); background: var(--line-light); }

@media (max-width: 1240px) {
  .aop__fact { font-size: .95rem; gap: 9px; }
  .aop__icon { width: 30px; height: 30px; }
}
@media (max-width: 1100px) {
  /* The strip no longer fits: it becomes a slow marquee (adaptations.js duplicates the list) */
  .aop__facts-list { justify-content: flex-start; width: max-content; max-width: none; padding-inline: var(--gutter); gap: 0; }
  .aop__rail { display: flex; width: max-content; will-change: transform; }
  .aop__fact { padding-right: 44px; }
  .aop__fact + .aop__fact::before { left: -22px; }
  html.no-js .aop__facts-list, html.rm .aop__facts-list, html.no-motion .aop__facts-list { width: auto; flex-wrap: wrap; gap: 10px 0; }
}
@media (max-width: 900px) {
  .aop__grid { grid-template-columns: 1fr; min-height: 0; }
  .aop__media { height: clamp(200px, 28svh, 320px); margin-right: var(--gutter); }
  .aop__copy { padding: 22px var(--gutter) 30px; }
  .aop__h { font-size: clamp(2.3rem, 9.6vw, 3.4rem); }
  .aop__notes { position: absolute; inset: -2%; width: 104%; height: 104%; z-index: 2; pointer-events: none; overflow: visible; }
.aop__lead { fill: none; stroke: var(--lime); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 1px 2px rgba(22, 35, 58, .45)); }
.aop__dot { fill: var(--honey); stroke: var(--lime); stroke-width: 3; }
.aop__tag { fill: var(--lime); }
.aop__txt { font-family: var(--display); font-style: italic; font-size: 38px; fill: var(--ink); }
html.no-js .aop__notes, html.rm .aop__notes, html.no-motion .aop__notes { display: none; }
@media (max-width: 900px) { .aop__notes { display: none; } }
.aop__cap { font-size: .95rem; padding-block: .55em; }
  :root { --facts-h: 72px; }
}

/* ---------- Who it is for: the cottage drawn then made, three people beside it ---------- */
.who { background: var(--paper); padding-block: clamp(56px, 5vw, 88px); }
.who__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 5.4vw, 104px); align-items: center; }
.who__pic { position: relative; margin: 0; height: min(calc(100svh - var(--header-h) - 200px), 680px); min-height: 400px; border-radius: var(--r); overflow: clip; background: var(--ink-2); }
.who__pic .ink { position: absolute; inset: -6% 0; height: 112%; }
.who__h { margin-bottom: clamp(26px, 3.6vh, 44px); }
.who__list { display: grid; gap: clamp(18px, 2.6vh, 30px); }
.who__item { display: grid; gap: 6px; padding-top: clamp(14px, 2vh, 20px); position: relative; transition: opacity .5s var(--ease); }
.who__rule { position: absolute; top: 0; left: 0; right: 0; width: auto; background: var(--honey-deep); opacity: .7; }
.who__t { font-size: clamp(1.45rem, 1.8vw, 1.9rem); line-height: 1.15; }
.who__item p { margin: 0; color: var(--soft); }
@media (max-width: 900px) {
  .who__grid { grid-template-columns: 1fr; }
  .who__pic { height: min(44svh, 380px); min-height: 0; }
}

/* ---------- What we can change: needs on the left, the room drawn then made in a pane on the right ---------- */
.needs { padding-block: clamp(72px, 7.5vw, 120px); }
.needs__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(36px, 5vw, 96px); align-items: center; }
.needs__h { margin-bottom: clamp(22px, 3.4vh, 40px); }
.needs__list { border-top: 1px solid var(--line-light); }
.need { position: relative; }
.need__h { font-size: inherit; }
.need__btn { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; padding: clamp(14px, 2vh, 20px) 0; background: none; border: 0; cursor: pointer; text-align: left;
  font-family: var(--display); font-weight: 440; font-variation-settings: "opsz" 72; font-size: clamp(1.45rem, 1.9vw, 2rem); line-height: 1.15; color: rgba(237, 238, 233, .62); transition: color .4s var(--ease); }
.need.is-open .need__btn, .need__btn:hover { color: var(--lime); }
.need.is-open .need__btn > span:first-child { font-style: italic; color: var(--honey); }
.need__plus { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid rgba(237, 238, 233, .4); transition: border-color .3s, transform .5s var(--ease); }
.need__plus::before, .need__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.need__plus::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .4s var(--ease); }
.need.is-open .need__plus { border-color: var(--honey); transform: rotate(180deg); }
.need.is-open .need__plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.need__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line-light); }
.need__fill { position: absolute; inset: -.5px auto -.5px 0; width: 100%; background: var(--honey); transform-origin: 0 50%; transform: scaleX(0); }
.need__panel { overflow: hidden; }
.need__body { padding: 0 0 clamp(18px, 2.6vh, 26px); }
.need__body p { margin: 0 0 14px; color: rgba(237, 238, 233, .8); max-width: 120ch; }
.need__tags { display: flex; flex-wrap: wrap; gap: 4px 0; font-weight: 600; font-size: .95rem; color: var(--honey); }
.need__tags li:not(:last-child)::after { content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 14px; border-radius: 50%; background: rgba(201, 164, 101, .6); vertical-align: middle; }
.need__pic { display: none; margin: 18px 0 0; height: min(44svh, 360px); border-radius: var(--r); overflow: clip; background: var(--ink-2); }

.needs__pane { position: relative; height: min(calc(100svh - var(--header-h) - 150px), 680px); min-height: 440px; border-radius: var(--r); overflow: clip; background: var(--ink-2); isolation: isolate; }
.needs__slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; }
.needs__slide.is-on { opacity: 1; visibility: visible; }
.needs__slide .ink { position: absolute; inset: 0; }
.needs__cap { position: absolute; left: 0; bottom: 0; z-index: 3; margin: 0; padding: .7em 1.2em; background: var(--ink); color: var(--lime); font-family: var(--display); font-style: italic; font-size: 1.1rem; border-radius: 0 var(--corner) 0 0; }
.needs__count { position: absolute; right: 18px; bottom: 16px; z-index: 3; margin: 0; padding: .35em .8em; background: rgba(22, 35, 58, .78); color: var(--lime); font-family: var(--display); font-size: 1rem; border-radius: var(--pill); }

/* Collapsed panels only when the script runs on a wide screen; without it every need is open */
@media (min-width: 900px) {
  html.js .need:not(.is-open) .need__panel { height: 0; }
}
@media (max-width: 899px) {
  .needs__grid { grid-template-columns: 1fr; }
  .needs__pane { display: none; }
  .need__pic { display: block; }
  .need__bar { display: none; }
  .need { border-bottom: 1px solid var(--line-light); }
  .need .need__btn { color: var(--lime); }
  .need .need__btn > span:first-child { font-style: italic; color: var(--honey); }
  .need .need__plus { display: block; width: 34px; height: 34px; border-color: var(--honey); transform: rotate(180deg); }
  .need.is-shut .need__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
  .need .need__plus::after { transform: translate(-50%, -50%) rotate(0deg); }
  .need.is-shut .need__panel { display: none; }
  .need.is-shut .need__plus { transform: none; }
}

/* ---------- The wet room, detail by detail: the drawing becomes the room one change at a time (pinned) ---------- */
.wet { background: var(--lime); }
/* The section is the grid itself (stage and copy are its direct children), so the scene pins as one block */
.wet { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(36px, 5.6vw, 110px); align-items: center; padding-inline: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter))); }
.wet__stage { --sw: 600px; position: relative; height: min(calc(100svh - var(--header-h) - 90px), 980px); min-height: 460px; aspect-ratio: 1000 / 1241; border-radius: var(--r); overflow: clip; background: #f3f3ef; box-shadow: 0 40px 80px -40px rgba(22, 35, 58, .35); }
.wet__cam { position: absolute; inset: 0; transform-origin: 0 0; }
.wet__draw, .wet__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wet__marks { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wet__ring { fill: none; stroke: var(--honey-deep); stroke-width: 2.5; stroke-dasharray: 2 0; }
.wet__halo { fill: none; stroke: var(--claret); stroke-width: 3; transform-box: fill-box; transform-origin: 50% 50%; animation: wet-halo 2.4s var(--ease) infinite; stroke-width: 4; }
.wet__mark:not(.is-cur) .wet__halo { display: none; }
@keyframes wet-halo { from { transform: scale(1); opacity: .9; } to { transform: scale(7); opacity: 0; } }
.wet__pin { fill: var(--claret); stroke: #fff; stroke-width: 3; }
.wet__tag { font-family: var(--body); font-weight: 600; font-size: 25px; letter-spacing: .12em; text-transform: uppercase; fill: var(--ink); paint-order: stroke; stroke: rgba(255, 255, 255, .85); stroke-width: 8px; stroke-linejoin: round; }
.wet__h { margin-bottom: clamp(24px, 4vh, 48px); }
.wet__steps { display: grid; gap: 28px; }
.wet__t { font-size: clamp(1.6rem, 2.2vw, 2.2rem); line-height: 1.1; margin-bottom: 12px; }
.wet__step p { margin: 0; color: var(--soft); font-size: clamp(1.05rem, 1.15vw, 1.18rem); max-width: 120ch; }
.wet__nav { display: none; }

/* Motion on: the photo shows only where a change has been made, the steps take turns, the scene is pinned */
html.js:not(.rm):not(.no-motion) .wet__photo {
  -webkit-mask-image:
    radial-gradient(circle at 71.1% 78.8%, #000 calc(var(--c0, 0) * var(--sw) / 1000 * .965), transparent calc(var(--c0, 0) * var(--sw) / 1000)),
    radial-gradient(circle at 53.3% 45.1%, #000 calc(var(--c1, 0) * var(--sw) / 1000 * .965), transparent calc(var(--c1, 0) * var(--sw) / 1000)),
    radial-gradient(circle at 64.4% 62.5%, #000 calc(var(--c2, 0) * var(--sw) / 1000 * .965), transparent calc(var(--c2, 0) * var(--sw) / 1000)),
    radial-gradient(circle at 80% 45.1%, #000 calc(var(--c3, 0) * var(--sw) / 1000 * .965), transparent calc(var(--c3, 0) * var(--sw) / 1000)),
    radial-gradient(circle at 50% 50%, #000 calc(var(--c4, 0) * var(--sw) / 1000 * .8), transparent calc(var(--c4, 0) * var(--sw) / 1000));
  mask-image:
    radial-gradient(circle at 71.1% 78.8%, #000 calc(var(--c0, 0) * var(--sw) / 1000 * .965), transparent calc(var(--c0, 0) * var(--sw) / 1000)),
    radial-gradient(circle at 53.3% 45.1%, #000 calc(var(--c1, 0) * var(--sw) / 1000 * .965), transparent calc(var(--c1, 0) * var(--sw) / 1000)),
    radial-gradient(circle at 64.4% 62.5%, #000 calc(var(--c2, 0) * var(--sw) / 1000 * .965), transparent calc(var(--c2, 0) * var(--sw) / 1000)),
    radial-gradient(circle at 80% 45.1%, #000 calc(var(--c3, 0) * var(--sw) / 1000 * .965), transparent calc(var(--c3, 0) * var(--sw) / 1000)),
    radial-gradient(circle at 50% 50%, #000 calc(var(--c4, 0) * var(--sw) / 1000 * .8), transparent calc(var(--c4, 0) * var(--sw) / 1000));
}
html.no-js .wet__draw, html.rm .wet__draw, html.no-motion .wet__draw,
html.no-js .wet__marks, html.rm .wet__marks, html.no-motion .wet__marks { display: none; }
html.js:not(.rm):not(.no-motion) .wet.is-pinned { height: 100svh; padding-block: var(--header-h) 0; align-content: center; }
html.js:not(.rm):not(.no-motion) .wet.is-pinned .wet__steps { display: block; position: relative; min-height: 13.5rem; }
html.js:not(.rm):not(.no-motion) .wet.is-pinned .wet__step { position: absolute; inset: 0 0 auto 0; }
html.js:not(.rm):not(.no-motion) .wet.is-pinned .wet__nav { display: block; margin-top: clamp(24px, 4vh, 44px); }
.wet__nav-list { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-weight: 600; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.wet__nav-list li { transition: color .4s var(--ease); }
.wet__nav-list li.is-on { color: var(--honey-deep); }
.wet__track { position: relative; display: block; height: 1px; background: var(--line-dark); }
.wet__bar { position: absolute; inset: -.5px auto -.5px 0; width: 100%; background: var(--honey-deep); transform-origin: 0 50%; transform: scaleX(0); }

@media (max-width: 899px) {
  .wet { grid-template-columns: 1fr; gap: 26px; }
  .wet__stage { height: auto; width: 100%; min-height: 0; max-height: none; }
  .wet__tag { font-size: 40px; stroke-width: 10px; }
  .wet__h { font-size: clamp(1.8rem, 7.4vw, 2.3rem); }
  html.js:not(.rm):not(.no-motion) .wet.is-pinned { padding-top: calc(var(--header-h) + 8px); align-content: start; gap: 16px; }
  html.js:not(.rm):not(.no-motion) .wet.is-pinned .wet__stage { width: auto; height: min(calc(100svh - var(--header-h) - 330px), calc((100vw - 2 * var(--gutter)) * 1.241)); justify-self: center; }
  html.js:not(.rm):not(.no-motion) .wet.is-pinned .wet__h { margin-bottom: 0; font-size: clamp(1.8rem, 7.4vw, 2.3rem); }
  html.js:not(.rm):not(.no-motion) .wet.is-pinned .wet__copy { display: contents; }
  html.js:not(.rm):not(.no-motion) .wet.is-pinned .wet__h { order: -1; }
  html.js:not(.rm):not(.no-motion) .wet.is-pinned .wet__nav { margin-top: 0; }
  html.js:not(.rm):not(.no-motion) .wet.is-pinned .wet__nav-list { display: none; }
  .wet__t { font-size: 1.4rem; margin-bottom: 6px; }
  .wet__step p { font-size: 1rem; line-height: 1.5; }
  html.js:not(.rm):not(.no-motion) .wet.is-pinned .wet__steps { min-height: 9.5rem; }
}

/* ---------- How it should look: the rail and seat, and a board of the materials ---------- */
.look { background: var(--paper); padding-block: clamp(56px, 5vw, 88px); }
.look__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(36px, 5vw, 96px); align-items: center; }
.look__main { position: relative; margin: 0; height: min(calc(100svh - var(--header-h) - 200px), 640px); min-height: 380px; border-radius: var(--r); overflow: clip; background: var(--ink-2); }
.look__img { width: 100%; height: 100%; object-fit: cover; transform-origin: 62% 45%; }
.look__cap { position: absolute; left: 0; bottom: 0; z-index: 2; margin: 0; padding: .7em 1.2em; background: var(--paper); color: var(--ink); font-family: var(--display); font-style: italic; font-size: 1.05rem; line-height: 1.3; border-radius: 0 var(--corner) 0 0; max-width: calc(100% - 40px); }
.look__h { margin-bottom: 22px; }
.look__lede { color: var(--soft); margin-bottom: clamp(26px, 4vh, 40px); }
.look__board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px; background: var(--lime); border-radius: var(--r); }
.swatch { display: grid; gap: 8px; align-content: start; }
.swatch__img { display: block; aspect-ratio: 1; overflow: clip; background: var(--ink-2); }
.swatch__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(3.6); }
.swatch:nth-child(1) img { transform-origin: 62% 45%; }
.swatch:nth-child(2) img { transform-origin: 38% 62%; }
.swatch:nth-child(3) img { transform-origin: 10% 28%; }
.swatch:nth-child(4) img { transform-origin: 40% 92%; }
.swatch__label { font-weight: 600; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); line-height: 1.3; }
@media (max-width: 1000px) { .look__grid { grid-template-columns: 1fr; } .look__main { height: min(56svh, 460px); min-height: 0; } }
@media (max-width: 520px) { .look__board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Reviews on this page: the walk-in bath drawn faintly behind the cards ---------- */
.pg-adapt .reviews { overflow: clip; padding-block: clamp(56px, 5vw, 88px); }
.pg-adapt .reviews__head { margin-bottom: clamp(20px, 2.4vw, 36px); }
.pg-adapt .reviews .review { padding: 28px 28px 24px; gap: 14px; }
.pg-adapt .reviews .review__text { font-size: clamp(1.05rem, 1.2vw, 1.24rem); line-height: 1.42; }
.pg-adapt .reviews::before { content: ""; position: absolute; top: -8%; right: 0; bottom: -8%; width: 46%; z-index: 0; pointer-events: none;
  background: url("../img/walkin-bath-ink-sm.webp") center / cover no-repeat; opacity: .22; mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%);
  transform: translateY(var(--rv, 0px)); animation: rv-drift 18s ease-in-out infinite alternate; }
@keyframes rv-drift { from { background-position: 40% 50%; } to { background-position: 62% 50%; } }
html.rm .pg-adapt .reviews::before { animation: none; }

/* ---------- Questions, with the planner card beside them ---------- */
.faq { background: var(--lime); }
.faq__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(36px, 5vw, 96px); align-items: start; }
.faq__h { margin-bottom: clamp(24px, 3.4vh, 40px); }
.faq__side { position: sticky; top: calc(var(--header-h) + 10px); }
.plan-card { display: grid; text-decoration: none; color: var(--lime); background: var(--ink); border-radius: var(--r); overflow: clip; }
.plan-card__img { display: block; height: min(40vh, 360px); overflow: clip; }
.plan-card__txt { display: grid; gap: 10px; padding: clamp(22px, 2.4vw, 34px); }
.plan-card__t { font-family: var(--display); font-weight: 440; font-size: clamp(1.6rem, 2.1vw, 2.1rem); line-height: 1.1; }
.plan-card__line { color: rgba(237, 238, 233, .8); }
.plan-card__go { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; color: var(--honey); font-weight: 600; }
.plan-card__go .i-arrow { width: 20px; height: 12px; transition: transform .4s var(--ease); }
.plan-card:hover .plan-card__go .i-arrow { transform: translateX(5px); }
@media (max-width: 900px) { .faq__grid { grid-template-columns: 1fr; } .faq__side { position: static; } .plan-card__img { height: min(40svh, 300px); } }
