/* The website of the platform (#311) on the design system (ADR 0015): tokens, fonts, the
   defaults of the elements and the components come from _content/Backoffice.DesignSystem/, and
   this file lays out the pages with its roles only. Head and title of each page stand on
   Röstbraun, the surface of the brand, with the logo in its dark version, so the first screen of
   the start page is Röstbraun; Vollkorn stands only in the titles, the text is Atkinson
   Hyperlegible Next (decision E16; docs/research/design-system.md, sections 4.1 and 6.2). The
   pages follow the setting of the device, light or dark, as their element html carries
   data-theme="device" (tokens.css). The start page follows variant A of
   docs/research/landing-page.md (7.1): one column of text like a letter, sections as prose,
   lists and tables, apart by space and not by rules (design-system.md, 6.2, rule 5). */

/* The main content grows, so that the footer stands at the bottom of the window on a short page
   (#376, finding 1). */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* Anchors of the start page land below the top of the window, not under it (WCAG 2.4.11). Words
   of eight letters stay whole, so the name restaroo does not break as "resta-roo"; base.css
   hyphenates words from eight letters on (design-system.md, section 4.4). */
html {
  scroll-padding-top: var(--rr-space-4);
  hyphenate-limit-chars: 9 4 3;
}

/* Bands as wide as the window, their content at most 44rem wide, about 70 characters a line
   (section 5.2). */
.site-header,
.site-intro,
.site-content,
.site-section,
.site-footer {
  padding-inline: max(var(--rr-space-4), calc((100% - 44rem) / 2));
}

.site-header,
.site-intro {
  background: var(--rr-surface-brand);
  color: var(--rr-text-on-brand);
}

.site-header :focus-visible,
.site-intro :focus-visible {
  outline-color: var(--rr-accent-on-brand);
}

.site-header a,
.site-intro a {
  color: var(--rr-accent-on-brand);
}

/* The logo on the left; on the start page the navigation to its sections beside it, or below it
   on a narrow screen. */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--rr-space-5);
  padding-top: var(--rr-space-5);
}

/* brand/README.md asks for at least 120 px width and, on every side, free space as high as the
   "o", which is about 10 px at 120 px width and so about 13.5 px at 162 px. The link leaves
   15.75 px on three sides; on the left lies the margin of the page. */
.logo {
  display: inline-block;
  padding: 0.875rem 0.875rem 0.875rem 0;
  border-radius: var(--rr-radius-control);
}

.logo img {
  display: block;
  width: 162px;
  height: 40px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--rr-target-gap) var(--rr-space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Links of the navigation as targets of the pointer (decision E11), underlined on hover. */
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--rr-target-size);
  font: var(--rr-font-text-md-strong);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--rr-text-on-brand);
  text-decoration: underline;
}

.site-intro {
  padding-top: var(--rr-space-5);
  padding-bottom: var(--rr-space-7);
}

/* The first screen of the start page: Röstbraun down to below the call to action (section 6.2,
   rule 1). Its height comes from its content (landing-page.md, 3.2). */
.site-intro-home {
  padding-top: var(--rr-space-6);
}

.site-intro h1 {
  margin: 0;
  font: var(--rr-font-display);
  color: var(--rr-text-on-brand);
  -webkit-hyphens: manual;
  hyphens: manual;
  text-wrap: balance;
}

.lead {
  max-width: 38rem;
  margin: var(--rr-space-5) 0 0;
  font: var(--rr-font-text-lg);
}

/* The one call to action, "Anfrage senden" (decision #393), and the link to the state beside
   it. */
.site-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--rr-space-3) var(--rr-space-5);
  margin: var(--rr-space-6) 0 0;
}

/* On Röstbraun the accent of the action is Kürbis and the text Röstbraun, the pair
   accent-on-brand and surface-brand (ContrastPairs); as high as the pointer asks, with the inner
   space of a button (decision E11; .rr-button in components.css), but wider. */
.site-intro a.site-action {
  display: inline-flex;
  align-items: center;
  min-height: var(--rr-target-size);
  padding: calc(var(--rr-control-padding-block) - 1px) calc(var(--rr-space-5) - 1px);
  border: 1px solid var(--rr-accent-on-brand);
  border-radius: var(--rr-radius-control);
  background: var(--rr-accent-on-brand);
  color: var(--rr-surface-brand);
  font: var(--rr-font-text-md-strong);
  line-height: var(--rr-line-height-control);
  text-decoration: none;
  -webkit-hyphens: manual;
  hyphens: manual;
}

.site-intro a.site-action:hover {
  border-color: var(--rr-text-on-brand);
  background: var(--rr-text-on-brand);
}

.site-actions-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--rr-target-size);
  font: var(--rr-font-text-md-strong);
}

.site-status {
  margin: var(--rr-space-5) 0 0;
  font: var(--rr-font-text-sm);
}

