/* adherence.ae v5: the workbench's ground as the page. Tokens from the brand (style-guide.md, section 2) and the
   workbench's paper ground (#f8f7f5). One accent, blue; green has one meaning: an agent that just passed its tests. */
@font-face { font-family: "Schibsted Grotesk"; src: url("../assets/fonts/schibsted-grotesk-400-900-latin.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../assets/fonts/schibsted-grotesk-400-900-latin-ext.woff2") format("woff2"); font-weight: 400 900; font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF; }

:root {
  --paper: #f8f7f5; --well: #efede9; --ink: #15171c; --grey: #575e69; --grey-3: #8a9099; --hair: rgba(21, 23, 28, .12);
  --blue: #1f5ed6; --live: #2e8465;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 3.2vw, 40px); --ease: cubic-bezier(.22, .61, .36, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
h1, h2 { font-weight: 780; letter-spacing: -.036em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 30; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 12px; }
.skip:focus { left: 8px; }

#ground { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
#labels { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.lb { position: absolute; left: 0; top: 0; white-space: nowrap; font: 600 13px/1 var(--sans); color: var(--ink); opacity: 0; will-change: transform, opacity; }
.lb-r { --ax: -100%; } .lb-l { --ax: 0%; } .lb-c { --ax: -50%; }
.lb-strong { font-size: 14px; font-weight: 700; }
.lb-blue { color: var(--blue); }
.lb-dim { color: var(--grey); font-weight: 500; font-size: 12.5px; }
.lb-two { display: flex; flex-direction: column; align-items: center; gap: 4px; line-height: 1.05; }
.sub-mark { font-size: 15px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); }
.sub-mark .stop, .who .stop { color: var(--blue); }

/* the map's tasks: a marker per example task, and one card for the task in focus */
/* the markers lie under the page's copy (main is above them), so a panel scrolling over the map covers them; the
   sections let pointers through their empty parts so an uncovered marker can still be pointed at or tapped */
#tasks { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.tk { position: absolute; left: 0; top: 0; width: 28px; height: 28px; margin: -14px 0 0 -14px; padding: 0; border: 0; background: none; cursor: pointer; opacity: 0; pointer-events: none; }
.tk.on { pointer-events: auto; }
.tk::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 1.5px var(--ink), 0 0 0 5px color-mix(in srgb, var(--paper) 70%, transparent); transition: background-color .15s, box-shadow .15s; }
.tk::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--ink); transition: background-color .15s; }
.tk:hover::before, .tk.sel::before, .tk:focus-visible::before { background: var(--blue); box-shadow: 0 0 0 1.5px var(--blue), 0 0 0 5px color-mix(in srgb, var(--blue) 18%, transparent); }
.tk:hover::after, .tk.sel::after, .tk:focus-visible::after { background: #fff; }
.tk:focus-visible { outline: none; }
.tcard { position: fixed; z-index: 6; left: 0; top: 0; width: 300px; padding: 16px 18px 15px; border-radius: 12px; background: var(--paper); box-shadow: 0 0 0 1px var(--hair), 0 18px 40px -18px rgba(21, 23, 28, .28); pointer-events: auto; opacity: 0; visibility: hidden; transition: opacity .16s var(--ease), visibility 0s .16s; }
.tcard.show { opacity: 1; visibility: visible; transition: opacity .16s var(--ease); }
.tcard b { display: block; font-size: 15.5px; line-height: 1.3; letter-spacing: -.01em; }
.tcard dl { margin: 12px 0 0; display: grid; gap: 9px; }
.tcard dt { font-size: 12.5px; font-weight: 600; color: var(--grey); }
.tcard dd { margin: 2px 0 0; font-size: 14.5px; line-height: 1.45; }
.tcard .adh dt { color: var(--blue); }
.tcard small { display: block; margin-top: 12px; font-size: 12px; color: var(--grey-3); }

/* the header: the wordmark, three places and one action; no sign-in */
.top { position: fixed; z-index: 20; inset: 0 0 auto 0; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); transition: background-color .25s var(--ease), box-shadow .25s var(--ease); }
.top.scrolled { background: color-mix(in srgb, var(--paper) 94%, transparent); box-shadow: 0 1px 0 var(--hair); }
.mark { font-size: 21px; font-weight: 700; letter-spacing: -.03em; text-decoration: none; color: var(--ink); }
.mark .stop, h1 .stop, h2 .stop { color: var(--blue); }
.mark-sm { font-size: 16px; }
.top nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); font-size: 15px; font-weight: 500; }
.top nav a:not(.btn) { text-decoration: none; color: var(--grey); transition: color .15s; }
.top nav a:not(.btn):hover { color: var(--ink); }

