:root {
  --ink: #171b17;
  --ink-soft: #5f665f;
  --ink-faint: #8b9188;
  --paper: #f1ebdd;
  --paper-warm: #e8dfce;
  --room: #0b110d;
  --room-mid: #111812;
  --room-high: #172018;
  --cream: #f2ede1;
  --cream-soft: rgba(242, 237, 225, .68);
  --cream-faint: rgba(242, 237, 225, .38);
  --line: rgba(242, 237, 225, .12);
  --line-strong: rgba(242, 237, 225, .22);
  --brass: #ad8d61;
  --brass-light: #d2b384;
  --brass-dark: #5d4932;
  --moss: #8fb49c;
  --moss-deep: #456b55;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: Bahnschrift, "Aptos", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--room);
  color-scheme: dark;
}

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  font-family: var(--sans);
  color: var(--cream);
  background:
    radial-gradient(ellipse at 73% 23%, rgba(89, 130, 100, .10), transparent 35%),
    radial-gradient(ellipse at 9% 88%, rgba(173, 141, 97, .07), transparent 34%),
    linear-gradient(147deg, #090e0a 0%, #0e1510 49%, #090e0a 100%);
}

body::before {
  content: "";
  position: fixed;
  z-index: 0;
  top: -34vw;
  right: -20vw;
  width: 58vw;
  height: 58vw;
  border-radius: 50%;
  background: rgba(113, 155, 127, .05);
  filter: blur(100px);
  pointer-events: none;
}

button, input, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
::selection { color: var(--room); background: var(--brass-light); }

:focus-visible {
  outline: 2px solid var(--brass-light);
  outline-offset: 4px;
}

.room-light {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 77% 43%, rgba(211, 180, 132, .045), transparent 26%),
    radial-gradient(circle at 70% 70%, rgba(100, 137, 112, .035), transparent 32%);
}

.grain {
  position: fixed;
  z-index: 30;
  inset: 0;
  pointer-events: none;
  opacity: .048;
  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='.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.site-shell {
  position: relative;
  z-index: 2;
  width: min(100%, 1540px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 20px clamp(20px, 4vw, 62px) 17px;
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: max-content;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--brass-light);
}

.brand-mark svg { width: 100%; height: 100%; }

.brand-word {
  color: var(--cream);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .27em;
  line-height: 1;
}

.brand-slash {
  color: var(--cream-faint);
  font-size: 13px;
  font-weight: 300;
}

.brand-sub {
  color: var(--cream-soft);
  font-family: var(--serif);
  font-size: 16px;
  font-style: italic;
  letter-spacing: .01em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.daybook-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  color: rgba(242, 237, 225, .64);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .25s ease, border-color .25s ease;
}

.daybook-link:hover {
  color: var(--brass-light);
  border-color: rgba(210, 179, 132, .34);
}

.daybook-pip {
  flex: 0 0 auto;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 3px rgba(173, 141, 97, .09);
}

.daybook-arrow {
  color: var(--brass);
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
}

.clock {
  color: rgba(242, 237, 225, .46);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.quiet-button {
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .022);
  color: var(--cream-soft);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: color .25s ease, border-color .25s ease, background .25s ease;
}

.quiet-button:hover {
  color: var(--cream);
  border-color: rgba(210, 179, 132, .36);
  background: rgba(210, 179, 132, .05);
}

.room {
  flex: 1;
  min-height: calc(100svh - 143px);
  display: grid;
  grid-template-columns: minmax(390px, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(40px, 5.2vw, 96px);
  padding: clamp(24px, 3.5vh, 45px) 0 clamp(20px, 3vh, 38px);
}

.threshold-copy {
  width: 100%;
  max-width: 610px;
  justify-self: end;
  padding-bottom: 2px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--cream-faint);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .2em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow.dark { color: var(--ink-faint); }

.open-pip,
.local-pip,
.hour-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 4px rgba(143, 180, 156, .07);
  animation: pip-breathe 5.5s ease-in-out infinite;
}

@keyframes pip-breathe {
  0%, 100% { opacity: .42; }
  50% { opacity: .92; }
}

h1 {
  margin: clamp(25px, 3.2vh, 39px) 0 0;
  font-family: var(--serif);
  font-size: clamp(67px, 7.55vw, 119px);
  font-weight: 400;
  line-height: .82;
  letter-spacing: -.06em;
  color: var(--cream);
  text-wrap: balance;
}

