/* ==========================================================================
   Brand identity case study: QuadCoreX. The point where four things converge.
   ========================================================================== */
/* Sedan SC belongs to the logo; everything else is Inter, its display cut at large sizes */
.qx { --n: #01182a; --ic: #81e6ff; --sl: #1e1e1e; --f-display: "Inter", ui-sans-serif, system-ui, sans-serif; --f-text: "Inter", ui-sans-serif, system-ui, sans-serif; font-family: var(--f-text); font-optical-sizing: auto; color: var(--n); }
.qx h2 { margin: 0; font: 500 clamp(2rem, 1.3rem + 2.2vw, 3.6rem)/1.06 var(--f-display); letter-spacing: -0.03em; color: inherit; }
.qx-x { clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%); visibility: hidden; }

/* ---------- The opening ---------- */
.qx-open__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(1, 24, 42, 0.62), rgba(1, 24, 42, 0.2) 45%, rgba(1, 24, 42, 0.5)); opacity: 0; }
.qx-hero { position: absolute; inset: 0; color: #fff; }
.qx-hero__in { display: grid; grid-template-rows: auto 1fr; height: 100%; padding-top: calc(var(--nav-h) + 28px); padding-bottom: clamp(28px, 5vh, 56px); }
.qx-hero__say { align-self: center; display: grid; justify-items: center; margin-top: -4vh; }
.qx-hero__logo { display: block; width: min(52vw, 760px); height: auto; fill: var(--ic); }
.qx-open h1 { margin: clamp(22px, 3.4vh, 36px) 0 0; padding-top: clamp(18px, 2.8vh, 28px); border-top: 1px solid rgba(255, 255, 255, 0.28); max-width: 28em; font: 400 clamp(1.1rem, 0.9rem + 0.7vw, 1.5rem)/1.3 var(--f-display); text-align: center; color: #fff; }
.qx-open__line { position: absolute; left: 50%; top: 50%; width: min(70vw, 980px); margin: 0; translate: -50% -50%; font: 500 clamp(1.9rem, 1.1rem + 2.4vw, 3.6rem)/1.14 var(--f-display); letter-spacing: -0.03em; text-align: center; color: #fff; opacity: 0; visibility: hidden; text-shadow: 0 2px 40px rgba(1, 24, 42, 0.7); }
.qx-open__intro { position: absolute; left: 0; right: 0; top: calc(var(--nav-h) + 8px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px clamp(24px, 4vw, 64px); color: #fff; opacity: 0; visibility: hidden; }
.qx-open__intro h2 { grid-column: 1 / -1; }
.qx-open__intro p { margin: 0; font-size: 18px; line-height: 1.5; }

/* ---------- The vision ---------- */
.qx-vm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 100vh; background: #fff; }
.qx-vm__copy { display: grid; gap: clamp(28px, 6vh, 64px); align-content: center; padding: 10vh var(--gutter); font-size: 18px; line-height: 1.5; color: #27384a; }
.qx-vm__copy h2 { margin-bottom: 12px; color: var(--n); }
.qx-vm__copy p { margin: 0; max-width: 32em; }
.qx-vm__fig { margin: 0; overflow: hidden; }
.qx-vm__fig img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Four domains, one screen ---------- */
.qx-quad__grid { --x: 50%; --y: 50%; position: absolute; inset: 0; display: grid; grid-template-columns: var(--x) calc(100% - var(--x)); grid-template-rows: var(--y) calc(100% - var(--y)); }
.qx-quad__grid article { position: relative; background: var(--c); color: var(--t); overflow: hidden; }
.qx-quad__grid h3 { position: absolute; margin: 0; font: 500 clamp(2.2rem, 1rem + 3.6vw, 5rem)/1 var(--f-display); letter-spacing: -0.035em; color: inherit; white-space: nowrap; }
.qx-quad__grid article:nth-child(1) h3 { left: var(--gutter); top: calc(var(--nav-h) + 12px); }
.qx-quad__grid article:nth-child(2) h3 { right: var(--gutter); top: calc(var(--nav-h) + 12px); }
.qx-quad__grid article:nth-child(3) h3 { left: var(--gutter); bottom: 44px; }
.qx-quad__grid article:nth-child(4) h3 { right: var(--gutter); bottom: 44px; }
.qx-quad__x { position: absolute; left: var(--x); top: var(--y); width: 15vh; height: 15vh; margin: -7.5vh 0 0 -7.5vh; fill: #fff; }
.qx-quad__say { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 18px; padding-inline: 14vw; background: rgba(1, 24, 42, 0.88); color: #fff; text-align: center; font-size: 19px; line-height: 1.5; }
.qx-quad__say p { margin: 0; max-width: 42em; }

/* ---------- The mark ---------- */
.qx-mark { padding-block: 12vh; background: var(--n); color: #fff; }
.qx-mark__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.qx-tile { position: relative; display: grid; place-items: center; min-height: clamp(320px, 34vw, 520px); margin: 0; overflow: hidden; background: #fff; color: var(--n); }
.qx-tile--d { background: #082538; color: #fff; }
.qx-tile figcaption { position: absolute; left: 22px; top: 18px; font-size: 15px; }
.qx-logo { width: 64%; height: auto; fill: var(--ic); overflow: visible; }
.qx-fav { width: 34%; height: auto; fill: var(--n); }
.qx-mark__copy { grid-column: 1 / -1; margin: 18px 0 0; max-width: 46em; font-size: 18px; line-height: 1.5; color: rgba(255, 255, 255, 0.86); }

/* ---------- The colours ---------- */
.qx-cols { display: flex; min-height: 70vh; }
.qx-cols button { flex: 1 1 0; min-width: 0; display: grid; grid-template-rows: 1fr auto auto auto; gap: 8px; padding-bottom: 28px; background: var(--c); color: var(--t); font: 400 15px/1.2 var(--f-text); text-align: left; cursor: pointer; overflow: hidden; transition: flex-grow 0.8s var(--ease-out); }
.qx-cols button:hover, .qx-cols button:focus-visible { flex-grow: 1.6; }
.qx-cols b { grid-row: 2; margin: 18px 26px 0; font: 500 clamp(1.3rem, 1rem + 0.8vw, 1.8rem)/1.1 var(--f-display); letter-spacing: -0.02em; white-space: nowrap; }
.qx-cols span { grid-row: 3; margin: 0 26px; opacity: 0.74; }
.qx-cols em { grid-row: 4; margin: 0 26px; font-style: normal; font-size: 18px; white-space: nowrap; }

/* ---------- The type ---------- */
.qx-type__p { background: var(--n); color: #fff; }
.qx-type__t { background: #f4f5f6; color: #111; }
.qx-type .container { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 6vw; padding-block: 9vh; }
.qx-type__k { grid-column: 1; margin: 0 0 12px; font-size: 16px; }
.qx-type__big { grid-column: 1; margin: 0 0 14px; font: 400 clamp(3rem, 1.4rem + 4.6vw, 5.8rem)/1 var(--f-text); letter-spacing: -0.03em; }
.qx-type__big--s { font-family: "Sedan SC", Georgia, serif; letter-spacing: 0.02em; }
.qx-type__row { grid-column: 1; margin: 0; font-size: 17px; line-height: 1.5; }
.qx-type__row--s { font-family: "Sedan SC", Georgia, serif; }
.qx-type__use { grid-column: 2; grid-row: 1 / span 3; align-self: center; margin: 0; font-size: 18px; line-height: 1.5; }

/* ---------- The end ---------- */
.qx-end { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 100vh; background: #fff; }
.qx-end__copy { display: grid; gap: 16px; align-content: center; padding: 10vh var(--gutter); font-size: 18px; line-height: 1.55; color: #27384a; }
.qx-end__copy h2 { color: var(--n); }
.qx-end__copy p { margin: 0; max-width: 34em; }
.qx-end__fig { display: grid; place-items: center; margin: 0; background: var(--n); overflow: hidden; }
.qx-end__fig svg { width: 38%; height: auto; fill: var(--ic); }

@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .qx-x { clip-path: none; visibility: visible; }
  .qx-hero { padding: 24px 0; background: var(--n); }
  .qx-open__line, .qx-open__intro { padding: 16px var(--gutter); width: auto; translate: none; left: auto; color: #fff; }
  .qx-open .st-reel__stage { color: #fff; }
  .qx-open__intro, .qx-vm, .qx-mark__grid, .qx-end, .qx-type .container { grid-template-columns: minmax(0, 1fr); }
  .qx-quad__grid { grid-template-columns: 1fr 1fr; grid-template-rows: 180px 180px; }
  .qx-quad__grid h3 { position: static; padding: 16px; font-size: 1.5rem; }
  .qx-quad__say { padding: 32px var(--gutter); }
  .qx-cols { flex-direction: column; }
}

/* stacked: the logo and statement sit under the meta row instead of being pulled up over it */
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .qx-hero__in { height: auto; }
  .qx-hero__say { margin-top: 40px; }
  .qx-hero__logo { width: 100%; }
}

/* scroll section heights, so they are in place before st-quadcorex.js runs (same numbers as its reel() calls) */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .qx-open { height: 540vh; } .qx-quad { height: 400vh; } .qx-world { height: 740vh; }
}
