/* El Fortín Riba-roja — The Concierge Desk
   Walnut desk chapters, ledger-paper reading chapters, brass for every action,
   one hotel-green field for the guarantee. */

/* Self-hosted faces (SIL Open Font License). Archivo: Omnibus-Type; Libre Caslon Text: Impallari Type. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-variable-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Libre Caslon Text";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/libre-caslon-text-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Libre Caslon Text";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/libre-caslon-text-700-latin.woff2") format("woff2");
}

:root {
  --walnut: #2a1f18;
  --walnut-deep: #1c130e;
  --walnut-grain: #35281f;
  --brass: #b08d57;
  --brass-light: #d4b57a;
  --brass-dark: #7a5c2e;
  --ledger: #efe6d2;
  --ledger-deep: #e3d6b8;
  --ledger-rule: rgba(42, 31, 24, 0.14);
  --ink: #1e1611;
  --ink-soft: #6b5744;
  --paper-on-walnut: #c9ad7f;
  --green: #1f4a3c;
  --green-deep: #173a2f;

  --plates: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --book: "Libre Caslon Text", Georgia, "Times New Roman", serif;

  --gutter: clamp(20px, 5vw, 96px);
  --measure: 62ch;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--brass) var(--walnut-deep);
}

body {
  margin: 0;
  background: var(--walnut);
  color: var(--ledger);
  font-family: var(--book);
  font-size: 1.125rem;
  line-height: 1.6;
  caret-color: var(--brass);
  accent-color: var(--brass);
}

::selection {
  background: var(--brass);
  color: var(--walnut-deep);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--walnut-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--brass-dark);
  border: 3px solid var(--walnut-deep);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--plates);
  font-weight: 500;
  font-stretch: 100%;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 3.6vw, 3.25rem);
}

h3 {
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
}

p {
  margin: 0;
  max-width: var(--measure);
}

p + p {
  margin-top: 1.1em;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--brass);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition:
    color 160ms var(--ease-out),
    text-decoration-color 160ms var(--ease-out),
    text-decoration-thickness 160ms var(--ease-out);
}
a:hover,
a:focus-visible {
  text-decoration-thickness: 2px;
  text-decoration-color: var(--brass-light);
}

/* 2.4.13 Focus Appearance (AAA): ≥2px perimeter, ≥3:1 change vs unfocused pixels.
   Brass-light on walnut; ink on ledger paper so the ring stays visible. */
:focus-visible {
  outline: 2px solid var(--brass-light);
  outline-offset: 3px;
}
.chapter--ledger :focus-visible,
.ratecard :focus-visible {
  outline-color: var(--ink);
}

b {
  font-weight: 600;
}

dl {
  margin: 0;
}

dt,
dd {
  margin: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--brass);
  color: var(--walnut-deep);
  font-family: var(--plates);
}
.skip:focus {
  top: 16px;
}

