/*ha-fluid*/
/* ============================================================
   HAFEZI ARCHITECTS — SERVICES SECTION, VARIANT A2
   Expanding panels with draw-on line art, staggered text,
   slow image zoom, autoplay with progress bar, pause on hover.
   Replace each .hx-art SVG with a real render (<img>) when ready.
   ============================================================ */
.hx-services{
  --ink:#1C1C1C;
  --paper:#EDE8DF;
  --muted:#A39E95;
  --line:#3A3833;
  --gold:#C9A96E;
  --serif:'Bodoni Moda',Georgia,'Times New Roman',serif;
  --sans:'Manrope',Arial,Helvetica,sans-serif;
  --closed:96px;          /* width of a closed panel */
  --gap:calc(8 * var(--u));              /* gap between panels */
  --group-gap:calc(32 * var(--u));       /* gap between the two service groups */
  --ease:cubic-bezier(.7,0,.2,1);
}
.hx-services *{box-sizing:border-box}


.hx-services{max-width:calc(1440 * var(--u));margin:0 auto;padding:calc(64 * var(--u)) calc(88 * var(--u));display:flex;flex-direction:column;gap:calc(28 * var(--u))}
.hx-services__head{display:flex;justify-content:space-between;align-items:flex-end;gap:calc(24 * var(--u))}
.hx-eyebrow{font-size:calc(12 * var(--u));letter-spacing:.28em;text-transform:uppercase;color:var(--gold)}
.hx-services__title{margin:calc(16 * var(--u)) 0 0;font-family:var(--serif);font-weight:400;font-size:calc(48 * var(--u));line-height:1.1}
.hx-counter{font-size:calc(14 * var(--u));color:var(--muted)}

.hx-groups{display:flex;justify-content:space-between;align-items:baseline;gap:calc(16 * var(--u));border-bottom:1px solid var(--line);padding-bottom:calc(12 * var(--u));font-size:calc(12 * var(--u));letter-spacing:.14em;text-transform:uppercase}
.hx-groups span{color:var(--muted);transition:color .6s ease}
.hx-groups span.on{color:var(--gold)}
.hx-groups em{font-style:normal;text-transform:none;letter-spacing:0;color:var(--muted)}

/* ---------- Panels ---------- */
.hx-panels{display:flex;height:calc(560 * var(--u))}
.hx-panel{
  position:relative;overflow:hidden;border:0;padding:0;margin:0 0 0 var(--gap);
  flex:0 0 var(--closed);height:100%;cursor:pointer;text-align:left;
  font-family:var(--sans);color:var(--paper);background:var(--tone);
  border-top:2px solid transparent;
  transition:flex-grow .9s var(--ease);
}
.hx-panel:first-child{margin-left:0}
.hx-panel.hx-first-specialist{margin-left:var(--group-gap)}
.hx-panel.hx-specialist{border-top-color:var(--gold)}
.hx-panel.active{flex-grow:1}
.hx-panel:focus-visible{outline:2px solid var(--gold);outline-offset:calc(3 * var(--u))}

.hx-panel__num{position:absolute;left:calc(22 * var(--u));top:calc(22 * var(--u));font-size:calc(13 * var(--u));color:var(--gold);z-index:2}
.hx-panel__vtitle{
  position:absolute;left:calc(34 * var(--u));bottom:calc(30 * var(--u));writing-mode:vertical-rl;transform:rotate(180deg);
  font-family:var(--serif);font-size:calc(21 * var(--u));white-space:nowrap;transition:opacity .4s ease;
}
.hx-panel.active .hx-panel__vtitle{opacity:0}

/* Content is fixed at the open width so text never reflows mid-transition */
.hx-panel__content{position:absolute;left:0;top:0;bottom:0;width:var(--open-w,calc(616 * var(--u)));opacity:0;pointer-events:none}
.hx-panel.active .hx-panel__content{opacity:1;transition:opacity .3s ease .15s}

.hx-art{position:absolute;inset:0;transform-origin:50% 30%}
.hx-art svg{position:absolute;left:0;top:calc(30 * var(--u));width:100%;height:calc(250 * var(--u))}
.hx-panel.active .hx-art{animation:hxPanelsZoom 6s cubic-bezier(.2,.6,.2,1) forwards}

.hx-draw{stroke-dasharray:1400;stroke-dashoffset:1400}
.hx-panel.active .hx-draw{animation:hxPanelsDraw 1.9s cubic-bezier(.6,0,.2,1) .2s forwards}

