/* HippoHub – single stylesheet, mobile first (NFR-015). */

/* ---------- Fonts (self-hosted, NFR-007) ---------- */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque-normal.woff2") format("woff2");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */

:root {
  /* Black, white and the logo turquoise, plus coral as second highlight (design.md).
     Text pairs keep a contrast of at least 4.5:1 (NFR-011). */
  --color-brand: #67c4cf; /* logo turquoise – fill or graphic only on light backgrounds */
  --color-brand-strong: #1b7380; /* turquoise for text and links on light backgrounds */
  --color-ink: #11161d;
  --color-ink-muted: #4b5560;
  --color-paper: #ffffff;
  --color-surface: #f3f6f7;
  --color-border: #dde3e6;
  --color-night: #0e1116;
  --color-night-ink: #f4f7f8;
  --color-night-muted: #b3bcc4;
  --color-accent: var(--color-brand); /* primary actions */
  --color-accent-ink: #0e1116;
  --color-highlight: #ff7a59; /* badges, emphasis; fill only on light backgrounds */
  --color-highlight-ink: #11161d;
  --color-focus: #1b7380;
  --color-error: #b3261e; /* text on white 6.5:1 */
  --color-night-link: var(--color-brand);
  --color-night-focus: var(--color-brand);

  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque", var(--font-text);
  --display-weight: 800;
  --display-tracking: -0.02em;
  --h1-min: 2.5rem; /* wide display fonts need smaller values to stay within 320 px (NFR-015) */
  --h1-fluid: 7vw + 1rem;
  --brand-size-s: 1.125rem;
  --heading-weight: 700;

  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-s: 0.75rem;
  --space-m: 1rem;
  --space-l: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;

  --radius-s: 0.5rem;
  --radius-m: 1rem;
  --radius-button: 0.5rem;
  --radius-card: 0.5rem;
  --container: 72rem;

  /* Motion and depth; everything stands still with reduced motion (NFR-014). */
  --motion-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --motion-reveal: 0.5s;
  --motion-hover: 0.15s;
  --motion-fly: 0.9s;
  --motion-fade: 1s; /* tile change on the big screen of the platform (REQ-032) */
  --reveal-distance: 0.75rem;
  --lift: -0.25rem;
  --shadow-raised: 0 0.75rem 1.5rem -0.75rem color-mix(in srgb, var(--color-ink) 35%, transparent);

  /* Hero mosaic: dark enough that hero text keeps 4.5:1 even over a white tile (REQ-002, NFR-011). */
  --mosaic-dim: 84%;
  --mosaic-gap: 3px;
  --media-label-dim: 80%; /* label background on photos, 4.5:1 even over white (REQ-033) */
  --color-device: #2a3038; /* frame of the TV in step 3 */
}

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

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

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

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-paper);
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0 0 var(--space-m);
}

h1 {
  font-size: clamp(var(--h1-min), calc(var(--h1-fluid)), 4.5rem); /* ≥ 56 px on desktop (Konzept §6) */
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
}

h2 {
  font-size: clamp(1.75rem, 3vw + 1rem, 2.75rem);
  font-weight: var(--heading-weight);
  letter-spacing: calc(var(--display-tracking) / 2);
}

h3 {
  font-size: 1.375rem;
  font-weight: var(--heading-weight);
}

p {
  margin: 0 0 var(--space-m);
}

a {
  color: var(--color-brand-strong);
  text-underline-offset: 0.15em;
}

/* `hidden` wins over every display rule below. */
[hidden] {
  display: none !important;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-m);
}

/* Text only for screen readers. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-m);
  top: -4rem;
  z-index: 10;
  padding: var(--space-xs) var(--space-m);
  background: var(--color-paper);
  color: var(--color-ink);
  border-radius: var(--radius-s);
}

.skip-link:focus {
  top: var(--space-m);
}

/* ---------- Sections: dark (hero, big screen) and light ---------- */

.section {
  padding-block: var(--space-2xl);
}

.section--surface {
  background: var(--color-surface);
}

