/* ==========================================================================
   Tesaria — marketing site styles

   One light theme, on purpose: no dark variant, no theme switch.
   The colours and typefaces are provisional (see DESIGN.md) until the brand
   book settles them. Change the tokens below, not the components.

   Contents: fonts · tokens · base · layout · header · footer · pieces
   (buttons, links, hero, flow, sides, rail, questions, form) · states
   ========================================================================== */

/* --- Fonts -----------------------------------------------------------------
   Self-hosted, SIL OFL 1.1 (assets/fonts/OFL.txt). latin + latin-ext together
   cover Turkish: Ç ç ı Ö ö Ü ü are in latin; Ğ ğ İ Ş ş are in latin-ext.
   latin-ext is declared first so the shared code points resolve to latin. */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext-opsz-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Stand-ins while the files above load, or if they never do. Arial and Times
   New Roman are resized to run about as wide as the web fonts (measured in
   Chromium: Source Sans 3 is 94% of Arial; Source Serif 4 at heading sizes is
   101–110% of Times New Roman) and to sit on the same baseline, so the text
   barely moves when the real fonts arrive. */

@font-face {
  font-family: "Source Sans 3 Fallback";
  src: local("Arial");
  size-adjust: 94%;
  ascent-override: 109%;
  descent-override: 42.6%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Source Serif 4 Fallback";
  src: local("Times New Roman");
  size-adjust: 104%;
  ascent-override: 99.6%;
  descent-override: 32.2%;
  line-gap-override: 0%;
}

/* --- Tokens ---------------------------------------------------------------- */

:root {
  /* Light only. This also stops browsers restyling the page or its form
     controls when the device prefers dark. */
  color-scheme: only light;

  /* Provisional brand samples, read from the logo concept sheet. */
  --fig: #3e2042;
  --porcelain: #f6f3ee;

  /* Colour roles. Contrast against porcelain / white is noted where it matters. */
  --surface: var(--porcelain);
  --surface-raised: #fff;
  --ink: #221a24; /* reading text, 15.3:1 / 16.9:1 */
  --ink-muted: #5b5160; /* secondary text, 6.8:1 / 7.5:1 */
  --action: var(--fig); /* links, buttons, the reservation node, 12.7:1 / 14.1:1 */
  --action-strong: #2a142d; /* hover and pressed */
  --on-action: #fff; /* 14.1:1 on fig */
  --rule: #ddd5ca; /* decorative hairlines only */
  --fold: #a79ba3; /* the dashed centre line, decorative */
  --control-border: #857a89; /* field and button outlines, 3.7:1 / 4.1:1 */
  --danger: #a12a1e; /* errors, 6.6:1 / 7.3:1 */
  --focus: var(--fig);

  /* Type. Headings in the serif, everything else in the sans. */
  --font-serif: "Source Serif 4", "Source Serif 4 Fallback", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", "Source Sans 3 Fallback", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-small: 1rem;
  --text-label: 1.0625rem;
  --text-body: clamp(1.125rem, 1.05rem + 0.3vw, 1.1875rem); /* 18 → 19px */
  --text-lead: clamp(1.25rem, 1.14rem + 0.5vw, 1.4375rem); /* 20 → 23px */
  --text-h3: clamp(1.25rem, 1.2rem + 0.2vw, 1.3125rem); /* 20 → 21px, small headings in the sans */
  --text-h2: clamp(1.75rem, 1.4rem + 1.55vw, 2.625rem); /* 28 → 42px */
  --text-h1: clamp(2.25rem, 1.44rem + 3.1vw, 3.875rem); /* 36 → 62px */

  /* Space. Every page hangs on one centre axis: two halves and the gap
     between them. */
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --container: 72.5rem;
  --half-gap: clamp(3rem, 6vw, 7.5rem);
  --section: clamp(3.25rem, 2rem + 4.5vw, 5.5rem);
  --measure: 34rem;
  --radius: 0.375rem;
}

/* --- Base ------------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* The serif is for the major headings only. */
h1,
h2 {
  font-family: var(--font-serif);
  font-weight: 400;
}

