/* ERA Canada · Locations Canada — independent interior page (Sonnet 5.5).
   Rooted in [data-section-design="locations"]. The homepage @scope stops at that attribute, so this file carries its
   own reset and tokens; the approved header, footer and review bar are untouched (the one rule outside the main is the phone
   review-bar tidy-up that every sibling concept carries).
   Same geometry as the other Sonnet interiors: every seam, plane and photo foot leans "/" (rises to the right), edged by a
   green and a blue stripe taken from the warehouse walls. Light page, dark Inter type; the one saturated band is the closing.
   Composition: a full-screen aerial photograph with the heading over its lower left, handed to the page on one "/" seam. The
   pale plane that follows holds the original introduction and the nine cities as one even grid. Each city is a single large
   tile: the photograph's foot is cut on the same "/" and edged by the stripe pair, and the city name (the original link) is
   the click target for the whole tile. Ottawa has no photograph that can honestly stand for it, so its tile carries the brand
   stripes instead of a picture. On phones the grid becomes a list with thumbnails. The closing sets the four original
   actions as compact buttons in a light panel on the green band. Nothing here needs script: every city link works as plain HTML. */

@keyframes lc-settle{from{transform:scale(1.07)}to{transform:scale(1)}}

[data-section-design="locations"]{
  --ink:#0d1a22;--text:#32424d;--muted:#566772;--line:#d5dee5;--rule:#c6d2db;--paper:#f2f6f9;
  --blue:#0d5a92;--blue-deep:#0a3f69;--blue-bright:#1b8bd0;--blue-tint:#e4f0f8;
  --green:#2c7a1c;--green-bright:#7cc242;--green-hover:#69ad2f;
  --lc-gutter:clamp(20px,4.2vw,64px);
  --lc-edge:max(var(--lc-gutter),calc((100vw - 1280px) / 2));        /* content edge: the 1280px shell */
  --lc-edge-wide:max(var(--lc-gutter),calc((100vw - 1520px) / 2));   /* lines the hero copy up with the header logo */
  --lc-col:clamp(28px,4.4vw,72px);
  --lc-gap:clamp(18px,2.3vw,34px);        /* space between city tiles */
  --lc-rise:5vw;                          /* height every seam gains across the full width: slope .05 */
  --lc-s:clamp(6px,.8vw,12px);            /* stripe thickness */
  --lc-g:clamp(3px,.42vw,6px);            /* gap between the two stripes */
  --lc-hs:calc(var(--lc-rise) + var(--lc-s) * 2 + var(--lc-g));   /* height of a striped seam */
  --lc-pos:65% 50%;--lc-pos-sm:73% 50%;   /* hero crop; replaced inline from the photo manifest */
  position:relative;display:block;overflow-x:clip;background:#fff;color:var(--text);
  font:400 17px/1.7 Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;

  /* ---------- Reset + type ---------- */
  & *,& *::before,& *::after{box-sizing:border-box}
  & h1,& h2,& h3,& h4,& p{margin:0}
  & img{display:block;max-width:100%;height:auto}
  & a{color:inherit}
  & [hidden]{display:none!important}
  & :focus-visible{outline:3px solid var(--blue);outline-offset:3px}
  & h1,& h2,& h3,& h4{color:var(--ink);font-weight:800;letter-spacing:-.04em;line-height:1.04;text-wrap:balance}
  & p{color:var(--text)}
  & [id="h-"]{display:block;height:0;overflow:hidden}   /* the one inert anchor kept from the source */

  /* ---------- Hero: one full-screen photograph, the heading over its lower left, the page handed over on a "/" seam ---------- */
  & #locations-hero{position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;min-height:max(600px,calc(100vh - var(--review-h,34px) - var(--header-h,72px)));min-height:max(600px,calc(100svh - var(--review-h,34px) - var(--header-h,72px)));padding:clamp(88px,10vw,160px) var(--lc-edge-wide) calc(var(--lc-hs) + clamp(34px,4vw,64px));background:#0b1419;color:#fff}
  & #locations-hero :focus-visible{outline-color:#fff}
  & .lc-hero-media{position:absolute;inset:0;z-index:-2;overflow:hidden}
  & .lc-hero-media img{width:100%;height:100%;max-width:none;object-fit:cover;object-position:var(--lc-pos);transform-origin:62% 60%;animation:lc-settle 2.2s cubic-bezier(.2,.7,.2,1) both}
  /* Darkness gathers on the left and along the foot, over the empty apron where the copy sits; the truck at the right stays clear. */
  & .lc-hero-shade{position:absolute;inset:0;z-index:-1;background:
    linear-gradient(90deg,rgba(5,15,22,.82) 0%,rgba(5,15,22,.7) 26%,rgba(5,15,22,.38) 44%,rgba(5,15,22,.08) 58%,rgba(5,15,22,0) 68%),
    linear-gradient(0deg,rgba(5,15,22,.66) 0%,rgba(5,15,22,.3) 22%,rgba(5,15,22,0) 44%),
    linear-gradient(180deg,rgba(5,15,22,.36) 0%,rgba(5,15,22,0) 22%)}
  & #locations-hero h1{max-width:6.7em;margin-bottom:clamp(16px,1.8vw,28px);font-size:clamp(52px,7.4vw,132px);line-height:.93;letter-spacing:-.055em;color:#fff;text-shadow:0 2px 30px rgba(0,0,0,.35)}
  /* The tagline leads into a line that runs out to the right: green and blue lead-in bar, then a hairline. */
  & #locations-hero h4{display:flex;align-items:center;gap:clamp(14px,1.4vw,22px);width:min(100%,46rem);font-size:clamp(17px,1.5vw,23px);line-height:1.3;font-weight:560;letter-spacing:-.012em;color:rgba(255,255,255,.95);text-shadow:0 1px 16px rgba(0,0,0,.45)}
  & #locations-hero h4::after{content:"";flex:1 1 56px;min-width:56px;height:6px;background:
    linear-gradient(var(--blue-bright),var(--blue-bright)) 0 50% / 40px 6px no-repeat,
    linear-gradient(var(--green-bright),var(--green-bright)) 46px 50% / 20px 6px no-repeat,
    linear-gradient(rgba(255,255,255,.42),rgba(255,255,255,.42)) 0 50% / 100% 1px no-repeat}
  & .lc-jump{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;margin-top:clamp(24px,2.8vw,40px)}
  & .lc-btn{display:inline-flex;align-items:center;justify-content:space-between;gap:22px;min-height:56px;padding:0 22px 0 26px;border:2px solid var(--green-bright);border-radius:2px;background:var(--green-bright);color:var(--ink);font-size:16px;line-height:1.2;font-weight:760;letter-spacing:-.01em;text-decoration:none;transition:background-color .18s,border-color .18s}
  & .lc-btn::after{content:"↓";content:"↓" / "";flex:none;font-size:20px;font-weight:600;line-height:1;transition:transform .2s}
  & .lc-btn:hover{background:var(--green-hover);border-color:var(--green-hover)}
  & .lc-btn:hover::after{transform:translateY(3px)}
  /* The seam: green stripe, pale gap, blue stripe, then the pale plane, all parallel on the shared slope. */
  & .lc-seam{position:absolute;z-index:1;left:0;right:0;bottom:-1px;height:calc(var(--lc-hs) + 1px);pointer-events:none}
  & .lc-seam::before,& .lc-seam::after{content:"";position:absolute;left:0;right:0;top:0;height:var(--lc-hs)}
  & .lc-seam::before{background:var(--green-bright);clip-path:polygon(0 var(--lc-rise),100% 0,100% var(--lc-s),0 calc(var(--lc-rise) + var(--lc-s)))}
  & .lc-seam::after{background:var(--blue-bright);clip-path:polygon(0 calc(var(--lc-rise) + var(--lc-s) + var(--lc-g)),100% calc(var(--lc-s) + var(--lc-g)),100% calc(var(--lc-s) * 2 + var(--lc-g)),0 calc(var(--lc-rise) + var(--lc-s) * 2 + var(--lc-g)))}
  & .lc-seam i{position:absolute;inset:0;background:var(--paper);clip-path:polygon(0 calc(var(--lc-rise) + var(--lc-s)),100% var(--lc-s),100% 100%,0 100%)}

  /* ---------- Overview: the pale plane, its foot cut on the same "/" that the closing band rises along ---------- */
  & #locations-overview{position:relative;isolation:isolate;padding:clamp(40px,5vw,84px) var(--lc-edge) calc(var(--lc-rise) + clamp(44px,5.4vw,88px))}
  & #locations-overview::before{content:"";position:absolute;inset:0 0 -2px;z-index:-1;background:var(--paper);clip-path:polygon(0 0,100% 0,100% calc(100% - var(--lc-rise)),0 100%)}
  & .locations-intro{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);column-gap:var(--lc-col);row-gap:18px;align-items:end;margin-bottom:clamp(30px,3.8vw,58px)}
  & .locations-intro h2{max-width:7.5em;font-size:clamp(36px,4.8vw,74px);line-height:1;letter-spacing:-.05em}
  & .locations-intro h2::before,& #closing-actions h2::before{content:"";display:block;width:clamp(18px,1.6vw,24px);aspect-ratio:4/3;margin-bottom:clamp(16px,1.8vw,26px);background:linear-gradient(to top left,var(--green-bright) 0 34%,var(--blue-bright) 34%);clip-path:polygon(0 100%,100% 0,100% 100%)}
  & .locations-intro p{max-width:30em;padding-bottom:.3em;font-size:clamp(17px,1.32vw,20px);line-height:1.72;color:var(--ink)}

  /* ---------- Directory: nine tiles, one even grid. The whole tile is the link; the city name is the original heading link. ---------- */
  & #locations-directory{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--lc-gap)}
  /* Each tile measures itself (container units), so the foot of its photograph keeps the page-wide slope at any width. */
  & .location{--tr:5cqw;--ts:max(4px,1.4cqw);--tg:max(2px,.7cqw);--tb:calc(var(--ts) * 2 + var(--tg));--lp:clamp(16px,1.7vw,26px);
    container-type:inline-size;position:relative;display:flex;flex-direction:column;min-width:0;background:#fff;box-shadow:0 22px 44px -34px rgba(13,26,34,.42);-webkit-tap-highlight-color:rgba(27,139,208,.14);transition:transform .28s ease,box-shadow .28s ease}
  & .loc-media{position:relative;flex:none;aspect-ratio:4/3;background:#fff}
  /* The photograph's foot leans "/": it ends on the top edge of the green stripe, the blue stripe follows, white below. */
  & .loc-photo{position:absolute;inset:0;overflow:hidden;clip-path:polygon(0 0,100% 0,100% calc(100% - var(--tb) - var(--tr) + 1px),0 calc(100% - var(--tb) + 1px))}
  & .loc-photo img{position:absolute;left:0;top:0;width:100%;height:calc(100% - var(--tb));max-width:none;object-fit:cover;object-position:var(--pos,50% 50%);transform-origin:50% 55%;transition:transform .8s cubic-bezier(.2,.7,.2,1)}
  & .loc-media::before,& .loc-media::after{content:"";position:absolute;z-index:1;left:0;right:0;bottom:0;height:calc(var(--tr) + var(--tb));pointer-events:none}
  & .loc-media::before{background:var(--green-bright);clip-path:polygon(0 var(--tr),100% 0,100% var(--ts),0 calc(var(--tr) + var(--ts)))}
  & .loc-media::after{background:var(--blue-bright);clip-path:polygon(0 calc(var(--tr) + var(--ts) + var(--tg)),100% calc(var(--ts) + var(--tg)),100% calc(var(--ts) * 2 + var(--tg)),0 calc(var(--tr) + var(--ts) * 2 + var(--tg)))}
  /* Ottawa: no photograph is used, so the plane carries the brand stripes, parallel to the tile's own diagonal. */
  & .loc-photo--plain{background:
    linear-gradient(to top left,transparent 0 11%,var(--blue-deep) 11% 14.5%,transparent 14.5% 21%,var(--blue-bright) 21% 28%,transparent 28% 35%,var(--green-bright) 35% 48%,transparent 48%),
    var(--blue-tint)}

  /* Name and region. The name is the original link; its stretched box makes the whole tile one target. */
  & .location h3{padding:calc(var(--lp) * .9) calc(var(--lp) + 54px) 0 var(--lp);font-size:clamp(24px,2.3vw,34px);line-height:1.05;letter-spacing:-.04em;scroll-margin-top:300px;scroll-margin-top:75cqw}
  & .location h3 a{color:var(--ink);text-decoration:none;background:linear-gradient(transparent 84%,var(--green-bright) 84% 96%,transparent 96%) 0 0 / 0 100% no-repeat;transition:background-size .3s ease}
  & .location h3 a::after{content:"";position:absolute;inset:0;z-index:3}
  & .location h3 a::before{content:"→";content:"→" / "";position:absolute;z-index:2;right:var(--lp);bottom:var(--lp);display:grid;place-items:center;width:42px;height:42px;border:1px solid var(--rule);border-radius:2px;background:#fff;color:var(--blue);font-size:19px;font-weight:600;line-height:1;transition:background-color .2s,border-color .2s,color .2s,transform .2s}
  & .loc-region{display:block;padding:6px calc(var(--lp) + 54px) var(--lp) var(--lp);font-size:15px;line-height:1.4;font-weight:540;letter-spacing:.005em;color:var(--muted)}
  & .location h3 a:focus-visible{outline:none}
  & .location h3 a:focus-visible::after{outline:3px solid var(--blue);outline-offset:3px}
  & .location h3 a:focus-visible,& .location:hover h3 a{background-size:100% 100%}
  & .location h3 a:focus-visible::before,& .location:hover h3 a::before{background:var(--blue);border-color:var(--blue);color:#fff;transform:translateX(3px)}
  /* Arriving on a city fragment (#h-calgary and the like) marks the tile. */
  & .location:has(h3:target){box-shadow:0 0 0 3px var(--green-bright),0 30px 52px -30px rgba(13,26,34,.5)}

  /* ---------- Closing: calmer typography and a light action panel on the original green band ---------- */
  & #closing-actions{position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,1fr);grid-template-areas:"title acts" "copy acts";align-items:start;column-gap:clamp(40px,6vw,96px);row-gap:24px;margin-top:calc(var(--lc-rise) * -1);padding:calc(var(--lc-rise) + var(--lc-s) + var(--lc-g) + clamp(52px,5vw,80px)) var(--lc-edge) clamp(60px,5.5vw,88px);color:var(--ink)}
  & #closing-actions::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--green-bright);clip-path:polygon(0 calc(var(--lc-rise) + var(--lc-s) + var(--lc-g)),100% calc(var(--lc-s) + var(--lc-g)),100% 100%,0 100%)}
  & #closing-actions::after{content:"";position:absolute;left:0;right:0;top:0;z-index:-1;height:calc(var(--lc-rise) + var(--lc-s));background:var(--blue-bright);clip-path:polygon(0 var(--lc-rise),100% 0,100% var(--lc-s),0 calc(var(--lc-rise) + var(--lc-s)))}
  & #closing-actions :focus-visible{outline-color:var(--ink)}
  & #closing-actions h2{grid-area:title;max-width:23ch;font-size:clamp(34px,3.15vw,48px);font-weight:720;line-height:1.16;letter-spacing:-.03em;text-wrap:balance}
  & #closing-actions h2::before{display:none}
  & #closing-actions>p{grid-area:copy;max-width:55ch;font-size:18px;line-height:1.8;color:var(--ink);text-wrap:pretty}
  & #closing-actions>p a{font-weight:650;text-decoration:underline;text-decoration-color:var(--ink);text-decoration-thickness:1px;text-underline-offset:4px;transition:color .15s,text-decoration-color .15s}
  & #closing-actions>p a:hover{color:var(--blue-deep);text-decoration-color:var(--blue-deep)}
  /* Compact, stable buttons: one primary action, three equally readable secondary actions. */
  & .locations-actions{grid-area:acts;align-self:center;display:grid;gap:10px;padding:24px;border:1px solid rgba(255,255,255,.7);border-radius:4px;background:#fff;box-shadow:0 12px 30px -24px rgba(13,26,34,.3)}
  & .locations-actions a{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:58px;padding:15px 18px;border:1px solid #ccd9e0;border-radius:2px;background:#f5f8fa;font-size:17px;line-height:1.35;font-weight:650;letter-spacing:0;color:var(--ink);text-decoration:none;transition:background-color .18s,border-color .18s,color .18s}
  & .locations-actions a::after{content:"→";content:"→" / "";flex:none;font-size:20px;font-weight:500;color:var(--blue);transition:transform .18s}
  & .locations-actions a:hover,& .locations-actions a:focus-visible{background:#e7f1f7;border-color:#8aafc6;color:var(--blue-deep);padding-inline:18px}
  & .locations-actions a:hover::after,& .locations-actions a:focus-visible::after{transform:translateX(3px)}
  & .locations-actions a:first-child{padding-inline:18px;border:1px solid var(--ink);background:var(--ink);color:#fff}
  & .locations-actions a:first-child::after{color:#fff}
  & .locations-actions a:first-child:hover,& .locations-actions a:first-child:focus-visible{background:var(--blue-deep);border-color:var(--blue-deep);padding-inline:18px;color:#fff}
}

/* Content edge and seam slope measured on the page itself (not the viewport, which includes the scrollbar), so the copy lines
   up with the header. Placed before the responsive rules so that the tablet and phone slope below still wins. */
@supports (width:1cqw){
  [data-section-design="locations"]{
    container-type:inline-size;
    --lc-edge:max(var(--lc-gutter),calc((100cqw - 1280px) / 2));
    --lc-edge-wide:max(var(--lc-gutter),calc((100cqw - 1520px) / 2));
    --lc-rise:5cqw;
  }
}

/* Pointer devices: the tile lifts a little and its photograph leans in. Touch keeps the tile still. */
@media (hover:hover){
  [data-section-design="locations"]{
    & .location:hover{transform:translateY(-5px);box-shadow:0 34px 56px -32px rgba(13,26,34,.5)}
    & .location:hover .loc-photo img{transform:scale(1.05)}
  }
}

/* Portrait screens: the crop from the manifest keeps the truck in frame. */
@media (max-aspect-ratio:1/1){
  [data-section-design="locations"]{
    & .lc-hero-media img{object-position:var(--lc-pos-sm)}
  }
}

/* ---------- Tablet: two columns, Ottawa wide; the intro, closing and actions stack ---------- */
@media (max-width:999px){
  [data-section-design="locations"]{
    --lc-rise:7vw;--lc-col:clamp(24px,4vw,44px);

    & #locations-hero h1{font-size:clamp(52px,10vw,92px)}
    & .locations-intro{grid-template-columns:minmax(0,1fr)}
    & .locations-intro h2{max-width:10em}
    & #locations-directory{grid-template-columns:repeat(2,minmax(0,1fr))}
    & .location.loc-plain{grid-column:1 / -1}
    & .location.loc-plain .loc-media{aspect-ratio:3/1}
    & .location.loc-plain h3{scroll-margin-top:260px;scroll-margin-top:34cqw}
    & #closing-actions{grid-template-columns:minmax(0,1fr);grid-template-areas:"title" "copy" "acts";row-gap:clamp(20px,3vw,30px)}
    & #closing-actions h2{max-width:23ch;font-size:clamp(32px,4.8vw,44px)}
    & .locations-actions{align-self:start;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:8px;max-width:720px}
  }
}

/* ---------- Phone: the hero copy sits on a deeper gradient; the button spans the row ---------- */
@media (max-width:760px){
  [data-section-design="locations"]{
    & .lc-hero-shade{background:
      linear-gradient(0deg,rgba(5,15,22,.94) 0%,rgba(5,15,22,.84) 30%,rgba(5,15,22,.56) 52%,rgba(5,15,22,.16) 70%,rgba(5,15,22,0) 84%),
      linear-gradient(180deg,rgba(5,15,22,.42) 0%,rgba(5,15,22,0) 24%)}
    & #locations-hero h1{font-size:clamp(46px,13.4vw,76px)}
    & #locations-hero h4::after{display:none}
    & .lc-jump{align-self:stretch}
    & .lc-btn{flex:1 1 auto}
  }
}

/* ---------- Small phone: the grid becomes a list. Thumbnail at the left, its right edge cut on "/" with the stripes beside it ---------- */
@media (max-width:599px){
  [data-section-design="locations"]{
    & .locations-intro h2{font-size:clamp(34px,9.6vw,46px)}
    & #locations-directory{grid-template-columns:minmax(0,1fr);gap:0;border-top:2px solid var(--ink)}
    & .location{--ps:3px;--pg:2px;--pb:calc(var(--ps) * 2 + var(--pg));--pr:14px;--lw:clamp(88px,28vw,148px);--lp:14px;
      display:grid;grid-template-columns:var(--lw) minmax(0,1fr);align-content:center;padding:12px 0;background:transparent;box-shadow:none;border-bottom:1px solid var(--line)}
    & .location:hover{transform:none;box-shadow:none;background:rgba(255,255,255,.7)}
    & .location:hover .loc-photo img{transform:none}
    & .location.loc-plain{grid-column:auto}
    & .loc-media,& .location.loc-plain .loc-media{grid-column:1;grid-row:1 / span 2;aspect-ratio:4/3}
    & .loc-photo{clip-path:polygon(0 0,calc(100% - var(--pb) + 1px) 0,calc(100% - var(--pr) - var(--pb) + 1px) 100%,0 100%)}
    & .loc-photo img{height:100%}
    & .loc-media::before,& .loc-media::after{top:0;bottom:0;left:auto;right:0;width:calc(var(--pr) + var(--pb));height:auto}
    & .loc-media::before{clip-path:polygon(var(--pr) 0,calc(var(--pr) + var(--ps)) 0,var(--ps) 100%,0 100%)}
    & .loc-media::after{clip-path:polygon(calc(var(--pr) + var(--ps) + var(--pg)) 0,calc(var(--pr) + var(--ps) * 2 + var(--pg)) 0,calc(var(--ps) * 2 + var(--pg)) 100%,calc(var(--ps) + var(--pg)) 100%)}
    & .location h3{grid-column:2;grid-row:1;align-self:end;padding:0 calc(var(--lp) + 40px) 0 var(--lp);font-size:clamp(22px,6.8vw,30px);scroll-margin-top:16px}
    & .location.loc-plain h3{scroll-margin-top:16px}
    & .loc-region{grid-column:2;grid-row:2;align-self:start;padding:4px calc(var(--lp) + 40px) 0 var(--lp)}
    & .location h3 a::before{top:50%;bottom:auto;width:34px;height:34px;font-size:17px;transform:translateY(-50%)}
    & .location h3 a:focus-visible::before,& .location:hover h3 a::before{transform:translateY(-50%) translateX(3px)}
    & .location:has(h3:target){box-shadow:none;background:#fff}
    & #closing-actions h2{font-size:clamp(30px,8vw,38px);line-height:1.18}
    & #closing-actions>p{font-size:17px;line-height:1.8}
    & .locations-actions{grid-template-columns:minmax(0,1fr);padding:18px}
    & .locations-actions a{font-size:16px;min-height:56px}
  }
}

@media (prefers-reduced-motion:reduce){
  [data-section-design="locations"] *,[data-section-design="locations"] *::before,[data-section-design="locations"] *::after{transition:none!important;animation:none!important}
  [data-section-design="locations"] .location:hover,[data-section-design="locations"] .location:hover .loc-photo img{transform:none}
}

@media print{
  [data-section-design="locations"]{
    & #locations-hero{min-height:0}
    & .lc-btn{display:none}
  }
}

/* Review toolbar: keep all review controls visible on phones. */
@media(max-width:640px){.review-bar .review-id>a{display:none}.review-bar .review-id{font-size:10px}.review-bar{gap:10px}}
