:root {
  --ink: #171b17;
  --ink-soft: #5f665f;
  --ink-faint: #8b9188;
  --paper: #f0e8d8;
  --paper-deep: #e8dfce;
  --room: #0b110d;
  --cream: #f2ede1;
  --cream-soft: rgba(242, 237, 225, .7);
  --cream-faint: rgba(242, 237, 225, .42);
  --line: rgba(242, 237, 225, .12);
  --brass: #ad8d61;
  --brass-light: #d2b384;
  --brass-dark: #6e5638;
  --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;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --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 82% 15%, rgba(89, 130, 100, .11), transparent 36%),
    radial-gradient(ellipse at 8% 91%, rgba(173, 141, 97, .08), transparent 35%),
    linear-gradient(146deg, #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, .055);
  filter: blur(100px);
  pointer-events: none;
}

button { color: inherit; cursor: pointer; }
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 72% 44%, rgba(211, 180, 132, .045), transparent 28%),
    radial-gradient(circle at 65% 81%, rgba(100, 137, 112, .035), transparent 34%);
}

.grain {
  position: fixed;
  z-index: 30;
  inset: 0;
  pointer-events: none;
  opacity: .045;
  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; }
.opened-label { color: var(--cream-faint); font-size: 9px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }

.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);
}

.outside {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(350px, .88fr) minmax(520px, 1.12fr);
  align-items: center;
  gap: clamp(46px, 6vw, 100px);
  padding: clamp(38px, 6vh, 70px) 0 clamp(36px, 5vh, 60px);
}

.letter {
  width: 100%;
  max-width: 610px;
  justify-self: end;
  animation: letter-in .7s var(--ease) both;
}

@keyframes letter-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.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 {
  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.5vh, 42px) 0 0;
  color: var(--cream);
  font-family: var(--serif);
  font-size: clamp(69px, 7.9vw, 116px);
  font-weight: 400;
  line-height: .82;
  letter-spacing: -.06em;
  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: 46ch;
  margin: clamp(24px, 3.3vh, 36px) 0 0;
  color: rgba(242, 237, 225, .74);
  font-size: clamp(13px, 1.08vw, 15px);
  line-height: 1.75;
}

.letter-body {
  max-width: 53ch;
  margin-top: clamp(23px, 3.2vh, 34px);
}

.letter-body p {
  margin: 0 0 13px;
  color: rgba(242, 237, 225, .58);
  font-family: var(--serif);
  font-size: clamp(14px, 1.12vw, 16px);
  line-height: 1.62;
}

.letter-body p:last-child {
  margin-bottom: 0;
  color: rgba(242, 237, 225, .78);
  font-style: italic;
}

.world-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: clamp(26px, 3.6vh, 38px);
}

.world-links a {
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(210, 179, 132, .25);
  color: rgba(242, 237, 225, .58);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: color .2s ease, border-color .2s ease;
}

.world-links a span { color: var(--brass); }
.world-links a:hover { color: var(--brass-light); border-color: var(--brass-light); }

.tiny-note {
  margin: 24px 0 0;
  color: var(--cream-faint);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .11em;
  line-height: 1.5;
  text-transform: uppercase;
}

.calling-card {
  position: relative;
  justify-self: start;
  width: 100%;
  max-width: 620px;
  min-width: 0;
  padding: clamp(26px, 3.2vw, 38px);
  border: 1px solid rgba(34, 41, 32, .2);
  border-radius: 2px;
  background:
    radial-gradient(ellipse at 96% 0%, rgba(155, 118, 79, .07), transparent 34%),
    linear-gradient(151deg, #f3ecdd 0%, #ece4d4 58%, #e5dbc8 100%);
  color: var(--ink);
  box-shadow: 0 38px 100px rgba(0, 0, 0, .42);
  transform: rotate(-.35deg);
  animation: card-in .8s var(--ease) both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(18px) rotate(-.8deg); }
  to { opacity: 1; transform: translateY(0) rotate(-.35deg); }
}

.calling-card::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  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='.93' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.calling-card > * { position: relative; z-index: 1; }

.card-tape {
  position: absolute;
  z-index: 2;
  top: -13px;
  left: 38px;
  width: 104px;
  height: 25px;
  background: rgba(218, 203, 173, .44);
  box-shadow: 0 2px 4px rgba(31, 25, 17, .09);
  transform: rotate(-2.2deg);
  clip-path: polygon(2% 7%, 99% 0, 97% 96%, 1% 100%);
}

