/* ============================================================
   Miss Doginist — responsive layer
   ------------------------------------------------------------
   Desktop is the source of truth and lives inline in every page.
   Inline values that need to change on smaller screens are written
   as  var(--token, <desktop value>)  — so with this file absent or
   above 1024px nothing changes. This file only:
     (a) redefines those layout tokens at tablet / mobile widths
     (b) adds the handful of structural mobile rules tokens can't
         express, keyed by data-m (layout) / data-t (type) hooks.
   Breakpoints:  tablet ≤1024px · mobile ≤767px · small ≤359px
   ============================================================ */

/* ---------------------------------------------------------- tablet */
@media (max-width:1024px){
  :root{
    --bp:tablet;                     /* read by page scripts: getComputedStyle(el).getPropertyValue('--bp') */
    --px:32px;                       /* page gutter */
    --sy:.72;                        /* section rhythm scale: calc(160px * var(--sy)) */
    --gx:.6;                         /* large gap scale */
    --logo-t:84px; --logo-c:48px;    /* nav logo: top / compact */
    --menu-logo:64px;
    --g6:repeat(2,minmax(0,1fr));    /* services mosaic → 2 columns */
    --svc-span4:1 / -1; --svc-span:auto;
    --card-pad:32px 26px 28px;       /* price cards */
    --aside-sticky:static;           /* booking shells: aside flows */
    --shell-cols:minmax(0,1fr);      /* booking shells: single column */
    --main-pad:48px var(--px) 120px;
    --bt-tcol:1 / -1; --bt-row:2; --bt-ar:990/400; --bt-iw:133.334%; --bt-pb:12px;   /* boutique card: text above the drawing */
  }
  [data-t="h3"]{font-size:30px!important}
}

