/* the home page: hero, the story, the lab and its inventions, work with us, the audio guide */
/* reveal and ink */
.ink { -webkit-mask-image: url(/assets/ink.webp); mask-image: url(/assets/ink.webp); -webkit-mask-size: 100% 4800%; mask-size: 100% 4800%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: 0 0%; mask-position: 0 0%; }
.pic { display: block; width: 100%; height: auto; }

section { padding: 72px 0; }

/* hero */
#hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 84px 0 56px; }
#hero .pic { width: min(100% - 32px, 760px, 38vh * 16 / 9); aspect-ratio: 16 / 9; }  /* the buttons stay on the first screen, even on a 720 px laptop */
#hero h1 { font-weight: 500; font-size: clamp(2.4rem, min(6vw, 7.4vh), 4.4rem); line-height: 1.06; margin: 30px 16px 24px; max-width: 920px; letter-spacing: -.005em; text-wrap: balance; }
#hero .sub { font-style: italic; font-size: clamp(1.15rem, 2.1vw, 1.35rem); line-height: 1.5; color: var(--ink-mid); margin: 0 auto 32px; padding: 0 16px; max-width: 640px; }
.tourbtn { display: inline-flex; align-items: baseline; gap: 12px; font-size: 1.35rem; font-style: italic; border-bottom: 1px solid var(--ink-soft); padding-bottom: 2px; transition: border-color .3s; }
.tourbtn:hover { border-color: var(--ink); }
.tourbtn small { font-size: .78em; color: var(--ink-mid); }
.cue { margin-top: 40px; font-style: italic; font-size: 15px; color: var(--ink-mid); }

/* the story */
.room { padding: 64px 0 40px; }
.room + .room { border-top: 1px solid var(--rule); }
.roomhead { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.roomhead .num { color: var(--ink-mid); font-size: 19px; }
.room h2 { font-weight: 500; font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.1; margin: 4px 0 18px; width: 100%; }
.listen { font-style: italic; font-size: 17px; color: var(--ink-mid); border-bottom: 1px solid var(--rule); }
.listen:hover { color: var(--ink); border-color: var(--ink-soft); }
.room .pic { width: min(100%, 760px); aspect-ratio: 16 / 9; margin: 6px auto 22px; }
.text p { font-size: clamp(1.18rem, 2vw, 1.42rem); line-height: 1.62; margin: 0 0 .95em; }
.room.speaking > .text .w, .quote.speaking .w { color: var(--ink-soft); transition: color .25s; }
.room.speaking > .text .w.lit, .quote.speaking .w.lit { color: var(--ink); }
.room.speaking > .text .w.g { color: rgba(142, 79, 36, .4); }
.room.speaking > .text .w.g.lit { color: var(--accent); }

/* voices from the field: quotes read by their own voices */
.quotes { display: grid; gap: 52px; margin: 44px 0 16px; }
.quote { margin: 0; display: grid; grid-template-columns: 210px 1fr; gap: 40px; align-items: center; }
.quote.flip { grid-template-columns: 1fr 210px; }
.quote.flip .qpic { order: 2; }
.quote.flip .qbody { text-align: right; }
.qpic { text-align: center; }
.room .qpic .pic { aspect-ratio: auto; width: auto; height: auto; max-width: 100%; max-height: 260px; margin: 0 auto; }
.hear { margin-top: 10px; font-size: 15px; color: var(--ink-mid); border-bottom: 1px solid var(--ink-soft); padding-bottom: 2px; }
.hear:hover { color: var(--ink); border-color: var(--ink); }
.quote blockquote { margin: 0; }
.qtext { font-style: italic; font-size: clamp(1.3rem, 2.5vw, 1.72rem); line-height: 1.4; margin: 0 0 14px; }
.quote figcaption { font-size: 15px; color: var(--ink-mid); }

/* the lab's inventions: patent-style sheets */
#lab .inventions { margin-top: 72px; padding-top: 56px; text-align: left; border-top: 1px solid var(--rule); }
.inventions-head { text-align: center; margin-bottom: 40px; }
.inventions-head h3 { font-weight: 500; font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.08; margin: 6px 0 12px; }
.inventions-head p { font-style: italic; font-size: 1.25rem; color: var(--ink-mid); max-width: 620px; margin: 0 auto; }
.sheets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px; }
.sheet { margin: 0; background: var(--sheet); padding: 22px 26px 24px; position: relative; box-shadow: 0 1px 0 rgba(42, 34, 25, .06), 0 14px 30px -18px rgba(42, 34, 25, .35); }
.sheet::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(42, 34, 25, .5); outline: 1px solid rgba(42, 34, 25, .5); outline-offset: 3px; pointer-events: none; }
.sheet header { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-mid); padding: 4px 6px 0; }
.sheet .plate { position: relative; width: 88%; margin: 8px auto 0; }
.sheet .pic { aspect-ratio: 4 / 3; }
/* labels sit under the drawing's plinth, each centred on its tile (story.json legend_x) */
.sheet .legend { list-style: none; position: absolute; left: 0; right: 0; top: 70%; margin: 0; padding: 0; font-size: 12px; letter-spacing: .08em; color: var(--ink-mid); }
.sheet .legend li { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; white-space: nowrap; }
.sheet .legend svg { width: 11px; height: 11px; color: var(--ink); }
.sheet .fig { text-align: center; font-style: italic; font-size: 1.2rem; margin: 2px 0 10px; }
.sheet .field { margin: 0 6px 2px; font-size: 14px; color: var(--ink-mid); }
.sheet h3 { font-weight: 500; font-size: 1.65rem; margin: 0 6px 4px; line-height: 1.15; }
.sheet .replaces { margin: 0 6px 8px; font-size: 1.05rem; color: var(--ink-mid); }
.sheet .replaces span { color: var(--accent); }
.sheet .abstract { margin: 0 6px 6px; font-size: 1.08rem; line-height: 1.5; }