h1 em {
  display: inline-block;
  margin-left: clamp(7px, 1vw, 15px);
  color: #b3c5b4;
  font-weight: 400;
  letter-spacing: -.055em;
}

.lede {
  max-width: 48ch;
  margin: clamp(25px, 3.2vh, 38px) 0 0;
  color: rgba(242, 237, 225, .74);
  font-size: clamp(13px, 1.08vw, 15px);
  line-height: 1.75;
  letter-spacing: .005em;
}

.doors {
  width: min(100%, 487px);
  margin-top: clamp(28px, 4vh, 42px);
  display: grid;
  gap: 9px;
}

.door {
  position: relative;
  min-height: 91px;
  display: grid;
  grid-template-columns: 1fr 36px;
  gap: 15px;
  align-items: center;
  padding: 14px 15px 14px 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background:
    linear-gradient(103deg, rgba(255, 255, 255, .034), rgba(255, 255, 255, .009) 58%, transparent),
    rgba(16, 23, 18, .58);
  transition: transform .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease);
}

.door::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(210, 179, 132, .055), transparent 72%);
  transform: translateX(-110%);
  transition: transform .8s var(--ease);
  pointer-events: none;
}

.door:hover {
  transform: translateX(4px);
  border-color: rgba(210, 179, 132, .27);
  background:
    linear-gradient(103deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .012) 58%, transparent),
    rgba(19, 28, 21, .74);
}

.door:hover::after { transform: translateX(110%); }

.door-accent {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(173, 141, 97, .76) 35%, rgba(173, 141, 97, .1) 85%, transparent);
}

.door-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.door-kicker {
  color: rgba(242, 237, 225, .46);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .17em;
  line-height: 1.3;
  text-transform: uppercase;
}

.door strong {
  margin-top: 4px;
  color: var(--cream);
  font-family: var(--serif);
  font-size: clamp(24px, 2.1vw, 30px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.025em;
}

.door-line {
  margin-top: 7px;
  color: rgba(242, 237, 225, .58);
  font-size: 10px;
  line-height: 1.45;
}

.door-arrow {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--cream-soft);
  transition: color .25s ease, border-color .25s ease, transform .35s var(--ease), background .25s ease;
}

.door-arrow svg { width: 17px; height: 17px; }
.door:hover .door-arrow {
  color: var(--room);
  border-color: var(--brass-light);
  background: var(--brass-light);
  transform: rotate(-5deg);
}

.under-doors {
  margin: 19px 0 0;
  color: rgba(242, 237, 225, .48);
  font-family: var(--serif);
  font-size: 12px;
  font-style: italic;
  letter-spacing: .01em;
}

.text-link {
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(210, 179, 132, .26);
  background: transparent;
  color: rgba(242, 237, 225, .68);
  font-family: var(--sans);
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .2s ease, border-color .2s ease;
}

.text-link:hover {
  color: var(--brass-light);
  border-color: var(--brass-light);
}

.window-stage {
  width: min(100%, 765px);
  justify-self: start;
  align-self: center;
}

.window-wrap {
  position: relative;
  width: 100%;
  padding-top: 16px;
  filter: drop-shadow(0 40px 58px rgba(0, 0, 0, .46));
}

.window-crown {
  position: absolute;
  top: 0;
  left: 7%;
  right: 7%;
  height: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brass);
}

.crown-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(173, 141, 97, .24));
}

.crown-line:last-child {
  background: linear-gradient(to left, transparent, rgba(173, 141, 97, .24));
}

.crown-dot {
  width: 4px;
  height: 4px;
  border: 1px solid rgba(173, 141, 97, .58);
  border-radius: 50%;
}