.card-kicker {
  color: rgba(55, 67, 51, .5);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.calling-card h2 {
  margin: 13px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(35px, 3.8vw, 48px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.045em;
}

.card-lede {
  margin: 8px 0 0;
  color: rgba(23, 27, 23, .55);
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
}

.badge-preview {
  display: grid;
  place-items: center;
  margin: 25px 0 24px;
}

.badge-preview img {
  display: block;
  width: min(100%, 320px);
  height: auto;
  box-shadow: 0 12px 25px rgba(26, 23, 17, .19);
}

.card-rule {
  height: 1px;
  background: rgba(23, 27, 23, .13);
}

.copy-block {
  min-width: 0;
  margin-top: 22px;
  padding: 16px 17px 14px;
  border-radius: 2px;
  background: #101a13;
  color: var(--cream);
}

.copy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(242, 237, 225, .5);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.copy-head button {
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(210, 179, 132, .38);
  border-radius: 999px;
  background: transparent;
  color: var(--brass-light);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.copy-head button:hover {
  border-color: var(--brass-light);
  background: rgba(210, 179, 132, .1);
  color: var(--cream);
}

.copy-block pre {
  width: 100%;
  max-width: 100%;
  margin: 13px 0 0;
  overflow-x: auto;
  color: rgba(242, 237, 225, .7);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.6;
  white-space: pre;
  scrollbar-width: thin;
}

.copy-status {
  min-height: 14px;
  margin: 10px 0 0;
  color: rgba(242, 237, 225, .39);
  font-family: var(--serif);
  font-size: 10.5px;
  font-style: italic;
  line-height: 1.4;
}

.copy-status.is-copied { color: var(--moss); }

.machine-card {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(23, 27, 23, .13);
}

.machine-card ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.machine-card li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.machine-card li a {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .2s ease;
}

.machine-card li a:hover { color: var(--brass-dark); text-decoration: underline; text-underline-offset: 3px; }
.machine-card li span { color: rgba(23, 27, 23, .42); font-size: 8px; line-height: 1.35; }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding-top: 13px;
  border-top: 1px solid rgba(23, 27, 23, .13);
  color: rgba(23, 27, 23, .4);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.card-seal {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(173, 141, 97, .45);
  border-radius: 50%;
  color: var(--brass-dark);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: .02em;
}

.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); }

.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: 1140px) {
  .outside { grid-template-columns: minmax(310px, .78fr) minmax(0, 1.22fr); gap: 40px; }
  h1 { font-size: clamp(60px, 7.2vw, 92px); }
  .calling-card { padding: 27px; }
}

@media (max-width: 940px) {
  .outside {
    grid-template-columns: 1fr;
    gap: 42px;
    padding-top: 38px;
    padding-bottom: 38px;
  }

  .letter { justify-self: start; max-width: 720px; }
  h1 { font-size: clamp(63px, 12vw, 106px); }
  .lede { max-width: 52ch; }
  .letter-body { max-width: 60ch; }
  .calling-card { justify-self: start; max-width: 700px; transform: none; }
  @keyframes card-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@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; }
  .opened-label { display: none; }
  .header-actions { gap: 8px; }
  .header-actions .quiet-button { min-height: 30px; padding: 0 10px; font-size: 7.5px; letter-spacing: .08em; }

  .outside { gap: 31px; padding: 31px 0 28px; }
  h1 { margin-top: 22px; font-size: clamp(56px, 17vw, 82px); line-height: .84; }
  h1 em { margin-left: 0; }
  .lede { margin-top: 22px; font-size: 12px; line-height: 1.7; }
  .letter-body { margin-top: 21px; }
  .letter-body p { font-size: 14px; line-height: 1.6; }
  .world-links { gap: 8px 14px; margin-top: 24px; }
  .world-links a { font-size: 7px; letter-spacing: .09em; }
  .tiny-note { margin-top: 21px; font-size: 7px; }

  .calling-card { padding: 24px 18px 20px; }
  .card-tape { left: 24px; width: 82px; height: 21px; top: -11px; }
  .card-kicker { font-size: 7px; letter-spacing: .14em; }
  .calling-card h2 { margin-top: 11px; font-size: 35px; }
  .card-lede { font-size: 12px; }
  .badge-preview { margin: 21px 0; }
  .copy-block { margin-top: 18px; padding: 13px 12px 12px; }
  .copy-head { gap: 10px; font-size: 7px; letter-spacing: .12em; }
  .copy-head button { padding: 0 9px; font-size: 6.8px; }
  .copy-block pre { font-size: 8.5px; }
  .copy-status { font-size: 10px; }
  .machine-card { margin-top: 20px; padding-top: 15px; }
  .machine-card ul { grid-template-columns: 1fr; gap: 9px; }
  .machine-card li { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 12px; }
  .card-foot { margin-top: 20px; font-size: 6.8px; }
  .card-seal { width: 26px; height: 26px; font-size: 10px; }

  .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; }
}

@media (max-height: 790px) and (min-width: 941px) {
  .site-shell { padding-top: 15px; padding-bottom: 12px; }
  .site-header { min-height: 36px; }
  .outside { padding-top: 22px; padding-bottom: 22px; }
  h1 { margin-top: 24px; font-size: clamp(60px, 7.2vw, 94px); }
  .lede { margin-top: 20px; }
  .letter-body { margin-top: 20px; }
  .world-links { margin-top: 22px; }
  .tiny-note { margin-top: 18px; }
  .calling-card { padding: 22px 25px; }
  .badge-preview { margin: 18px 0 16px; }
  .copy-block { margin-top: 16px; }
  .machine-card { margin-top: 18px; }
  .site-footer { min-height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}