h1,
.as-h1 {
  font-size: var(--text-h1);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

/* A headline in parts. A new sentence always starts its own line; a part
   that continues a sentence does so only where there is room. */
h1 > .sentence {
  display: block;
}

@media (min-width: 48em) {
  h1 > span {
    display: block;
  }
}

h2 {
  font-size: var(--text-h2);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.35;
}

p {
  max-width: var(--measure);
  text-wrap: pretty;
}

a {
  color: var(--action);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--action-strong);
  text-decoration-thickness: 0.14em;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

main {
  flex: 1;
}

/* The skip link lands here; the page itself needs no ring. */
main:focus {
  outline: none;
}

svg {
  flex: none;
}

[hidden] {
  display: none !important;
}

/* --- Layout ---------------------------------------------------------------- */

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

/* Two halves around the centre axis; one column on small screens and when
   text is enlarged (the breakpoint is in em, so zoom collapses it too). */
.halves {
  display: grid;
  row-gap: 1.5rem;
}

.stack > * + * {
  margin-top: 1.25rem;
}

.section__inner {
  padding-block: var(--section);
  border-top: 1px solid var(--rule);
}

/* A section that continues the one above it: no rule, no extra space. */
.section--joined .section__inner {
  padding-top: 0;
  border-top: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: max(var(--gutter), (100% - var(--container)) / 2);
  z-index: 10;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--action);
  color: var(--on-action);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  color: var(--on-action);
  transform: none;
}

/* --- Header ----------------------------------------------------------------
   Three widths:
   - phones (below 48em): logo, the other language, a Menu button; the links,
     both language names and the invitation open under the bar;
   - tablets (48em up): the links follow the logo, both language names sit at
     the right edge;
   - desktop (66em up): the invitation joins them, outlined, so the page's own
     solid invitation stays the one primary action on screen. */

.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.75rem;
  padding-top: 0.875rem;
}

/* The space under the bar belongs to its first row, so it stays the same
   height whether the menu below it is open or closed. */
.site-header__bar > :not(.site-menu) {
  margin-bottom: 0.875rem;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 2.75rem;
  margin-inline-end: auto;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand img {
  display: block;
  width: auto;
  height: 2.5rem;
}

/* Used only if no logo artwork is configured: the name as ordinary text. */
.brand--text {
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1;
}

/* The language switch: both names, each in its own language (.lang), or just
   the other language's name in the phone bar (.lang-compact). */
.lang ul {
  display: flex;
  align-items: center;
}

.lang li {
  display: flex;
  align-items: center;
}

/* A short rule between the two names. */
.lang li + li::before {
  content: "";
  height: 1em;
  margin-inline: 0.25rem;
  border-left: 1px solid var(--control-border);
}

.lang a,
.lang [aria-current],
.lang-compact {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.5rem;
  font-size: var(--text-small);
}

.lang [aria-current] {
  font-weight: 600;
}

.lang a,
.lang-compact {
  color: var(--ink);
  text-decoration: none;
}

.lang-compact {
  font-weight: 500;
}

.lang a:hover,
.lang-compact:hover,
.site-nav a:hover,
.site-footer__nav a:hover {
  color: var(--action);
  text-decoration: underline;
  text-decoration-thickness: 0.09em;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: 600 var(--text-small) / 1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
}

.menu-toggle:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.menu-toggle[aria-expanded="true"] .icon--chevron {
  rotate: 180deg;
}

/* Phones: the menu opens in the page flow under the bar, so it never covers
   what the visitor was reading. Without JavaScript the Menu link goes to the
   same links in the footer instead. */
.site-menu {
  display: none;
  flex-basis: 100%;
  padding-block: 0.25rem 1.5rem;
  border-top: 1px solid var(--rule);
}

.site-header[data-menu-open] .site-menu {
  display: block;
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 3.25rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--action);
  font-weight: 600;
}

.site-menu .lang {
  margin-top: 0.5rem;
  margin-left: -0.5rem;
}

.site-menu__cta {
  width: 100%;
  margin-top: 1rem;
}

