:root {
  /* Interface labels marks:** (Google */
  --parchment: #F5E8C8;
  --honey: #D8A64A;
  --straw: #B9975B;
  --walnut: #2F261D;
  --moss: #586447;
  --lavender: #8D829A;
  --blue: #6C9FB3;
  --cream: #FFF7DF;
  --sky-a: #FFF7DF;
  --sky-b: #F5E8C8;
  --sky-c: #D8A64A;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--walnut);
  background: var(--parchment);
  font-family: "Cormorant Garamond", serif;
  overflow-x: hidden;
}

.ambient-sky {
  position: fixed;
  inset: 0;
  z-index: -5;
  background: linear-gradient(140deg, var(--sky-a) 0%, var(--sky-b) 46%, var(--sky-c) 100%);
  transition: background 1100ms ease;
}

body[data-phase="field"] { --sky-a: #F5E8C8; --sky-b: #D8A64A; --sky-c: #6C9FB3; }
body[data-phase="model"] { --sky-a: #F5E8C8; --sky-b: #B9975B; --sky-c: #8D829A; }
body[data-phase="evening"] { --sky-a: #8D829A; --sky-b: #586447; --sky-c: #2F261D; color: #FFF7DF; }

.retro-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
  opacity: .28;
  background-image:
    repeating-radial-gradient(circle at 18px 18px, rgba(47, 38, 29, .32) 0 1px, transparent 2px 34px),
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(88, 100, 71, .16) 39px 40px),
    repeating-linear-gradient(0deg, transparent 0 38px, rgba(185, 151, 91, .16) 39px 40px);
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.site-mast {
  position: fixed;
  top: 24px;
  left: 28px;
  right: 28px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: currentColor;
  mix-blend-mode: multiply;
}

body[data-phase="evening"] .site-mast { mix-blend-mode: normal; }

.brand {
  border: 1px solid rgba(47, 38, 29, .25);
  background: rgba(255, 247, 223, .42);
  padding: 10px 14px;
  border-radius: 999px;
}

.phase-readout { color: var(--moss); }
body[data-phase="evening"] .phase-readout { color: var(--cream); }

.day-sequence { position: relative; z-index: 2; }

.chamber {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 92px 6vw 54px;
}

.modular-wall {
  width: min(1180px, 100%);
  min-height: 72vh;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(72px, 1fr));
  gap: 18px;
  position: relative;
}

.panel {
  position: relative;
  border: 1px solid rgba(47, 38, 29, .24);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 247, 223, .78), rgba(245, 232, 200, .52)),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(216, 166, 74, .08) 13px 14px);
  box-shadow: 0 24px 70px rgba(47, 38, 29, .13), inset 0 1px 0 rgba(255, 247, 223, .7);
  overflow: hidden;
  backdrop-filter: blur(2px);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 18px;
  border: 1px dashed rgba(88, 100, 71, .22);
  pointer-events: none;
}