/* ---------------------------------------------------------- mobile */
@media (max-width:767px){
  :root{
    --bp:mobile;
    --px:20px; --sy:.5; --gx:.4;
    /* grids */
    --g2:minmax(0,1fr); --g3:minmax(0,1fr); --g4:repeat(2,minmax(0,1fr)); --g6:minmax(0,1fr);
    --foot-cols:1fr 1fr; --foot-logo:1 / -1;
    --span2:auto; --svc-span:auto; --svc-span4:auto;
    --num-col:36px; --num-col2:72px; --num-col3:56px; --thumb:88px; --thumb-gap:16px;
    /* flex rows that stack */
    --dir:column; --align:stretch; --jc-end:flex-start; --ta-end:left; --js-end:start; --menu-ac:end;
    /* sticky / pinned */
    --sticky:static; --aside-sticky:static;
    --pin:auto; --pin-pos:relative; --pin-h:auto;
    --hero-h:100svh; --vh100:100svh; --hero-mh:560px; --overlap:0;
    --cta-disp:flex; --cta-mh:72svh;
    --track-pos:relative; --track-top:auto; --track-h:auto; --track-pb:0;
    /* visibility */
    --desk-flex:none; --desk-block:none; --desk-inline:none; --desk-grid:none;
    --mob-flex:flex; --mob-block:block;
    /* sizing */
    --mw280:0; --fx34:none; --mw320:none;
    --nav-py:12px; --nav-py-c:8px; --logo-t:58px; --logo-c:44px; --logo-w:auto;
    --menu-logo:52px; --menu-side-pad:0; --tile-h:auto; --tile-mh:104px; --tile-pad:18px;
    --mo-bleed:0px; --tile-dir:row-reverse; --tile-ink-flex:0 0 42%; --tile-text-flex:1 1 0%;   /* menu tiles: drawing as a vignette on the right */
    --card-mh:auto; --card-pad:28px 22px 24px; --card-pad2:16px; --cell-pad:32px 22px 36px; --cell-pad2:22px 0;
    --svc-h1:380px; --svc-h:250px;
    --form-pad:24px 20px 28px; --main-pad:32px var(--px) 150px; --shell-cols:minmax(0,1fr);
    --ans-r:0; --ans-l:0; --bq-pad:0;
    --panel-pad:40px var(--px) 60px; --panel-intro-pad:88px var(--px);
    --chip-gap:12px 22px;
    --bt-ar:660/400; --bt-iw:200%;   /* boutique card: room only */
  }

  /* ---- mobile type scale (overrides inline font shorthands) ---- */
  h1{font-size:clamp(38px,11cqw,46px)!important;line-height:1!important;max-width:none!important}
  h1[data-t="h1s"]{font-size:30px!important;line-height:1.1!important}
  h2{font-size:clamp(28px,8.2cqw,34px)!important;line-height:1.1!important;max-width:none!important}
  h2[data-t="h2x"]{font-size:clamp(32px,9.4cqw,38px)!important;line-height:1.05!important}
  [data-t="h3"]{font-size:clamp(24px,7cqw,28px)!important;line-height:1.1!important}
  [data-t="h3x"]{font-size:clamp(30px,8.6cqw,36px)!important;line-height:1.05!important}
  [data-t="num"]{font-size:44px!important;line-height:.95!important}
  [data-t="num-xl"]{font-size:64px!important;line-height:.9!important}
  [data-t="quote"]{font-size:clamp(22px,6.2cqw,26px)!important;line-height:1.3!important}
  [data-t="tile-title"]{font-size:30px!important}
  [data-t="menu-link"]{font-size:30px!important}
  p{text-wrap:pretty}

  /* ---- touch targets & inputs ---- */
  button{min-height:44px}
  input,select,textarea{font-size:16px!important}
  [data-m="nav-pill"]{padding:14px 18px!important}
  [data-m="login-link"]{display:none!important}

  /* ---- CTA pills: full width, comfortable ---- */
  [data-m="pill"]{display:inline-flex!important;width:100%;box-sizing:border-box;align-items:center;justify-content:center!important;gap:14px!important;padding:17px 22px!important;min-height:52px;white-space:normal!important;text-align:center}

  /* ---- desktop-only decoration ---- */
  [data-m="desk"]{display:none!important}
  [data-m="thumb-card"] [data-caption]{display:none}

  /* ---- rail: horizontal swipe row, bleeding to the viewport edges ---- */
  [data-m="rail"]{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden;scroll-snap-type:x mandatory;gap:14px!important;margin-left:calc(-1 * var(--px))!important;margin-right:calc(-1 * var(--px))!important;padding:0 var(--px) 10px!important;scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  [data-m="rail"]::-webkit-scrollbar{display:none}
  [data-m="rail"]>*{flex:0 0 82cqw!important;width:auto!important;min-width:0;scroll-snap-align:start;scroll-snap-stop:always}
  [data-m="rail"][data-bleed="0"]{margin-left:0!important;margin-right:0!important}
  [data-m="rail"][data-rail="cards"]>*{height:clamp(380px,58vh,460px)!important}

  /* ---- stats 2×2 ---- */
  [data-m="stats"]{gap:28px 20px!important}
  [data-m="stats"]>*{border-left:0!important;padding-left:0!important;border-top:1px solid color-mix(in srgb,currentColor 18%,transparent);padding-top:18px}
  /* ---- credentials: single column ---- */
  [data-m="creds"]>*{padding-left:0!important}
  /* ---- story figures: photo first ---- */
  [data-m="fig"]>[data-para]{order:-1}
  /* ---- service list rows (booking hub) ---- */
  [data-m="svc-row"]{grid-template-columns:36px minmax(0,1fr) 28px!important;row-gap:10px;padding:28px 0!important}
  [data-m="svc-row"]>:nth-child(3){grid-column:2}
  [data-m="svc-row"]>:nth-child(4){display:none}
  [data-m="svc-row"]>:nth-child(5){grid-column:3;grid-row:1}
  /* ---- method / process panels: photo above text ---- */
  [data-m="panel"]>[data-para]{order:-1;aspect-ratio:4/3;min-height:0}
  /* ---- day timeline (daycare / grooming) ---- */
  [data-m="track-head"]{position:relative!important;inset:auto!important;padding:calc(80px * var(--sy)) var(--px) 28px;flex-direction:column;align-items:flex-start!important;gap:18px}
  [data-m="track-bar"]{position:relative!important;inset:auto!important;margin:22px var(--px) calc(90px * var(--sy))}
  /* ---- brand promise: photo stacks above the text ---- */
  [data-m="promise-media"]{position:relative!important;inset:auto!important;aspect-ratio:4/5;transform:none!important}
  /* ---- homepage hero split: headline up top, CTA by the thumb ---- */
  [data-m="hero-text"]{top:0!important;display:flex;flex-direction:column;padding-top:calc(var(--logo-t) + 60px)!important}
  [data-m="hero-split"]{flex:1;align-items:stretch!important;flex-direction:column!important}
  [data-m="hero-split"]>:last-child{flex:1 1 auto!important;justify-content:space-between}
  /* ---- booking shells ---- */
  [data-m="anchors"]{flex-direction:row!important;overflow-x:auto;max-width:100%;min-width:0;gap:22px!important;border-top:0!important;padding-top:0!important;white-space:nowrap;scrollbar-width:none}
  [data-m="anchors"]::-webkit-scrollbar{display:none}
  /* ---- footer ---- */
  [data-m="foot-col"]{gap:16px!important;font-size:15px!important;line-height:1.3!important}
  /* contact column: full width under a hairline, address on one line, mail + phone side by side */
  [data-m="foot-col"]:nth-of-type(3){grid-column:1 / -1;display:grid!important;grid-template-columns:1fr auto;gap:10px 24px!important;align-items:baseline;margin-top:8px;padding-top:22px;border-top:1px solid rgba(0,0,0,.12);font:300 15px/1.4 'Newsreader',serif!important;color:#000000!important}
  [data-m="foot-col"]:nth-of-type(3)>:first-child{grid-column:1 / -1;font-size:19px!important;letter-spacing:-0.005em}
  [data-m="foot-col"]:nth-of-type(3)>a{font:400 11px/1.6 ui-monospace,monospace!important;letter-spacing:0.12em;text-transform:uppercase;color:rgba(0,0,0,.55)!important}
  [data-m="foot-col"]:nth-of-type(3)>a:last-child{justify-self:end;font-variant-numeric:tabular-nums}
  /* ---- menu overlay (phones): one screen, top to bottom — the three doors grow into the free height, drawings fade in as vignettes, secondary links in two quiet columns, address on one line ---- */
  [data-menu-overlay]>div:nth-child(2){grid-template-rows:minmax(auto,1fr) auto;align-content:stretch!important;gap:clamp(22px,3.6vh,48px)!important;padding-top:10px!important}
  [data-menu-overlay]>div:nth-child(2)>div:first-child{min-height:0}
  [data-menu-overlay]>div:nth-child(2)>div:first-child>[data-mo-right]{display:none!important}
  [data-menu-overlay]>div:nth-child(2)>div:first-child>div:last-child{flex:1 1 auto;min-height:0;grid-template-rows:repeat(3,minmax(var(--tile-mh),1fr));gap:10px!important}
  [data-mo-wrap]{display:flex;flex-direction:column;min-height:var(--tile-mh)}
  [data-mo-item]{flex:1 1 auto;min-height:var(--tile-mh)}
  [data-mo-item]>span:last-child{gap:8px!important}
  [data-mo-num]{margin-bottom:2px!important}
  [data-mo-item] [data-m="desk"]{display:block!important;font-size:12px!important;line-height:1.4!important;max-width:22ch;color:rgba(0,0,0,.55)!important}
  [data-mo-tile-img]{-webkit-mask-image:linear-gradient(180deg,rgba(0,0,0,0) 0,#000 42%),linear-gradient(90deg,rgba(0,0,0,0) 0,#000 26%);-webkit-mask-composite:source-in;mask-image:linear-gradient(180deg,rgba(0,0,0,0) 0,#000 42%),linear-gradient(90deg,rgba(0,0,0,0) 0,#000 26%);mask-composite:intersect}
  [data-menu-overlay]>div:nth-child(2)>div:last-child{gap:clamp(20px,3.2vh,44px)!important}
  [data-menu-overlay] [data-mo-right]:has(>a:nth-child(4)){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:18px;padding:6px 0;border-bottom:1px solid rgba(0,0,0,.12)}
  [data-menu-overlay] [data-mo-right]:has(>a:nth-child(4))>a{border-bottom:0!important;padding:9px 0!important;gap:12px!important;font-size:17px!important;white-space:nowrap}
  [data-menu-overlay] [data-mo-head] button,[data-menu-overlay]>div:nth-child(2)>div:first-child>[data-mo-right]{white-space:nowrap}
  [data-menu-overlay] [data-mo-right]:has(>a:nth-child(4))>a>span:first-child{min-width:16px}
  [data-menu-overlay] [data-mo-right]:last-child{flex-direction:row!important;flex-wrap:wrap;align-items:baseline;gap:4px 14px!important;line-height:1.5!important}
}

@media (max-width:767px) and (max-height:720px){
  :root{--tile-mh:92px}
  [data-mo-item] [data-m="desk"]{display:none!important}
  [data-t="tile-title"]{font-size:26px!important}
}

@media (max-width:359px){
  :root{--px:16px}
  h1{font-size:36px!important}
  [data-m="rail"]>*{flex-basis:86cqw!important}
}

/* ---------------------------------------------------------- motion */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}