/* Plates: brass, engraved, square. The only action colour. */
.plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border: 0;
  background: var(--brass);
  color: var(--walnut-deep);
  font-family: var(--plates);
  font-size: 0.875rem;
  font-weight: 600;
  font-stretch: 108%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 214, 0.55),
    inset 0 -2px 0 rgba(60, 40, 12, 0.45),
    0 10px 24px -12px rgba(0, 0, 0, 0.6);
  transition:
    background-color 220ms var(--ease-out),
    transform 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out);
}
a.plate:hover,
a.plate:focus-visible {
  text-decoration: none;
}
.plate:hover {
  background: var(--brass-light);
  transform: translateY(-1px);
}
.plate:focus-visible {
  outline: 2px solid var(--ledger);
  outline-offset: 3px;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 214, 0.55),
    inset 0 -2px 0 rgba(60, 40, 12, 0.45),
    0 0 0 5px rgba(26, 18, 14, 0.85);
}
.plate:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 0 rgba(60, 40, 12, 0.45),
    0 4px 12px -8px rgba(0, 0, 0, 0.6);
}
.plate:disabled {
  opacity: 0.55;
  transform: none;
  cursor: wait;
}
.plate--lg {
  min-height: 56px;
  padding: 0 36px;
  font-size: 0.9375rem;
}
.plate__mark {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

/* ---------- masthead ---------- */

.afm-notice {
  position: sticky;
  top: 0;
  z-index: 60;
  width: 100%;
  max-width: none;
  margin: 0;
  background: #fff;
  line-height: 0;
}
.afm-notice img {
  width: 100%;
  max-width: none;
  height: auto;
}
body:has(.afm-notice) {
  --afm-h: calc(100vw * 80 / 2357);
}
body:has(.afm-notice) .window {
  min-height: calc(100svh - var(--afm-h));
}

.masthead {
  position: fixed;
  inset: 0 0 auto 0;
  top: var(--afm-h, 0px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
  color: var(--ledger);
  transition:
    background-color 320ms var(--ease-out),
    box-shadow 320ms var(--ease-out);
}
.masthead.is-solid {
  background: rgba(28, 19, 14, 0.94);
  box-shadow: 0 1px 0 rgba(176, 141, 87, 0.35);
}
.masthead__actions {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}
.masthead__name {
  display: flex;
  align-items: center;
  gap: 0.85em;
  min-width: 0;
  font-family: var(--plates);
  font-weight: 400;
  font-stretch: 100%;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.masthead__logo {
  display: block;
  height: 36px;
  width: auto;
  flex-shrink: 0;
  transition: opacity 200ms var(--ease-out);
}
.masthead__name:hover,
.masthead__name:focus-visible {
  text-decoration: none;
}
.masthead__name span {
  display: none;
  color: var(--paper-on-walnut);
  white-space: nowrap;
}
/* the place-name only appears once the masthead has its own walnut ground */
@media (min-width: 720px) {
  .masthead.is-solid .masthead__name span {
    display: inline;
  }
}
.masthead__talk {
  font-family: var(--plates);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--brass-light);
  padding: 10px 0;
  border-bottom: 2px solid var(--brass);
  transition:
    color 200ms var(--ease-out),
    border-bottom-color 200ms var(--ease-out),
    border-bottom-width 200ms var(--ease-out);
}
.masthead__talk:hover,
.masthead__talk:focus-visible {
  color: var(--ledger);
  border-bottom-color: var(--ledger);
  border-bottom-width: 3px;
  text-decoration: none;
}
.masthead__name:hover .masthead__logo,
.masthead__name:focus-visible .masthead__logo {
  opacity: 0.82;
}
.masthead__name:focus-visible {
  outline: 2px solid var(--brass-light);
  outline-offset: 6px;
}

/* ---------- 1 · the picture window ---------- */

.window {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 0 var(--gutter);
  isolation: isolate;
  overflow: hidden;
  background-color: var(--walnut-deep);
}
.window__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  z-index: -2;
}
.window::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(28, 19, 14, 0.42) 0%, rgba(28, 19, 14, 0.08) 38%, rgba(28, 19, 14, 0.12) 70%, rgba(28, 19, 14, 0.7) 100%);
}
.window__copy {
  display: grid;
  justify-items: center;
  gap: clamp(28px, 3.5vh, 40px);
  padding: 16vh 0;
  text-align: center;
}
.window h1 {
  font-size: clamp(2.75rem, 9vw, 3.75rem);
  font-weight: 500;
  font-stretch: 96%;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: #fbf6ea;
  text-shadow: 0 2px 28px rgba(20, 12, 6, 0.55);
}
@media (min-width: 900px) {
  .window__copy {
    gap: clamp(32px, 4vh, 48px);
    padding: 10vh 0 18vh;
  }
  .window h1 {
    font-size: clamp(4.25rem, 6.8vw, 6.25rem);
    letter-spacing: -0.03em;
    line-height: 1.02;
  }
}
/* Hero CTA: a button under the title, not a second display block. */
.plate--window {
  min-width: 0;
  max-width: 100%;
  min-height: 3.25rem;
  flex-direction: row;
  padding: 0 28px 0 32px;
  gap: 10px;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
}
.plate--window .plate__mark {
  width: 16px;
  height: 16px;
}
.window__sheet {
  position: absolute;
  left: var(--gutter);
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--ledger);
  color: var(--ink);
  font-family: var(--plates);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 20px -10px rgba(20, 12, 6, 0.55);
  transition:
    background-color 200ms var(--ease-out),
    color 200ms var(--ease-out);
}
.window__sheet:hover,
.window__sheet:focus-visible {
  background: var(--ledger-deep);
  color: var(--walnut-deep);
  text-decoration: none;
}
.window__sheet:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
/* ---------- chapters ---------- */

.chapter {
  display: grid;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  padding: clamp(72px, 11vh, 140px) var(--gutter);
}

