/* ============================================================================
   Stylesheet for the three legal documents only.

   Those pages stay as static HTML under public/ so their clause text and the ten
   privacy translations keep the URLs they have always had, which means they
   cannot use the Tailwind bundle the Next.js app builds. This file re-declares
   the same design tokens by hand and styles the handful of classes those pages
   actually use. It is the one duplication in the repo; it is small, and it buys
   not having to escape 200 KB of legal prose into JSX.

   Tokens are kept in sync with app/globals.css by name and by value. If a colour
   changes there, change it here.
   ========================================================================== */

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

:root {
  --orange: #ff2c27;
  --ink: #111111;
  --navy: #1a1a1a;
  --muted: #5b6472;
  --line: #e7e4df;
  --cream: #faf7f5;

  --ease: cubic-bezier(.5, 0, .63, 1);
  --dur-micro: .2s;
  --dur-state: .4s;

  --shell: 1180px;
  --gutter: clamp(24px, 4vw, 32px);

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: #fff;
  font-size: .875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }

/* Rule-underlined uppercase link, same gesture as the app: the resting rule
   slides out to the right while a brand-red one slides in behind it. */
.link-rule {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.link-rule::before,
.link-rule::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition: transform var(--dur-state) var(--ease);
}
.link-rule::after {
  background: var(--orange);
  transform: translateX(-100%);
  transition-delay: var(--dur-micro);
}
.link-rule:hover::before { transform: translateX(100%); }
.link-rule:hover::after { transform: translateX(0); }

:where(a, button):focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

/* ── Shell ───────────────────────────────────────────────────────────────── */
/* In flow, not fixed: a legal document is read top to bottom and does not need
   the nav following it down the page. */
.legal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 28px) var(--gutter);
}
.legal-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.legal-logo img { height: 44px; width: auto; flex-shrink: 0; }
.legal-logo > span {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .17em;
  text-transform: uppercase;
  line-height: 1.2;
}
.legal-logo > span > span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .26em;
  line-height: 1.4;
}

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header {
  background: var(--navy);
  padding: clamp(56px, 8vw, 96px) var(--gutter);
  text-align: center;
}
.page-header h1 {
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: uppercase;
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: .95;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.page-header p { color: rgba(255, 255, 255, .55); font-size: .875rem; margin-top: 16px; }
.header-divider { width: 44px; height: 1px; background: var(--orange); margin: 22px auto 0; }

/* ── Document body ───────────────────────────────────────────────────────── */
.content {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) var(--gutter) clamp(72px, 10vw, 130px);
}
/* Each clause opens on its own hairline, the same device the app uses to
   separate one module from the next. */
.content h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 52px 0 16px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.content h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.content h3 { font-size: 1rem; font-weight: 600; color: var(--ink); margin: 28px 0 10px; }
.content p { color: var(--muted); font-size: .9375rem; line-height: 1.8; margin-bottom: 16px; overflow-wrap: break-word; }
.content ul, .content ol { color: var(--muted); font-size: .9375rem; line-height: 1.8; margin: 0 0 16px 22px; }
.content li { margin-bottom: 6px; }
.content strong { color: var(--ink); font-weight: 600; }
.content a { color: var(--orange); text-decoration: none; border-bottom: 1px solid rgba(255, 44, 39, .35); overflow-wrap: break-word; }
.content a:hover { border-bottom-color: var(--orange); }
.content table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: .875rem; }
.content th, .content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; color: var(--muted); }
.content th { color: var(--ink); font-weight: 600; background: var(--cream); }

/* ── Language sidebar ────────────────────────────────────────────────────── */
.legal-layout {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) var(--gutter) clamp(72px, 10vw, 130px);
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.legal-layout .content { max-width: none; margin: 0; padding: 0; }

.lang-sidebar { position: sticky; top: 32px; }
.lang-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--orange);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.lang-eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lang-list { list-style: none; }
.lang-list a {
  display: block;
  padding: 9px 0 9px 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: .875rem;
  border-left: 1px solid var(--line);
  transition: color var(--dur-micro) var(--ease), border-color var(--dur-micro) var(--ease);
}
.lang-list a:hover { color: var(--ink); border-left-color: var(--orange); }
.lang-list .active { color: var(--ink); font-weight: 600; border-left-color: var(--orange); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.legal-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, .4);
  padding: clamp(32px, 4vw, 44px) var(--gutter);
  font-size: .8125rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 28px;
}
.legal-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.legal-footer a {
  color: rgba(255, 255, 255, .5);
  text-decoration: none;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color var(--dur-micro) var(--ease);
}
.legal-footer a:hover { color: #fff; }

@media (max-width: 820px) {
  .legal-layout { grid-template-columns: 1fr; gap: 32px; }
  .lang-sidebar { position: static; }
  .lang-list { display: flex; flex-wrap: wrap; gap: 6px; }
  .lang-list a { padding: 7px 12px; border-left: 0; border: 1px solid var(--line); border-radius: 6px; }
  .lang-list a:hover { border-color: var(--orange); }
  .lang-list .active { border-color: var(--orange); }
}

@media (max-width: 600px) {
  /* Twenty-seven tracked characters do not fit beside the mark at phone widths.
     The app's nav drops the same sub-line for the same reason. */
  .legal-logo > span > span { display: none; }
  .legal-footer { flex-direction: column; text-align: center; }
  .legal-footer nav { justify-content: center; }
}

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