@media (min-width: 48em) {
  .site-header__bar {
    flex-wrap: nowrap;
    column-gap: clamp(1.25rem, 3vw, 2.5rem);
  }

  /* The logo is the tallest thing in the bar on every page, so the bar keeps
     one height whether or not the invitation is in it. */
  .brand {
    min-height: 3rem;
    margin-inline-end: 0;
  }

  .brand img {
    height: 2.75rem;
  }

  /* (.site-menu .site-menu__cta outranks .button's own display, set later.) */
  .menu-toggle,
  .lang-compact,
  .site-menu .site-menu__cta {
    display: none;
  }

  .site-menu,
  .site-header[data-menu-open] .site-menu {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    column-gap: 1.5rem;
    min-width: 0;
    margin-bottom: 0.875rem;
    padding: 0;
    border: 0;
  }

  .site-nav ul {
    display: flex;
    column-gap: clamp(1rem, 2.2vw, 1.75rem);
  }

  .site-nav a {
    min-height: 2.75rem;
    border: 0;
    font-size: var(--text-label);
    white-space: nowrap;
  }

  .site-nav a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.45em;
  }

  /* The links follow the logo. The language names hold the right edge on
     every page, with or without the invitation beside them. */
  .site-menu .lang {
    margin: 0 0 0 auto;
  }
}

@media (min-width: 62em) {
  .brand img {
    height: 3rem;
  }
}

@media (min-width: 66em) {
  /* Outlined: the same invitation, one step quieter than the solid one in the
     page below it. */
  .site-menu .site-menu__cta {
    display: inline-flex;
    width: auto;
    min-height: 2.75rem;
    margin-top: 0;
    padding: 0.5rem 1rem;
    border-color: var(--action);
    background: transparent;
    color: var(--action);
    font-size: 1rem;
    white-space: nowrap;
  }

  .site-menu .site-menu__cta {
    margin-left: auto;
  }

  .site-menu .site-menu__cta + .lang {
    margin-left: 0;
  }

  .site-menu .site-menu__cta:hover,
  .site-menu .site-menu__cta:active {
    border-color: var(--action-strong);
    background: var(--action-strong);
    color: var(--on-action);
  }
}

/* --- Footer ---------------------------------------------------------------- */

.site-footer {
  padding-block: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  border-top: 1px solid var(--rule);
}

.site-footer__about p {
  margin-top: 0.375rem;
  color: var(--ink-muted);
  font-size: var(--text-small);
}

.site-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--ink);
  font-size: var(--text-small);
  font-weight: 500;
  text-decoration: none;
}

/* --- Buttons and links ------------------------------------------------------ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.625rem 1.375rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 600 var(--text-label) / 1.25 var(--font-sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button--primary,
.button--primary:hover {
  background: var(--action);
  color: var(--on-action);
}

.button--primary:hover,
.button--primary:active {
  background: var(--action-strong);
}

.button[aria-disabled="true"] {
  cursor: progress;
}

.link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 600;
}

/* --- Hero ------------------------------------------------------------------ */

.hero {
  padding-block: clamp(2.5rem, 1rem + 5.5vw, 5rem) var(--section);
}

/* The booking engine page's diagram follows straight on. */
.hero--product {
  padding-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}

.eyebrow {
  color: var(--action);
  font-size: var(--text-label);
  font-weight: 600;
  line-height: 1.4;
}

.hero .eyebrow,
.hero__meta {
  margin-bottom: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1.25rem;
}

.hero__meta .eyebrow {
  margin-bottom: 0;
}

/* An open ring: under way, not finished. */
.status {
  position: relative;
  padding-left: 1.125rem;
  color: var(--ink-muted);
  font-size: var(--text-label);
  font-weight: 500;
  line-height: 1.4;
}

.status::before {
  content: "";
  position: absolute;
  top: 0.42em;
  left: 0;
  width: 0.5625rem;
  height: 0.5625rem;
  border: 1.5px solid var(--action);
  border-radius: 50%;
}

.lead + .status {
  margin-top: 1rem;
}

.hero__body,
.hero__lead {
  margin-top: clamp(1.5rem, 1rem + 2.2vw, 2.75rem);
}

.hero__body {
  row-gap: 2.5rem;
}

.lead {
  max-width: 36rem;
  font-size: var(--text-lead);
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
  margin-top: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
}

/* --- The diagram: guest → reservation → hotel team --------------------------
   Drawn large on a white panel beside the home introduction: an open ring for
   each person, one filled disc for the reservation, one stroke weight
   throughout. Marks, line and arrowheads are drawn with borders, so they
   survive forced-colours mode, and nothing in it has the shape of a button. */