main > section[id] {
  scroll-margin-top: 88px;
}
@media (min-width: 900px) {
  .chapter {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  }
}
.chapter--ledger {
  background-color: var(--ledger);
  color: var(--ink);
}
.chapter--ledger h2,
.chapter--ledger h3 {
  color: var(--ink);
}
.chapter--ledger a {
  text-decoration-color: var(--brass-dark);
}
.chapter--ledger a:hover,
.chapter--ledger a:focus-visible {
  color: var(--walnut-deep);
  text-decoration-color: var(--ink);
  text-decoration-thickness: 2px;
}
.chapter__text h2 {
  margin-bottom: 28px;
}
.chapter__fact {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--brass);
  font-family: var(--plates);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.place-link {
  display: inline;
  margin: 0;
  padding: 0 0 1px;
  border: 0;
  border-bottom: 2px solid var(--brass-dark);
  background: none;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  outline-offset: 3px;
  transition:
    color 160ms var(--ease-out),
    border-bottom-color 160ms var(--ease-out),
    border-bottom-width 160ms var(--ease-out);
}
.place-link:hover,
.place-link:focus-visible {
  color: var(--walnut-deep);
  border-bottom-color: var(--ink);
  border-bottom-width: 3px;
}
.place-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.chapter__figure {
  margin: 0;
  position: relative;
}
.chapter__figure img {
  width: 100%;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.chapter__figure--drawing img {
  box-shadow: none;
  mix-blend-mode: multiply;
}
.chapter__figure figcaption {
  margin-top: 12px;
  font-family: var(--plates);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}
@media (min-width: 900px) {
  .chapter__figure--bleed {
    margin-right: calc(-1 * var(--gutter));
  }
  .chapter__figure--bleed figcaption {
    padding-right: var(--gutter);
  }
}

/* ---------- the figures ---------- */

.figures {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
  padding: clamp(80px, 12vh, 150px) var(--gutter);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(176, 141, 87, 0.12), transparent 60%),
    var(--green);
  color: var(--ledger);
}
.figures__text h2 {
  margin-bottom: 28px;
}
.figures__text p {
  color: #e7e0cf;
}
.figures__row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
@media (min-width: 900px) {
  .figures__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}