.section--night {
  --color-focus: var(--color-night-focus);
  background: var(--color-night);
  color: var(--color-night-ink);
}

.section--night a:not(.button) {
  color: var(--color-night-link);
}

.section--night .muted {
  color: var(--color-night-muted);
}

.section--night .highlight {
  color: var(--color-highlight); /* text in the highlight colour only on dark backgrounds */
}

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

/* ---------- Buttons and badges ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: var(--space-xs) var(--space-l);
  border: 2px solid transparent;
  border-radius: var(--radius-button);
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button--accent {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.button--accent:hover {
  filter: brightness(1.06);
}

.button--outline {
  border-color: currentColor;
  color: inherit;
  background: transparent;
}

.badge {
  display: inline-block;
  padding: var(--space-2xs) var(--space-s);
  border-radius: 999px;
  background: var(--color-highlight);
  color: var(--color-highlight-ink);
  font-size: 0.8125rem;
  font-weight: 700;
}

.badge--pulse {
  animation: badge-pulse 2.4s ease-in-out infinite; /* REQ-009 */
}

@keyframes badge-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-highlight) 45%, transparent);
  }

  50% {
    box-shadow: 0 0 0 0.4rem color-mix(in srgb, var(--color-highlight) 0%, transparent);
  }
}

/* ---------- Section texts ---------- */

.section__intro {
  max-width: 42rem;
  margin-bottom: var(--space-xl);
  color: var(--color-ink-muted);
}

.section__outro {
  max-width: 42rem;
  margin: var(--space-xl) 0 0;
}

/* ---------- Text blocks ---------- */

.prose > * {
  max-width: 48rem; /* readable line length, left-aligned with the other sections */
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  margin: var(--space-l) 0 var(--space-m);
}

.fact-list {
  display: grid;
  gap: var(--space-xs);
  margin: var(--space-l) 0 0;
  padding: 0;
  list-style: none;
}

.fact-list li {
  position: relative;
  padding-left: 1.75rem;
}

.fact-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: var(--color-brand);
}

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

.hero {
  padding-block: var(--space-2xl) calc(var(--space-2xl) + var(--space-l));
}

.hero__logo {
  width: 4rem;
  margin-bottom: var(--space-l);
}

.hero__subline {
  max-width: 40rem;
  font-size: 1.1875rem;
}

.hero__facts {
  margin: 0;
  font-size: 0.9375rem;
}

.hero__footnote {
  margin: var(--space-2xs) 0 0;
  font-size: 0.8125rem;
}

/* ---------- Hero mosaic (REQ-002) ---------- */

.hero {
  position: relative;
  isolation: isolate; /* the mosaic sits behind the text, above the dark background */
  overflow: hidden;
}

.mosaic {
  --mosaic-columns: 3;
  position: absolute;
  inset: 0;
  z-index: -1;
  display: grid;
  grid-template-columns: repeat(var(--mosaic-columns), 1fr);
  grid-auto-flow: dense;
  align-content: start;
  gap: var(--mosaic-gap);
}

.mosaic::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--color-night) var(--mosaic-dim), transparent);
}

.mosaic__tile {
  position: relative;
  aspect-ratio: 1;
}

.mosaic__tile--big {
  grid-column: span 2;
  grid-row: span 2;
}

.mosaic__tile picture,
.mosaic__tile img,
.slideshow__tile picture,
.slideshow__tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mosaic__tile img,
.slideshow__tile img {
  object-fit: cover;
}

.mosaic__photo--in {
  z-index: 1;
  animation: mosaic-fly-in var(--motion-fly) var(--motion-ease) both;
}