.figure {
  padding: 2rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.flow {
  --flow-row: 4rem; /* the row the marks sit in */
  --flow-ring: 1.125rem; /* ring radius */
  --flow-disc: 2rem; /* disc radius */
  --flow-clear: 0.375rem; /* clear space between the line and a mark */
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* The line runs from the first mark's centre to the last one's; each mark
   clears a little space around itself. */
.flow::before {
  content: "";
  position: absolute;
  top: calc(var(--flow-row) / 2);
  right: calc(100% / 6);
  left: calc(100% / 6);
  border-top: 2px solid var(--ink);
  translate: 0 -1px;
}

.flow__stop {
  --flow-r: var(--flow-ring);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-align: center;
}

.flow__stop--node {
  --flow-r: var(--flow-disc);
}

.flow__mark {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--flow-row);
  height: var(--flow-row);
}

.flow__mark::before {
  content: "";
  box-sizing: border-box;
  width: calc(var(--flow-r) * 2);
  height: calc(var(--flow-r) * 2);
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--surface-raised);
  box-shadow: 0 0 0 var(--flow-clear) var(--surface-raised);
}

.flow__stop--node .flow__mark::before {
  border: var(--flow-r) solid var(--action);
}

/* Arrowheads: into the reservation, and on into the hotel team. Each one
   stops where the mark's clear space begins. (0.4419rem is how far the tip
   sits from the centre of the rotated square.) */
.flow__stop + .flow__stop::before,
.rail__stop:not(:last-child)::after {
  content: "";
  position: absolute;
  width: 0.625rem;
  height: 0.625rem;
  border-top: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
}

.flow__stop + .flow__stop::before {
  top: calc(var(--flow-row) / 2);
  left: calc(50% - var(--flow-r) - var(--flow-clear) - 0.4419rem);
  translate: -50% -50%;
  rotate: 45deg;
}