.btn { display: inline-flex; align-items: center; height: 46px; padding: 0 22px; border-radius: 12px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; font-size: 16px; transition: background-color .15s; }
.btn:hover { background: var(--blue); }
.btn-sm { height: 36px; padding: 0 15px; font-size: 14.5px; border-radius: 10px; color: #fff !important; }
.quiet { font-weight: 600; text-decoration: none; color: var(--ink); border-bottom: 1.5px solid var(--hair); padding-bottom: 2px; transition: border-color .15s; }
.quiet:hover { border-color: var(--blue); }
.acts { display: flex; align-items: center; gap: 26px; margin-top: 34px; flex-wrap: wrap; }

/* the story: blocks scroll at the reader's pace; the ground beneath follows them */
main { position: relative; z-index: 2; pointer-events: none; }
.blk > *, .solid { pointer-events: auto; }
.blk { min-height: 100vh; display: flex; align-items: center; padding: 96px var(--gutter) 64px; }
.copy { width: min(460px, 36vw); }
.blk h2 { font-size: clamp(30px, 3.1vw, 44px); line-height: 1.06; }
.blk .copy p:not(.acts):not(.note):not(.legend) { margin-top: 18px; font-size: 18px; color: var(--grey); }
.hero .copy { width: min(640px, 50vw); }
.hero h1 { font-size: clamp(48px, 6.6vw, 96px); line-height: .98; }
.hero .lede { margin-top: 26px; font-size: clamp(18px, 1.45vw, 21px) !important; line-height: 1.55; color: var(--grey); max-width: 31em; }
/* the start page's foot: the MBZUAI band. A hairline across the page, the floor fading out beneath it, the claim on
   the left and the place on the right. (The MBZUAI logo waits for the university's written permission.) */
.hero { position: relative; }
.origin { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0 26px; box-shadow: 0 -1px 0 var(--hair); }
.origin::before { content: ""; position: absolute; z-index: -1; inset: -36px calc(-1 * var(--gutter)) 0; background: linear-gradient(to bottom, color-mix(in srgb, var(--paper) 0%, transparent), var(--paper) 46%); }
.who { margin: 0; flex: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 6px 24px; flex-wrap: wrap; line-height: 1.25; }
.who b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); } .who > span { color: var(--grey); font-size: 15px; }
.origin img { height: 46px; width: auto; display: block; filter: grayscale(1) brightness(0); opacity: .9; }
.note { margin-top: 22px; font-size: 13.5px; color: var(--grey-3); }
.legend { margin-top: 22px; font-size: 14px; color: var(--grey); display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.key { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; margin-right: 14px; }
.dot-blue { background: var(--blue); } .dot-green { background: var(--live); }

/* the founders: a solid band over the ground */
.solid { position: relative; background: var(--paper); box-shadow: 0 -1px 0 var(--hair), 0 1px 0 var(--hair); padding: clamp(80px, 11vw, 140px) var(--gutter); }
.wrap { max-width: 1180px; margin: 0 auto; }
.solid h2 { font-size: clamp(30px, 3.1vw, 44px); line-height: 1.06; max-width: 15em; }
.sub { margin-top: 18px !important; font-size: 18px; color: var(--grey); max-width: 38em; }
.people { list-style: none; margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.people figure { margin: 0 0 18px; aspect-ratio: 5 / 4.6; border-radius: 12px; overflow: hidden; display: flex; align-items: flex-end; justify-content: center;
  background: radial-gradient(120% 90% at 50% 100%, #e6ecf8 0%, var(--well) 62%); }
.people img { height: 94%; width: auto; max-width: 100%; object-fit: contain; object-position: bottom; display: block; }
.people b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.people span { display: block; margin-top: 3px; font-size: 14.5px; color: var(--grey); }
.people .mail { display: inline-block; margin-top: 8px; font-size: 14.5px; font-weight: 500; color: var(--ink); text-decoration: none; border-bottom: 1.5px solid var(--hair); padding-bottom: 1px; transition: border-color .15s, color .15s; }
.people .mail:hover { color: var(--blue); border-color: var(--blue); }
.careers { margin-top: 44px; font-size: 15px; color: var(--grey); }
.careers a { color: var(--ink); font-weight: 600; text-decoration-color: var(--hair); text-underline-offset: 3px; }

.closing { flex-direction: column; justify-content: center; align-items: stretch; padding-bottom: 0; }
.closing .copy { margin-top: auto; }
.closing footer { margin-top: auto; display: flex; gap: 10px 28px; flex-wrap: wrap; align-items: center; padding: 28px 0 30px; font-size: 14px; color: var(--grey); box-shadow: 0 -1px 0 var(--hair); }
.closing footer a { color: var(--grey); text-decoration: none; }
.closing footer a:hover { color: var(--ink); }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* phones and narrow windows: the drawing sits in the upper part of the screen, the copy on a paper panel below */
@media (max-width: 899px) {
  .top nav a:not(.btn) { display: none; }
  .blk { align-items: flex-start; padding: 80px 16px 28px; }
  .copy, .hero .copy { width: 100%; }
  .blk:not(.hero):not(.closing) .copy { background: color-mix(in srgb, var(--paper) 95%, transparent); box-shadow: 0 0 0 1px var(--hair); border-radius: 12px; padding: 20px 20px 22px; }
  /* the start page on a phone: the MBZUAI line follows the buttons, so it is on the first screen whatever the toolbars */
  /* the start page on a phone fills the visible screen (whatever Safari's toolbars), with the MBZUAI band at its foot */
  .hero { flex-direction: column; align-items: stretch; min-height: 100svh; padding: 64px 16px 0; }
  .hero .copy { margin: auto 0; padding: 24px 0 28px; }
  .hero .origin { position: relative; left: auto; right: auto; justify-content: center; padding: 18px 0 calc(20px + env(safe-area-inset-bottom)); }
  .hero .origin::before { inset: -28px -16px 0; }
  .hero .who { flex-direction: column; align-items: center; gap: 3px; text-align: center; } .hero .who b { font-size: 15px; } .hero .who > span { font-size: 13.5px; }
  .hero h1 { font-size: clamp(44px, 13vw, 64px); }
  .blk h2 { font-size: 27px; }
  .blk .copy p:not(.acts):not(.note):not(.legend) { font-size: 16.5px; margin-top: 12px; }
  .people { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .people li { display: grid; grid-template-columns: 96px 1fr; column-gap: 16px; align-items: center; }
  .people li { grid-template-rows: auto auto auto; align-content: center; }
  .people figure { grid-row: 1 / span 3; margin: 0; width: 96px; aspect-ratio: 1; }
  .people b { font-size: 17px; } .people span { font-size: 14px; } .people .mail { justify-self: start; margin-top: 4px; font-size: 14px; }
  .lb { font-size: 11.5px; } .lb-strong { font-size: 12.5px; } .lb-dim { font-size: 11px; }
  .closing .copy { margin-top: 30vh; }
  .tcard { width: min(300px, calc(100vw - 32px)); }
}