/* the lab */
#lab { text-align: center; }
#lab > .wrap .pic { width: min(100%, 640px); aspect-ratio: 16 / 9; margin: 0 auto 6px; }
#lab h2, #contact h2 { font-weight: 500; font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.1; margin: 6px 0 18px; }
#lab > .wrap p { font-size: 1.3rem; margin: 0 auto .9em; max-width: 620px; }
#lab > .wrap .quiet { font-style: italic; color: var(--ink-mid); font-size: 1.15rem; }


/* work with us */
#contact { text-align: center; border-top: 1px solid var(--rule); min-height: 64vh; }
.ask { max-width: 820px; margin: 0 auto; }
.ask h3 { font-weight: 500; font-size: clamp(1.8rem, 4.2vw, 3.1rem); line-height: 1.12; margin: 10px 0 26px; }
.ask input { width: min(560px, 100%); background: transparent; border: 0; border-bottom: 1px solid var(--ink-soft); color: var(--ink); caret-color: var(--accent);
  font: italic 400 clamp(1.3rem, 2.6vw, 1.8rem) var(--serif); text-align: center; padding: 6px 4px 10px; outline: none; resize: none; }
.ask input:focus { border-bottom-color: var(--ink); }
.ask ::placeholder { color: rgba(42, 34, 25, .5); }
.ask .err { min-height: 1.4em; margin-top: 10px; font-style: italic; color: #A33A22; }
.ask .send { display: inline-block; margin-top: 22px; font-size: 1.8rem; font-style: italic; color: var(--accent); }
.ask .note { margin-top: 12px; font-style: italic; color: var(--ink-mid); }
.ask-step { transition: opacity .45s ease, transform .5s ease; }
.ask-step.out { opacity: 0; transform: translateY(-8px); }

/* the audio guide */
#guide { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 140%); z-index: 12; display: flex; align-items: center; gap: 14px; padding: 10px 16px 10px 14px; background: var(--ink); color: var(--paper); border-radius: 999px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .45); transition: transform .5s cubic-bezier(.2, .7, .2, 1); max-width: calc(100vw - 24px); }
#guide.on { transform: translate(-50%, 0); }
#guide .pp { width: 28px; height: 28px; display: grid; place-items: center; font-size: 12px; color: var(--paper); }
#guide .what { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
#guide .what .caps { opacity: .7; margin-right: 6px; }
#guide .bar { width: 120px; height: 2px; background: rgba(239, 232, 218, .25); position: relative; }
#guide .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--paper); width: 0; }
#guide .time { font-size: 15px; opacity: .75; font-variant-numeric: tabular-nums; }
#guide .x { font-size: 18px; opacity: .7; padding: 0 2px; }
#sound { position: fixed; left: 18px; bottom: 18px; z-index: 11; width: 40px; height: 40px; display: grid; place-items: center; font-size: 22px; color: var(--ink-mid); }
#sound[aria-pressed="true"] { color: var(--accent); }

@media (max-width: 820px) {
  .sheets { grid-template-columns: 1fr; }
  .quote, .quote.flip { grid-template-columns: 1fr; gap: 14px; }
  .quote.flip .qpic { order: 0; }
  .quote.flip .qbody { text-align: left; }
  .room .qpic .pic { max-height: 210px; }
  .days { grid-template-columns: 1fr 1fr; }
  #guide .bar { display: none; }
}
@media (max-width: 480px) { .sheet .legend { font-size: 11px; letter-spacing: .03em; } }

.ask .captcha { display: flex; justify-content: center; min-height: 78px; }
.ask button.send { display: block; margin: 18px auto 0; }
.ask button.send[disabled] { color: var(--ink-soft); }
.ask .note a { color: inherit; }

/* the hero: a call, the tour, and the references */
.ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 0 16px 18px; }
.cta { display: inline-block; font-size: 1.25rem; font-style: italic; text-decoration: none; padding: 10px 22px 11px; border: 1px solid var(--ink-soft); border-radius: 999px; color: var(--ink); transition: background .25s, color .25s, border-color .25s; }
.cta:hover { border-color: var(--ink); }
.cta.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cta.primary:hover { background: #3d3226; }

#hero .refs { margin-top: 38px; padding: 0 16px; }
#hero .tourbtn { font-size: 1.15rem; color: var(--ink-mid); }
.refs .logos { display: flex; flex-wrap: wrap; gap: 18px 38px; justify-content: center; align-items: center; margin-top: 10px; }
.refs img { height: 24px; width: auto; max-width: 104px; object-fit: contain; filter: grayscale(1) contrast(1.1); opacity: .62; mix-blend-mode: multiply; }

#contact .intro { font-style: italic; color: var(--ink-mid); margin: -6px 0 34px; }
#contact .intro a { color: inherit; }
.quotes .kicker { text-align: center; margin-bottom: -18px; }

@media (max-width: 600px) { #sound { display: none; } .cta { font-size: 1.12rem; padding: 9px 18px 10px; } .refs img { height: 20px; max-width: 88px; } }

/* work with us: a name and a work email */
.contact .field { display: block; max-width: 520px; margin: 0 auto 20px; text-align: left; }
.contact .field span { display: block; font-size: 15px; color: var(--ink-mid); margin-bottom: 2px; }
.contact input { width: 100%; text-align: left; font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
.contact .captcha { margin-top: 8px; }
.contact .captcha:empty { min-height: 0; margin: 0; }