.flow__label {
  margin-top: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.flow__stop--node .flow__label {
  color: var(--action);
}

.flow__does {
  margin-top: 0.125rem;
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.35;
  white-space: nowrap;
}

/* Narrow phones, or very large text: smaller, so the three stops still fit
   side by side. */
@media (max-width: 24em) {
  .flow {
    --flow-row: 3.25rem;
    --flow-ring: 0.9375rem;
    --flow-disc: 1.625rem;
  }

  .flow__label {
    font-size: 1rem;
  }

  .flow__does {
    font-size: 0.9375rem;
  }
}

/* Tablets and up: full size. */
@media (min-width: 48em) {
  .figure {
    padding: 2rem 1rem;
  }

  .flow {
    --flow-row: 5rem;
    --flow-ring: 1.375rem;
    --flow-disc: 2.5rem;
  }

  .flow__label {
    font-size: 1.3125rem;
  }

  .flow__does {
    font-size: 1.0625rem;
  }
}

/* --- Two sides: what the guest asks, what the hotel team asks --------------- */

.sides {
  margin-top: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

.sides__grid {
  row-gap: 0;
}

.side {
  padding-block: 1.75rem;
}

.side:first-child {
  padding-top: 0;
}

.side:last-child {
  padding-bottom: 0;
}

.side > h3 {
  margin-bottom: 0.5rem;
}

/* The fold: a dashed line where the guest's half meets the hotel's half. */
.side + .side {
  border-top: 1px dashed var(--fold);
}

/* --- The diagram, as the page: one stop at a time ---------------------------
   The same marks as the home diagram, turned downwards. On phones and tablets
   the axis runs down the left edge. On wide screens it is the page's centre
   axis: each stop's name against it on the left, its text on the right. */

.rail {
  --rail-row: calc(var(--text-h2) * 1.15); /* the name's first line */
  --rail-gap: 2.5rem;
  --rail-x: 0.75rem; /* where the axis runs */
  --rail-ring: 0.5rem;
  --rail-disc: 0.75rem;
  --rail-clear: 0.3125rem;
}

.rail__stop {
  --rail-r: var(--rail-ring);
  --rail-next-r: var(--rail-disc);
  position: relative;
  padding-bottom: var(--rail-gap);
  padding-left: 2.5rem;
}

.rail__stop--node {
  --rail-r: var(--rail-disc);
  --rail-next-r: var(--rail-ring);
}

.rail__stop:last-child {
  padding-bottom: 0;
}

.rail__stop--node .rail__name {
  color: var(--action);
}

/* The stop's mark on the axis: a ring for people, a disc for the reservation. */
.rail__name::before {
  content: "";
  position: absolute;
  top: calc(var(--rail-row) / 2);
  left: var(--rail-x);
  box-sizing: border-box;
  width: calc(var(--rail-r) * 2);
  height: calc(var(--rail-r) * 2);
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 var(--rail-clear) var(--surface);
  translate: -50% -50%;
}

.rail__stop--node .rail__name::before {
  border: var(--rail-r) solid var(--action);
}

/* The line down to the next stop's mark, ending in an arrowhead that stops
   where that mark's clear space begins. */
.rail__stop:not(:last-child)::before {
  content: "";
  position: absolute;
  top: calc(var(--rail-row) / 2);
  bottom: calc(var(--rail-row) / -2);
  left: var(--rail-x);
  border-left: 2px solid var(--ink);
  translate: -1px 0;
}

.rail__stop:not(:last-child)::after {
  bottom: calc(-1 * (var(--rail-row) / 2 - var(--rail-next-r) - var(--rail-clear) - 0.4419rem) - 0.3125rem);
  left: var(--rail-x);
  translate: -50% 0;
  rotate: 135deg;
}

.rail__text {
  margin-top: 0.75rem;
}

.rail__caption {
  font-size: var(--text-lead);
  line-height: 1.5;
}

/* --- Questions -------------------------------------------------------------- */

.faq {
  display: grid;
  margin-top: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

.faq__item {
  padding-block: 1.25rem;
  border-top: 1px solid var(--rule);
}

.faq__item:last-child {
  padding-bottom: 0;
}

.faq__item h3 {
  margin-bottom: 0.375rem;
}

/* --- About: one statement, two principles ----------------------------------- */

.statement {
  max-width: 50rem;
  margin-top: clamp(1.5rem, 1rem + 2.2vw, 2.75rem);
  font-family: var(--font-serif);
  font-size: clamp(1.375rem, 1.1rem + 1.25vw, 1.9375rem);
  line-height: 1.38;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}

.principles {
  row-gap: 2.5rem;
  margin-top: clamp(3rem, 2rem + 4.5vw, 5.5rem);
}

.principle {
  padding-top: 1.25rem;
  border-top: 1.5px solid var(--ink);
}

/* Small headings, so they are set in the sans like every h3. */
.principle h2 {
  margin-bottom: 0.5rem;
  font-family: var(--font-sans);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

/* --- Closing invitation: a question, one sentence, the invitation ---------- */

.closing {
  padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  border-top: 1px solid var(--rule);
  background: var(--surface-raised);
}

.closing__inner {
  display: grid;
  row-gap: 1.5rem;
}

.closing h2 {
  font-size: clamp(1.5rem, 1.32rem + 0.8vw, 1.875rem);
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.closing__text p {
  margin-top: 0.5rem;
}

/* --- Contact form ------------------------------------------------------------ */

.form,
.form__pair {
  display: grid;
  row-gap: 1.5rem;
  max-width: var(--measure);
}

.field__label {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 600;
  line-height: 1.4;
}

.field__optional {
  margin-left: 0.25rem;
  color: var(--ink-muted);
  font-weight: 400;
}

.field__help {
  margin-bottom: 0.625rem;
  color: var(--ink-muted);
  font-size: var(--text-small);
  line-height: 1.5;
}

.field__control {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
}

textarea.field__control {
  min-height: 10rem;
  resize: vertical;
}

.field__control:hover {
  border-color: var(--ink-muted);
}

.field__control:focus-visible {
  border-color: var(--focus);
  outline-offset: 1px;
  border-radius: var(--radius);
}

.field__control[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: inset 0 0 0 1px var(--danger);
}

.field__error {
  margin-top: 0.5rem;
  color: var(--danger);
  font-size: var(--text-small);
  font-weight: 600;
  line-height: 1.45;
}

.form__submit {
  display: grid;
  justify-items: start;
}

/* Dashed, like the fold: this is a draft. It opens the form, so nobody fills
   the fields before learning that nothing is sent. */
.form__notice {
  padding: 0.75rem 1rem;
  border: 1px dashed var(--control-border);
  border-radius: var(--radius);
  font-size: var(--text-small);
  line-height: 1.5;
}

/* Results. The two live regions are always present (never display: none), so
   screen readers hear them fill; empty, they take no room. */
.form__messages > :not(:empty) {
  position: relative;
  padding-left: 1.25rem;
  font-weight: 600;
  line-height: 1.45;
}

.form__messages > :not(:empty)::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 0;
  border: 0.28125rem solid var(--action);
  border-radius: 50%;
}

.form__alert:not(:empty) {
  color: var(--danger);
}

.form__alert:not(:empty)::before {
  border-color: var(--danger);
}

/* --- Two columns, from tablet width ------------------------------------------ */

@media (min-width: 46em) {
  .halves {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--half-gap);
    align-items: start;
  }

  /* The opening of a page stays in one column until there is room for both. */
  .hero__body {
    grid-template-columns: none;
  }

  .sides__grid {
    position: relative;
  }

  /* The fold between the guest's half and the hotel's half. */
  .sides__grid::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    border-left: 1px dashed var(--fold);
  }

  /* 404: the two languages share rows, so headings, text and links line up
     even when one heading wraps. */
  .notfound .side {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    align-content: start;
  }

  /* Both sides share rows, so the two answers start on one line even when
     one question wraps. */
  .side {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    align-content: start;
  }

  .side,
  .side:first-child,
  .side:last-child {
    padding-block: 0;
  }

  /* Questions: the heading on the left, the list on the right. */
  .faq-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--half-gap);
    align-items: start;
  }

  .faq {
    margin-top: 0;
  }

  .faq__item:first-child {
    padding-top: 0.375rem;
    border-top: 0;
  }

  .side + .side {
    border-top: 0;
  }

  .closing__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 3rem;
    align-items: center;
  }

  /* The footer links keep to one row: beside the logo on tablets, starting on
     the centre axis on wide screens. */
  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .site-footer__nav ul {
    display: flex;
    column-gap: 1.75rem;
  }
}