@keyframes mosaic-fly-in {
  from {
    opacity: 0;
    transform: translate(-12%, -18%) rotate(-6deg) scale(1.2);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 40rem) {
  .mosaic {
    --mosaic-columns: 4;
  }
}

@media (min-width: 64rem) {
  .mosaic {
    --mosaic-columns: 6;
  }
}

/* ---------- Steps ---------- */

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps h3 {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.step-number {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--color-highlight);
  color: var(--color-highlight-ink);
  font-size: 1rem;
}

/* ---------- Gallery features ---------- */

.feature-grid {
  display: grid;
  gap: var(--space-l) var(--space-xl);
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-grid h3 {
  margin-bottom: var(--space-2xs);
  font-size: 1.125rem;
}

.feature-grid p {
  margin: 0;
  color: var(--color-ink-muted);
}

@media (min-width: 40rem) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Demo gallery (REQ-007) ---------- */

/* Square tiles in a tight grid, like the guest gallery of the product. */
.demo-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.demo-gallery__note {
  margin: var(--space-s) 0 0;
  font-size: 0.8125rem;
}

@media (min-width: 64rem) {
  .demo-gallery {
    grid-template-columns: repeat(8, 1fr);
  }
}

/* ---------- Closing ---------- */

.closing {
  text-align: left;
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  gap: var(--space-l);
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-s);
  padding: var(--space-l);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-paper);
}

.card > * {
  margin: 0;
}

@media (min-width: 48rem) {
  .card-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Images in sections and cards (REQ-025, NFR-006) ---------- */

.prose > .media-wide {
  max-width: none; /* wider than the text column */
  margin: var(--space-xl) 0;
}

.media-wide picture,
.card__media picture {
  display: block;
}

.media-wide img {
  width: 100%;
  border-radius: var(--radius-m);
}

/* Flush with the card edges above the heading. */
.card > .card__media {
  align-self: stretch;
  margin: calc(-1 * var(--space-l)) calc(-1 * var(--space-l)) var(--space-2xs);
  overflow: hidden;
  border-radius: calc(var(--radius-card) - 1px) calc(var(--radius-card) - 1px) 0 0;
}

.card__media > picture img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* ---------- Label on images made with AI (REQ-033) ---------- */

.media-labelled {
  position: relative;
}

.media-label {
  position: absolute;
  right: var(--space-xs);
  bottom: var(--space-xs);
  margin: 0;
  padding: 0.125rem var(--space-xs);
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-night) var(--media-label-dim), transparent);
  color: var(--color-night-ink);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}

.hero__label {
  right: var(--space-m);
  bottom: var(--space-m);
}

/* ---------- Big screen in step 3, tile view of the platform (REQ-032) ---------- */

.slideshow {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--color-brand) 22%, var(--color-night)), var(--color-night) 70%);
}

.slideshow__screen {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  width: 78%;
  aspect-ratio: 16 / 9;
  border: 0.375rem solid var(--color-device);
  border-radius: 0.375rem;
  background: var(--color-night);
  box-shadow: 0 0 2.5rem color-mix(in srgb, var(--color-brand) 35%, transparent);
}

.slideshow__screen::after {
  content: ""; /* stand */
  position: absolute;
  top: 100%;
  left: 50%;
  width: 22%;
  height: 0.5rem;
  translate: -50% 0.375rem;
  border-radius: 0 0 0.25rem 0.25rem;
  background: var(--color-device);
}

.slideshow__tile {
  position: relative;
  overflow: hidden;
}

.slideshow__photo--in {
  z-index: 1;
  animation: slideshow-fade var(--motion-fade) ease both;
}

@keyframes slideshow-fade {
  from {
    opacity: 0;
  }
}

/* ---------- Plans ---------- */

.plan--recommended {
  border: 2px solid var(--color-highlight);
}

@media (min-width: 48rem) {
  .plan--recommended {
    transform: translateY(-0.5rem); /* slightly raised (Konzept §6) */
  }
}

.plan__price {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: var(--display-weight);
  line-height: 1;
}

.plan__tagline,
.plan__meta,
.plan__note {
  color: var(--color-ink-muted);
}

.plan__note {
  font-size: 0.8125rem;
}

.feature-list {
  display: grid;
  gap: var(--space-xs);
  margin: var(--space-xs) 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 1.25rem;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--color-brand);
}

