/* Services hub (services.php). Design plan: _work/design-plan.md; site plan: "Hub" opener + Flip-filtered service grid.
   Backgrounds: white opener → blush grid → ink process → white packages → crimson CTA → wine footer. */

/* ---------- Opener: compact type band, "I'm a..." chips and an index card that lists what you need ---------- */
.sh { position: relative; background: var(--paper); padding: calc(var(--head-h) + clamp(28px, 5vh, 56px)) 0 clamp(40px, 6vh, 64px); overflow: clip; }
.sh__ruling { position: absolute; inset: 0; pointer-events: none; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, rgba(117,21,35,.07) 31px, rgba(117,21,35,.07) 32px); animation: sh-drift 20s linear infinite; }
.sh__ruling::before { content: ''; position: absolute; top: 0; bottom: 0; left: clamp(14px, 3.2vw, 52px); width: 1px; background: rgba(163,24,62,.38); }
@keyframes sh-drift { to { background-position: 0 32px; } }
.sh__oval { position: absolute; right: -18vw; top: -22%; width: min(1100px, 80vw); overflow: visible; pointer-events: none; }
.sh__oval ellipse { fill: none; stroke: rgba(163,24,62,.14); stroke-width: 1.4; }
.sh__oval .dash { stroke: rgba(163,24,62,.3); stroke-dasharray: 3 12; animation: dash-turn 46s linear infinite; }
.sh__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) min(360px, 32%); gap: clamp(40px, 6vw, 110px); align-items: center; }
.sh__title { font-size: clamp(2.5rem, min(4.6vw, 8.4vh), 4.6rem); line-height: 1.03; margin-bottom: clamp(14px, 2.4vh, 24px); }
.sh__lede { color: var(--ink); margin-bottom: clamp(20px, 3vh, 30px); }
.sh__pick { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.sh__im { margin: 0; font-family: var(--serif); font-size: clamp(1.4rem, 1.8vw, 1.7rem); line-height: 1; color: var(--claret); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; min-height: 50px; padding: 10px 18px; border: 1.5px solid var(--claret); border-radius: var(--btn-r); background: #fff; color: var(--claret); font-weight: 700; font-size: 1rem; line-height: 1.1; cursor: pointer; overflow: hidden; isolation: isolate; transition: color .35s var(--ease), transform .3s var(--ease); }
.chip::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--claret); transform: scaleY(0); transform-origin: bottom; transition: transform .4s var(--ease); }
.chip:hover { transform: translateY(-2px); }
.chip[aria-pressed="true"] { color: #fff; background-color: var(--claret); }
.chip[aria-pressed="true"]::before { transform: scaleY(1); }
.chip--all { border-style: dashed; }
.chip--all[aria-pressed="true"] { border-style: solid; }

/* The index card */
.sh__card { position: relative; width: 100%; padding: 14px 0 46px; }
.idx { position: relative; padding: 18px 22px 22px; background: #FFFDF8; border-left: 3px solid var(--crimson); transform: rotate(2deg); box-shadow: 0 30px 60px rgba(34,9,15,.18), 0 2px 0 rgba(34,9,15,.06); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, #F2E4E7 31px, #F2E4E7 32px); background-position: 0 10px; }
.idx::after { content: ''; position: absolute; left: 0; right: 0; bottom: -7px; height: 8px; background: linear-gradient(-45deg, transparent 5px, #FFFDF8 0) 0 0 / 10px 8px repeat-x, linear-gradient(45deg, transparent 5px, #FFFDF8 0) 0 0 / 10px 8px repeat-x; }
.idx p { margin: 0; }
.idx__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-family: var(--serif); font-size: 1.4rem; line-height: 1.2; }
.idx__head b { font-family: var(--sans); font-weight: 700; font-size: .95rem; color: var(--crimson); white-space: nowrap; }
.idx__for { font-weight: 600; color: var(--ink-soft); font-size: .98rem; margin-bottom: 8px !important; }
.idx__lines { min-height: calc(4 * (2.5em + 6px)); }
.idx__lines li { display: flex; align-items: center; gap: 10px; height: calc(2.5em + 6px); overflow: hidden; font-weight: 600; font-size: .98rem; line-height: 1.25; }
.idx__lines i { position: relative; flex: none; width: 18px; height: 18px; border: 2px solid var(--crimson); background: var(--crimson); border-radius: 2px; }
.idx__lines i::after { content: ''; position: absolute; left: 4px; top: 0; width: 6px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.idx__price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 10px !important; padding-top: 10px; border-top: 2px solid var(--ink); }
.idx__price span { font-weight: 600; font-size: 1.9rem; line-height: 1; letter-spacing: -.03em; color: var(--claret); }
.idx__price small { font-size: .95rem; color: var(--ink-soft); }
.idx__stamp { position: absolute; right: -46px; bottom: -40px; width: 132px; height: 82px; display: grid; place-content: center; text-align: center; border: 3px solid var(--crimson); outline: 1.5px solid var(--crimson); outline-offset: -9px; border-radius: 50%; color: var(--crimson); background: rgba(255,255,255,.88); transform: rotate(-11deg); }
.idx__stamp span { font-family: var(--serif); font-size: 1.12rem; line-height: 1.05; padding: 0 14px; }
.idx__stamp small { margin-top: 3px; font-weight: 700; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; }
.motion:not(.motion-fail) [data-sh-in], .motion:not(.motion-fail) [data-sh-card] { opacity: 0; }

@media (min-width: 901px) and (max-height: 820px) { .sh { padding-top: calc(var(--head-h) + 20px); } }
@media (max-width: 1100px) { .sh__grid { grid-template-columns: minmax(0, 1fr) min(320px, 40%); gap: 40px; } }
@media (max-width: 900px) {
  .sh__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .sh__card { justify-self: start; width: min(100% - 30px, 360px); padding: 6px 0 40px 6px; }
}
@media (max-width: 560px) {
  .sh__title { font-size: clamp(2.15rem, 9.6vw, 2.7rem); }
  .sh__pick { gap: 10px; }
  .chip { padding: 9px 13px; font-size: .95rem; min-height: 46px; }
  .idx__stamp { right: -10px; bottom: -34px; width: 112px; height: 70px; }
  .idx__stamp span { font-size: 1rem; }
}

/* ---------- The grid: re-sorts with Flip when you pick a type ---------- */
.sgw { overflow: clip; padding-block: clamp(56px, 6vw, 88px); }
.sgw__h2 { margin-bottom: 10px; }
.sgw__status { margin: 0 0 clamp(22px, 2.6vw, 34px); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-weight: 600; color: var(--ink-soft); }
.sg { --gap: clamp(14px, 1.4vw, 22px); position: relative; display: flex; flex-wrap: wrap; gap: var(--gap); }
.sgc { position: relative; flex: 1 1 calc((100% - 2 * var(--gap)) / 3); height: clamp(260px, 31vh, 300px); display: block; overflow: hidden; color: var(--ink); text-decoration: none; background: var(--ink-blue); isolation: isolate; }
.sgc__media { position: absolute; inset: 0; overflow: hidden; }
.sgc__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: filter .6s var(--ease); }
.motion .sgc__media img { animation: breathe 14s ease-in-out infinite alternate; }
.sgc:nth-child(2n) .sgc__media img { animation-delay: -5s; } .sgc:nth-child(3n) .sgc__media img { animation-delay: -9s; }
.sgc::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(420px circle at var(--lx, 50%) var(--ly, 50%), rgba(255,255,255,.22), transparent 60%); opacity: 0; transition: opacity .4s; }
.sgc:hover::after { opacity: 1; }
.sgc__label { position: absolute; left: 0; bottom: 0; z-index: 2; width: min(90%, 420px); background: var(--paper); padding: 18px 62px 18px 20px; border-top: 3px solid var(--crimson); transition: transform .5s var(--ease); }
.sgc__label h3 { font-size: clamp(1.12rem, 1.3vw, 1.3rem); margin-bottom: 5px; }
.sgc__blurb { margin: 0; font-size: .97rem; line-height: 1.5; color: var(--ink-soft); }
.sgc__why { display: none; margin: 0 0 10px; padding: 3px 9px; width: fit-content; background: var(--highlight); color: var(--ink); font-weight: 700; font-size: .92rem; line-height: 1.35; }
.sgc__go { position: absolute; right: 0; bottom: 0; width: 48px; height: 48px; display: grid; place-items: center; background: var(--claret); color: #fff; transition: background .3s; overflow: hidden; }
.sgc__go svg { width: 20px; }
.sgc:hover .sgc__label, .sgc:focus-visible .sgc__label { transform: translateY(-8px); }
.sgc:hover .sgc__go { background: var(--crimson); }
.sgc:hover .sgc__go svg { animation: arrow-run .6s var(--ease); }
.sg__also { display: none; flex: 1 1 100%; margin: 10px 0 -4px; padding-top: 14px; border-top: 2px solid var(--ink); font-family: var(--serif); font-size: clamp(1.4rem, 1.9vw, 1.8rem); line-height: 1.1; }

/* Picked: the services you need, big, with why you need them */
.sg[data-mode]:not([data-mode="all"]) .sg__also { display: block; }
.sgc.is-match { flex-basis: calc((100% - var(--gap)) / 2); height: clamp(300px, 40vh, 370px); }
.sg[data-n="3"] .sgc.is-match, .sg[data-n="1"] .sgc.is-match { flex-basis: calc((100% - 2 * var(--gap)) / 3); }
.sgc.is-match .sgc__why { display: block; }
.sgc.is-match .sgc__label { width: min(80%, 460px); }
/* The rest: a compact row, photo on the left */
.sgc.is-other { flex-basis: calc((100% - 3 * var(--gap)) / 4); height: 118px; background: var(--paper); box-shadow: 0 1px 0 var(--rule); }
.sgc.is-other .sgc__media { right: auto; width: 36%; }
.sgc.is-other .sgc__label { left: 36%; right: 0; top: 0; width: auto; display: flex; flex-direction: column; justify-content: center; padding: 12px 54px 12px 16px; border-top: 0; border-left: 3px solid var(--crimson); }
.sgc.is-other .sgc__label h3 { font-size: 1.02rem; margin: 0; }
.sgc.is-other .sgc__blurb { display: none; }
.sgc.is-other .sgc__go { width: 40px; height: 40px; }
.sgc.is-other:hover .sgc__label { transform: none; }
.motion:not(.motion-fail) [data-sg] > .sgc { opacity: 0; }

@media (max-width: 1100px) {
  .sgc { flex-basis: calc((100% - var(--gap)) / 2); }
  .sg[data-n] .sgc.is-match { flex-basis: calc((100% - var(--gap)) / 2); }
  .sgc.is-other { flex-basis: calc((100% - var(--gap)) / 2); }
}
@media (max-width: 680px) {
  .sgc, .sg[data-n] .sgc.is-match, .sgc.is-other { flex-basis: 100%; }
  .sgc { height: 270px; }
  .sgc.is-match { height: 290px; }
  .sgc.is-other { height: 96px; }
  .sgc__label, .sgc.is-match .sgc__label { width: calc(100% - 20px); }
  .sgc.is-other .sgc__media { width: 32%; }
  .sgc.is-other .sgc__label { left: 32%; width: auto; }
}

/* ---------- How switching works: a file travels a drawn line ---------- */
.sproc { overflow: clip; }
.sproc__ruling { position: absolute; inset: 0; pointer-events: none; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 35px, rgba(255,255,255,.04) 35px, rgba(255,255,255,.04) 36px); animation: sproc-drift 22s linear infinite; }
.sproc__ruling::before { content: ''; position: absolute; top: 0; bottom: 0; left: clamp(20px, 4.4vw, 70px); width: 1px; background: rgba(163,24,62,.6); }
@keyframes sproc-drift { to { background-position: 0 36px; } }
.sproc .wrap { position: relative; }
.sproc h2 { color: #fff; }
.sproc__track { position: relative; padding-top: 96px; }
.sproc__line { position: absolute; left: 0; right: 0; top: 70px; height: 3px; background: rgba(255,255,255,.16); }
.sproc__fill { position: absolute; inset: 0; background: var(--crimson); transform-origin: left; transform: scaleX(var(--p, 1)); }
.sproc__file { position: absolute; left: calc(100% - 128px); top: 0; z-index: 2; width: 128px; }
.js.motion:not(.motion-fail) .sproc__file { left: 0; }
.sproc__paper { padding: 10px 12px 12px; background: #FFFDF8; color: var(--ink); border-left: 3px solid var(--crimson); box-shadow: 0 18px 36px rgba(0,0,0,.35); transform: rotate(-3deg); font-weight: 700; font-size: .95rem; line-height: 1.2; }
.sproc__paper i { display: block; height: 18px; margin-top: 6px; background: repeating-linear-gradient(to bottom, #E6D2D7 0, #E6D2D7 2px, transparent 2px, transparent 6px); }
.sproc__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 40px); }
.sproc__step { position: relative; padding-top: 22px; opacity: .45; transition: opacity .5s var(--ease); }
.sproc__step.is-on, .no-js .sproc__step, .rm .sproc__step, .motion-fail .sproc__step { opacity: 1; }
.sproc__dot { position: absolute; left: 0; top: -33px; width: 20px; height: 14px; border-radius: 50%; background: var(--ink-blue); border: 2.5px solid rgba(255,255,255,.7); transition: background .3s, border-color .3s, transform .4s var(--ease); }
.sproc__step.is-on .sproc__dot { background: var(--highlight); border-color: #fff; transform: scale(1.25); }
.sproc__icon { width: 42px; height: 42px; margin-bottom: 14px; overflow: visible; }
.sproc__icon path, .sproc__icon circle { fill: none; stroke: var(--highlight); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.motion:not(.motion-fail) .sproc__icon path, .motion:not(.motion-fail) .sproc__icon circle { stroke-dashoffset: 1; }
.sproc__step h3 { color: #fff; font-size: clamp(1.15rem, 1.4vw, 1.35rem); margin-bottom: 8px; }
.sproc__n { display: block; font-size: .9rem; font-weight: 700; color: var(--highlight); margin-bottom: 4px; }
.sproc__step p { margin: 0; color: var(--on-dark-soft); }
@media (max-width: 900px) {
  .sproc__track { padding: 0 0 0 46px; }
  .sproc__line { left: 9px; right: auto; top: 0; bottom: 0; width: 3px; height: auto; }
  .sproc__fill { transform-origin: top; transform: scaleY(var(--p, 1)); }
  .sproc__file { display: none; }
  .sproc__steps { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .sproc__step { padding-top: 0; }
  .sproc__dot { left: -46px; top: 6px; }
}

/* ---------- Packages: a ruled sheet with Mark's photo clipped to it ---------- */
.swhy { overflow: clip; padding-block: clamp(56px, 6vw, 88px); }
.swhy__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(36px, 6vw, 110px); align-items: center; }
.swhy__copy h2 { margin-bottom: 18px; }
.swhy__copy .lede { margin-bottom: 26px; }
.swhy__prices { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 30px; border-top: 2px solid var(--ink); }
.swhy__prices > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px; padding: 16px 16px 0 0; }
.swhy__prices > div + div { padding-left: 22px; border-left: 1px solid var(--rule); }
.swhy__prices dt { font-weight: 600; color: var(--ink-soft); font-size: .98rem; }
.swhy__prices dd { margin: 0; font-weight: 600; font-size: clamp(2.8rem, 4.4vw, 4.2rem); line-height: 1; letter-spacing: -.04em; color: var(--claret); }
.swhy__prices dd small { font-size: .3em; font-weight: 700; letter-spacing: 0; color: var(--ink-soft); margin-right: 4px; vertical-align: .9em; }
.swhy__sheet { position: relative; }
.sheet { position: relative; padding: 24px clamp(20px, 2.4vw, 32px) 22px; background: #FFFDF8; border-left: 3px solid var(--crimson); box-shadow: 0 30px 60px rgba(34,9,15,.15); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 35px, #F2E4E7 35px, #F2E4E7 36px); background-position: 0 14px; }
.sheet::after { content: ''; position: absolute; left: 0; right: 0; bottom: -7px; height: 8px; background: linear-gradient(-45deg, transparent 5px, #FFFDF8 0) 0 0 / 10px 8px repeat-x, linear-gradient(45deg, transparent 5px, #FFFDF8 0) 0 0 / 10px 8px repeat-x; }
.sheet__head { margin: 0 0 16px; padding-bottom: 10px; border-bottom: 3px double var(--ink); font-family: var(--serif); font-size: clamp(1.5rem, 2vw, 1.9rem); line-height: 1.1; }
.sheet__body { display: grid; grid-template-columns: minmax(0, .62fr) minmax(0, 1.38fr); gap: clamp(18px, 2.2vw, 32px); align-items: start; }
.sheet__list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-bottom: 1px dashed #DCCBD0; }
.sheet__list li:first-child { padding-top: 2px; }
.sheet__list li:last-child { border-bottom: 0; }
.sheet__list i { position: relative; width: 22px; height: 22px; margin-top: 2px; border: 2px solid var(--crimson); border-radius: 2px; background: var(--crimson); }
.sheet__list i::after { content: ''; position: absolute; left: 5px; top: 1px; width: 7px; height: 12px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(var(--tk, 1)); transform-origin: 50% 70%; }
.sheet__list h3 { font-size: 1.08rem; margin-bottom: 2px; }
.sheet__list p { margin: 0; color: var(--ink-soft); font-size: .97rem; line-height: 1.45; }
.swhy__photo { position: relative; margin: 6px 0 0; padding: 8px 8px 12px; background: #fff; transform: rotate(-4deg); box-shadow: 0 18px 34px rgba(34,9,15,.22); }
.swhy__photo .frame { aspect-ratio: 3 / 4; }
.swhy__photo .frame img { position: absolute; inset: -6% 0 auto; height: 112%; object-position: 50% 10%; }
.swhy__photo::before { content: ''; position: absolute; left: 50%; top: -14px; z-index: 4; width: 64px; height: 24px; margin-left: -32px; background: rgba(242,214,75,.75); transform: rotate(4deg); }
.swhy__photo figcaption { padding-top: 8px; font-weight: 700; font-size: .95rem; line-height: 1.25; }
.swhy__photo figcaption small { display: block; font-weight: 500; font-size: .86rem; color: var(--ink-soft); }
.sheet__letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 0; }
.sheet__letters span { padding: 3px 9px; border: 1.5px solid var(--claret); color: var(--claret); font-weight: 700; font-size: .86rem; letter-spacing: .04em; background: #fff; }
@media (max-width: 1000px) { .swhy__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .sheet__body { grid-template-columns: minmax(0, 1fr); }
  .sheet__side { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; align-items: end; }
  .sheet__letters { margin: 0; }
  .swhy__prices dd { font-size: 2.6rem; }
}

/* ---------- CTA ---------- */
.scta { overflow: clip; padding-block: clamp(64px, 8vw, 110px); }
.scta__oval { position: absolute; left: -18vw; top: -40%; width: 70vw; height: 140%; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); box-shadow: inset 0 0 0 40px rgba(255,255,255,.035), inset 0 0 0 80px rgba(255,255,255,.025); animation: wobble 24s ease-in-out infinite alternate; pointer-events: none; }
.scta__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) min(340px, 30%); gap: clamp(40px, 6vw, 110px); align-items: center; }
.scta h2 { color: #fff; margin-bottom: 18px; }
.scta__copy > p { font-size: clamp(1.08rem, 1.25vw, 1.2rem); color: #FBE3E8; margin-bottom: 28px; }
.scta__next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 34px; }
.scta__next a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 10px 16px; background: rgba(255,255,255,.1); border-left: 3px solid var(--highlight); color: #fff; font-weight: 700; text-decoration: none; line-height: 1.25; transition: background .3s, transform .35s var(--ease); }
.scta__next a:hover { background: rgba(255,255,255,.2); transform: translateX(6px); }
.scta__next svg { width: 18px; flex: none; }
.scta__photo { position: relative; margin: 0; padding: 20px 0 0; width: 100%; }
.scta__ring { position: absolute; left: -9%; top: -5%; width: 116%; height: 110%; overflow: visible; pointer-events: none; }
.scta__ring ellipse { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 1.5; stroke-dasharray: 5 10; animation: dash-turn 34s linear infinite; }
.scta__photo .frame { aspect-ratio: 3 / 4; max-height: var(--media-cap); }
.scta__photo .frame img { position: absolute; inset: -6% 0 auto; height: 112%; }
.scta__photo .cap { left: -18px; bottom: 26px; border-left: 3px solid var(--highlight); box-shadow: 0 12px 26px rgba(0,0,0,.25); }
@media (max-width: 900px) { .scta__grid { grid-template-columns: minmax(0, 1fr); } .scta__photo { justify-self: start; width: min(78%, 320px); margin-left: 18px; } .scta__next { grid-template-columns: minmax(0, 1fr); } }
/* Ambient: framed photos breathe slowly at rest */
.motion .swhy__photo .frame, .motion .scta__photo .frame { animation: sv-breathe 9s ease-in-out infinite alternate; }
@keyframes sv-breathe { from { transform: scale(1); } to { transform: scale(1.03); } }
.swhy__prices dd small { vertical-align: .95em; }
/* QA round 1: ledes wrap evenly; the index card's price note sits on its own line clear of the stamp */
.sh__lede, .scta__copy > p { text-wrap: pretty; }
.idx__price { flex-direction: column; align-items: flex-start; gap: 2px; padding-right: 84px; }