.figures__row li,
.place-gain {
  display: grid;
  gap: 10px;
  padding: 28px 28px 30px;
  background:
    linear-gradient(160deg, #d9bc84 0%, var(--brass) 45%, #a3844f 100%);
  color: var(--walnut-deep);
  font-family: var(--plates);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 214, 0.65),
    inset 0 -2px 0 rgba(60, 40, 12, 0.45),
    0 24px 40px -28px rgba(0, 0, 0, 0.9);
}
.figures__row b,
.place-gain b {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 500;
  font-stretch: 84%;
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.figures__row span,
.place-gain span {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.35;
  max-width: 22ch;
}
.place-gain {
  margin: 0 0 32px;
}
.place-gain span {
  max-width: 28ch;
}

/* ---------- the apartments ---------- */

.suite {
  display: grid;
  gap: clamp(36px, 5vw, 56px);
  padding: clamp(72px, 11vh, 140px) var(--gutter);
  background: var(--walnut);
  color: var(--ledger);
}
.suite__intro h2 {
  margin-bottom: 16px;
}
.suite__intro p {
  color: var(--paper-on-walnut);
}
.suite__gallery {
  position: relative;
}
.suite__photos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}
.suite__photos li {
  margin: 0;
  overflow: hidden;
  background: var(--walnut-deep);
}
.suite__photo--lead {
  grid-column: 1 / -1;
}
.suite__photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.suite__photo--lead img {
  aspect-ratio: 16 / 8;
}
.suite__all {
  margin-top: 20px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid var(--brass);
  background: none;
  color: var(--brass-light);
  font-family: var(--plates);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  padding-bottom: 8px;
  transition:
    color 200ms var(--ease-out),
    border-bottom-color 200ms var(--ease-out);
}
.suite__all:hover,
.suite__all:focus-visible {
  color: var(--ledger);
  border-bottom-color: var(--ledger);
}
@media (min-width: 900px) {
  .suite__photos {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .suite__photo--lead {
    grid-column: 1;
    grid-row: 1 / span 2;
  }
  .suite__photo--lead img {
    aspect-ratio: auto;
    height: 100%;
  }
}

/* ---------- construction status ---------- */

.status {
  padding: clamp(80px, 12vh, 140px) var(--gutter);
  background: var(--walnut-deep);
  color: var(--ledger);
}
.status h2 {
  margin-bottom: 16px;
}
.status p {
  margin: 0;
  font-family: var(--plates);
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 500;
  color: var(--brass-light);
}

/* ---------- 6 · the rate card ---------- */

.ratecard {
  padding: clamp(72px, 11vh, 140px) var(--gutter);
  background-color: var(--ledger);
  color: var(--ink);
}
.ratecard > h2 {
  max-width: 18ch;
  margin-bottom: 16px;
}
.ratecard__lead {
  max-width: 52ch;
  margin: 0 0 48px;
  color: var(--ink-soft);
}
.ratecard__grid {
  display: grid;
  gap: 48px;
}
@media (min-width: 900px) {
  .ratecard__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(32px, 5vw, 80px);
  }
}
.room {
  display: grid;
  gap: 16px;
  align-content: start;
}
.room h3 {
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
  font-size: 2rem;
}
.room__render {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.room__allin {
  margin: 8px 0 0;
  max-width: none;
  font-family: var(--plates);
  line-height: 1.05;
}
.room__allin b {
  display: block;
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 600;
  font-stretch: 88%;
  font-variant-numeric: tabular-nums;
  color: var(--walnut-deep);
}
.stages {
  margin-top: clamp(56px, 8vh, 96px);
  padding-top: 32px;
  border-top: 2px solid var(--ink);
  display: grid;
  gap: 20px;
}
.stages h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}
.instalments {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 900px) {
  .instalments {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.instalments li {
  display: grid;
  gap: 8px;
  padding: 20px 18px 22px;
  background: var(--ledger-deep);
  box-shadow: inset 0 0 0 1px rgba(42, 31, 24, 0.12);
}
.instalments b {
  font-family: var(--plates);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  font-stretch: 88%;
  font-variant-numeric: tabular-nums;
  color: var(--walnut-deep);
  line-height: 1;
}
.instalments span {
  font-family: var(--plates);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* ---------- 7 · the guest book ---------- */

.guestbook {
  display: grid;
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(80px, 12vh, 150px) var(--gutter);
  background:
    radial-gradient(90% 80% at 0% 100%, rgba(176, 141, 87, 0.14), transparent 60%),
    var(--walnut-deep);
  color: var(--ledger);
}
@media (min-width: 900px) {
  .guestbook {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
  }
}
.guestbook__who {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 28px);
}
.guestbook__avatar {
  width: 6.5rem;
  height: 6.5rem;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 42%;
  border: 1.5px solid var(--brass);
}
.guestbook__sub {
  margin-top: 10px;
  font-family: var(--plates);
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--brass-light);
}
@media (max-width: 599px) {
  .guestbook__avatar {
    width: 4.75rem;
    height: 4.75rem;
  }
}
.guestbook__direct {
  margin-top: 32px;
  font-family: var(--plates);
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--paper-on-walnut);
}
.guestbook__direct a {
  color: var(--ledger);
  text-decoration-line: underline;
  text-decoration-color: var(--brass);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.guestbook__direct a:hover,
.guestbook__direct a:focus-visible {
  color: var(--brass-light);
  text-decoration-color: var(--brass-light);
  text-decoration-thickness: 2px;
}
.form {
  display: grid;
  gap: 28px;
}
.form__slips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.field {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}
.field--phone,
.field--wide,
.field--choice,
.form__actions,
.form__status {
  grid-column: 1 / -1;
}
@media (max-width: 640px) {
  .form__slips {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Ledger slips: paper on the desk for anything they write. */
.form__slips .field,
.field--wide {
  padding: 14px 16px 12px;
  background: var(--ledger);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(42, 31, 24, 0.14);
}
.form__slips .field label,
.field--wide label {
  font-family: var(--plates);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--walnut);
}
.form__slips input[type="text"],
.form__slips input[type="email"],
.form__slips input[type="tel"],
.field--wide textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 8px 0 6px;
  border: 0;
  border-bottom: 1px solid var(--brass-dark);
  background: transparent;
  color: var(--ink);
  font-family: var(--book);
  font-size: 1.125rem;
  border-radius: 0;
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.form__slips input::placeholder,
.field--wide textarea::placeholder {
  color: var(--ink-soft);
}
.form__slips .field:focus-within,
.field--wide:focus-within {
  box-shadow: inset 0 0 0 2px var(--brass);
}
.form__slips input:focus,
.field--wide textarea:focus {
  border-bottom-color: var(--brass);
  outline: 0;
}
.form__slips input:focus-visible,
.field--wide textarea:focus-visible {
  outline: 2px solid var(--brass-dark);
  outline-offset: 3px;
}
.form__slips input:-webkit-autofill,
.form__slips input:-webkit-autofill:hover,
.form__slips input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--brass-dark);
  box-shadow: inset 0 0 0 1000px var(--ledger);
  transition: background-color 9999s ease-out;
}
.field--wide textarea {
  resize: vertical;
  min-height: calc(1.65em * 5);
  line-height: 1.65;
  border-bottom: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(1.65em - 1px),
    var(--ledger-rule) calc(1.65em - 1px),
    var(--ledger-rule) 1.65em
  );
  background-attachment: local;
}
.form__slips .field.is-invalid,
.field--wide.is-invalid {
  box-shadow: inset 0 0 0 2px #8a3d28;
}
.form__slips .field.is-invalid input {
  border-bottom-color: #8a3d28;
}
.field__error {
  font-family: var(--plates);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: #8a3d28;
}

