/* =====================================================================
   Home page: the name set big, and a wall of rounded tiles drifting up and
   down beside it. The page fits one screen on every device, in one of five
   layouts chosen by the screen's shape (--home-mode, read by home.js).
   ===================================================================== */
:root { --home-mode: mob; }
@media (min-width: 560px) and (min-aspect-ratio: 1/1) { :root { --home-mode: mob-l; } }
@media (min-width: 600px) and (min-height: 820px) and (max-aspect-ratio: 21/20) { :root { --home-mode: tab-p; } }
@media (min-width: 900px) and (min-height: 540px) and (min-aspect-ratio: 21/20) { :root { --home-mode: tab-l; } }
@media (min-width: 1097px) and (min-aspect-ratio: 27/25) { :root { --home-mode: desk; } }

/* The first screen is the home page's composition; below it the page scrolls on to the footer. */
body.on-home .announcement { display: none !important; }
html.desk body.on-home main, html.tab-l body.on-home main { position: relative; flex: none; height: 100vh; height: 100svh; overflow: hidden; }
.home2 { --drift: 17.5s; --col: 205.33px; --gap: 13px; --pitch: 282.5px; --r: 22px; --tm: 16px; background: var(--paper); }

/* ---------- the tile wall ---------- */
/* The wall's top and bottom edges fade into the page rather than cutting off. */
.m-grid { position: absolute; z-index: 1; overflow: hidden; --fade: 64px; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent); mask-image: linear-gradient(to bottom, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent); }
.m-col { position: absolute; width: var(--col); display: flex; flex-direction: column; gap: var(--gap); animation: colDown var(--drift) linear infinite; will-change: transform; }
.m-col.c2, .m-col.x1, .m-col.x3 { animation-name: colUp; }
@keyframes colDown { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -50%, 0); } }
@keyframes colUp { from { transform: translate3d(0, -50%, 0); } to { transform: translate3d(0, 0, 0); } }
.m-col.c1 { left: var(--shift, 0px); top: 86px; }
.m-col.c2 { left: calc(var(--shift, 0px) + var(--col) + var(--gap)); top: -11.5px; }
.m-col.c3 { left: calc(var(--shift, 0px) + 2 * (var(--col) + var(--gap))); top: 86.5px; }
.m-col.x1 { left: calc(var(--shift, 0px) - (var(--col) + var(--gap))); top: -40px; }
.m-col.x2 { left: calc(var(--shift, 0px) - 2 * (var(--col) + var(--gap))); top: 40px; }
.m-col.x3 { left: calc(var(--shift, 0px) - 3 * (var(--col) + var(--gap))); top: -80px; }
.m-col.x1, .m-col.x2, .m-col.x3 { display: none; }
html.desk.ex1 .m-col.x1, html.desk.ex2 .m-col.x1, html.desk.ex2 .m-col.x2, html.desk.ex3 .m-col.x1, html.desk.ex3 .m-col.x2, html.desk.ex3 .m-col.x3 { display: flex; }
.m-cell { position: relative; flex: none; container-type: inline-size; height: calc(var(--pitch) - var(--gap)); border-radius: var(--r); overflow: hidden; isolation: isolate; }
.m-cell.ph { background: var(--deep) var(--pic, none) center / cover no-repeat; }
.m-cell.gold { background: var(--gold); }
.m-cell.mid { background: var(--navy-2); }
.m-cell.deep { background: var(--deep); }
.m-cell.cream { background: var(--cream); box-shadow: inset 0 0 0 1px #e9e6df; }
.m-cell.dark { background: var(--navy); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.m-cell:not(.ph)::after { content: ""; position: absolute; inset: 0; background-image: var(--grain); opacity: .13; mix-blend-mode: multiply; pointer-events: none; }
.m-cell.dark::after, .m-cell.deep::after, .m-cell.mid::after { mix-blend-mode: screen; opacity: .035; }
.m-word { position: absolute; left: 9%; bottom: 7%; right: 6%; font: 900 clamp(13px, 15.5cqw, 34px)/.9 var(--display); font-stretch: 85%; letter-spacing: -.04em; text-transform: uppercase; color: var(--ink); }
.m-cell.dark .m-word, .m-cell.deep .m-word, .m-cell.mid .m-word { color: var(--gold); }
.m-word.rotate .rw { display: block; transition: opacity 260ms ease, transform 360ms var(--ease-out), filter 260ms ease; }
.m-word.rotate .rw.out { opacity: 0; transform: translateY(-14px); filter: blur(3px); }
.m-word.rotate .rw.in { opacity: 0; transform: translateY(14px); filter: blur(3px); transition: none; }

/* Pause / play for the tile wall. */
.motion-btn { position: absolute; z-index: 4; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255, 255, 255, .92); color: var(--ink); display: grid; place-items: center; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 8px 20px -10px rgba(22, 22, 44, .45); transition: transform 160ms var(--ease-out); }
.motion-btn:active { transform: scale(.94); }
.motion-btn svg { width: 16px; height: 16px; }
.motion-btn .i-play, .motion-btn[aria-pressed="true"] .i-pause { display: none; }
.motion-btn[aria-pressed="true"] .i-play { display: block; }
.m-grid.is-paused .m-col { animation-play-state: paused !important; }
@media (hover: hover) and (pointer: fine) { .m-grid:hover .m-col { animation-play-state: paused; } }

/* ---------- the name and the welcome ---------- */
.home-hero { position: absolute; z-index: 3; }
.home-hero h1 { margin: 0; font: 900 calc(72px * var(--hs, 1))/.94 var(--display); letter-spacing: -.06em; text-transform: uppercase; -webkit-text-stroke: 1.1px currentColor; color: var(--ink); overflow-wrap: anywhere; }
.home-hero h1 > span { display: block; overflow: hidden; padding-bottom: 2px; }
.home-hero h1 .ln { display: block; font-size: .95em; letter-spacing: -.05em; }
/* The last word sits on a navy tile from the wall, with a thread of gold light round it. */
@property --shine { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.home-hero h1 > span.tile-word { position: relative; display: inline-block; margin-top: .14em; padding: .1em .26em .08em; background: var(--navy); border-radius: 18px; }
.home-hero h1 > span.tile-word .ln { color: var(--gold); -webkit-text-stroke-color: var(--gold); }
.home-hero h1 > span.tile-word::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none; background: conic-gradient(from var(--shine), transparent 0deg 250deg, rgba(201, 164, 99, .25) 290deg, #e7c98a 330deg, transparent 360deg); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: shine 6s linear infinite; }
@keyframes shine { to { --shine: 360deg; } }
.home-tag { margin: 14px 0 0; font: italic 600 20px/1.3 var(--sans); color: #55545c; }
.home-tag em { font-style: inherit; font-weight: 800; color: var(--gold-text); }
/* A short gold bar and extra space start the details, apart from the punchline. */
.home-lede { position: relative; margin: 26px 0 0; padding-top: 22px; font-size: 18px; line-height: 26.6px; color: #3a3a4a; }
.home-lede::before { content: ""; position: absolute; left: 0; top: 0; width: 44px; height: 3px; border-radius: 2px; background: var(--gold); }
.home-lede b { color: var(--ink); }
.home-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 26px; }
.home-acts .go-link { margin-left: 22px; }
.home-acts .call-pill { display: none; }

/* ---------- desktop and landscape tablets: a 1280 x 800 canvas, scaled to fill ---------- */
html.desk .home2, html.tab-l .home2 { position: absolute; left: 0; top: 0; transform-origin: 0 0; transform: scale(var(--s, 1)); width: calc(var(--W, 1280) * 1px); height: calc(var(--H, 800) * 1px); overflow: hidden; }
html.desk .m-grid, html.tab-l .m-grid { right: 62px; top: 0; bottom: 0; --shift: calc(var(--ex, 0) * (var(--col) + var(--gap))); width: calc(var(--shift) + 3 * var(--col) + 2 * var(--gap)); }
/* Extra columns on very wide screens sit inside the wall's box, so the edge fade covers them too. */
html.desk.ex1 .m-grid { --ex: 1; } html.desk.ex2 .m-grid { --ex: 2; } html.desk.ex3 .m-grid { --ex: 3; }
html.desk .home2 .hdr, html.tab-l .home2 .hdr { position: absolute; left: 40px; right: 40px; top: 0; margin: 0; z-index: 5; }
html.desk .home-hero, html.tab-l .home-hero { left: 86px; top: calc(160px + (var(--H, 800) - 800) * .5px); width: 500px; }
html.desk .home-lede, html.tab-l .home-lede { width: 460px; }
html.desk .motion-btn, html.tab-l .motion-btn { right: 78px; bottom: 18px; }
/* On the scaled canvas the header always keeps its full row of links. */
html.desk .home2 .mnav-links, html.desk .home2 .hdr-cta .cta-pill { display: flex; }
html.desk .home2 .hdr-cta { display: flex; }
html.desk .home2 .call-btn { display: none; }
html.desk .home2 .hdr-main { height: 102px; padding: 0 20px 0 26px; }
html.desk .home2 .menu-inner { grid-template-columns: minmax(0, 1fr); padding: 8px 8px 8px 0; }
html.desk .home2 .mgroups { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 18px 22px 22px 26px; }

/* ---------- portrait tablets: header, the name, then a band of tiles ---------- */
html.tab-p .home2 { position: relative; display: grid; grid-template-rows: auto auto minmax(max(420px, 42svh), 1fr); overflow: hidden; min-height: 100svh; }
html.tab-p .home2 .hdr { position: relative; grid-row: 1; }
html.tab-p .home-hero { position: relative; grid-row: 2; padding: clamp(28px, 5vw, 56px) clamp(20px, 6vw, 72px) 28px; }
html.tab-p .home-hero h1 { font-size: calc(clamp(56px, 10vw, 80px) * var(--hs, 1)); line-height: .94; }
html.tab-p .home-lede { max-width: 520px; margin-top: 24px; }
html.tab-p .m-grid { position: relative; grid-row: 3; --gw: calc(100vw - 2 * clamp(20px, 4vw, 40px)); --col: calc((var(--gw) - 2 * var(--gap)) / 3); --pitch: calc(var(--col) * 1.376); margin: 0 clamp(20px, 4vw, 40px); }
html.tab-p .m-col.c1 { top: calc(var(--pitch) * -.35); } html.tab-p .m-col.c2 { top: calc(var(--pitch) * -.7); } html.tab-p .m-col.c3 { top: calc(var(--pitch) * -.2); }
html.tab-p .motion-btn { right: calc(clamp(20px, 4vw, 40px) + 12px); bottom: 14px; }

/* ---------- phones: the name first, the tiles below; the page scrolls if it needs to ---------- */
html.mob .home2 { position: relative; display: flex; flex-direction: column; min-height: 100svh; overflow: hidden; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
html.mob .home2 .hdr { position: relative; margin: 0 var(--tm); }
html.mob .home2 .hdr-main { height: 76px; padding: 0 12px 0 12px; gap: 12px; }
html.mob .home2 .lab-logo img { width: 56px; height: 56px; }
html.mob .home2 .lab-logo b { font-size: 24px; }
html.mob .home2 .lab-logo small { font-size: 9.5px; letter-spacing: .08em; }
html.mob .home2 .mnav-links, html.mob .home2 .hdr-cta { display: none; }
html.mob .home2 .call-btn { display: grid; }
html.mob .home-hero { position: relative; order: 1; padding: 22px var(--tm) 16px; }
html.mob .home-hero h1 { font-size: calc(clamp(40px, 13.4vw, 64px) * var(--hs, 1)); line-height: .92; -webkit-text-stroke-width: .8px; }
html.mob .home-hero h1 > span:not(.tile-word) { display: inline-block; margin-right: .22em; }
html.mob .home-hero h1 > span.tile-word { display: table; border-radius: 14px; }
html.mob .home-tag { margin-top: 10px; font-size: 15px; }
html.mob .home-lede { font-size: 15.5px; line-height: 1.45; margin-top: 16px; padding-top: 16px; }
html.mob .home-acts { margin-top: 14px; }
html.mob .home-acts .cta-ring, html.mob .home-acts .go-link { display: none; }
html.mob .home-acts .call-pill { display: inline-grid; margin-left: 4px; }
html.mob .m-grid { position: relative; order: 2; flex: 1 0 auto; min-height: max(340px, 46svh); margin: 0 var(--tm); --fade: 44px; --gw: calc(100vw - 2 * var(--tm)); --gap: 8px; --col: calc((var(--gw) - 2 * var(--gap)) / 3); --pitch: calc(var(--col) * 1.376); --r: 16px; }
html.mob .m-col.c1 { top: calc(var(--pitch) * -.25); } html.mob .m-col.c2 { top: calc(var(--pitch) * -.62); } html.mob .m-col.c3 { top: calc(var(--pitch) * -.1); }
html.mob .motion-btn { right: calc(var(--tm) + 10px); bottom: calc(10px + env(safe-area-inset-bottom)); }
/* Landscape phones: the name on the left, the tiles on the right. */
html.mob-l .home2 { display: grid; grid-template-columns: minmax(0, 1fr) var(--lgw, 44vw); grid-template-rows: auto 1fr; }
html.mob-l .home2 .hdr { grid-column: 1; grid-row: 1; z-index: 5; }
html.mob-l .home-hero { grid-column: 1; grid-row: 2; align-self: center; }
html.mob-l .home-hero h1 { font-size: calc(clamp(32px, 7vh, 56px) * var(--hs, 1)); }
html.mob-l .m-grid { grid-column: 2; grid-row: 1 / -1; margin: 0 var(--tm) 0 0; --gw: calc(var(--lgw, 44vw) - var(--tm) - env(safe-area-inset-right)); z-index: 1; }

/* Reduced motion (often switched on by remote and work computers): the wall still drifts,
   at half speed and with its pause button, but the entrance and shine are left out. */
@media (prefers-reduced-motion: reduce) {
  .m-col { animation: colDown calc(var(--drift) * 2) linear infinite !important; }
  .m-col.c2, .m-col.x1, .m-col.x3 { animation-name: colUp !important; }
  .home-hero h1 > span.tile-word::before { animation: none; display: none; }
}
/* Landscape tablets: the canvas keeps the header's Get directions; the links live in the menu. */
html.tab-l .home2 .mnav-links, html.tab-l .home2 .call-btn { display: none; }
html.tab-l .home2 .hdr-cta { display: flex; }
html.tab-l .home2 .hdr-cta .cta-pill { display: inline-grid; }
.home-facts { margin: 14px 0 0; max-width: 470px; font: 800 clamp(18px, 2vw, 24px)/1.25 var(--display); letter-spacing: -.01em; text-transform: uppercase; color: var(--gold-text); }
.home-facts span { white-space: nowrap; }