.window-frame {
  position: relative;
  width: 100%;
  padding: clamp(10px, 1.15vw, 15px);
  border-radius: 3px;
  background:
    linear-gradient(146deg, #786247 0%, #4a3a2b 12%, #2b231b 38%, #695339 61%, #3c2e22 83%, #8a7253 100%);
  box-shadow:
    0 1px 0 rgba(255, 244, 218, .22) inset,
    0 -1px 0 rgba(0, 0, 0, .55) inset,
    0 0 0 1px rgba(8, 11, 8, .8),
    0 0 0 5px rgba(21, 18, 14, .56),
    0 0 0 6px rgba(188, 155, 107, .13);
}

.window-frame::before,
.window-frame::after {
  content: "";
  position: absolute;
  z-index: 6;
  left: 9px;
  right: 9px;
  height: 1px;
  background: rgba(238, 211, 166, .18);
  pointer-events: none;
}

.window-frame::before { top: 7px; }
.window-frame::after { bottom: 7px; background: rgba(0, 0, 0, .3); }

.glass {
  position: relative;
  width: 100%;
  aspect-ratio: 1.17 / 1;
  overflow: hidden;
  border-radius: 1px;
  background: #0d1b1f;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .65),
    0 0 0 2px rgba(239, 214, 171, .09),
    0 0 35px rgba(0, 0, 0, .75) inset;
  isolation: isolate;
}

#viewCanvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.sky-wash {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(124deg, rgba(255, 239, 201, .085), transparent 23%, transparent 78%, rgba(2, 8, 7, .15)),
    linear-gradient(to bottom, rgba(255, 255, 255, .025), transparent 28%, rgba(1, 6, 6, .08) 100%);
  mix-blend-mode: soft-light;
}

.glass-shine {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  opacity: .62;
  background:
    linear-gradient(122deg, transparent 0%, rgba(242, 237, 225, .075) 16%, transparent 24%, transparent 70%, rgba(242, 237, 225, .025) 85%, transparent 100%),
    radial-gradient(ellipse at 18% 7%, rgba(255, 248, 229, .07), transparent 29%);
}

.glass-vignette {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  box-shadow:
    0 0 52px rgba(0, 4, 3, .43) inset,
    0 0 0 1px rgba(231, 208, 168, .07) inset;
  background:
    linear-gradient(to right, rgba(0, 4, 4, .15), transparent 8%, transparent 92%, rgba(0, 4, 4, .18)),
    linear-gradient(to bottom, rgba(0, 4, 4, .10), transparent 12%, transparent 81%, rgba(0, 4, 4, .24));
}

.scene-caption {
  position: absolute;
  z-index: 7;
  top: clamp(15px, 2.1vw, 24px);
  left: clamp(16px, 2.4vw, 28px);
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(247, 240, 224, .61);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}

.scene-pip {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(235, 213, 173, .92);
  box-shadow: 0 0 8px rgba(235, 213, 173, .6);
}

.scene-readout {
  position: absolute;
  z-index: 7;
  right: clamp(16px, 2.4vw, 28px);
  bottom: clamp(15px, 2.2vw, 24px);
  left: clamp(16px, 2.4vw, 28px);
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(247, 240, 224, .57);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .13em;
  line-height: 1.4;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .55);
}

.readout-rule {
  width: 18px;
  height: 1px;
  background: rgba(247, 240, 224, .22);
}

#placeLabel {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#placeLabel::before {
  content: "·";
  margin-right: 10px;
  color: rgba(247, 240, 224, .35);
}

.mullions {
  position: absolute;
  z-index: 8;
  inset: clamp(10px, 1.15vw, 15px);
  pointer-events: none;
}