/* ---------- Games ---------- */

@media (min-width: 48rem) {
  .game--featured {
    grid-column: 1 / -1;
  }
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: var(--space-s);
  max-width: 48rem;
}

.faq details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-paper);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: var(--space-m);
  padding: var(--space-m) var(--space-l);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--color-brand-strong);
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details > p {
  margin: 0;
  padding: 0 var(--space-l) var(--space-m);
}

.plan__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  margin-top: auto;
}

/* ---------- Inquiry dialog (REQ-101 to REQ-109) ---------- */

.inquiry {
  width: min(36rem, calc(100vw - 2 * var(--space-m)));
  max-height: calc(100dvh - 2 * var(--space-m));
  padding: var(--space-l);
  border: 0;
  border-radius: var(--radius-card);
  background: var(--color-paper);
  color: var(--color-ink);
}

.inquiry::backdrop {
  background: color-mix(in srgb, var(--color-night) 70%, transparent);
}

.inquiry__head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: var(--space-m);
}

.inquiry__head h2 {
  font-size: 1.75rem;
}

.inquiry__close {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.field {
  display: grid;
  gap: var(--space-2xs);
  margin-bottom: var(--space-m);
}

.field label {
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: var(--space-xs) var(--space-s);
  border: 1px solid var(--color-ink-muted);
  border-radius: var(--radius-s);
  background: var(--color-paper);
  color: var(--color-ink);
  font: inherit;
}

.field [aria-invalid="true"] {
  border: 2px solid var(--color-error);
}

.field__error {
  margin: 0;
  color: var(--color-error);
  font-size: 0.9375rem;
  font-weight: 600;
}

/* Honeypot: off-screen for people, still filled in by bots (REQ-108). */
.inquiry__trap,
.booking__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.inquiry__privacy {
  font-size: 0.9375rem;
}

.inquiry__status,
.booking__status {
  margin-top: var(--space-m);
  padding: var(--space-m);
  border-radius: var(--radius-s);
  background: var(--color-surface);
}

.inquiry__status--error,
.booking__status--error {
  border-left: 4px solid var(--color-error);
}

.inquiry__status--success,
.booking__status--success {
  border-left: 4px solid var(--color-brand);
}

/* ---------- Booking (REQ-110, REQ-114 to REQ-117) ---------- */

.booking__container {
  max-width: 40rem;
}

.booking h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3rem);
}

.booking__notice {
  padding: var(--space-m);
  border-left: 4px solid var(--color-highlight);
  border-radius: var(--radius-s);
  background: var(--color-surface);
}

.booking__group {
  margin: 0 0 var(--space-l);
  padding: 0;
  border: 0;
}

.booking__group legend {
  margin-bottom: var(--space-s);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: var(--heading-weight);
}

.plan-choice {
  display: grid;
  gap: var(--space-s);
  margin-bottom: var(--space-s);
}

.plan-choice__option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 var(--space-s);
  align-items: center;
  padding: var(--space-s) var(--space-m);
  border: 1px solid var(--color-ink-muted);
  border-radius: var(--radius-s);
  cursor: pointer;
}

.plan-choice__option:has(input:checked) {
  border: 2px solid var(--color-brand-strong);
  background: var(--color-surface);
}

.plan-choice__option input {
  grid-row: span 2;
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--color-brand-strong);
}

.plan-choice__name {
  font-weight: 600;
}

.plan-choice__meta {
  color: var(--color-ink-muted);
}

/* Radio buttons and checkboxes with their text (REQ-115, REQ-124). */
.choice-list {
  display: grid;
  gap: var(--space-xs);
}

.choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-s);
  align-items: center;
  cursor: pointer;
}

.choice--top {
  align-items: start;
}

.choice input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--color-brand-strong);
}

.choice--top input {
  margin-top: 0.15rem;
}

.choice + .field__hint,
.field__hint + .booking__notice {
  margin-top: var(--space-s);
}

.choice-list ~ .field {
  margin-top: var(--space-m);
}

