/* madlab.com: the whole site's styles. Roboto Light, MadLab red, gray text, soft-shadowed screenshots. */
:root {
  --red: #ba2132;
  --ink: #333;
  --grey: #6f777d;
  --light: #8b949a;
  --rule: #e5e5e5;
  --shadow: 1px 1px 4px rgba(46, 46, 46, .5);
  --wrap: 1680px;
  --pad: 4vw;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 300 17px/1.5 Roboto, system-ui, sans-serif; color: var(--ink); background: #fff; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--red); text-decoration: none; transition: opacity .15s; }
a:hover { opacity: .75; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; font-weight: 300; }

.page { min-height: 100vh; display: flex; flex-direction: column; }
.page > main { flex: 1 0 auto; }
.page > * { width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.math { background: linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, .5)), #fff url("/cdn/images/heros/mathbackground.7f378562.jpg") center top / 1500px repeat; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header: the logo and the menu, which reads "Contact us about our work". */
.masthead { width: 100%; display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; }
.masthead-bar { background: #fff; border-bottom: 1px solid var(--rule); }
.masthead-over { position: relative; padding-top: 26px; padding-bottom: 26px; }
.masthead .logo img { height: 42px; width: auto; }
.menu { display: flex; flex-wrap: wrap; gap: 8px 30px; }
.menu a { padding: 6px 0; font-weight: 400; font-size: 15px; line-height: 1.2; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
.menu a[aria-current] { color: var(--red); }
.masthead-light .menu a:not([aria-current]) { color: #fff; }
.masthead-light .menu a { text-shadow: 0 1px 10px rgba(0, 0, 0, .7), 0 0 2px rgba(0, 0, 0, .5); }
.masthead-light .menu a[aria-current] { color: #fff; box-shadow: inset 0 -2px var(--red); }

/* Page titles: the page's address after "MadLab", as in madlab.com/made. Left-aligned, on the content's edge. */
.title { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-bottom: 30px; border-bottom: 1px solid var(--rule); }
.title h1, .title h2 { font-size: clamp(34px, 3.1vw, 50px); line-height: 1.1; }
.title .route { color: var(--light); }
.title p { font-size: clamp(18px, 1.4vw, 21px); color: var(--grey); }

/* Footer */
.footer { padding: 56px var(--pad) 48px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer nav { font-size: 17px; }
.footer p { font-size: 14px; color: #7c858b; }

/* Home: the mad scientist, then what's in the lab, then the team. */
.hero { position: relative; min-height: clamp(600px, 56vw, 1100px); display: flex; flex-direction: column; justify-content: space-between; background: #2a2f33; overflow: hidden; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, 0) 26%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .6) 100%); }
.hero > * { position: relative; z-index: 1; }
.hero-text { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 0 var(--pad) clamp(48px, 6vw, 96px); color: #fff; }
.hero-text h1 { font-size: clamp(44px, 4.6vw, 76px); line-height: 1.05; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
.hero-text p { font-size: clamp(22px, 2.1vw, 34px); line-height: 1.3; text-shadow: 0 2px 14px rgba(0, 0, 0, .5); }

.section { display: flex; flex-direction: column; gap: 56px; padding-top: 88px; padding-bottom: 32px; }

/* Currently in the lab: a full-width panel, the project on one side and its screenshots taking turns in a browser frame. */
.lab-band { --panel-text: #fff; --panel-soft: #c3cacf; --panel-faint: #8f989e; background: #24282b; color: var(--panel-text); }
.lab-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: clamp(40px, 5vw, 96px); align-items: center; padding-top: clamp(64px, 7vw, 120px); padding-bottom: clamp(64px, 7vw, 120px); }
.lab-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.lab-copy h2 { font-weight: 400; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--panel-faint); }
.lab-copy h3 { font-size: clamp(40px, 4vw, 64px); line-height: 1.05; }
.lab-lede { font-size: clamp(19px, 1.5vw, 23px); line-height: 1.45; color: var(--panel-soft); max-width: 30ch; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 18px 0 6px; }
.stat strong { font-weight: 300; font-size: clamp(48px, 4.6vw, 76px); line-height: 1; letter-spacing: -.01em; }
.stat span { font-size: 16px; color: var(--panel-faint); }
.lab-links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding-top: 14px; }
.lab-visit { font-weight: 400; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: #24282b; background: #fff; border-radius: 4px; padding: 14px 24px; }
.lab-more { font-size: 17px; color: var(--panel-soft); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.browser { border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .2); }
.browser-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: #e8ebed; }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.browser-bar i:nth-child(2) { background: #febc2e; }
.browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar span { flex: 0 1 300px; margin: 0 auto; transform: translateX(-24px); background: #fff; border-radius: 5px; padding: 3px 12px; font-size: 12px; color: var(--grey); text-align: center; }
.browser-view { position: relative; aspect-ratio: 2 / 1; background: #fff; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s, visibility .7s; }
.slide.is-on { opacity: 1; visibility: visible; }
.slide.is-on:hover { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.slide-contain img { object-fit: contain; object-position: center; }
.slide-nav { display: flex; align-items: center; gap: 4px; padding-top: 18px; }
.slide-nav button { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.slide-nav button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--panel-faint); opacity: .6; transition: opacity .2s, transform .2s; }
.slide-nav button[aria-current]::before { background: var(--panel-text); opacity: 1; transform: scale(1.2); }
.slide-caption { margin-left: 10px; font-size: 15px; color: var(--panel-soft); }

/* Our work: the same dark panel at the top, with the page title and every NurseRecruiter screenshot side by side. */
.made-top .title { border-bottom-color: rgba(255, 255, 255, .14); padding-top: clamp(24px, 3vw, 48px); }
.made-top .title .route { color: var(--panel-faint); }
.made-lead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 28px clamp(40px, 5vw, 96px); padding-top: clamp(40px, 4vw, 64px); }
.made-name { flex: 1 1 420px; display: flex; flex-direction: column; gap: 14px; }
.made-name h2 { font-weight: 400; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--panel-faint); }
.made-name h3 { font-size: clamp(36px, 3.4vw, 56px); line-height: 1.05; }
.made-lead .stat { padding: 0; }
.made-shots { padding-top: clamp(36px, 3.5vw, 56px); padding-bottom: clamp(56px, 6vw, 96px); }
.made-shots .row { gap: clamp(16px, 1.6vw, 26px); }
.made-shots .shot { box-shadow: 0 14px 36px rgba(0, 0, 0, .35); }
.made-shots figcaption { color: var(--panel-soft); }

/* Screenshots: whole images, soft shadow, rows of equal height. */
.shot { width: 100%; border-radius: 4px; box-shadow: var(--shadow); background: #fff; transition: box-shadow .2s; }
a:hover > .shot { box-shadow: 2px 3px 12px rgba(46, 46, 46, .45); }
a:has(> .shot):hover { opacity: 1; }
.gallery { display: flex; flex-direction: column; gap: 34px; }
.row { display: flex; gap: 22px; }
.tile { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; flex: var(--r) 1 calc(var(--r) * 100px); }
.tile .shot { aspect-ratio: var(--r); object-fit: cover; }
.tile figcaption { font-size: 14px; line-height: 1.4; color: var(--grey); }
.tile figcaption .name { color: var(--ink); }
.tile figcaption a.name { color: var(--red); }

/* Team: gray circles, faces zoomed to about the same size. */
.team { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 56px 40px; width: 100%; }
.team-4 { --cols: 4; }
.member { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.member:hover { opacity: 1; }
.member .name { font-size: 28px; line-height: 1.1; color: var(--ink); }
.member .line { font-size: 16px; color: var(--grey); max-width: 290px; }
.member:hover .name { color: var(--red); }
.face { display: block; flex: none; width: var(--size, 190px); height: var(--size, 190px); border-radius: 50%; overflow: hidden; background: #ddd; }
.face img, .portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06); transform: scale(var(--zoom, 1)); transform-origin: var(--focus, 50% 50%); }

/* About: a dark top with the title and what MadLab is, then the team two by two. */
.about-intro { display: flex; flex-direction: column; gap: clamp(16px, 1.6vw, 24px); padding-top: clamp(32px, 4vw, 72px); padding-bottom: clamp(64px, 7vw, 120px); }
.about-intro h1 { font-size: clamp(34px, 3.1vw, 50px); line-height: 1.1; }
.about-intro .route { color: var(--panel-faint); }
.about-intro p { max-width: 30ch; font-size: clamp(32px, 3.6vw, 60px); line-height: 1.15; }
.eyebrow { font-weight: 400; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--grey); }
.about-team { display: flex; flex-direction: column; gap: 40px; padding-top: clamp(56px, 5.5vw, 96px); padding-bottom: 40px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px clamp(40px, 5vw, 96px); }
.card { display: flex; align-items: center; gap: clamp(24px, 2.5vw, 40px); color: var(--ink); }
.card:hover { opacity: 1; }
.card-text { display: flex; flex-direction: column; gap: 6px; }
.card .name { font-size: clamp(26px, 2.1vw, 32px); line-height: 1.1; }
.card .line { font-size: 17px; color: var(--grey); }
.card .lead { font-size: 17px; line-height: 1.5; padding-top: 8px; }
.card .read { font-size: 15px; color: var(--red); padding-top: 4px; }
.card:hover .name { color: var(--red); }

/* A person's page: /is/<name> */
.person-head { display: flex; flex-direction: column; gap: 10px; padding-bottom: 30px; border-bottom: 1px solid var(--rule); }
.person-head > a { font-size: 18px; color: var(--grey); }
.person-head h1 { font-size: clamp(40px, 3.6vw, 58px); line-height: 1.05; }
.person-head p { font-size: 21px; color: var(--grey); }
.person { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.portrait { aspect-ratio: 1; overflow: hidden; border-radius: 4px; box-shadow: var(--shadow); }
.bio { display: flex; flex-direction: column; gap: 22px; padding-top: 4px; max-width: 760px; }
.bio > p { font-size: clamp(19px, 1.45vw, 22px); line-height: 1.6; }
.bio .links { font-weight: 400; font-size: 17px; }
.others { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 20px; }
.others h2 { font-weight: 400; font-size: 13px; color: var(--grey); text-transform: uppercase; letter-spacing: .06em; }
.other { display: flex; align-items: center; gap: 16px; --size: 64px; }
.other span span { display: block; }
.other .name { font-size: 20px; color: var(--ink); }
.other .line { font-size: 15px; color: var(--grey); }

/* Contact: the therapist's chair and the couch, then the form. */
.listens { background: #dbdbdb; display: flex; flex-direction: column; overflow: hidden; }
.listens .title { width: 100%; border: 0; padding-top: clamp(8px, 2vw, 32px); padding-bottom: 0; }
.listens .title p { font-size: clamp(19px, 1.6vw, 24px); }
.chairs { width: min(100%, 1500px); margin: 0 auto; aspect-ratio: 1800 / 700; object-fit: cover; object-position: 50% 40%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.contact { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(40px, 6vw, 110px); padding-top: 72px; padding-bottom: 64px; }
.contact form { display: flex; flex-direction: column; gap: 22px; max-width: 760px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-weight: 400; font-size: 15px; }
.field label span { color: var(--grey); }
.field input, .field textarea { font: 300 17px/1.4 Roboto, system-ui, sans-serif; color: var(--ink); border: 1px solid #cdd3d7; border-radius: 4px; padding: 11px 13px; background: #fff; width: 100%; }
.field textarea { min-height: 170px; resize: vertical; }
.send { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.button { font: 400 15px Roboto, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--red); border: 0; border-radius: 4px; padding: 15px 30px; cursor: pointer; }
.button:disabled { opacity: .6; cursor: default; }
.status { padding: 12px 16px; border-radius: 4px; font-size: 16px; }
.status[hidden] { display: none; }
.status-info { background: #eef1f3; }
.status-success { background: #e8f4ea; color: #24602f; }
.status-danger { background: #fbeaec; color: var(--red); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.mail { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.mail h2 { font-size: 26px; }
.mail address { font-style: normal; font-size: 18px; line-height: 1.6; color: var(--grey); }

/* Page not found and Jobs */
.notice { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; padding-top: 120px; padding-bottom: 140px; }
.notice h1 { font-size: clamp(40px, 3.6vw, 58px); line-height: 1.1; }
.notice p { font-size: 21px; color: var(--grey); max-width: 46ch; }

@media (max-width: 1200px) { .team-4 { --cols: 2; } }
@media (max-width: 900px) {
  .team, .team-4 { --cols: 1; }
  .person, .contact, .lab-grid, .cards { grid-template-columns: 1fr; }
  .portrait { max-width: 300px; }
}
@media (max-width: 700px) {
  .masthead, .menu { justify-content: center; }
  .hero::after { background: linear-gradient(180deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .55) 22%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .65) 100%); }
  .browser-bar { height: 26px; gap: 5px; padding: 0 10px; }
  .browser-bar i { width: 8px; height: 8px; }
  .browser-bar span { font-size: 11px; padding: 1px 10px; transform: none; }
  .row { flex-wrap: wrap; }
  .tile { flex: 1 1 100%; }
  .tile-square { flex-direction: row; align-items: center; gap: 18px; }
  .tile-square > a, .tile-square > .shot { flex: 0 0 96px; width: 96px; }
  .tile-square figcaption { flex: 1; }
  .team { gap: 32px; }
  .member { display: grid; grid-template-columns: 96px 1fr; column-gap: 20px; row-gap: 6px; text-align: left; align-items: start; }
  .member .face { --size: 96px !important; grid-row: 1 / 3; grid-column: 1; }
  .member .name { grid-column: 2; font-size: 24px; align-self: end; }
  .member .line { grid-column: 2; max-width: none; }
  .contact .button { width: 100%; }
  .cards { gap: 40px; }
  .card { align-items: flex-start; gap: 20px; }
  .card .face { --size: 96px !important; }
  .card .name { font-size: 24px; }
}