.mullion {
  position: absolute;
  background:
    linear-gradient(to right, #241c14, #6a553a 30%, #3a2d20 56%, #1e1811 100%);
  box-shadow:
    1px 0 0 rgba(255, 235, 202, .13),
    -1px 0 0 rgba(0, 0, 0, .4),
    0 0 7px rgba(0, 0, 0, .38);
}

.mullion-v {
  top: 0;
  bottom: 0;
  left: 50%;
  width: clamp(7px, .9vw, 11px);
  transform: translateX(-50%);
}

.mullion-h {
  top: 42%;
  right: 0;
  left: 0;
  height: clamp(6px, .78vw, 9px);
  background:
    linear-gradient(to bottom, #6a553a, #3d3022 45%, #211a13 100%);
  transform: translateY(-50%);
}

.frame-highlight {
  position: absolute;
  z-index: 9;
  top: 5px;
  right: 5px;
  bottom: 5px;
  left: 5px;
  border: 1px solid rgba(255, 237, 205, .08);
  pointer-events: none;
}

.curtain {
  position: absolute;
  z-index: 5;
  top: 0;
  bottom: 0;
  width: 53%;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(90deg, rgba(18, 25, 20, .08), rgba(11, 15, 12, .96) 20%, rgba(24, 33, 26, .98) 53%, rgba(11, 16, 12, .96) 82%, rgba(6, 9, 7, .4)),
    repeating-linear-gradient(92deg, transparent 0 16px, rgba(174, 146, 101, .035) 16px 18px, transparent 18px 34px);
  box-shadow: 0 0 38px rgba(0, 0, 0, .35) inset;
  transition: transform .9s var(--ease), opacity .55s ease;
}

.curtain-left {
  left: 0;
  transform: translateX(-101%);
  border-right: 1px solid rgba(185, 156, 113, .08);
}

.curtain-right {
  right: 0;
  transform: translateX(101%);
  border-left: 1px solid rgba(185, 156, 113, .08);
}

.curtained-note {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(5px);
  color: rgba(242, 237, 225, .42);
  font-family: var(--serif);
  font-size: clamp(15px, 1.5vw, 20px);
  font-style: italic;
  letter-spacing: .015em;
  pointer-events: none;
  transition: opacity .6s ease .12s, transform .6s var(--ease) .12s;
}

.glass.is-curtained .curtain {
  opacity: 1;
  transform: translateX(0);
}

.glass.is-curtained .curtained-note {
  opacity: 1;
  transform: translateY(0);
}

.glass.is-curtained .scene-caption,
.glass.is-curtained .scene-readout {
  opacity: .12;
  transition: opacity .4s ease;
}

.sill {
  position: relative;
  width: calc(100% + clamp(22px, 3vw, 38px));
  height: clamp(27px, 3.2vw, 39px);
  margin-left: calc(clamp(22px, 3vw, 38px) / -2);
  border-radius: 0 0 2px 2px;
  background:
    linear-gradient(to bottom, #7b6245 0%, #4b3a2a 13%, #2d241b 47%, #18140f 100%);
  box-shadow:
    0 1px 0 rgba(255, 236, 200, .26) inset,
    0 8px 15px rgba(0, 0, 0, .35),
    0 0 0 1px rgba(5, 8, 5, .55);
}

.sill-top {
  position: absolute;
  top: 0;
  right: 5px;
  left: 5px;
  height: 1px;
  background: rgba(236, 207, 159, .18);
}

.sill-object {
  position: absolute;
  bottom: 62%;
  display: block;
  background: #141812;
  box-shadow: 0 2px 3px rgba(0, 0, 0, .3);
}

.sill-object.cup {
  left: 12%;
  width: 15px;
  height: 17px;
  border-radius: 2px 2px 5px 5px;
  background: linear-gradient(90deg, #27251c, #65604d 45%, #242219);
}

.sill-object.cup::after {
  content: "";
  position: absolute;
  top: 4px;
  right: -6px;
  width: 7px;
  height: 8px;
  border: 2px solid #4c4939;
  border-left: 0;
  border-radius: 0 6px 6px 0;
}

.sill-object.key {
  left: 46%;
  width: 23px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to bottom, #9b8155, #493a27);
  transform: rotate(-7deg);
}

.sill-object.key::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -5px;
  width: 9px;
  height: 9px;
  border: 2px solid #9b8155;
  border-radius: 50%;
}

.sill-note {
  position: absolute;
  right: 16%;
  bottom: 72%;
  width: clamp(25px, 3.2vw, 36px);
  height: clamp(17px, 2.2vw, 24px);
  padding: 0;
  border: 0;
  background: transparent;
  transform: rotate(5deg);
  transition: transform .3s var(--ease), filter .3s ease;
}

.sill-note span {
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(151deg, #e5dac0 0 47%, #c9b893 48% 50%, #efe5cc 51% 100%);
  box-shadow: 0 3px 5px rgba(0, 0, 0, .35);
  clip-path: polygon(0 7%, 100% 0, 95% 100%, 4% 92%);
}

.sill-note:hover { transform: rotate(1deg) translateY(-2px); filter: brightness(1.08); }
.sill-note:focus-visible { outline-offset: 3px; }

.sill-cast {
  position: absolute;
  top: 4px;
  left: 0;
  width: 100%;
  height: 10px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .33), transparent);
  pointer-events: none;
}

.window-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 18px;
  padding: 0 5px;
}

.hour-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: rgba(242, 237, 225, .49);
  font-family: var(--serif);
  font-size: 11px;
  font-style: italic;
  line-height: 1.4;
}

.hour-dot {
  width: 3px;
  height: 3px;
  box-shadow: none;
  opacity: .7;
}

.window-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

.keepsake-button,
.curtain-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: rgba(242, 237, 225, .51);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .25s ease, border-color .25s ease;
}

.keepsake-button {
  color: rgba(242, 237, 225, .7);
  border-bottom-color: rgba(210, 179, 132, .27);
}