.site-content {
  padding-top: var(--rr-space-6);
  padding-bottom: var(--rr-space-7);
}

/* The sections of the start page, apart by space alone. The state and the inquiry stand on the
   sunken surface, so the two places that matter for a decision are found when scrolling. */
.site-section {
  padding-block: var(--rr-space-7);
}

.site-section-sunken {
  background: var(--rr-surface-sunken);
}

.site-content h2,
.site-section h2 {
  font: var(--rr-font-heading-md);
  font-family: var(--rr-font-family-heading);
  font-weight: 700;
  color: var(--rr-heading);
}

/* Headings break between words only. */
.site-section h2 {
  margin: 0 0 var(--rr-space-4);
  -webkit-hyphens: manual;
  hyphens: manual;
  text-wrap: balance;
}

.site-section h3 {
  color: var(--rr-heading);
}

.site-content > :first-child {
  margin-top: 0;
}

.site-section > :last-child {
  margin-bottom: 0;
}

/* A list that continues the sentence above it (landing-page.md, 7.2, "Bedingung"). */
.site-list-lead {
  margin-bottom: var(--rr-space-1);
}

.site-list li + li {
  margin-top: var(--rr-space-1);
}

/* Who leads what, with or without a reservation system: the cells start at the top of their
   row, and the heading of a row keeps its word whole and the rule above it, as a cell does. */
.site-compare th[scope="row"] {
  border-top: 1px solid var(--rr-border-subtle);
  background: var(--rr-surface-raised);
  color: var(--rr-text);
  -webkit-hyphens: manual;
  hyphens: manual;
}

.site-compare th[scope="row"],
.site-compare td {
  padding-block: var(--rr-space-2);
  vertical-align: top;
}

/* On a narrow screen the table scrolls in its own area (components.css) rather than squeeze its
   sentences into a dozen letters a line. */
.site-compare td {
  min-width: 11rem;
}

/* "Für welches Restaurant": the situation in bold, the answer below it. */
.site-cases {
  margin-top: var(--rr-space-5);
}

.site-cases dt {
  margin-top: var(--rr-space-4);
  font: var(--rr-font-text-md-strong);
}

.site-cases dt:first-child {
  margin-top: 0;
}

.site-cases dd {
  margin: var(--rr-space-1) 0 0;
}

.site-state td {
  padding-block: var(--rr-space-2);
}

/* The condition over the rows that hold only when restaroo leads the reservations
   (landing-page.md, 7.2). */
.site-state th[scope="rowgroup"] {
  border-top: 1px solid var(--rr-border-subtle);
  color: var(--rr-text);
}

.site-state td:last-child {
  font-weight: 600;
  white-space: nowrap;
}

/* The steps: the numbers in Vollkorn beside the text, without boxes, in the colour of the
   headings, as Kürbis marks only actions, links, focus and selection (design-system.md, 3.1). */
.site-steps {
  display: grid;
  gap: var(--rr-space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.site-steps li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--rr-space-3);
  counter-increment: step;
}

/* Lining figures: the old-style 1 of Vollkorn looks like an I. */
.site-steps li::before {
  content: counter(step);
  color: var(--rr-heading);
  font: var(--rr-font-heading-lg);
  font-weight: 700;
  font-variant-numeric: lining-nums;
  line-height: 1;
}

.site-steps strong {
  display: block;
  font: var(--rr-font-text-md-strong);
}

/* The questions apart by space, without rules between them; each opens on a click and is as
   high as the pointer asks (decision E11). */
.site-faq details + details {
  margin-top: var(--rr-space-2);
}

.site-faq summary {
  min-height: var(--rr-target-size);
  padding-block: var(--rr-space-2);
  font: var(--rr-font-text-md-strong);
  cursor: pointer;
}

.site-faq details p {
  margin: var(--rr-space-1) 0 var(--rr-space-4);
}

/* The call to action at the end of the inquiry (landing-page.md, 7.4, point 1). */
.site-final-action {
  margin: var(--rr-space-5) 0 0;
}

dt {
  font-weight: 600;
}

dd {
  margin: 0 0 var(--rr-space-3);
}

/* Text that the human writes before the website of the platform goes live (#311, criterion
   4), in the colour of the text, also inside a link or a button, where the colour of the
   link or of the button would not hold its contrast on Rahm (#401, finding 21). */
.placeholder {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border: 1px dashed var(--rr-accent);
  background: var(--rr-surface-selected);
  color: var(--rr-text);
  font-weight: 600;
}

.site-footer {
  padding-top: var(--rr-space-5);
  padding-bottom: var(--rr-space-6);
  border-top: 1px solid var(--rr-border-subtle);
  background: var(--rr-surface-sunken);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--rr-space-2) var(--rr-space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Links of the footer as targets of the pointer (decision E11). */
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--rr-target-size);
}
