/* Shared rules for every page, linked from the <head> of each template in src/.
   The templates use inline styles, so these target data-* attributes and use
   !important where they have to win over an inline value.

   1. Texture: the moving-pad diagonal lines behind sections.
   2. Phone and tablet layout. */

/* Direction (task "american moving current", Nov 20): established, trustworthy, professional.
   Blue and white everywhere; red ONLY on calls to action (Get a Quote, Call, Apply, Continue).
   High-quality photos carry the design. Layout: home hero splits copy on a pale blue ground
   from a real crew photo carrying the quote form. */
:root {
  --navy: oklch(0.22 0.055 262);
  --blue: oklch(0.45 0.13 256);          /* accent text, rules and links on light grounds (AA) */
  --blue-light: oklch(0.8 0.08 248);     /* accent text on navy */
  --blue-tint: oklch(0.95 0.025 250);    /* icon tiles, pills */
  --band: oklch(0.36 0.11 258);          /* the closing call-to-action band */
  --mist: oklch(0.96 0.014 250);         /* pale blue hero and band background */
  --sand: var(--mist);                   /* old name, kept so existing markup follows */
  --paper: oklch(0.985 0.004 250);       /* page background, near white */
  --paper-2: oklch(0.965 0.008 250);
  --ink: #16181d;
  --ink-2: #3d424c;                      /* body copy */
  --muted: #5a5f69;
  --line: oklch(0.88 0.015 250);
  --line-soft: oklch(0.92 0.01 250);
  --red: oklch(0.57 0.21 27);            /* calls to action only */
  --red-dark: oklch(0.5 0.21 27);
  --accent: var(--blue);                 /* switched per ground below */
  --lines-ink: oklch(0.22 0.055 262 / .08);   /* on white and pale blue */
  --lines-dark: rgb(255 255 255 / .06);         /* on navy */
  --lines-red: rgb(255 255 255 / .1);           /* on the blue CTA band */
}
/* Templates mark their grounds: data-dark on navy and blue bands, data-light on white cards. */
[data-dark] { --accent: var(--blue-light); }
[data-light] { --accent: var(--blue); }

/* Lines bleed to the screen edge even inside a 1240px section; clip stops them
   adding a sideways scrollbar. */
html { overflow-x: hidden; overflow-x: clip; }

/* ---------------------------------------------------------------- 1. texture
   data-lines="right" | "left" on a section: diagonal lines 2px every 14px over
   about half the screen width, fading out toward the middle. Add "dark" or
   "red" for navy or red sections, e.g. data-lines="left dark". Content stays on
   top because the lines sit at z-index -1 inside an isolated section. */