/* Unit choice stays on the wood: brass stamps, not paper. */
.field--choice {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.field--choice legend {
  grid-column: 1 / -1;
  font-family: var(--plates);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-on-walnut);
}
.field--choice label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  font-family: var(--book);
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ledger);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--brass);
}
.field--choice label:hover {
  box-shadow: inset 0 0 0 2px var(--brass-light);
  color: var(--brass-light);
}
.field--choice label:has(input:checked) {
  background: rgba(176, 141, 87, 0.16);
  color: var(--brass-light);
  box-shadow: inset 0 0 0 1px var(--brass-light);
}
.field--choice input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--brass);
  background: transparent;
  display: grid;
  place-items: center;
  flex: none;
}
.field--choice input::after {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--brass-light);
  transform: scale(0);
  transition: transform 180ms var(--ease-out);
}
.field--choice input:checked::after {
  transform: scale(1);
}
.field--choice input:focus-visible {
  outline: 2px solid var(--brass-light);
  outline-offset: 3px;
}
@media (max-width: 520px) {
  .field--choice {
    grid-template-columns: minmax(0, 1fr);
  }
}
.form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}
.form__status {
  font-family: var(--plates);
  font-size: 1rem;
  color: var(--brass-light);
  padding-top: 12px;
  border-top: 1px solid rgba(176, 141, 87, 0.4);
}
.form__status.is-error {
  color: #e8c4b4;
}
.form__status a {
  color: var(--brass-light);
}

/* ---------- colophon ---------- */

.colophon {
  padding: 32px var(--gutter) 40px;
  background: var(--walnut-deep);
  border-top: 1px solid rgba(176, 141, 87, 0.3);
  color: var(--paper-on-walnut);
  font-family: var(--plates);
  font-size: 0.8125rem;
  line-height: 1.7;
}
.colophon p {
  max-width: 80ch;
}
.colophon p + p {
  margin-top: 6px;
}
.colophon a {
  color: var(--ledger);
  text-decoration-line: underline;
  text-decoration-color: var(--brass);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.colophon a:hover,
.colophon a:focus-visible,
.colophon [data-consent-settings]:hover,
.colophon [data-consent-settings]:focus-visible {
  color: var(--brass-light);
  text-decoration-color: var(--brass-light);
  text-decoration-thickness: 2px;
}
.colophon [data-consent-settings] {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  color: var(--ledger);
  font: inherit;
  cursor: pointer;
  text-decoration-line: underline;
  text-decoration-color: var(--brass);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* ---------- place map dialog ---------- */

.map-dialog {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: min(920px, calc(100vw - 32px));
  width: 100%;
  color: var(--ledger);
}
.map-dialog::backdrop {
  background: rgba(16, 10, 7, 0.72);
}
.map-dialog__panel {
  background: var(--walnut-deep);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.85);
}
.map-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--brass) 40%, transparent);
}
.map-dialog__head h2 {
  margin: 0;
  font-family: var(--plates);
  font-size: 0.9375rem;
  font-weight: 600;
  font-stretch: 108%;
  letter-spacing: 0.03em;
  color: var(--ledger);
}
.map-dialog__close {
  flex: none;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--brass) 55%, transparent);
  background: transparent;
  color: var(--brass-light);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.map-dialog__close:hover,
