/* ═══════════════════════════════════════════════════════════════
   ATRAMENT — /begin, the door

   One column, bone on black, mono labels. No shader, no smooth
   scroll, no custom cursor: this is the one room where the
   machinery gets out of the way and lets someone type.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --black: #0a0908;
  --coal: #14110f;
  --bone: #e8e2d6;
  --smoke: #8f887a;
  --oxblood: #7a1f2b;
  --hairline: rgba(232, 226, 214, 0.14);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --display: "Italiana", serif;
  --mono: "IBM Plex Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* A fieldset is the right element for a radio group, and its default groove
   border is the wrong look everywhere on this page. min-inline-size also has
   to go: the UA default is min-content, which stops the box shrinking. */
fieldset { border: 0; min-inline-size: 0; }
legend { padding: 0; }

body {
  background: var(--black);
  color: var(--bone);
  font-family: var(--serif);
  overflow-x: clip;
}

::selection { background: var(--oxblood); color: var(--bone); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 1px solid var(--oxblood);
  outline-offset: 3px;
}

.mono {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--smoke);
}
.serif-i { font-family: var(--serif); font-style: italic; font-weight: 300; }

/* [hidden] is a user-agent rule, so any author `display` here outranks it —
   which left the empty booking-status line drawing its border on a page
   where it had nothing to say. Several things on this page are hidden until
   the manifest or the form gives them a reason to appear. */
[hidden] { display: none !important; }

/* present to a screen reader, absent to the eye — the flash links and the
   form controls both need names longer than their visible labels */
.vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-4%, 5%); }
}

/* ── chrome ───────────────────────────────────────────────────── */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.6rem 2.4rem;
  background: rgba(10, 9, 8, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav__brand {
  font-family: var(--display);
  font-size: 1.15rem; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--bone); text-decoration: none;
}
.nav__links { display: flex; gap: 2.2rem; }
.nav__links a {
  font-family: var(--mono); font-size: 0.62rem;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--bone); text-decoration: none;
  position: relative; padding-bottom: 3px;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--bone);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__meta { color: var(--bone); text-decoration: none; }
@media (max-width: 720px) { .nav__links { display: none; } }

.footer {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.8rem 1.6rem;
  padding: 1.6rem 2.4rem;
  border-top: 1px solid var(--hairline);
}
.footer a { color: var(--smoke); text-decoration: none; transition: color 0.3s; }
.footer a:hover { color: var(--bone); }
@media (max-width: 720px) {
  .footer { flex-direction: column; align-items: flex-start; }
}

/* ── the page ─────────────────────────────────────────────────── */

.door {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(7rem, 18vh, 11rem) clamp(1.4rem, 6vw, 3rem) clamp(4rem, 10vh, 7rem);
}

.door__label { margin-bottom: 1.8rem; }
.door__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3rem, 12vw, 6rem);
  line-height: 1;
  letter-spacing: 0.03em;
  margin-bottom: 1.6rem;
}
.door__title span { color: var(--oxblood); }
.door__lede {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  line-height: 1.7;
  color: rgba(232, 226, 214, 0.82);
  max-width: 40ch;
}
.door__status {
  margin-top: 1.8rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(122, 31, 43, 0.5);
  color: var(--bone);
  display: inline-block;
}

/* ── the terms, before the form ───────────────────────────────── */

.terms {
  margin-top: clamp(3rem, 7vh, 4.5rem);
  border-top: 1px solid var(--hairline);
  padding-top: 2rem;
}
.terms__label { margin-bottom: 1.4rem; }
.terms__list { list-style: none; display: grid; gap: 1.1rem; }
.terms__item {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0 1.4rem;
  align-items: baseline;
}
.terms__sum {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--bone);
  letter-spacing: 0.02em;
}
.terms__body { font-size: 1.02rem; line-height: 1.65; color: rgba(232, 226, 214, 0.78); }
.terms__body b { font-weight: 500; color: var(--bone); }
.terms__foot {
  margin-top: 1.6rem;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--smoke);
  border-left: 1px solid rgba(122, 31, 43, 0.6);
  padding-left: 1.1rem;
}
@media (max-width: 560px) {
  .terms__item { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* ── the form ─────────────────────────────────────────────────── */

.letter {
  margin-top: clamp(3rem, 7vh, 4.5rem);
  border-top: 1px solid var(--hairline);
  padding-top: 2.4rem;
}
.letter[hidden] { display: none; }

.fieldset {
  display: grid;
  gap: 1.6rem;
  margin-bottom: 2.8rem;
  /* a legend sits above the padding box, so this is the gap under it */
  padding-top: 1.4rem;
}
.fieldset__legend {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--oxblood);
}

.f { display: grid; gap: 0.5rem; }
/* the same gap the grid would give, for the groups that are fieldsets */
.f > .choices { margin-top: 0.1rem; }
.f__label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--smoke);
}
.f__label i {
  font-style: normal;
  color: var(--oxblood);
  margin-left: 0.35em;
}
.f__hint {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--smoke);
}