[data-lines] { position: relative; isolation: isolate; }
[data-lines]::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: calc(50% - 50vw);
  width: 55vw;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(135deg, var(--lines, var(--lines-ink)) 0 2px, transparent 2px 14px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
  mask-image: linear-gradient(90deg, transparent, #000 45%);
}
[data-lines~="left"]::before { right: auto; left: calc(50% - 50vw); transform: scaleX(-1); }
[data-lines~="dark"] { --lines: var(--lines-dark); }
[data-lines~="red"] { --lines: var(--lines-red); }
/* Phones: a narrower band so it frames the text instead of sitting under all of it. */
@media (max-width:640px) {
  [data-lines]::before { width: 70vw; -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); mask-image: linear-gradient(90deg, transparent, #000 70%); }
}

/* ---------------------------------------------------------------- 2. phones and tablets */

/* Header: logo, call, Get a Quote and a menu button below 900px (src/SiteHeader.dc.html). */
@media (max-width:900px){
  [data-hdr-desk]{display:none!important}
  [data-hdr-row]{padding:10px 16px!important;gap:8px!important;flex-wrap:nowrap!important}
  [data-hdr-logo] img{height:38px!important}
}
@media (min-width:901px){
  [data-hdr-mob]{display:none!important}
}
/* Phones: Call and Plan Your Move sit in a bar fixed to the bottom of the screen (data-hdr-bar in
   SiteHeader), so leave room for it under the footer. */
@media (max-width:900px){
  body{padding-bottom:calc(64px + env(safe-area-inset-bottom,0px))}
}

/* Home (V5 layout, Nov 22; quote form back in the hero Nov 27). Hero: copy on the left, the quote
   form card on the right over the truck photo. Below 980px it stacks: copy, the photo as a band,
   then the form. */
@media (max-width:979px){
  [data-hero-grid]{display:contents!important}
  [data-hero-img]{position:static!important;width:100%!important;height:auto!important;aspect-ratio:16/9;order:2}
  [data-hero-shade]{display:none!important}
  [data-hero-copy]{padding:32px 16px 28px!important;gap:18px!important;order:1}
  [data-hero-form]{order:3;padding:16px 12px 20px!important;width:100%;max-width:600px;margin:0 auto}
  [data-hero-chips]{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px 12px!important;font-size:14px!important}
  [data-hero-review]{max-width:none!important}
  [data-hero-review-more]{display:none!important}
}
/* Home service cards: four across, three on tablets, two on phones (photo and name only). */
@media (max-width:1000px){
  [data-svc]{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media (max-width:700px){
  [data-svc]{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  [data-svc-desc]{display:none!important}
  [data-svc]>a>span{padding:12px 12px 14px!important}
  [data-svc]>a>span>span:first-child{font-size:16px!important}
}
/* Home: the second storage photo is extra on phones; the four steps tighten. */
@media (max-width:640px){
  [data-storage-2]{display:none!important}
  [data-how-step]{padding:20px 18px!important}
}

/* Intros pinned beside FAQs and reviews: unpin once the two columns stack (~872px). */
@media (max-width:880px){
  [data-unstick]{position:static!important}
}

/* Fixed two-column feature grids stack into one column. */
@media (max-width:640px){
  [data-bento]{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:none!important}
  [data-bento]>*{grid-area:auto!important}
}

/* No-wrap stat rows: labels may wrap once the hero column narrows, then go two by two. */
@media (max-width:1200px){
  [data-stats]{white-space:normal!important}
}
@media (max-width:600px){
  [data-stats]{grid-template-columns:repeat(2,minmax(0,1fr))!important;row-gap:0!important}
}

/* Get a Quote: the four choice buttons go two by two, the five bedroom buttons three across. */
@media (max-width:480px){
  [data-chips4]{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  [data-chips5]{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}

/* Get a Quote: once the columns stack, put the form right after the heading,
   ahead of the four steps and the phone box. */
@media (max-width:900px){
  [data-quote-left]{display:contents!important}
  [data-quote-card]{order:1}
  [data-quote-after]{order:2}
}

/* Footer links: tall enough to tap. */
@media (max-width:900px){
  footer a:not([aria-label]){display:inline-block;padding-top:9px;padding-bottom:9px}
}

/* Short standalone links: a bigger invisible tap area without moving their underline. */
[data-tap]{position:relative}
[data-tap]::after{content:"";position:absolute;inset:-10px -6px}

/* "Keep reading" cards on posts: narrower image and smaller titles on small phones. */
@media (max-width:400px){
  [data-card]{grid-template-columns:96px minmax(0,1fr)!important}
  [data-card-title]{font-size:16px!important;hyphens:auto;overflow-wrap:break-word}
}

/* FAQ disclosure (Moving Process page): hide the default marker; the "+" turns into "-" when open. */
details > summary::-webkit-details-marker { display: none; }
details[open] > summary > span[aria-hidden="true"] { transform: rotate(45deg); }
details > summary > span[aria-hidden="true"] { transition: transform .2s; display: inline-block; }
details > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 4px; }

/* Short label lists (home "For the trade" partner types): two across on phones instead of
   eight full-width rows. */
@media (max-width:640px){
  [data-pairs]{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  [data-pairs]>*{padding:16px 14px!important;font-size:16px!important}
}

/* Footer Services and Company lists: two columns on phones (Areas already is). */
@media (max-width:640px){
  [data-foot-list]{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px;row-gap:0!important}
  [data-foot-list]>span{grid-column:1/-1}
}

/* Home vaulted-storage steps: on phones, three compact rows (number beside the text) instead
   of two cards plus one left alone. */
@media (max-width:640px){
  [data-steps]{grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
  [data-steps]>li{flex-direction:row!important;align-items:baseline;gap:12px!important;padding:12px 16px!important}
}
/* Home: the eight local towns go two across on phones. */
@media (max-width:640px){
  [data-towns]{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* Sticky header. The page runtime (support.js) sets html, body and its wrappers to height:100%,
   which makes them one screen tall with the page overflowing. A sticky element only sticks
   inside its container, so the header let go after one screenful. Let the wrappers grow. */
html,body{height:auto!important;min-height:100%}
#dc-root,#dc-root>.sc-host,#dc-static,#dc-static>.sc-host{height:auto!important;min-height:100vh}