.keepsake-button svg,
.curtain-button svg { width: 15px; height: 15px; }

.keepsake-button:hover,
.curtain-button:hover { color: var(--brass-light); border-color: rgba(210, 179, 132, .42); }

.site-footer {
  min-height: 37px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-top: 1px solid rgba(242, 237, 225, .075);
  color: rgba(242, 237, 225, .47);
}

.footer-note {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.local-pip {
  width: 4px;
  height: 4px;
  background: var(--moss);
  box-shadow: 0 0 0 3px rgba(143, 180, 156, .055);
}

.footer-signature {
  gap: 10px;
  font-weight: 500;
  letter-spacing: .11em;
}

.footer-signature a { transition: color .2s ease; }
.footer-signature a:hover { color: var(--brass-light); }

.footer-rule {
  width: 18px;
  height: 1px;
  background: rgba(242, 237, 225, .16);
}

.letter-modal {
  width: min(92vw, 600px);
  max-height: min(88svh, 760px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(40, 48, 39, .2);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 38px 100px rgba(0, 0, 0, .58);
}

.letter-modal[open] {
  animation: modal-in .45s var(--ease) both;
}

.letter-modal::backdrop {
  background: rgba(3, 7, 4, .74);
  backdrop-filter: blur(6px);
  animation: backdrop-in .4s ease both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.letter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 27px 31px 22px;
  border-bottom: 1px solid rgba(23, 27, 23, .12);
}

.eyebrow.dark { color: var(--ink-faint); }

.letter-head h2 {
  margin: 12px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(28px, 4.4vw, 39px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.035em;
}

.modal-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 1px solid rgba(23, 27, 23, .15);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}

.modal-close:hover { color: var(--ink); border-color: rgba(23, 27, 23, .36); transform: rotate(4deg); }
.modal-close svg { width: 16px; height: 16px; }

.letter-body {
  max-height: calc(88svh - 210px);
  overflow-y: auto;
  padding: 25px 31px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(23, 27, 23, .24) transparent;
}

.letter-body p {
  margin: 0 0 15px;
  color: #4b5149;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.62;
}

.letter-body p:first-child {
  color: var(--ink);
  font-size: 19px;
  line-height: 1.47;
}

.letter-turn {
  margin-top: 23px !important;
  color: var(--ink) !important;
  font-size: 18px !important;
  font-style: italic;
}

.letter-sign {
  margin: 25px 0 0 !important;
  color: var(--ink-faint) !important;
  font-family: var(--sans) !important;
  font-size: 9px !important;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.letter-sign span { margin: 0 4px; color: var(--brass); }

.letter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 31px;
  border-top: 1px solid rgba(23, 27, 23, .12);
  background: rgba(255, 255, 255, .15);
}

.letter-worlds {
  display: flex;
  align-items: center;
  gap: 19px;
}

.letter-worlds a {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: color .2s ease;
}

.letter-worlds a:hover { color: var(--ink); }
.letter-worlds a span { color: var(--brass); }

.letter-foot .quiet-button {
  flex: 0 0 auto;
  min-height: 30px;
  border-color: rgba(23, 27, 23, .16);
  background: transparent;
  color: var(--ink-soft);
  font-size: 8px;
}

.letter-foot .quiet-button:hover {
  color: var(--ink);
  border-color: rgba(23, 27, 23, .34);
  background: rgba(23, 27, 23, .035);
}

.keepsake-modal {
  width: min(94vw, 710px);
  max-height: min(92svh, 1000px);
  margin: auto;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(210, 179, 132, .2);
  border-radius: 2px;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(105, 136, 106, .09), transparent 38%),
    #0c130e;
  color: var(--cream);
  box-shadow: 0 42px 120px rgba(0, 0, 0, .68);
}

.keepsake-modal[open] { animation: modal-in .45s var(--ease) both; }

.keepsake-modal::backdrop {
  background: rgba(3, 7, 4, .8);
  backdrop-filter: blur(7px);
  animation: backdrop-in .4s ease both;
}

.keepsake-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 27px 16px;
  border-bottom: 1px solid rgba(242, 237, 225, .09);
}