.f__input,
.f__area,
.f__select {
  width: 100%;
  background: var(--coal);
  color: var(--bone);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 0.85rem 0.9rem;
  font-family: var(--serif);
  font-size: 16px; /* 16px stops iOS zooming the page on focus */
  line-height: 1.5;
  transition: border-color 0.3s ease;
}
.f__input:focus,
.f__area:focus,
.f__select:focus { border-color: var(--smoke); }
.f__input::placeholder,
.f__area::placeholder { color: rgba(143, 136, 122, 0.55); }
.f__area { resize: vertical; min-height: 7.5rem; }

.f__select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--smoke) 50%),
                    linear-gradient(135deg, var(--smoke) 50%, transparent 50%);
  background-position: calc(100% - 1.1rem) 1.25rem, calc(100% - 0.75rem) 1.25rem;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
}
.f__select option { background: var(--coal); color: var(--bone); }

/* choices — radios and checkboxes as hairline plates */
.choices { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.choices--stack { flex-direction: column; align-items: stretch; }

.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.4;
  color: rgba(232, 226, 214, 0.82);
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}
.choice:hover { border-color: rgba(143, 136, 122, 0.5); color: var(--bone); }
.choice input {
  appearance: none;
  flex: 0 0 auto;
  width: 12px; height: 12px;
  border: 1px solid var(--smoke);
  background: transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.choice input[type="radio"] { border-radius: 50%; }
.choice input:checked {
  background: var(--oxblood);
  border-color: var(--oxblood);
}
.choice:has(input:checked) {
  border-color: rgba(122, 31, 43, 0.75);
  background: rgba(122, 31, 43, 0.08);
  color: var(--bone);
}
.choice input:focus-visible { outline: 1px solid var(--oxblood); outline-offset: 3px; }

.choice--gate {
  align-items: flex-start;
  padding: 1rem;
}
.choice--gate input { margin-top: 0.32rem; }

/* the flash piece a link arrived with */
.claim {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0 1.2rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(122, 31, 43, 0.5);
  background: rgba(122, 31, 43, 0.06);
  margin-bottom: 1.6rem;
}
.claim[hidden] { display: none; }
.claim__art {
  width: 100%; height: auto; display: block;
  filter: grayscale(1) contrast(1.1);
}
.claim__no { display: block; margin-bottom: 0.3rem; }
.claim__name { font-family: var(--display); font-size: 1.5rem; font-weight: 400; }
.claim__spec { display: block; margin-top: 0.35rem; }

/* roman / step marks on quiet prose pages (/aftercare, /before, /sitting) */
.terms__mark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.6rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--smoke);
}

/* a number the sheet cannot place: the same frame, with nothing to hang in
   it but the sentence saying so */
.stray {
  padding: 1rem;
  border: 1px solid rgba(122, 31, 43, 0.5);
  background: rgba(122, 31, 43, 0.06);
  margin-bottom: 1.6rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* honeypot: never shown, never announced */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ── submit ───────────────────────────────────────────────────── */

.send {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem 2rem;
  border-top: 1px solid var(--hairline);
  padding-top: 2rem;
}
.send__btn {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: 0.06em;
  color: var(--bone);
  background: transparent;
  border: 1px solid var(--hairline);
  padding: 0.9rem 2.6rem;
  cursor: pointer;
  transition: border-color 0.45s ease, background 0.45s ease, color 0.45s ease;
}
.send__btn:hover:not(:disabled) {
  border-color: rgba(122, 31, 43, 0.8);
  background: rgba(122, 31, 43, 0.08);
}
.send__btn:disabled { opacity: 0.45; cursor: default; }
.send__btn span { color: var(--oxblood); }
.send__note { flex: 1 1 16rem; font-size: 0.95rem; line-height: 1.6; color: var(--smoke); }

/* ── what comes back ──────────────────────────────────────────── */

.reply {
  margin-top: clamp(3rem, 7vh, 4.5rem);
  border: 1px solid var(--hairline);
  padding: clamp(1.8rem, 5vw, 2.8rem);
}
.reply[hidden] { display: none; }
.reply__label { margin-bottom: 1.2rem; }
.reply__word {
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}
.reply__body { font-size: 1.08rem; line-height: 1.75; color: rgba(232, 226, 214, 0.8); }
.reply__body + .reply__body { margin-top: 0.9rem; }
.reply__body a { color: var(--bone); text-decoration: none; border-bottom: 1px solid var(--hairline); }
.reply__body a:hover { border-color: var(--oxblood); }
.reply[data-tone="trouble"] { border-color: rgba(122, 31, 43, 0.6); }

.door__else {
  margin-top: clamp(3rem, 7vh, 4.5rem);
  border-top: 1px solid var(--hairline);
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  align-items: baseline;
}
.door__else a { color: var(--bone); text-decoration: none; border-bottom: 1px solid var(--hairline); }
.door__else a:hover { border-color: var(--oxblood); }

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
