/* Carry the paper, water and night-sky colors through adjoining sections. */
:root { --sea: #153859; --sea-mist: #c2d4dc; --night-sky: #081a2a; }
.exhibit, .anchorage, .endpaper { padding: clamp(48px,6vw,104px) var(--edge); }
.exhibit h2, .anchorage h2, .endpaper h2 {
  font: 650 clamp(54px,6.8vw,110px)/.93 var(--display); letter-spacing: -.068em;
}
.exhibit h2 i, .anchorage h2 i, .endpaper h2 i { font: italic 1.05em/.92 var(--serif); letter-spacing: -.065em; }
.kicker, .credit, .gallery-legend, .soundings figcaption, .note-action, .note-slip small { font-family: var(--grotesk); }
.kicker { font-size: .77rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1.2rem; font-weight: 600; }
.exhibit-intro, .field-guide { display: grid; grid-template-columns: 1fr .8fr; align-items: end; gap: 5%; }
.exhibit-intro > p, .depth-intro > p:last-child, .anchor-copy > p:last-child {
  font: 400 clamp(17px,1.42vw,24px)/1.48 var(--grotesk); max-width: 36ch; text-wrap: pretty;
}
.gallery { background: var(--stock); padding-top: clamp(30px,4vw,64px); }
.gallery .exhibit-intro { border-top: 1px solid #647c8b60; padding-top: clamp(24px,3vw,44px); }
.exhibit-intro { margin-bottom: clamp(22px,3vw,48px); }
.gallery-frame {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 2px;
  height: clamp(375px,44vw,655px); background: #91aec0;
  box-shadow: inset 0 0 0 1px #1830491a;
}
.gallery-ink {
  position: absolute; inset: -8%; background: linear-gradient(130deg,#e7f1f9b3,#86a8bb74 55%,#45698e40),url("./swell.webp") center 52% / cover;
  filter: saturate(.27); opacity: .64; mix-blend-mode: luminosity;
  transform: translateY(calc(var(--travel, 0) * 4%)) scale(1.04);
}
.device { margin: 0; position: absolute; border: clamp(3px,.5vw,8px) solid #242a31; background: #242a31;
  border-radius: clamp(11px,2vw,29px); overflow: hidden; box-shadow: 0 25px 50px -18px #0b203dcc, 0 0 0 1px #99a6af; }
.device img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tablet { width: auto; height: 89%; aspect-ratio: 3 / 4; left: 47%; bottom: -1%;
  transform: translate(-50%,calc(var(--travel,0) * -3%)) rotate(-5deg); }
.phone { height: 70%; aspect-ratio: 420 / 914; left: 59%; bottom: 3%;
  transform: translateY(calc(var(--travel,0) * -6%)) rotate(5deg); }
.mac { width: min(80%,690px); max-width: 100%; height: auto; max-height: 94%; aspect-ratio: 1100 / 767;
  top: 50%; left: 50%; transform: translate(-50%,-50%); border-radius: 12px; }
.gallery-frame[data-view="appearance"] .tablet { left: 42%; height: 92%; bottom: 2%; transform: translateX(-50%) rotate(-2deg); }
.gallery-frame[data-view="library"] .phone { left: 39%; height: 90%; bottom: 4%; transform: translateX(-50%) rotate(-4deg); }
.loupe { position: absolute; width: clamp(160px,23vw,330px); aspect-ratio: 1; border-radius: 50%;
  left: 55%; top: 19%; border: 5px solid var(--stock); box-shadow: 0 12px 38px #1933474d; }
[data-view="appearance"] .loupe { background: #fff url("./plates/ipad-appearance.webp") 44% 44% / 245% auto; }
[data-view="library"] .loupe { background: #202124 url("./plates/phone-library.webp") 29% 29% / 139% auto; }
.gallery-legend { display: flex; align-items: center; justify-content: space-between; gap: 14px 30px; flex-wrap: wrap; padding-top: 20px; }
.gallery-legend p { font-size: .89rem; line-height: 1.45; max-width: 45ch; }
.scene-switch { display: flex; flex-wrap: wrap; gap: 5px; }
.scene-switch button { font: var(--control); border: 1px solid #35516a55; background: transparent;
  color: inherit; padding: .65em 1em; border-radius: 3em; cursor: pointer; }
.scene-switch [aria-pressed="true"] { color: var(--stock); background: var(--ink); border-color: var(--ink); }
button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
#reader.depth { position: relative; inset: auto; pointer-events: auto; background: var(--sea); color: #f4f5ee; padding-top: 0; padding-bottom: clamp(48px,6vw,90px); overflow: hidden; }
.depth-intro { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr .66fr; gap: 0 6%; align-items: end;
  margin-inline: calc(-1 * var(--edge)); padding: clamp(48px,6vw,104px) var(--edge) 0;
  color: var(--ink); background: linear-gradient(to bottom,var(--stock),var(--sea-mist));
}
.depth-intro .kicker { grid-column: 1/-1; }
.depth-intro h2 { max-width: 10ch; }
.soundings { margin: 0 calc(-1 * var(--edge)); height: clamp(190px,21vw,325px); position: relative; overflow: hidden;
  background: linear-gradient(to bottom,var(--sea-mist),var(--sea) 82%); }
.soundings canvas { display: block; width: 100%; height: 100%; }
.soundings figcaption { position: absolute; bottom: 12px; right: var(--edge); font-size: .73rem; color: #cfdee6; }
.soundings figcaption span { margin: 0 .4em; }
.specimen { background: var(--stock); color: var(--ink); display: grid; grid-template-columns: minmax(150px, .58fr) 1.65fr; }
.specimen > div { padding: clamp(23px,3.4vw,56px); }
.specimen-controls { border-right: 1px solid #17395748; }
.specimen .levels { display: grid; gap: 0; }
.specimen legend { font-size: .78rem; }
.levels label { font: var(--control); display: flex; gap: .65em; align-items: center; color: #47617a; }
.levels label::before { content: ''; width: .5em; height: .5em; border-radius: 50%; border: 1px solid currentColor; }
.levels label:has(:checked)::before { background: currentColor; }
.specimen-page h3 { margin: 0; font: italic clamp(24px,2.5vw,42px)/1.1 var(--serif); }
#passage { font: 400 clamp(24px,2.45vw,40px)/1.25 var(--serif); min-height: 0; max-width: 40ch; margin: .7em 0; }
.credit { color: #496078; font-size: .78rem; }
.anchorage { position: relative; isolation: isolate; overflow: hidden; color: #f2f0e5; display: grid;
  background: linear-gradient(var(--sea),var(--night-sky) 50%);
  grid-template-columns: 1fr 1fr; align-items: start; gap: 7%; min-height: clamp(470px,45vw,690px); }
.shore { position: absolute; z-index: -3; right: 0; bottom: 0; width: max(100%,610px); aspect-ratio: 2;
  background: linear-gradient(90deg,#081a2a70,transparent 80%),url("../night-tide/coast.webp") center/100% 100%;
  mask-image: linear-gradient(transparent,#000 23%); pointer-events: none; }
@media (min-width: 721px) {
  .shore { bottom: auto; top: 57%; transform: translateY(-29.2%); }
}
/* The lantern is at (89.4%, 29.2%) of the engraving. Both lights stay in that coordinate system. */
.shore::before { content: ''; position: absolute; right: 10.6%; top: 21.7%; width: 73%; height: 15%;
  transform-origin: right center; transform: rotate(-4deg); opacity: .7;
  clip-path: polygon(0 0,100% 49.6%,100% 50.4%,0 100%);
  background: linear-gradient(90deg,transparent,#d2e6ed24 38%,#f8ebc987); }
.shore::after { content: ''; position: absolute; left: 89.4%; top: 29.2%; width: 4px; height: 4px;
  transform: translate(-50%,-50%); border-radius: 50%; background: #fff4d3;
  box-shadow: 0 0 5px 2px #fbe0aa99,0 0 16px 5px #e5d2a943; }
.anchorage::before { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom,var(--sea),transparent 23%,transparent 82%,var(--night-sky)); }
.anchorage::after { content: ''; position: absolute; z-index: -2; inset: 4% 0 46%; opacity: .72; pointer-events: none;
  background:
    radial-gradient(circle at 5% 21%,#fff7df 0 .7px,transparent 1.4px),
    radial-gradient(circle at 12% 34%,#c9dbe5 0 .6px,transparent 1.1px),
    radial-gradient(circle at 17% 18%,#d7e9f1 0 .8px,transparent 1.6px),
    radial-gradient(circle at 27% 59%,#d9e2e4 0 .6px,transparent 1.2px),
    radial-gradient(circle at 31% 45%,#cfdfec 0 .7px,transparent 1.3px),
    radial-gradient(circle at 41% 24%,#fff2d7 0 1px,transparent 1.8px),
    radial-gradient(circle at 43% 29%,#d2e2ed 0 .65px,transparent 1.2px),
    radial-gradient(circle at 51% 65%,#bbd5e4 0 .7px,transparent 1.2px),
    radial-gradient(circle at 59% 33%,#edf2e9 0 .85px,transparent 1.6px),
    radial-gradient(circle at 71% 19%,#c1d6e5 0 .6px,transparent 1.3px),
    radial-gradient(circle at 77% 28%,#f2e9d6 0 .8px,transparent 1.5px),
    radial-gradient(circle at 82% 56%,#cbdded 0 .7px,transparent 1.2px),
    radial-gradient(circle at 95% 14%,#f5eede 0 .8px,transparent 1.6px); }
@media (prefers-reduced-motion:no-preference) {
  html:not(.motion-paused) .shore::before { animation: coast-sweep 8s ease-in-out infinite; }
  html:not(.motion-paused) .shore::after { animation: coast-flash 8s ease-in-out infinite; }
}
@keyframes coast-sweep {
  0%,100% { transform: rotate(5deg) scaleX(.48); opacity: .42; }
  38% { transform: rotate(-3deg) scaleX(1); opacity: .94; }
  65% { transform: rotate(-8deg) scaleX(.06); opacity: .22; }
  81% { transform: rotate(-6deg) scaleX(-.22); opacity: .34; }
}
@keyframes coast-flash { 0%,100% { opacity: .68; } 38% { opacity: 1; } 66% { opacity: .52; } }
.anchor-copy > p:last-child { margin-top: 1.4rem; color: #e3e7e9; max-width: 33ch; }
.kept-note { margin-top: clamp(20px,6vw,90px); position: relative; max-width: 32rem; }
.kept-note summary { cursor: pointer; list-style: none; }
.kept-note summary::-webkit-details-marker { display: none; }
.quote { font: italic clamp(29px,3.2vw,52px)/1.18 var(--serif);
  background: linear-gradient(90deg,#a7c6de,#deedf3) left bottom / calc(var(--mark,1) * 100%) 1px no-repeat;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.note-action { display: flex; align-items: center; gap: .6em; font-size: .83rem; margin-top: 1.2em; }
.note-slip { margin: 1.3rem 0 0 clamp(15px,3vw,54px); padding: 1em 1.35em; color: #122c44; background: #e7eef1; position: relative; width: fit-content; }
.note-slip::before { content: ''; position: absolute; width: clamp(12px,2vw,40px); height: 1.8em; border: solid #c5d9e5;
  border-width: 0 0 1px 1px; right: 100%; bottom: 50%; border-radius: 0 0 0 9px; }
.note-slip small { font-size: .72rem; }
.note-slip p { font: italic clamp(21px,1.8vw,30px)/1.18 var(--serif); margin-top: .24em; }
.field-guide { align-items: start; --dawn: clamp(55px,8vw,120px);
  padding-top: calc(var(--dawn) + clamp(32px,3vw,56px));
  background: linear-gradient(var(--night-sky),var(--sea-mist) calc(var(--dawn) * .72),var(--stock) var(--dawn)); }
.guide-list details { border-top: 1px solid #1a354756; padding: 1.1rem 0; font: 400 1rem/1.5 var(--grotesk); }
.guide-list summary { font-size: clamp(17px,1.4vw,24px); cursor: pointer; }
.guide-list p { margin: .85rem 0 .4rem; max-width: 45ch; }
.endpaper { max-width: none; background: #d4e1e9; }
.endpaper > div:first-child { display: flex; align-items: center; gap: 16px; margin-bottom: 1.2rem; }
.endpaper .kicker { margin: 0; font-size: .77rem; }
.endpaper img { border-radius: 12px; }
.endpaper > p { font: 1rem/1.5 var(--grotesk); max-width: 42ch; }
.endpaper .colophon { border-top: 1px solid #586d7e66; margin-top: 2.4rem; padding-top: 1rem; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.motion-paused) .kept-note[open] .note-slip { animation: note-arrives .55s cubic-bezier(.16,.8,.2,1) both; }
}
@keyframes note-arrives { from { opacity: 0; transform: translate(-10px,-8px); } }
@media (max-width: 720px) {
  .exhibit-intro, .field-guide, .depth-intro, .anchorage, .specimen { grid-template-columns: 1fr; }
  .exhibit-intro, .field-guide, .anchorage { gap: 23px; }
  .depth-intro > p:last-child { margin-top: 18px; }
  .gallery-frame { height: clamp(300px,73vw,445px); }
  .tablet { left: 40%; height: 83%; }
  .phone { left: 61%; height: 66%; }
  .loupe { width: 44%; left: 50%; }
  .scene-switch button { padding: .65em .85em; }
  .specimen-controls { border: 0; border-bottom: 1px solid #17395748; }
  .specimen .levels { display: flex; gap: 0 .85em; }
  .specimen-controls .kicker { margin-bottom: .85em; }
  .levels label { gap: .35em; }
  .kept-note { margin: 0 0 24px; }
  .anchorage { min-height: 550px; align-content: start; padding-bottom: 230px; }
}
.film { height: 92%; aspect-ratio: 886 / 1920; bottom: 4%; left: 50%; transform: translateX(-50%); }
.film video { display: block; width: 100%; height: 100%; background: #1d2024; }

.specimen-page { touch-action: pan-x pan-y; }
.gesture-tip { margin-top: .8em; font: .78rem/1.45 var(--grotesk); color: #496078; }

.credit, .gesture-tip, .specimen legend, .soundings figcaption, .gallery-legend p,
.note-slip small, .endpaper .colophon { font: var(--caption); }
.note-action { font: var(--control); }
.capture-drawer > summary, .guide-list summary { display: flex; align-items: center;
  justify-content: space-between; gap: 1em; list-style: none; }
.capture-drawer > summary::-webkit-details-marker, .guide-list summary::-webkit-details-marker { display: none; }
details[open] > summary .ui-icon { transform: rotate(180deg); }

:root[data-theme=dark] {
  color-scheme: dark;
  --stock: #101f30; --page: #101f30; --ink: #e7ebed; --blue: #b3d4e7;
  --night-muted: #b4c7d4; --night-rule: #516879;
}
[data-theme=dark] .wave-print { filter: grayscale(1) invert(.93); mix-blend-mode: screen; }
[data-theme=dark] .endpaper { background: #192d40; }
:root[data-theme=dark] { --sea: #10283e; --sea-mist: #1b3448; }
[data-theme=dark] .reading-room { --room-paper: #192d40; --room-ink: #e7ebed; }
[data-theme=dark] .volume:not([data-book=watch]) { color: #112f4c; }
[data-theme=dark] :is(.credit,.room-hint,.gesture-tip,.levels label,.room-page.is-focused .opening-line,.room-page.is-focused .closing-line) { color: var(--night-muted); }
[data-theme=dark] :is(.press-mast,.guide-list details,.scene-switch button,.specimen-controls,.ink-switch,.capture-drawer,.endpaper .colophon) { border-color: var(--night-rule); }
[data-theme=dark] .logotype .period { color: #adc8de; }
