/* ==========================================================================
   bullawa.cz – styles
   Colors, type and logo rules follow the brand strategy (see CLAUDE file).
   ========================================================================== */

:root {
  /* Brand palette */
  --color-primary: #7C3AED;      /* Royal Purple: logo N, buttons, H1 */
  --color-accent: #A78BFA;       /* Light Purple: decoration only on light bg (2.7:1) */
  --color-text: #2C3E50;         /* Charcoal */
  --color-bg-subtle: #ECF0F1;    /* Light Grey */
  --color-on-dark-1: #EDE9FE;
  --color-on-dark-2: #C4B5FD;
  --color-on-dark-text: #FFFFFF;

  /* Derived from the palette */
  --color-bg: #FFFFFF;
  --color-text-muted: #5A6B7D;     /* Charcoal tint: 5.5:1 on white, 4.8:1 on Light Grey */
  --color-border-strong: #8796A5;  /* 3:1 on white, for form controls */
  --color-dim: rgba(44, 62, 80, 0.18);
  --color-accent-soft: rgba(167, 139, 250, 0.3);
  --color-primary-soft: rgba(124, 58, 237, 0.09);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container: 1160px;
  --gutter: clamp(20px, 5vw, 40px);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-soft: 0 1px 2px rgba(44, 62, 80, 0.04), 0 10px 30px rgba(44, 62, 80, 0.07);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --section-space: clamp(80px, 11vw, 144px);
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  color: var(--color-primary);
  font-size: clamp(2.25rem, 1.35rem + 3.6vw, 3.25rem); /* 36 → 52 px */
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h2 {
  color: var(--color-text);
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.25rem); /* 28 → 36 px */
}

h3 {
  color: var(--color-text);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); /* 20 → 24 px */
  font-weight: 600;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

a {
  color: var(--color-primary);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
}

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

strong {
  font-weight: 600;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--color-text);
  color: var(--color-on-dark-text);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Placeholder for content that still has to be supplied */
.todo {
  padding: 0 0.3em;
  border: 1px dashed var(--color-accent);
  border-radius: 4px;
  background: var(--color-accent-soft);
  color: var(--color-text);
  font-size: 0.95em;
  font-weight: 500;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--color-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  color: var(--color-text);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.6;
}

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

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.5rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background-color 0.2s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-on-dark-text);
}

.btn--primary:hover {
  box-shadow: 0 0 0 4px var(--color-accent-soft);
}

.btn--ghost {
  border-color: var(--color-primary);
  background: transparent;
  color: var(--color-primary);
}

.btn--ghost:hover {
  background: var(--color-primary-soft);
}

.btn--sm {
  min-height: 44px;
  padding: 0 1.125rem;
  font-size: 0.9375rem;
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  cursor: progress;
  opacity: 0.7;
  transform: none;
}

/* --------------------------------------------------------------------------
   Logo (inline SVG, colors set through custom properties)
   -------------------------------------------------------------------------- */

.brand {
  display: inline-block;
  flex: none;
  line-height: 0;
}

.logo {
  width: 220px;
  min-width: 200px; /* brand rule: full logo never narrower than 200 px */
  height: auto;
  --logo-n: var(--color-primary);
  --logo-curve: var(--color-accent);
  --logo-sep: var(--color-bg-subtle);
  --logo-text: var(--color-text);
}

.logo--dark {
  --logo-n: var(--color-on-dark-1);
  --logo-curve: var(--color-accent);
  --logo-sep: rgba(236, 240, 241, 0.4);
  --logo-text: var(--color-on-dark-text);
}

/* --------------------------------------------------------------------------
   Scroll progress
   -------------------------------------------------------------------------- */

.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 70;
  height: 3px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

@supports (animation-timeline: scroll()) {
  .progress {
    animation: progress-grow linear both;
    animation-timeline: scroll(root);
  }
}

@keyframes progress-grow {
  to {
    transform: scaleX(1);
  }
}

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

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px; /* brand rule: 40 px clear space around the logo */
  padding-block: 40px;
}

.site-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--color-text);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--color-bg-subtle);
  color: var(--color-primary);
}