.keepsake-head h2 {
  margin: 10px 0 0;
  color: var(--cream);
  font-family: var(--serif);
  font-size: clamp(29px, 4vw, 37px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.035em;
}

.keepsake-close {
  border-color: rgba(242, 237, 225, .17);
  color: rgba(242, 237, 225, .62);
}

.keepsake-close:hover {
  border-color: rgba(210, 179, 132, .5);
  color: var(--brass-light);
}

.keepsake-lede {
  margin: 0;
  padding: 14px 27px 0;
  color: rgba(242, 237, 225, .45);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1.55;
  text-transform: uppercase;
}

.keepsake-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 27px 18px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 52%, rgba(236, 228, 211, .055), transparent 55%);
}

#keepsakeCanvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(64svh, 780px);
  background: #e8dfce;
  box-shadow: 0 20px 55px rgba(0, 0, 0, .48);
}

.keepsake-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 27px 20px;
  border-top: 1px solid rgba(242, 237, 225, .09);
}

.keepsake-meta {
  color: rgba(242, 237, 225, .44);
  font-family: var(--serif);
  font-size: 11px;
  font-style: italic;
  line-height: 1.4;
}

.keepsake-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.keepsake-foot .quiet-button {
  min-height: 37px;
  font-size: 8px;
  letter-spacing: .12em;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 17px;
  border: 1px solid var(--brass-light);
  border-radius: 999px;
  background: var(--brass-light);
  color: #10150f;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  transition: background .25s ease, border-color .25s ease, transform .25s var(--ease);
}

