/* ==========================================================================
   Qvitti — legal pages (Terms of Use, Personal data, Cookie Policy,
   Information security, Service setup and features)

   Not part of the Figma file — these five pages don't exist in the mockup.
   Added 2026-09-28 so the footer's legal links go somewhere real. Deliberately
   self-contained (its own small token set, its own layout) rather than
   pulling in style.css, so a change to the marketing page can't accidentally
   break these, and vice versa. Shares only the webfonts and the logo/favicon.
   ========================================================================== */

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

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

body, h1, h2, p, ul, li { margin: 0; padding: 0; }

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

a { color: inherit; }

ul { list-style: none; }

:root {
  --ink:     #00241b;
  --accent:  #73a916;
  --page:    #f8f6f6;
  --surface: #ece9ea;
  --muted:   #58534f;
  --border:  rgba(0, 36, 27, .12);
  --gutter:  16px;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------- header */

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(100% - var(--gutter) * 2, 740px);
  margin-inline: auto;
  padding-block: 24px;
}

.legal-header__logo img {
  width: clamp(84px, 8vw, 108px);
  height: auto;
}

.legal-header__back {
  font-size: .9375rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.legal-header__back:hover { color: var(--accent); }

/* ---------------------------------------------------------------- main */

.legal-shell {
  width: min(100% - var(--gutter) * 2, 740px);
  margin-inline: auto;
  padding-block: 8px 96px;
}

.legal-eyebrow {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
}

.legal-title {
  margin-top: 12px;
  font-family: Onest, Inter, sans-serif;
  font-weight: 600;
  font-size: clamp(1.75rem, 1.55rem + 1vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -.01em;
}

.legal-updated {
  margin-top: 12px;
  font-size: .9375rem;
  color: var(--muted);
}

.legal-lede {
  margin-top: 24px;
  font-size: 1.125rem;
  line-height: 1.55;
  color: rgba(0, 36, 27, .8);
}

.legal-body { margin-top: 40px; }

.legal-body h2 {
  font-family: Onest, Inter, sans-serif;
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.3;
  margin-top: 40px;
}

.legal-body h2:first-child { margin-top: 0; }

.legal-body p,
.legal-body li {
  margin-top: 14px;
  color: rgba(0, 36, 27, .85);
}

.legal-body ul,
.legal-body ol {
  margin-top: 14px;
  padding-left: 1.25em;
}

.legal-body ul { list-style: disc; }
.legal-body ol { list-style: decimal; }
.legal-body li { margin-top: 8px; }
.legal-body li + li { margin-top: 8px; }

.legal-body strong { font-weight: 600; }

.legal-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-body table {
  margin-top: 16px;
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
}

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

.legal-body th {
  font-family: Onest, Inter, sans-serif;
  font-weight: 600;
  color: var(--ink);
}

.legal-body td { color: rgba(0, 36, 27, .8); }

.legal-note {
  margin-top: 40px;
  padding: 20px 24px;
  border-radius: 20px;
  background: var(--surface);
  font-size: .9375rem;
  color: rgba(0, 36, 27, .8);
}

.legal-note a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------------------------------------------------- index (legal/index.html) */
/* The card list on the /legal/ hub page — added 2026-09-28 so the directory
   has a real page instead of a bare server directory listing. */

.legal-index {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-index__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border-radius: 20px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: background-color .15s ease;
}

.legal-index__card:hover,
.legal-index__card:focus-visible {
  background: #e2e6d6;
}

.legal-index__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal-index__title {
  font-family: Onest, Inter, sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--ink);
}

.legal-index__desc {
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--muted);
}

.legal-index__arrow {
  flex: none;
  font-size: 1.25rem;
  color: var(--accent);
  transition: translate .15s ease;
}

.legal-index__card:hover .legal-index__arrow,
.legal-index__card:focus-visible .legal-index__arrow {
  translate: 4px 0;
}

/* -------------------------------------------------------------- footer */

.legal-footer {
  border-top: 1px solid var(--border);
}

.legal-footer__inner {
  width: min(100% - var(--gutter) * 2, 740px);
  margin-inline: auto;
  padding-block: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.legal-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.legal-footer__nav a {
  font-size: .875rem;
  color: var(--muted);
  text-decoration: none;
}

.legal-footer__nav a:hover,
.legal-footer__nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: .8125rem;
  color: var(--muted);
}

.legal-footer__meta a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------------------------------------------------------------- misc */

:where(a):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