.booking__row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  align-items: start;
  gap: var(--space-s);
}

.field__hint {
  margin: 0;
  font-size: 0.9375rem;
}

.booking__plan {
  margin-bottom: var(--space-l);
}

.booking__plan h3,
.booking__plan p {
  margin: 0;
}

.booking__details {
  display: grid;
  gap: var(--space-2xs) var(--space-m);
  margin: 0 0 var(--space-l);
}

.booking__details dt {
  font-weight: 600;
}

.booking__details dd {
  margin: 0 0 var(--space-xs);
  overflow-wrap: anywhere;
}

@media (min-width: 30rem) {
  .booking__details {
    grid-template-columns: minmax(8rem, auto) 1fr;
  }

  .booking__details dd {
    margin: 0;
  }
}

.booking__multiline {
  white-space: pre-line;
}

.booking__legal {
  padding: var(--space-m);
  border-radius: var(--radius-s);
  background: var(--color-surface);
}

/* ---------- Counter in the big-screen section (REQ-028) ---------- */

.stat-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--space-l);
  margin: var(--space-xl) 0 var(--space-s);
  padding: 0;
  list-style: none;
}

.stat {
  display: grid;
  gap: var(--space-2xs);
}

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw + 1rem, 3.5rem);
  font-weight: var(--display-weight);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--color-brand);
}

.stat-list__note {
  font-size: 0.875rem;
}

/* ---------- Personal area (REQ-111, REQ-120, REQ-122) ---------- */

.account__container {
  max-width: 44rem;
}

.account h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3rem);
}

.account__notice {
  padding: var(--space-m);
  border-left: 4px solid var(--color-highlight);
  border-radius: var(--radius-s);
  background: var(--color-surface);
}

.account__status {
  margin: var(--space-m) 0;
  padding: var(--space-m);
  border-radius: var(--radius-s);
  background: var(--color-surface);
}

.account__status--error {
  border-left: 4px solid var(--color-error);
}

.account__status--success,
.account__status--info {
  border-left: 4px solid var(--color-brand);
}

.account__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-s);
  margin-bottom: var(--space-l);
}

.account__bar p {
  margin: 0;
  overflow-wrap: anywhere;
}

.account__bookings {
  display: grid;
  gap: var(--space-l);
  margin-bottom: var(--space-l);
}

.account-booking {
  align-items: stretch;
}

.account-booking h2 {
  margin: 0;
  font-size: 1.5rem;
}

.account-booking h3 {
  margin: var(--space-m) 0 var(--space-s);
  font-size: 1.125rem;
}

.account-booking__status {
  margin: 0;
}

.account-booking__badge {
  position: static;
  margin-right: var(--space-xs);
}

.account-booking__facts {
  display: grid;
  gap: var(--space-2xs) var(--space-m);
  margin: 0;
}

.account-booking__facts dt {
  font-weight: 600;
}

.account-booking__facts dd {
  margin: 0 0 var(--space-xs);
  overflow-wrap: anywhere;
}

@media (min-width: 30rem) {
  .account-booking__facts {
    grid-template-columns: minmax(8rem, auto) 1fr;
  }

  .account-booking__facts dd {
    margin: 0;
  }
}

.account-booking__secret {
  font-family: ui-monospace, monospace;
}

.link-button {
  margin-left: var(--space-xs);
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-brand-strong);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.subdomain-input {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.subdomain-input input {
  flex: 1;
  min-width: 0;
}

.account-booking__preview {
  max-width: 10rem;
  max-height: 8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  object-fit: contain;
}

.account-booking__games {
  margin: 0 0 var(--space-m);
  padding: 0;
  border: 0;
}

.account-booking__games legend {
  margin-bottom: var(--space-xs);
  font-weight: 600;
}

.account-booking__choice {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 2.75rem;
}

.account-booking__choice input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--color-brand-strong);
}

/* ---------- Legal pages and error page ---------- */

.legal h1,
.not-found h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3rem);
}

.legal h2 {
  margin-top: var(--space-xl);
  font-size: 1.5rem;
}