.download-button svg { width: 16px; height: 16px; }
.download-button:hover { background: #e3c797; border-color: #e3c797; transform: translateY(-1px); }

.noscript-note {
  position: fixed;
  z-index: 40;
  right: 20px;
  bottom: 20px;
  left: 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: #141b15;
  color: var(--cream);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.noscript-note a { color: var(--brass-light); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1120px) {
  .room {
    grid-template-columns: minmax(330px, .84fr) minmax(0, 1.16fr);
    gap: clamp(30px, 4vw, 54px);
  }

  h1 { font-size: clamp(61px, 7.4vw, 88px); }
  .lede { font-size: 12px; }
  .door { min-height: 84px; padding-left: 17px; }
  .door-line { font-size: 9px; }
  .window-foot { margin-top: 14px; }
  .hour-note { font-size: 10px; }
}

@media (max-width: 900px) {
  .site-shell {
    min-height: auto;
    padding: 17px 20px 14px;
  }

  .site-header { min-height: 36px; }
  .brand-sub { font-size: 15px; }
  .header-actions { gap: 10px; }
  .clock { display: none; }
  .daybook-link { font-size: 8px; letter-spacing: .11em; }
  .quiet-button { min-height: 30px; padding: 0 11px; font-size: 8px; }

  .room {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    gap: 0;
    padding: 36px 0 28px;
  }

  .threshold-copy {
    display: contents;
  }

  .eyebrow { order: 1; justify-content: center; }
  h1 { order: 2; margin-top: 22px; font-size: clamp(65px, 15.8vw, 105px); text-align: center; }
  .lede { order: 3; max-width: 49ch; margin: 23px auto 0; text-align: center; font-size: 13px; }
  .window-stage { order: 4; width: min(100%, 640px); margin: 35px auto 0; }
  .doors { order: 5; width: min(100%, 520px); margin: 27px auto 0; }
  .under-doors { order: 6; margin-top: 18px; text-align: center; }
  .site-footer { min-height: 40px; margin-top: auto; }

  .window-wrap { padding-top: 13px; }
  .window-foot { margin-top: 13px; padding: 0 2px; }
  .sill { height: 25px; }
}

@media (max-width: 560px) {
  .site-shell { padding-right: 16px; padding-left: 16px; }
  .brand { gap: 7px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-word { font-size: 10px; letter-spacing: .2em; }
  .brand-slash { font-size: 11px; }
  .brand-sub { font-size: 14px; }
  .header-actions { gap: 8px; }
  .header-actions .quiet-button { display: none; }
  .daybook-link { gap: 5px; font-size: 7px; letter-spacing: .09em; }
  .daybook-arrow { font-size: 9px; }

  .room { padding-top: 30px; }
  h1 { font-size: clamp(60px, 18.2vw, 86px); line-height: .86; }
  h1 em { margin-left: 0; }
  .lede { max-width: 35ch; font-size: 12px; line-height: 1.7; }

  .window-stage { margin-top: 29px; }
  .window-wrap { width: calc(100% + 12px); margin-left: -6px; filter: drop-shadow(0 24px 35px rgba(0, 0, 0, .42)); }
  .window-frame { padding: 8px; }
  .mullions { inset: 8px; }
  .glass { aspect-ratio: 1.08 / 1; }
  .scene-caption { top: 13px; left: 13px; font-size: 7px; }
  .scene-readout { right: 13px; bottom: 12px; left: 13px; gap: 7px; font-size: 6.8px; letter-spacing: .1em; }
  .readout-rule { width: 11px; }
  .window-foot { flex-direction: column; align-items: stretch; gap: 9px; }
  .hour-note { font-size: 9.6px; line-height: 1.35; }
  .window-actions { justify-content: space-between; gap: 14px; }
  .keepsake-button,
  .curtain-button { font-size: 7.2px; letter-spacing: .11em; }
  .keepsake-button svg,
  .curtain-button svg { width: 13px; height: 13px; }
  .sill { height: 21px; }
  .sill-object.cup { transform: scale(.8); transform-origin: bottom left; }
  .sill-object.key { transform: scale(.8) rotate(-7deg); transform-origin: bottom left; }
  .sill-note { right: 17%; bottom: 62%; }

  .doors { margin-top: 26px; gap: 8px; }
  .door { grid-template-columns: 1fr 31px; gap: 10px; min-height: 84px; padding: 12px 12px 12px 17px; }
  .door strong { font-size: 25px; }
  .door-line { max-width: 31ch; font-size: 9px; line-height: 1.4; }
  .door-arrow { width: 28px; height: 28px; }
  .door:hover { transform: none; }
  .under-doors { font-size: 11px; }

  .site-footer { flex-direction: column; align-items: flex-start; gap: 7px; padding-top: 12px; }
  .footer-note { font-size: 7px; }
  .footer-signature { width: 100%; justify-content: space-between; }

  .letter-head { padding: 22px 20px 18px; gap: 16px; }
  .letter-head h2 { font-size: 27px; }
  .letter-body { max-height: calc(88svh - 225px); padding: 20px 20px 14px; }
  .letter-body p { font-size: 14px; }
  .letter-body p:first-child { font-size: 17px; }
  .letter-turn { font-size: 16px !important; }
  .letter-foot { flex-direction: column; align-items: stretch; gap: 16px; padding: 16px 20px; }
  .letter-worlds { justify-content: space-between; }
  .letter-foot .quiet-button { width: 100%; }

  .keepsake-head { padding: 19px 18px 14px; gap: 14px; }
  .keepsake-head h2 { font-size: 28px; }
  .keepsake-lede { padding: 12px 18px 0; font-size: 8px; }
  .keepsake-stage { padding: 12px 16px 14px; }
  #keepsakeCanvas { max-height: 54svh; }
  .keepsake-foot { flex-direction: column; align-items: stretch; gap: 12px; padding: 13px 18px 16px; }
  .keepsake-meta { text-align: center; }
  .keepsake-actions { justify-content: space-between; gap: 8px; }
  .keepsake-foot .quiet-button { flex: 0 0 auto; padding: 0 13px; }
  .download-button { flex: 1; }
}

@media (max-height: 790px) and (min-width: 901px) {
  .site-shell { padding-top: 15px; padding-bottom: 12px; }
  .site-header { min-height: 36px; }
  .room { min-height: calc(100svh - 116px); padding-top: 18px; padding-bottom: 18px; }
  h1 { margin-top: 25px; font-size: clamp(60px, 7.1vw, 92px); }
  .lede { margin-top: 22px; font-size: 12px; }
  .doors { margin-top: 25px; }
  .door { min-height: 80px; padding-top: 11px; padding-bottom: 11px; }
  .door strong { font-size: 25px; }
  .under-doors { margin-top: 14px; }
  .window-foot { margin-top: 11px; }
  .site-footer { min-height: 30px; }
}

@media (max-height: 720px) {
  .keepsake-head { padding-top: 14px; padding-bottom: 10px; }
  .keepsake-head h2 { margin-top: 6px; font-size: 25px; }
  .keepsake-lede { padding-top: 8px; font-size: 8px; }
  .keepsake-stage { padding-top: 8px; padding-bottom: 9px; }
  #keepsakeCanvas { max-height: 48svh; }
  .keepsake-foot { padding-top: 10px; padding-bottom: 12px; gap: 8px; }
  .keepsake-meta { font-size: 10px; }
  .keepsake-foot .quiet-button,
  .download-button { min-height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