.map-dialog__close:focus-visible {
  background: color-mix(in srgb, var(--brass) 18%, transparent);
  color: var(--ledger);
}
.map-dialog__close:focus-visible {
  outline: 2px solid var(--ledger);
  outline-offset: 2px;
}
.map-dialog__frame {
  display: block;
  width: 100%;
  height: min(62vh, 520px);
  border: 0;
  background: #d8d2c4;
}
.map-dialog__foot {
  margin: 0;
  padding: 12px 18px 16px;
  font-family: var(--plates);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
}
.map-dialog__foot a {
  color: var(--ledger);
  text-decoration-line: underline;
  text-decoration-color: var(--brass);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.map-dialog__foot a:hover,
.map-dialog__foot a:focus-visible {
  color: var(--brass-light);
  text-decoration-color: var(--brass-light);
  text-decoration-thickness: 2px;
}

.ext-dialog__fallback {
  display: grid;
  gap: 20px;
  justify-items: start;
  padding: clamp(28px, 5vh, 48px) 24px 32px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brass) 8%, transparent), transparent 40%),
    var(--walnut);
}
.ext-dialog__fallback[hidden] {
  display: none;
}
.ext-dialog__fallback p {
  margin: 0;
  max-width: 42ch;
  font-family: var(--book);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ledger);
}
.map-dialog__frame[hidden] {
  display: none;
}

.receipt-dialog {
  max-width: min(28rem, calc(100vw - 32px));
}
.receipt__body {
  display: grid;
  justify-items: start;
  gap: 20px;
  padding: clamp(28px, 5vh, 48px) 24px 32px;
}
.receipt__mark {
  display: block;
  width: 48px;
  height: 48px;
  color: var(--brass-light);
}
.receipt__mark svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.receipt__mark path {
  stroke-dasharray: 28;
  stroke-dashoffset: 0;
}
.receipt-dialog[open] .receipt__mark path {
  animation: receipt-tick 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.receipt__body p {
  margin: 0;
  max-width: 36ch;
  font-family: var(--book);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ledger);
}
@keyframes receipt-tick {
  from {
    stroke-dashoffset: 28;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .receipt-dialog[open] .receipt__mark path {
    animation: none;
  }
}

/* ---------- photograph album ---------- */

.album-dialog {
  max-width: min(1180px, calc(100vw - 20px));
  height: min(92vh, 920px);
  max-height: min(92vh, 920px);
  overflow: hidden;
}
.album-dialog:focus {
  outline: none;
}
.album-dialog .map-dialog__panel {
  height: 100%;
  max-height: inherit;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.album__head h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.75em;
  min-width: 0;
}
.album__head time {
  font-weight: 500;
  font-stretch: 100%;
  letter-spacing: 0.04em;
  color: var(--brass-light);
}
.album__panes {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--brass) var(--walnut-deep);
}
.album__pane {
  padding: 16px 18px 28px;
  min-width: 0;
  overflow-x: hidden;
}
.album__pane + .album__pane {
  border-top: 1px solid color-mix(in srgb, var(--brass) 40%, transparent);
}
.album__pane h3 {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 0 14px;
  padding: 2px 0 10px;
  background: var(--walnut-deep);
  font-family: var(--plates);
  font-size: 0.8125rem;
  font-weight: 600;
  font-stretch: 108%;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-light);
}
.album__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.album__grid li {
  min-width: 0;
}
.album__grid img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
.album__grid--captioned {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 18px 12px;
}
.album__grid--captioned li {
  display: grid;
  gap: 8px;
}
.album__grid--captioned img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.album__grid--captioned p {
  margin: 0;
  font-family: var(--plates);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--paper-on-walnut);
}
@media (min-width: 800px) {
  .album__panes {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    overflow: hidden;
  }
  .album__panes:has(.album__pane--wide) {
    grid-template-columns: minmax(0, 1fr);
    overflow-y: auto;
  }
  .album__pane {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: var(--brass) var(--walnut-deep);
  }
  .album__pane + .album__pane {
    border-top: 0;
    border-left: 1px solid color-mix(in srgb, var(--brass) 40%, transparent);
  }
}
@media (max-width: 720px) {
  .album-dialog {
    max-width: 100vw;
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
  }
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