.thesis-pane {
  padding: clamp(30px, 4vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dawn-grid .thesis-pane { grid-area: 1 / 1 / 5 / 6; }
.dawn-grid .drawer-one { grid-area: 5 / 1 / 7 / 4; }
.dawn-grid .drawer-two { grid-area: 4 / 6 / 7 / 8; }
.dawn-grid .calibration-strip { grid-area: 1 / 8 / 7 / 9; }
.dawn-grid .marginal-note { grid-area: 1 / 6 / 3 / 8; }

.field-grid .thesis-pane { grid-area: 1 / 3 / 5 / 9; }
.field-grid .wide { grid-area: 2 / 1 / 5 / 3; }
.field-grid .evidence-drawer:not(.wide) { grid-area: 5 / 4 / 7 / 8; }
.field-grid .calibration-strip { grid-area: 1 / 1 / 2 / 3; }
.field-grid .marginal-note { grid-area: 5 / 1 / 7 / 4; }

.model-grid .thesis-pane { grid-area: 2 / 1 / 6 / 5; }
.model-grid .instrument-pane { grid-area: 1 / 5 / 4 / 8; }
.model-grid .evidence-drawer { grid-area: 4 / 5 / 7 / 8; }
.model-grid .calibration-strip { grid-area: 1 / 8 / 7 / 9; }
.model-grid .marginal-note { grid-area: 1 / 1 / 2 / 5; }

.evening-grid .final-note { grid-area: 2 / 2 / 6 / 8; }
.evening-grid .final-drawer { grid-area: 6 / 3 / 7 / 7; }
.evening-grid .calibration-strip { grid-area: 2 / 8 / 6 / 9; }
.evening-grid .marginal-note { grid-area: 1 / 3 / 2 / 7; }

.kicker, .drawer-label, .calibration-strip, .instrument-pane p {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.kicker { color: var(--moss); margin-bottom: 18px; }

h1, h2 {
  font-family: "Libre Baskerville", serif;
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.05;
  margin: 0;
}

h1 { font-size: clamp(44px, 7vw, 100px); max-width: 860px; }
h2 { font-size: clamp(34px, 5.4vw, 76px); }

p {
  font-size: clamp(21px, 2vw, 29px);
  line-height: 1.35;
  margin: 24px 0 0;
  max-width: 760px;
}

.italic-note {
  font-family: "Libre Baskerville", serif;
  font-style: italic;
  font-weight: 400;
}

.evidence-drawer {
  border: 0;
  color: var(--walnut);
  cursor: pointer;
  text-align: left;
  padding: 22px;
  min-width: 0;
  transition: transform 450ms ease, background 450ms ease, box-shadow 450ms ease;
}

.evidence-drawer .drawer-label {
  display: block;
  color: var(--moss);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  transition: writing-mode 350ms ease, transform 350ms ease;
}

.drawer-content, .mini-diagram {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 380ms ease, transform 380ms ease;
}

.drawer-content {
  display: block;
  margin-top: 14px;
  font-size: clamp(20px, 1.8vw, 28px);
  line-height: 1.22;
  max-width: 330px;
}

.mini-diagram {
  width: 120px;
  height: 58px;
  margin-top: 16px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
}

.mini-diagram circle, .mini-diagram ellipse { fill: rgba(108, 159, 179, .14); stroke: var(--blue); }

.evidence-drawer.open, .evidence-drawer:hover {
  transform: translateY(-5px) scale(1.015);
  background: linear-gradient(135deg, rgba(255, 247, 223, .9), rgba(108, 159, 179, .22));
  box-shadow: 0 30px 84px rgba(47, 38, 29, .18);
}

.evidence-drawer.open .drawer-label, .evidence-drawer:hover .drawer-label {
  writing-mode: horizontal-tb;
  transform: none;
}

.evidence-drawer.open .drawer-content, .evidence-drawer.open .mini-diagram,
.evidence-drawer:hover .drawer-content, .evidence-drawer:hover .mini-diagram {
  opacity: 1;
  transform: translateY(0);
}

.calibration-strip {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  color: var(--moss);
}

.calibration-strip span { writing-mode: vertical-rl; }
.calibration-strip i { font-style: normal; transform: rotate(-90deg); white-space: nowrap; }

.marginal-note {
  align-self: center;
  justify-self: center;
  max-width: 290px;
  padding: 20px 24px;
  border-left: 3px solid var(--honey);
  font-family: "Libre Baskerville", serif;
  font-style: italic;
  font-size: 18px;
  line-height: 1.45;
  background: rgba(255, 247, 223, .34);
  border-radius: 2px 20px 20px 2px;
}

.botanical::before {
  content: "✣";
  color: var(--moss);
  margin-right: 8px;
}

.instrument-pane {
  display: grid;
  place-items: center;
  padding: 30px;
}

.dial {
  width: min(220px, 80%);
  aspect-ratio: 1;
  border: 1px solid rgba(47, 38, 29, .35);
  border-radius: 50%;
  position: relative;
  background: repeating-conic-gradient(from 4deg, rgba(88,100,71,.22) 0 2deg, transparent 2deg 12deg);
}

.dial span {
  position: absolute;
  inset: 26%;
  border: 1px solid var(--blue);
  border-radius: 50%;
}

.dial b {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 2px;
  height: 42%;
  background: var(--walnut);
  transform-origin: bottom center;
  transform: rotate(42deg);
  animation: needle 9s ease-in-out infinite alternate;
}

.astrolabe {
  position: fixed;
  width: min(92vw, 900px);
  right: -18vw;
  top: 6vh;
  z-index: -1;
  opacity: .43;
  fill: none;
  pointer-events: none;
  animation: turn 70s linear infinite;
}

.orbit { stroke: var(--blue); stroke-width: 1.2; stroke-dasharray: 10 12; }
.grass-arc { stroke: var(--moss); stroke-width: 2; stroke-dasharray: 820; stroke-dashoffset: 820; animation: draw 8s ease forwards; }
.grass-arc.delayed { animation-delay: 1.5s; stroke: var(--straw); }

.fireflies {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.firefly {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #D8A64A;
  box-shadow: 0 0 18px #D8A64A;
  opacity: .55;
}

.chamber .panel, .chamber .marginal-note {
  opacity: .42;
  transform: translateY(26px);
  transition: opacity 900ms ease, transform 900ms ease;
}

.chamber.active .panel, .chamber.active .marginal-note {
  opacity: 1;
  transform: translateY(0);
}

body[data-phase="evening"] .panel {
  background: linear-gradient(135deg, rgba(47, 38, 29, .72), rgba(88, 100, 71, .5));
  border-color: rgba(255, 247, 223, .24);
  box-shadow: 0 26px 90px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 247, 223, .22);
}

body[data-phase="evening"] .kicker,
body[data-phase="evening"] .drawer-label,
body[data-phase="evening"] .calibration-strip { color: #F5E8C8; }
body[data-phase="evening"] .evidence-drawer { color: #FFF7DF; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes turn { to { transform: rotate(360deg); } }
@keyframes needle { to { transform: rotate(74deg); } }

@media (max-width: 820px) {
  .site-mast { left: 16px; right: 16px; top: 14px; }
  .phase-readout { display: none; }
  .chamber { padding: 82px 18px 42px; }
  .modular-wall { display: flex; flex-direction: column; min-height: auto; gap: 14px; }
  .panel, .marginal-note { min-height: 120px; }
  .calibration-strip { flex-direction: row; min-height: 72px; }
  .calibration-strip span, .calibration-strip i { writing-mode: horizontal-tb; transform: none; }
  .evidence-drawer .drawer-label { writing-mode: horizontal-tb; transform: none; }
  .drawer-content, .mini-diagram { opacity: 1; transform: none; }
  .astrolabe { right: -44vw; top: 16vh; }
}
