/* The header, its menu sheet and the footer: every rule for them. Linked last in every page's head (pages.fill_chrome
   and pages.layout), so these override site.css's .site-* rules, which stay there unused until W4.6 folds this file
   back into site.css. The revised header's .hd2-* rules stay in site.css; a rule here may override one. */
:root { --head: 64px; }    /* the header bar's height; the builder's stage and the sticky panels leave room for it */
.site-util :focus-visible, .site-foot :focus-visible { outline-color: #fff; }

/* a short page (404, track, an empty cart) keeps its footer at the bottom of the window */
body:has(> footer.site-foot) { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
body:has(> footer.site-foot) > main { flex: 1 0 auto; width: 100%; }

/* ---------- the strip above the header: who we are, where we deliver */
.site-util { background: var(--act); color: #DCE3EE; font-size: 14px; }
.site-util .in { max-width: 1264px; margin: 0 auto; min-height: 36px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-util a { color: #fff; text-decoration: none; font-weight: 500; }
.site-util a:hover { text-decoration: underline; }
@media (max-width: 900px) { .site-util .mid { display: none; } }
@media (max-width: 600px) { .site-util .in { padding: 0 16px; justify-content: center; } }

/* ---------- header */
.site-head { position: relative; z-index: 5; height: var(--head); display: flex; align-items: center; gap: 16px; padding: 0 32px; background: #fff; border-bottom: 1px solid var(--panel-2); }
.site-logo { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 16px; letter-spacing: .01em; white-space: nowrap; }
.site-logo img { width: 30px; height: 25px; display: block; }
.site-nav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; }
.site-right { margin-left: auto; display: flex; gap: 2px; }
.site-nav a, .site-right a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: var(--r);
  text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; transition: background-color .2s ease-out; }
.site-nav a:hover, .site-right a:hover, .site-nav a[aria-current="page"] { background: var(--panel); }
.site-menu, .site-mail, .site-cart { display: none; }
.site-menu { margin-left: auto; min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--r); background: var(--panel);
  font: 500 14px var(--sans); color: var(--ink); cursor: pointer; }
.site-menu:hover { background: var(--panel-2); }
.site-mail, .site-cart { width: 44px; height: 44px; flex: none; align-items: center; justify-content: center; border-radius: var(--r); }
.site-mail svg, .site-cart svg { width: 20px; height: 20px; }
.site-cart { position: relative; color: var(--ink); }
.site-short { display: none; }
@media (min-width: 1181px) {    /* on the page grid: the logo starts where the strip's words and the page do, and on
                                   /build, which has no strip, where every other page's does, so it never jumps; the
                                   links sit centered between it and the right-hand links */
  .site-head { padding-inline: max(32px, calc((100% - 1200px) / 2)); }
  .site-head .site-nav { position: static; transform: none; margin: 0 auto; }
  .site-head .site-right { margin-left: 0; }
  /* the right-hand links keep 40 px for the cart count whether it shows or not (/cart shows none), so the links stay
     put as it comes and goes (review 2026-10-20): a count sits in that room after Cart, 8 px from it as before; with
     no count the room goes before Cart */
  .site-right:has(.site-count:not([hidden])) a[href="/cart"] { position: relative; padding-right: 50px; }
  .site-right:has(.site-count:not([hidden])) .site-count { position: absolute; top: calc(50% - 11px); left: calc(100% - 50px); }
  .site-right:not(:has(.site-count:not([hidden]))) { padding-left: 40px; }
}
@media (max-width: 1366px) {    /* room for the Cart link: the email address becomes the mail icon */
  .site-right a[href^="mailto:"] { display: none; }
  .site-mail { display: inline-flex; }
}
@media (max-width: 1180px) {    /* the links move into the Menu sheet, and the cart with its count takes the mail icon's
                                   place, as Apple's phone bar keeps the Bag; email stays in the sheet, the footer and Contact */
  .site-nav, .site-right, .site-mail { display: none; }
  .site-menu { display: inline-flex; align-items: center; }
  .site-cart { display: inline-flex; }
}
@media (max-width: 600px) {    /* apple.com's font sets the name wider: at 360 px it stays clear of Menu, in Inter too */
  .site-head { padding: 0 12px; gap: 4px; }
  .site-logo { font-size: 14px; gap: 6px; letter-spacing: 0; }
  .site-menu { padding: 0 10px; }
  .site-logo img { width: 26px; height: 22px; }
}
@media (max-width: 359px) {    /* the narrowest phones: ACG, as the revised header shortens the name, so the name never
                                  runs under Menu (review 2026-10-17); a screen reader still hears the whole name */
  .site-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .site-short { display: inline; font-size: 18px; letter-spacing: .04em; color: #1B3052; }
  .site-short b { color: #E11320; font-weight: 600; }
}

/* ---------- the revised header (Connor 2026-10-15, DESIGN.md "Header, revised"; pages._new_header, behind
   ACGLASS_NEW_HEADER). Its look is in site.css's .hd2-* rules; here: its height, 80 px buttons row plus the 48 px menu
   row, and at 1180 px and below one 64 px row of the logo, Order Now and Menu (W0b.2 and W0b.5 leave room for both) */
:root:has(header.hd2) { --head: 128px; }
.hd2-top { height: 80px; }
/* the menu row keeps the button row's 32 px edges, so a marked or hovered link's highlight starts under the logo
   and ends under Get a Quote (review 2026-10-17: Cart's ran 12 px past the buttons) */
.hd2-nav .in { padding: 0 32px; }
@media (max-width: 1180px) {
  :root:has(header.hd2) { --head: 64px; }
  .hd2-top { height: 64px; padding: 0 12px; gap: 8px; }
  .hd2-logo { gap: 10px; }
  .hd2-logo img { width: 39px; height: 32px; }
  .hd2-acts, .hd2-nav { display: none; }
  .hd2-phone-order { display: inline-flex; margin-left: auto; min-height: 44px; padding: 0 14px; font-size: 15px; }
  .hd2-phone-order svg { width: 20px; height: 20px; }
  .hd2 .site-menu { display: inline-flex; align-items: center; margin-left: 0; }
}
@media (max-width: 359px) {    /* the narrowest phones: a little less room around the three, so ACG isn't under Order Now */
  .hd2-top { padding: 0 8px; gap: 6px; }
  .hd2-phone-order { padding: 0 10px; }
}

/* how many pieces are in this browser's cart, beside each Cart link (pages.CART_COUNT fills it in) */
.site-count { min-width: 22px; height: 22px; margin-left: 8px; padding: 0 7px; border-radius: 11px; background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 500; line-height: 22px; text-align: center; }
.hd2-nav .site-count { background: #fff; color: var(--act); }
/* on the phone bar's cart icon: on the cart's top right corner, raised 4 px so the cart still reads under 12 or 99+,
   inside the icon's 44 px width at 99+, with a white ring between the count and the cart */
.site-cart .site-count { position: absolute; top: -4px; right: 0; margin: 0; padding: 0 5px; box-shadow: 0 0 0 2px #fff; }

/* the menu on smaller screens: a full-screen sheet (native <dialog>, so focus stays inside and Escape closes it) */
.site-sheet { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: #fff; color: var(--body); }
.site-sheet::backdrop { background: #fff; }
.site-sheet-top { height: var(--head); display: flex; align-items: center; justify-content: flex-end; padding: 0 12px; }
.site-close { min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--r); background: var(--panel); font: 500 14px var(--sans); color: var(--ink); cursor: pointer; }
.site-sheet nav { display: grid; padding: 8px 24px 40px; max-width: 520px; }
.site-sheet nav a { min-height: 52px; display: flex; align-items: center; padding: 0 12px; border-radius: var(--r); text-decoration: none; font-size: 17px; font-weight: 500; color: var(--ink); }
.site-sheet nav a:hover, .site-sheet nav a[aria-current="page"] { background: var(--panel); }
.site-sheet nav hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 12px 0; }

/* ---------- footer: a real company's footer, with the license, offices and every page; every link 44 px tall */
.site-foot { background: var(--studio); color: var(--on-dark-2); font-size: 14px; padding: 64px 32px 40px; }
.site-foot .in { max-width: 1200px; margin: 0 auto; }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.site-foot h2 { margin: 0 0 12px; font-size: 14px; font-weight: 500; color: #fff; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li a { display: inline-flex; min-height: 44px; align-items: center; color: var(--on-dark-2); text-decoration: none; }
.site-foot li a:hover { color: #fff; text-decoration: underline; }
.site-foot .brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; font-size: 16px; margin-bottom: 14px; }
.site-foot .brand img { width: 30px; height: 25px; }
.site-foot p { margin: 0 0 10px; max-width: 40ch; }
.site-foot p a { color: #fff; }
.site-foot .mail { display: inline-flex; align-items: center; min-height: 44px; font-size: 22px; font-weight: 500; color: #fff; text-decoration: none; }
.site-foot .mail:hover { text-decoration: underline; }
.site-foot .legal { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--on-dark-line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; }
.site-foot .legal nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-foot .legal a { color: var(--on-dark-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.site-foot .legal a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 900px) { .site-foot .cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 601px) {    /* the offices are words, not links: each line as tall as a link beside it, so the columns'
                                  first lines start at one height */
  .site-foot .cols > div:last-child li { min-height: 44px; display: flex; align-items: center; }
}
@media (max-width: 600px) {    /* a third shorter on a phone: Shop and Help side by side, the offices on one line */
  .site-foot { padding: 40px 16px 24px; }
  .site-foot .cols { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .site-foot .cols > div:first-child, .site-foot .cols > div:last-child { grid-column: 1 / -1; }
  .site-foot .cols > div:last-child ul { display: flex; flex-wrap: wrap; gap: 0 16px; }
  .site-foot .legal { margin-top: 28px; }
}