.site-header__end {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-link {
  color: var(--color-text);
  font-weight: 500;
  text-decoration: none;
}

.back-link:hover {
  color: var(--color-primary);
}

@media (max-width: 899px) {
  .site-nav {
    display: none;
  }
}

@media (max-width: 439px) {
  .site-header__cta {
    display: none;
  }
}

/* Floating navigation, appears after the hero */
.pill {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--color-bg-subtle);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 30px rgba(44, 62, 80, 0.1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -16px);
  transition: opacity 0.3s, transform 0.4s var(--ease-out), visibility 0s linear 0.4s;
}

.pill.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 0.3s, transform 0.4s var(--ease-out), visibility 0s;
}

.pill a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--color-text);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}

.pill a:hover,
.pill a.is-active {
  background: var(--color-bg-subtle);
  color: var(--color-primary);
}

.pill a.pill__cta,
.pill a.pill__cta:hover,
.pill a.pill__cta.is-active {
  margin-left: 6px;
  background: var(--color-primary);
  color: var(--color-on-dark-text);
}

.site-nav a.is-active {
  color: var(--color-primary);
}

/* Floating contact button on small screens */
.fab {
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 60;
  box-shadow: 0 10px 30px rgba(44, 62, 80, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
  transition: opacity 0.3s, transform 0.4s var(--ease-out), visibility 0s linear 0.4s;
}

.fab.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 0.3s, transform 0.4s var(--ease-out), visibility 0s;
}

.cookie-open .fab {
  opacity: 0;
  visibility: hidden;
}

@media (max-width: 899px) {
  .pill {
    display: none;
  }
}