/* --- Wide screens ----------------------------------------------------------- */

@media (min-width: 62em) {
  .hero__body,
  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .site-footer__nav ul {
    column-gap: 2rem;
  }

  /* The diagram's panel starts on the introduction's cap height and ends on
     the invitation's bottom edge. */
  .hero__body:has(.figure) {
    align-items: stretch;
  }

  .figure {
    display: grid;
    align-content: center;
    margin-top: calc(var(--text-lead) * 0.3);
  }

  /* The diagram's axis is the page's centre axis. */
  .rail {
    --rail-gap: 3rem;
    --rail-x: 50%;
    --rail-ring: 0.625rem;
    --rail-disc: 1.125rem;
    --rail-clear: 0.375rem;
  }

  .rail__stop {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--half-gap);
    padding-left: 0;
  }

  /* The name ends, and the text begins, the same distance from the axis. */
  .rail__name {
    margin-right: calc(var(--half-gap) / -2 + 2.25rem);
    text-align: right;
  }

  .rail__text {
    margin-top: 0;
    margin-left: calc(var(--half-gap) / -2 + 2.25rem);
    padding-top: calc((var(--rail-row) - 1.6em) / 2);
  }

  .rail__caption {
    padding-top: calc((var(--rail-row) - 1.5em) / 2);
  }

  .form__pair {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 1.25rem;
    align-items: start;
  }
}

/* --- Widest screens: the questions three across ------------------------------ */

@media (min-width: 75em) {
  .faq-wrap {
    display: block;
  }

  .faq {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(2rem, 4vw, 3.5rem);
    margin-top: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  }

  /* Questions and answers sit on shared rows, so the answers start on one
     line even when a question wraps. */
  .faq__item,
  .faq__item:first-child {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    padding-block: 1.25rem 0;
    border-top: 1px solid var(--rule);
  }
}

/* --- Motion: colour feedback only, and only if the visitor allows it -------- */

@media (prefers-reduced-motion: no-preference) {
  a,
  .button,
  .menu-toggle,
  .field__control {
    transition:
      color 0.12s ease-out,
      background-color 0.12s ease-out,
      border-color 0.12s ease-out;
  }
}
