@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;1,400&family=DM+Mono:wght@300;400&display=swap');

:root {
  color-scheme: dark;
  --ink: #edf2e8;
  --muted: #aab7ad;
  --line: rgba(226, 237, 225, .22);
  --night: #102029;
  --haze: .25;
  --warmth: 0;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  overflow: hidden;
  background: var(--night);
  color: var(--ink);
  font-family: "DM Mono", monospace;
  transition: background 2s ease;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 68% 46%, rgba(197, 222, 194, calc(.08 + var(--warmth) * .12)), transparent 28%),
    linear-gradient(120deg, rgba(4, 13, 20, .58), transparent 48%, rgba(102, 127, 113, .12));
  pointer-events: none;
}
#atmosphere { position: fixed; inset: 0; width: 100%; height: 100%; }
.grain {
  position: fixed;
  inset: -100%;
  opacity: .035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
  animation: grain .25s steps(2) infinite;
}
.masthead, footer {
  position: fixed;
  z-index: 5;
  left: clamp(1.25rem, 4vw, 4.5rem);
  right: clamp(1.25rem, 4vw, 4.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .61rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.masthead { top: clamp(1.3rem, 4vh, 3rem); }
footer { bottom: clamp(1.25rem, 3vh, 2.25rem); color: var(--muted); }
.place { display: flex; align-items: center; gap: .8rem; color: inherit; text-decoration: none; }
.place-mark {
  width: 2rem; height: 2rem; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; font-size: 1.1rem;
}
.place b, .place small { display: block; }
.place b { font-size: .7rem; font-weight: 400; letter-spacing: .16em; }
.place small { margin-top: .3rem; color: var(--muted); font-size: .5rem; }
.masthead time { color: var(--muted); }
main {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, .85fr) minmax(260px, 1fr);
  align-items: center;
  min-height: 100svh;
  padding: 5.5rem clamp(1.25rem, 7vw, 8rem);
}
.reading { align-self: center; max-width: 31rem; }
.kicker, .details-label {
  margin: 0 0 1.2rem;
  color: #c2d0c6;
  font-size: .58rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font: 400 clamp(3.7rem, 6.5vw, 7.2rem)/.73 "Cormorant Garamond", serif;
  letter-spacing: -.055em;
}
h1 em { color: #c4d3c5; font-weight: 400; }
.intro {
  width: min(100%, 24rem);
  margin: 2.4rem 0 2.6rem;
  color: var(--muted);
  font-size: .67rem;
  line-height: 1.9;
}
.primary-weather { display: flex; align-items: center; gap: 1.15rem; }
.primary-weather > span:first-child {
  padding-right: 1.15rem;
  border-right: 1px solid var(--line);
  font: 400 2.4rem "Cormorant Garamond", serif;
}
.primary-weather b, .primary-weather small { display: block; }
.primary-weather b { font-size: .65rem; font-weight: 400; letter-spacing: .06em; }
.primary-weather small { margin-top: .35rem; color: var(--muted); font-size: .5rem; }
.instrument {
  position: relative;
  display: grid;
  place-items: center;
  height: min(76svh, 690px);
  min-height: 520px;
}
.aura {
  position: absolute;
  width: 130%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(186, 214, 191, .12), transparent 60%);
  filter: blur(10px);
}
.glass-wrap {
  position: relative;
  z-index: 1;
  width: clamp(210px, 22vw, 310px);
  height: 94%;
  outline: none;
  cursor: pointer;
  filter: drop-shadow(0 35px 30px rgba(0,0,0,.38));
  transition: transform .4s ease;
}
.glass-wrap:hover { transform: translateY(-4px); }
.glass-wrap:focus-visible { filter: drop-shadow(0 0 8px rgba(235,245,230,.7)); }
.stopper {
  position: absolute; z-index: 4; top: 0; left: 31%; width: 38%; height: 12%;
  border: 1px solid rgba(243, 244, 222, .42);
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(90deg, #493d2c, #887457 40%, #443827 85%);
  box-shadow: inset 8px 0 15px rgba(255,255,255,.1), 0 8px 12px rgba(0,0,0,.4);
}
.stopper i { display: block; height: 1px; margin-top: 24%; background: rgba(25,20,14,.45); transform: rotate(-3deg); }
.neck {
  position: absolute; z-index: 2; top: 9%; left: 36%; width: 28%; height: 22%;
  border: 1px solid rgba(223, 241, 229, .34);
  border-bottom: 0;
  background: linear-gradient(90deg, rgba(205,225,217,.12), rgba(238,250,241,.02) 40%, rgba(211,228,220,.16));
}
.vessel {
  position: absolute; z-index: 2; top: 24%; left: 6%; width: 88%; height: 64%;
  overflow: hidden;
  border: 1px solid rgba(225, 241, 232, .42);
  border-radius: 46% 46% 38% 38% / 20% 20% 12% 12%;
  background: linear-gradient(90deg, rgba(210,231,224,.18), rgba(173,207,198,.03) 28%, rgba(225,241,233,.06) 72%, rgba(182,214,203,.2));
  box-shadow: inset 9px 0 18px rgba(229,245,238,.09), inset -8px 0 15px rgba(219,239,231,.1);
}
.vessel::after {
  content: ""; position: absolute; inset: 0; z-index: 6;
  border-radius: inherit; box-shadow: inset 0 0 28px rgba(229,243,232,.14);
  pointer-events: none;
}
#storm { position: absolute; z-index: 3; inset: 0; width: 100%; height: 100%; }
.liquid {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 88%;
  background: linear-gradient(rgba(165, 204, 195, calc(.08 + var(--haze) * .18)), rgba(101, 150, 147, calc(.22 + var(--haze) * .2)));
  border-top: 1px solid rgba(224,244,235,.22);
  filter: blur(calc(var(--haze) * 2px));
}
.glass-shine {
  position: absolute; z-index: 5; top: 8%; left: 12%; width: 8%; height: 68%;
  border-radius: 50%;
  background: linear-gradient(rgba(255,255,255,.28), transparent);
  filter: blur(2px);
  transform: rotate(4deg);
}
.condensation {
  position: absolute; z-index: 4; inset: 8%;
  opacity: var(--haze);
  background-image:
    radial-gradient(circle at 10% 12%, rgba(240,250,245,.5) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 22%, rgba(240,250,245,.4) 0 1px, transparent 2px),
    radial-gradient(circle at 35% 45%, rgba(240,250,245,.35) 0 1.5px, transparent 2px);
  background-size: 31px 37px, 43px 47px, 53px 61px;
}
.base {
  position: absolute; z-index: 1; left: 1%; bottom: 3%; width: 98%; height: 12%;
  border-radius: 50% 50% 8% 8% / 35% 35% 20% 20%;
  background: linear-gradient(#2c261d, #786748 18%, #342b20 68%, #171411);
  border: 1px solid rgba(224,205,168,.28);
  box-shadow: 0 12px 18px rgba(0,0,0,.5), inset 0 3px 5px rgba(255,240,204,.15);
}
.base span { position: absolute; inset: 25% 8% 18%; border: 1px solid rgba(213,192,153,.18); border-radius: 50%; }
.instruction {
  position: absolute; bottom: 0; margin: 0; color: #87988e;
  font-size: .48rem; letter-spacing: .14em; text-transform: uppercase;
}
.details {
  justify-self: end;
  width: min(100%, 18rem);
  padding-left: clamp(1.5rem, 4vw, 4rem);
  border-left: 1px solid var(--line);
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
  transition: opacity .45s ease, transform .45s ease;
}
.details.open { opacity: 1; transform: none; pointer-events: auto; }
.details > button, .dialog-close {
  position: absolute; appearance: none; border: 0; background: none; color: var(--ink);
  font: 300 1.5rem "DM Mono"; cursor: pointer;
}
.details > button { top: -2rem; right: 0; }
.details h2, dialog h2 {
  margin: 0 0 1.8rem;
  font: 400 2.2rem/1 "Cormorant Garamond", serif;
}
dl { margin: 0; }
dl div { display: flex; justify-content: space-between; padding: .72rem 0; border-top: 1px solid rgba(220,235,225,.13); font-size: .56rem; }
dt { color: var(--muted); }
dd { margin: 0; color: var(--ink); }
.source { margin: 1.4rem 0 0; color: #849288; font-size: .46rem; line-height: 1.6; }
.source a { color: inherit; }
footer button {
  border: 0; padding: .4rem 0; color: var(--ink); background: none;
  font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer;
}
footer button span { margin-left: .5rem; }
dialog {
  width: min(calc(100% - 2rem), 520px);
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(12, 28, 34, .94);
  box-shadow: 0 30px 100px #000;
}
dialog::backdrop { background: rgba(4, 12, 15, .72); backdrop-filter: blur(7px); }
dialog p:not(.kicker) { color: var(--muted); font-size: .66rem; line-height: 1.9; }
.dialog-close { top: 1rem; right: 1.2rem; }
.fineprint { padding-top: 1rem; border-top: 1px solid var(--line); font-size: .52rem !important; }
noscript { position: fixed; left: 1rem; bottom: 1rem; z-index: 20; }

@keyframes grain { 0% { transform: translate(2%, -1%); } 50% { transform: translate(-1%, 2%); } }
@media (max-width: 900px) {
  body { overflow-y: auto; }
  main { grid-template-columns: 1fr 1fr; padding-top: 7rem; padding-bottom: 6rem; }
  .reading { padding-left: 2vw; }
  .details {
    position: fixed; z-index: 10; right: 1rem; bottom: 4rem; width: min(320px, calc(100% - 2rem));
    padding: 2rem; border: 1px solid var(--line); background: rgba(13,31,37,.94); backdrop-filter: blur(12px);
  }
  .details > button { top: .7rem; right: 1rem; }
}
@media (max-width: 620px) {
  body { overflow: auto; }
  .masthead time { display: none; }
  main { display: flex; flex-direction: column; padding: 7rem 1.25rem 5.5rem; }
  .reading { align-self: flex-start; position: relative; z-index: 3; }
  h1 { font-size: clamp(3.7rem, 18vw, 5.5rem); }
  .intro { display: none; }
  .primary-weather { margin-top: 1.6rem; }
  .instrument { width: 100%; height: 59svh; min-height: 470px; margin-top: -2rem; }
  .glass-wrap { width: 220px; }
  footer > span { display: none; }
  footer { justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .grain { display: none; }
}