.hx-text{position:absolute;left:calc(36 * var(--u));right:calc(36 * var(--u));bottom:calc(36 * var(--u));display:flex;flex-direction:column;gap:calc(12 * var(--u))}
.hx-text > *{opacity:0}
.hx-panel.active .hx-text > *{animation:hxPanelsRise .9s cubic-bezier(.2,.7,.2,1) forwards}
.hx-panel.active .hx-text > :nth-child(1){animation-delay:.35s}
.hx-panel.active .hx-text > :nth-child(2){animation-delay:.5s}
.hx-panel.active .hx-text > :nth-child(3){animation-delay:.65s}
.hx-panel.active .hx-text > :nth-child(4){animation-delay:.8s}
.hx-panel.active .hx-text > :nth-child(5){animation-delay:.9s}
.hx-text__group{font-size:calc(11 * var(--u));letter-spacing:.2em;text-transform:uppercase;color:var(--gold)}
.hx-text__tag{font-family:var(--serif);font-size:calc(32 * var(--u));line-height:1.15}
.hx-text__desc{font-size:calc(14 * var(--u));line-height:1.6;color:#D2CCC2}
.hx-chips{display:flex;flex-wrap:wrap;gap:calc(8 * var(--u));margin-top:calc(6 * var(--u))}
.hx-chip{font-size:calc(12 * var(--u));padding:calc(6 * var(--u)) calc(11 * var(--u));border:1px solid #6E6A63}
.hx-text__work{font-size:calc(12 * var(--u));color:var(--muted)}

.hx-bar{position:absolute;left:0;bottom:0;width:100%;height:2px;background:var(--line)}
.hx-bar i{display:block;height:2px;width:0;background:var(--gold)}
.hx-panel.active .hx-bar i{animation:hxPanelsBar 5s linear forwards}
.hx-panels.paused .hx-bar i{animation-play-state:paused}

@keyframes hxPanelsDraw{to{stroke-dashoffset:0}}
@keyframes hxPanelsRise{from{opacity:0;transform:translateY(calc(28 * var(--u)))}to{opacity:1;transform:none}}
@keyframes hxPanelsZoom{from{transform:scale(1.12)}to{transform:scale(1)}}
@keyframes hxPanelsBar{from{width:0}to{width:100%}}

/* ---------- Mobile: panels become a vertical accordion ---------- */
@media (max-width:900px){
  .hx-services{padding:calc(40 * var(--u)) calc(16 * var(--u))}
  .hx-services__title{font-size:calc(34 * var(--u))}
  .hx-groups em{display:none}
  .hx-panels{flex-direction:column;height:auto}
  .hx-panel,.hx-panel.hx-first-specialist{margin:0 0 calc(8 * var(--u)) 0;flex:none;height:calc(72 * var(--u));transition:height .8s var(--ease)}
  .hx-panel.hx-first-specialist{margin-top:calc(24 * var(--u))}
  .hx-panel.active{height:calc(560 * var(--u))}
  .hx-panel__vtitle{writing-mode:horizontal-tb;transform:none;left:calc(64 * var(--u));top:calc(22 * var(--u));bottom:auto;font-size:calc(19 * var(--u));white-space:normal;right:calc(16 * var(--u))}
  .hx-panel__content{width:100%}
  .hx-text{left:calc(20 * var(--u));right:calc(20 * var(--u));bottom:calc(24 * var(--u))}
  .hx-text__tag{font-size:calc(26 * var(--u))}
}
@media (prefers-reduced-motion:reduce){
  .hx-services *,.hx-services *::before,.hx-services *::after{animation:none!important;transition:none!important}
  .hx-draw{stroke-dashoffset:0}.hx-text > *{opacity:1}
}

.hx-services{--ink:#503f2d;--paper:#f7f3eb;--line:#78634d;--gold:#dfc7a2;--muted:#c9bbab;--sans:'Manrope',Arial,Helvetica,sans-serif;--closed:64px;background:#503f2d;max-width:none;padding:calc(48 * var(--u)) var(--pad);color:var(--paper)}
.hx-panel{background:#503f2d}.hx-services__title{font-size:clamp(calc(32 * var(--u)),3.5vw,calc(48 * var(--u)))}.hx-panel__content{visibility:hidden}.hx-panel.active .hx-panel__content{visibility:visible}.hx-panel__content .hx-art img{width:100%;height:100%;object-fit:cover;display:block}.hx-panel__content .hx-art:after{content:'';position:absolute;inset:25% 0 0;background:linear-gradient(transparent,rgba(35,27,20,.98))}.hx-panel__vtitle{left:calc(22 * var(--u));font-size:calc(18 * var(--u))}.hx-text{gap:calc(10 * var(--u))}.hx-text__tag{font-size:calc(28 * var(--u))}.hx-text__group{color:#f1dfc6}.hx-text__work{color:#ddd1c2}.hx-bar{display:none}.hx-panel .hx-art svg{top:calc(5 * var(--u));height:calc(230 * var(--u))}.hx-panel__num{color:#fff}.hx-panel.active .hx-art{animation:none}.hx-panel.active .hx-text>*{animation-duration:.65s}.hx-panels{height:calc(620 * var(--u))}
@media(max-width:1100px){.hx-services{--closed:48px;--group-gap:16px}.hx-panel__vtitle{left:calc(15 * var(--u));font-size:calc(16 * var(--u))}.hx-text{left:calc(24 * var(--u));right:calc(24 * var(--u))}}
@media(max-width:900px){.hx-services{padding:calc(35 * var(--u)) calc(24 * var(--u))}.hx-panels{height:auto}.hx-panel__vtitle{left:calc(58 * var(--u));top:calc(20 * var(--u));right:calc(12 * var(--u));font-size:calc(18 * var(--u))}.hx-panel.active{height:calc(590 * var(--u))}.hx-panel__content{width:100%}.hx-text{left:calc(22 * var(--u));right:calc(22 * var(--u))}.hx-groups{font-size:calc(10 * var(--u))}.hx-services__head{align-items:start}.hx-panel.active .hx-art{animation:none}}
/* Solid framed panels, with continuous entrance and exit transitions. */
.hx-services{--gap:12px;--group-gap:24px;--ease:cubic-bezier(.22,.68,.16,1)}
.hx-panel{background:#503f2d;border:1px solid #9b8569;transition:flex-grow 1.15s var(--ease),height 1.15s var(--ease);isolation:isolate}
.hx-panel.hx-specialist{border-top:1px solid #dfc7a2}
.hx-panel__content,.hx-panel.active .hx-panel__content{visibility:visible;transition:opacity .65s ease; background:#503f2d}
.hx-panel__content{opacity:0}.hx-panel.active .hx-panel__content{opacity:1}
.hx-panel__vtitle{transition:opacity .35s ease .35s}.hx-panel.active .hx-panel__vtitle{transition-delay:0s}
.hx-text>*{opacity:0;transform:translateY(calc(12 * var(--u)));transition:opacity .45s ease,transform .65s var(--ease)}
.hx-panel.active .hx-text>*{animation:none;opacity:1;transform:none;transition-delay:.35s}
.hx-panel.active .hx-text>:nth-child(2){transition-delay:.43s}.hx-panel.active .hx-text>:nth-child(3){transition-delay:.51s}.hx-panel.active .hx-text>:nth-child(4){transition-delay:.59s}.hx-panel.active .hx-text>:nth-child(5){transition-delay:.67s}
@media(max-width:900px){.hx-panel,.hx-panel.hx-first-specialist{margin-bottom:calc(12 * var(--u))}.hx-panel.hx-first-specialist{margin-top:calc(24 * var(--u))}.hx-panel.active{height:calc(590 * var(--u))}}
@media(prefers-reduced-motion:reduce){.hx-panel,.hx-panel__content,.hx-panel__vtitle,.hx-text>*{transition:none!important}.hx-panel.active .hx-text>*{transform:none;opacity:1}}

/* Beige study: ivory folded panels, with the approved brown surround. */
.hx-panel{background:#503f2d;color:#f7f3eb;border-color:#9b8569}
.hx-panel__num{color:#f7f3eb;transition:color .45s ease}
.hx-panel.active .hx-panel__num{color:#fff}
.hx-panel__content{color:#f7f3eb}
.hx-chips{gap:0;border-top:1px solid rgba(247,243,235,.35);padding-top:calc(12 * var(--u));display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.hx-chip{border:0;padding:0 calc(12 * var(--u)) 0 0;line-height:1.45;font-size:calc(12 * var(--u))}
.hx-step-number{display:block;font-size:calc(10 * var(--u));letter-spacing:.16em;color:#dfc7a2;margin-bottom:calc(5 * var(--u))}
@media(max-width:600px){.hx-chip{font-size:calc(11 * var(--u));padding-right:calc(8 * var(--u))}}

/* Hover indicates selection without changing the open service. */
@media(hover:hover){.hx-panel:not(.active):hover{background:#65513c;border-color:#dfc7a2}}
.hx-panel.active{border-color:#f7f3eb}

.hx-panel__content .hx-art.hx-plan{height:52%;background:#503f2d}.hx-panel__content .hx-art.hx-plan img{object-fit:contain;padding:calc(12 * var(--u))}.hx-panel__content .hx-art.hx-plan:after{display:none}.hx-panel__content .hx-art.hx-collage{display:grid;grid-template-columns:1fr 1fr;gap:calc(4 * var(--u));height:53%}.hx-panel__content .hx-art.hx-collage img{min-width:0;object-fit:cover}.hx-panel__content .hx-art.hx-collage:after{display:none}


/* Planning uses the shared bottom text layout; dark drawing on warm paper. */
.hx-panel__content .hx-art.hx-plan{width:100%;height:55%;background:#e9e2d7}.hx-panel__content .hx-art.hx-plan img{filter:brightness(0);mix-blend-mode:normal;opacity:1;object-fit:contain;padding:calc(16 * var(--u))}.hx-panel:has(.hx-plan).active .hx-panel__num{color:#503f2d}

/* Full-panel plan detail, with the same overlaid text as other services. */
.hx-panel__content .hx-art.hx-plan{height:100%;width:100%;overflow:hidden;background:#e9e2d7}
.hx-panel__content .hx-art.hx-plan img{object-fit:cover;object-position:50% 48%;padding:0;transform:scale(1.35);filter:brightness(0);opacity:1}
.hx-panel__content .hx-art.hx-plan:after{display:block;inset:25% 0 0;background:linear-gradient(transparent,rgba(35,27,20,.98))}