@media (min-width: 900px) {
  .fab {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */

[data-reveal] {
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}

.js [data-reveal]:not(.is-visible) {
  opacity: 0;
  transform: translateY(28px);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

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

.section--subtle {
  background: var(--color-bg-subtle);
  --check-bg: var(--color-bg);
}

.section--dark {
  background: var(--color-text);
  color: var(--color-on-dark-1);
}

.section--dark h2,
.section--dark h3 {
  color: var(--color-on-dark-text);
}

.section--dark .eyebrow {
  color: var(--color-on-dark-2);
}

.section--dark .lead {
  color: var(--color-on-dark-text);
}

.section--dark a {
  color: var(--color-on-dark-2);
}

.section--dark :focus-visible {
  outline-color: var(--color-on-dark-2);
}

.section__head {
  max-width: 720px;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.split {
  display: grid;
  gap: 48px;
}

@media (min-width: 960px) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(56px, 7vw, 96px);
  }

  .sticky {
    position: sticky;
    top: 112px;
  }
}

/* Checklist with check icons */
.checklist {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 30px;
}

.checklist li::before {
  content: "";
  position: absolute;
  top: 0.2em;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--check-bg, var(--color-bg-subtle))
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.5L14 7.5' fill='none' stroke='%237C3AED' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 20px no-repeat;
}

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

.hero {
  padding-block: clamp(16px, 4vw, 48px) var(--section-space);
}

.hero h1 {
  max-width: 14ch;
  margin-bottom: 24px;
}

.hero .lead {
  max-width: 34em;
  margin-bottom: 32px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Approach
   -------------------------------------------------------------------------- */

.statement {
  max-width: 22ch;
  margin-bottom: clamp(28px, 4vw, 40px);
  font-size: clamp(1.875rem, 1.1rem + 3.2vw, 2.875rem); /* stays below H1 */
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.statement .hl {
  color: var(--color-primary);
}

.statement.is-split .w {
  color: var(--color-dim);
  transition: color 0.35s ease;
}

.statement.is-split .w.on {
  color: var(--color-text);
}

.statement.is-split .hl .w.on {
  color: var(--color-primary);
}

.approach__intro {
  max-width: 40em;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.principle {
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--color-bg-subtle);
  border-radius: var(--radius);
  background: var(--color-bg);
  transition: border-color 0.3s, transform 0.3s var(--ease-out), opacity 0.8s var(--ease-out);
}

.principle:hover {
  border-color: var(--color-accent);
}

.principle__num {
  display: block;
  margin-bottom: 20px;
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.principle h3 {
  font-size: 1.25rem;
}

.principle p {
  margin: 0;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */

.services {
  display: grid;
  gap: 20px;
}

.service {
  padding: clamp(24px, 3.5vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
}

.service__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.service__head h3 {
  margin: 0;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--color-accent);
  color: var(--color-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.service > p {
  margin-bottom: 20px;
  color: var(--color-text-muted);
}

.service .checklist {
  margin-bottom: 24px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--color-bg-subtle);
  font-size: 0.8125rem;
  font-weight: 500;
}

.service--partner {
  border: 2px dashed var(--color-accent);
  background: transparent;
}

.service--partner h3 {
  margin-bottom: 24px;
}

.partner-areas {
  display: grid;
  gap: 20px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

@media (min-width: 600px) {
  .partner-areas {
    grid-template-columns: 1fr 1fr;
  }
}

.partner-areas li {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--color-bg);
}

.partner-areas h4 {
  margin-bottom: 6px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.partner-areas p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.partner-note {
  margin: 0;
  padding-left: 16px;
  border-left: 3px solid var(--color-accent);
}

.services__aside p {
  max-width: 30em;
  color: var(--color-text-muted);
}

.services__aside .btn {
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Process timeline
   -------------------------------------------------------------------------- */

.timeline {
  --p: 1;
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.js .timeline {
  --p: 0;
}

.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  top: 20px;
  bottom: var(--line-end, 20px);
  left: 19px;
  width: 2px;
  border-radius: 2px;
}

.timeline::before {
  background: var(--color-bg-subtle);
}

.timeline::after {
  background: var(--color-primary);
  transform: scaleY(var(--p));
  transform-origin: 50% 0;
}

.step {
  position: relative;
  padding: 0 0 clamp(40px, 6vw, 64px) 68px;
}

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

.step__marker {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-on-dark-text);
  font-weight: 700;
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.js .step:not(.is-active) .step__marker {
  background: var(--color-bg);
  box-shadow: inset 0 0 0 2px var(--color-bg-subtle);
  color: var(--color-text-muted);
}

.step__body {
  transition: opacity 0.4s;
}

.js .step:not(.is-active) .step__body {
  opacity: 0.55;
}

.step h3 {
  margin: 0 0 16px;
  padding-top: 5px; /* centres the first line against the 40 px marker */
}

.process__aside p {
  max-width: 30em;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about__text {
  max-width: 760px;
}

.about__text p {
  max-width: 38em;
}

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

.contact {
  display: grid;
  gap: 48px;
  align-items: start;
}

@media (min-width: 960px) {
  .contact {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(56px, 7vw, 96px);
  }
}

.contact__alt {
  display: grid;
  gap: 8px;
  margin: 32px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  list-style: none;
}

.contact__alt .todo {
  color: var(--color-on-dark-text);
}

/* Form */
.form {
  position: relative;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  color: var(--color-text);
}

.form a {
  color: var(--color-primary);
}

.form :focus-visible {
  outline-color: var(--color-primary);
}

.form__row {
  display: grid;
  gap: 20px;
}

@media (min-width: 600px) {
  .form__row {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  margin-bottom: 20px;
}

.field label,
.field legend {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.field .optional {
  color: var(--color-text-muted);
  font-weight: 400;
}

.req {
  color: var(--color-primary);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  font-size: 1rem; /* 16 px prevents zoom on iOS */
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-accent-soft);
  outline: none;
}

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

.field__error {
  margin: 6px 0 0;
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
}

.field__error:empty {
  display: none;
}

.field__error::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-on-dark-text);
  font-size: 0.75rem;
  vertical-align: 1px;
}

fieldset.field {
  margin-inline: 0;
  padding: 0;
  border: 0;
}

.choice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1.5px solid var(--color-border-strong);
  border-radius: 999px;
  font-size: 0.9375rem;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.choice input:checked + span {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 600;
}

.choice input:checked + span::before {
  content: "✓";
}

.choice input:focus-visible + span {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.form__hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__note {
  margin: 4px 0 20px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.form__status {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  background: var(--color-bg-subtle);
  font-weight: 500;
}

.form__status[data-type="error"] {
  border-left-color: var(--color-text);
}

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

.site-footer {
  padding-block: 64px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--color-text);
  color: var(--color-on-dark-1);
  font-size: 0.9375rem;
}

.site-footer a,
.site-footer .link-button {
  color: var(--color-on-dark-1);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer .link-button:hover {
  color: var(--color-on-dark-text);
  text-decoration: underline;
}

.site-footer :focus-visible {
  outline-color: var(--color-on-dark-2);
}

.footer__grid {
  display: grid;
  gap: 40px;
}

@media (min-width: 760px) {
  .footer__grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  }
}

.footer__brand .brand {
  margin-bottom: 24px;
}

.footer__bio {
  max-width: 30em;
  margin: 0;
}

.footer__title {
  margin: 0 0 12px;
  color: var(--color-on-dark-2);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.link-button--inline {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.footer__legal {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--color-on-dark-2);
  font-size: 0.875rem;
}

.footer__legal p {
  margin: 0;
}

.footer__legal .todo {
  color: var(--color-on-dark-text);
}

/* --------------------------------------------------------------------------
   Cookie banner
   -------------------------------------------------------------------------- */

.cookie {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 90;
  width: calc(100% - 32px);
  max-width: 460px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--color-bg-subtle);
  border-radius: 20px;
  background: var(--color-bg);
  box-shadow: 0 18px 50px rgba(44, 62, 80, 0.22);
  color: var(--color-text);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s, transform 0.4s var(--ease-out);
}

.cookie.is-open {
  opacity: 1;
  transform: none;
}

.cookie[hidden] {
  display: none;
}

@media (max-width: 599px) {
  .cookie {
    bottom: 12px;
    left: 12px;
    width: calc(100% - 24px);
    padding: 20px;
  }
}

.cookie__title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 700;
}

.cookie__text {
  margin: 0 0 20px;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.cookie__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cookie__actions[hidden],
.cookie__settings[hidden],
.cookie__link[hidden] {
  display: none;
}

.cookie__actions .btn {
  padding-inline: 12px;
}

.cookie__link {
  margin-top: 14px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--color-primary);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.cookie__opts {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.cookie__opt {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--color-bg-subtle);
}

.cookie__opt label {
  cursor: pointer;
}

.cookie__opt-title {
  display: block;
  font-weight: 600;
}

.cookie__opt-desc {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  margin: 2px 0 0;
  border-radius: 999px;
  background: var(--color-border-strong);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background-color 0.2s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-bg);
  transition: transform 0.2s var(--ease-out);
}

.switch:checked {
  background: var(--color-primary);
}

.switch:checked::after {
  transform: translateX(18px);
}

.switch:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* --------------------------------------------------------------------------
   Legal page
   -------------------------------------------------------------------------- */

.legal {
  max-width: 780px;
  padding-block: clamp(16px, 4vw, 48px) var(--section-space);
}

.legal h1 {
  max-width: none;
  margin-bottom: 16px;
}

.legal h2 {
  margin-top: clamp(48px, 7vw, 72px);
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
}

.legal h3 {
  margin-top: 32px;
  font-size: 1.25rem;
}

.legal ul,
.legal ol {
  padding-left: 1.25em;
}

.legal li {
  margin-bottom: 6px;
}

.legal__toc {
  margin: 40px 0 0;
  padding: 24px 28px;
  border-radius: var(--radius);
  background: var(--color-bg-subtle);
}

.legal__toc p {
  margin-bottom: 8px;
  font-weight: 600;
}

.legal__toc ol {
  margin: 0;
}

.legal__box {
  margin: 20px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-sm);
  background: var(--color-bg-subtle);
}

.legal__box p:last-child {
  margin-bottom: 0;
}

.table-wrap {
  margin: 20px 0;
  overflow: hidden;
  border: 1px solid var(--color-bg-subtle);
  border-radius: var(--radius);
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.legal th,
.legal td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-bg-subtle);
  text-align: left;
  vertical-align: top;
}

.legal th {
  background: var(--color-bg-subtle);
  font-weight: 600;
}

.legal tr:last-child td {
  border-bottom: 0;
}

.legal code {
  font-size: 0.875em;
  word-break: break-all;
}

@media (max-width: 679px) {
  .legal thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .legal tr {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-bg-subtle);
  }

  .legal tr:last-child {
    border-bottom: 0;
  }

  .legal td {
    position: relative;
    display: block;
    padding: 6px 14px 6px calc(7.5em + 26px);
    border: 0;
  }

  .legal td::before {
    content: attr(data-label);
    position: absolute;
    top: 6px;
    left: 14px;
    width: 7.5em;
    color: var(--color-text-muted);
    font-weight: 600;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .js [data-reveal]:not(.is-visible) {
    opacity: 1;
    transform: none;
  }

  .progress {
    animation: none;
  }
}