.legal h3 {
  margin-top: var(--space-l);
  font-size: 1.125rem;
}

.legal ul {
  padding-left: 1.25rem;
}

.not-found__logo {
  width: 7.5rem;
  margin-bottom: var(--space-l);
}

/* ---------- Header ---------- */

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

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-s) var(--space-m);
  padding-block: var(--space-s);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
  color: var(--color-ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--brand-size-s);
  font-weight: var(--display-weight);
}

.brand__logo {
  width: 2rem;
  flex: none;
}

.site-header__demo {
  min-height: 2.5rem;
  padding-inline: var(--space-s);
  font-size: 0.875rem;
}

.site-nav {
  grid-column: 1 / -1;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-s);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.site-nav__list a {
  display: inline-block;
  padding-block: var(--space-2xs);
  color: var(--color-ink);
  font-weight: 600;
  text-decoration: none;
}

.site-nav__list a:hover {
  color: var(--color-brand-strong);
  text-decoration: underline;
}

@media (min-width: 30rem) {
  .brand {
    font-size: 1.375rem;
  }

  .brand__logo {
    width: 2.5rem;
  }

  .site-header__demo {
    padding-inline: var(--space-m);
    font-size: 0.9375rem;
  }

  .site-nav__list {
    gap: var(--space-2xs) var(--space-m);
    font-size: 1rem;
  }
}

@media (min-width: 48rem) {
  .site-header__inner {
    grid-template-columns: auto 1fr auto;
  }

  .site-nav {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .site-header__demo {
    grid-column: 3;
  }
}

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

.site-footer {
  padding-block: var(--space-xl);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  font-size: 0.9375rem;
}

.site-footer__inner {
  display: grid;
  gap: var(--space-m);
}

.site-footer__inner > * {
  margin: 0;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}

.site-footer__brand .brand__logo {
  width: 2rem;
  flex: none;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-l);
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-list a {
  color: var(--color-ink);
}

/* Withdrawal and termination buttons in the footer and the personal area stand out from plain links (REQ-126, REQ-127). */
.contract-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
}

.button--small {
  min-height: 2.75rem;
  padding: var(--space-xs) var(--space-m);
  font-size: 0.9375rem;
}

.site-footer__copyright {
  color: var(--color-ink-muted);
}

/* ---------- Hover and keyboard focus (REQ-031) ---------- */

/* Only what can be clicked reacts, so no card pretends to be a link. */
.button,
.plan,
.faq details {
  transition:
    translate var(--motion-hover) var(--motion-ease),
    box-shadow var(--motion-hover) var(--motion-ease),
    border-color var(--motion-hover) var(--motion-ease),
    filter var(--motion-hover) var(--motion-ease);
}

@media (hover: hover) {
  .button:hover {
    translate: 0 -1px;
  }

  .plan:hover {
    translate: 0 var(--lift);
    box-shadow: var(--shadow-raised);
  }

  .faq details:has(> summary:hover) {
    border-color: var(--color-brand);
  }
}

.plan:has(:focus-visible) {
  translate: 0 var(--lift);
  box-shadow: var(--shadow-raised);
}

/* ---------- Reveal on scroll (REQ-030) ---------- */

/* Set only by reveal.js, so without JavaScript nothing is ever hidden. Comes after the
   hover rules, so its transition wins while a block fades in. */
.reveal--hidden {
  opacity: 0;
  translate: 0 var(--reveal-distance);
}

.reveal--shown {
  transition:
    opacity var(--motion-reveal) var(--motion-ease) var(--reveal-delay, 0ms),
    translate var(--motion-reveal) var(--motion-ease) var(--reveal-delay, 0ms);
}

@media print {
  .reveal--hidden {
    opacity: 1;
    translate: none;
  }
}

/* ---------- Motion (NFR-014) ---------- */

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

  .reveal--hidden {
    opacity: 1;
    translate: none;
  }

  .button,
  .plan {
    translate: none !important;
  }
}
