/* Stylesheet for the legal pages (/privacy-policy/, /terms-of-service/,
 * /cookie-policy/).
 *
 * Deliberately standalone: it does NOT pull in app.css. That file is the Framer
 * export, it is 150 kB of generated class hashes, and a re-export from Framer
 * rewrites it wholesale — a legal page that inherited from it would break on a
 * design change it has nothing to do with. What is shared with the site is the
 * part that actually reads as Echo: the fonts, the palette, the nav pill and
 * the footer, all restated here in about a hundred readable rules.
 *
 * Every font is served from this origin (assets/fonts, assets/misc — the same
 * files app.css uses for the latin subset). No fonts.googleapis.com, no CDN.
 * That is not incidental: the cookie policy states these pages make no
 * third-party requests, and this file is the reason that is true.
 */

/* --- Fonts (self-hosted, latin subset) ---------------------------------- */

@font-face {
  font-family: Satoshi;
  src: url(../assets/misc/7AHDUZ4A7LFLVFUIFSARGIWCRQJHISQP.woff2) format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Satoshi;
  src: url(../assets/misc/GHM6WVH6MILNYOOCXHXB5GTSGNTMGXZR.woff2) format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Wix Madefor Display";
  src: url(../assets/fonts/SZcl3EX9IbbyeJ8aOluD52KXgUA_7Ed1CVHuAg.woff2) format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Wix Madefor Display";
  src: url(../assets/fonts/SZcl3EX9IbbyeJ8aOluD52KXgUA_7Ed1CVHuAg.woff2) format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens -------------------------------------------------------------
 *
 * The values are the site's own: rgb(15,15,15) is the Framer background token,
 * rgb(181,179,180) the muted text token, rgb(33,33,33) the surface token.
 */

:root {
  --bg: #0a0a0a;
  --surface: #0f0f0f;
  --surface-2: #151618;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #ffffff;
  --muted: #b5b3b4;
  --muted-2: #8a8889;
  --display: "Wix Madefor Display", "Satoshi", sans-serif;
  --body: "Satoshi", "Wix Madefor Display", sans-serif;
  --measure: 46rem;
}

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

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* The nav pill floats over the top of the page, so an anchored heading would
   * otherwise land underneath it. */
  scroll-padding-top: 7rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.15s ease;
}

a:hover {
  text-decoration-color: var(--text);
}

/* --- The nav, matched to the home page's own -----------------------------
 *
 * Measured off the live page rather than copied from base.css: those rules
 * target `nav.echo-fxB6x`, and after hydration Framer renders the class as
 * `framer-fxB6x`, so they never apply to anything. The real nav is what is
 * restated here, at both of Framer's breakpoints.
 *
 *   ≥810px  centred pill, 51px tall, 89px radius, links inline, 40px gap
 *   ≤809px  full-width bar, 71px tall, 40px radius, logo left, burger right
 *
 * 810px is Framer's own breakpoint (its stylesheet carries
 * `(max-width: 809px) and (min-width: 0px)`), so the two navs change shape at
 * exactly the same width.
 */

.legal-nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 40px;
  height: 51px;
  padding: 16px 32px;
  background-color: rgba(18, 18, 18, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 89px;
}

.legal-nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.legal-nav__logo img {
  height: 24px;
  width: auto;
  display: block;
}

.legal-nav__links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.legal-nav a.legal-nav__link {
  padding: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.legal-nav a.legal-nav__link:hover,
.legal-nav a.legal-nav__link[aria-current="page"] {
  opacity: 1;
}

/* The burger exists only below 810px. Hidden rather than absent so the markup
 * is the same on every page and the script has something to bind to. */
.legal-nav__burger {
  display: none;
  width: 52px;
  height: 52px;
  margin-right: -14px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
}

.legal-nav__burger span {
  display: block;
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 809px) {
  .legal-nav {
    left: 16px;
    right: 16px;
    transform: none;
    justify-content: space-between;
    gap: 16px;
    height: 71px;
    border-radius: 40px;
    /* The inset ring the mobile bar carries and the desktop pill does not. */
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  }

  .legal-nav__burger {
    display: flex;
  }

  /* Closed: a panel under the bar, clipped away. Open: the four links. */
  .legal-nav__links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    /* Solid, and no backdrop blur — unlike the bar above it. The bar floats
     * over the page and letting it show through reads as depth. The panel has
     * to be READ, and even at 2% transparency the h1 behind it ghosts through
     * the blur as a smear that reads as a rendering fault, not as glass. */
    background-color: #0e0e0e;
    border-radius: 24px;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.14),
      0 16px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  }

  .legal-nav[data-open="true"] .legal-nav__links {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .legal-nav a.legal-nav__link {
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 17px;
  }

  .legal-nav a.legal-nav__link[aria-current="page"] {
    background-color: rgba(255, 255, 255, 0.08);
  }

  /* The bars cross when the menu is open. */
  .legal-nav[data-open="true"] .legal-nav__burger span:first-child {
    transform: translateY(6.5px) rotate(45deg);
  }

  .legal-nav[data-open="true"] .legal-nav__burger span:last-child {
    transform: translateY(-6.5px) rotate(-45deg);
  }
}

/* No animation for anyone who has asked not to have any. */
@media (prefers-reduced-motion: reduce) {
  .legal-nav__links,
  .legal-nav__burger span {
    transition: none;
  }
}

/* --- Page frame ---------------------------------------------------------- */

.legal-page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 9rem 1.5rem 5rem;
}

/* The mobile bar is taller than the desktop pill (24px down + 71px tall), so
 * the page needs to start lower than it does above the breakpoint. */
@media (max-width: 809px) {
  .legal-page {
    padding: 8.5rem 1.25rem 4rem;
  }

  html {
    scroll-padding-top: 8rem;
  }
}

.legal-header {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 3rem;
}

.legal-header h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.legal-header .lede {
  color: var(--muted);
  font-size: 1.125rem;
  margin: 0 0 1.5rem;
  max-width: 34rem;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--muted-2);
  margin: 0;
}

/* --- Typography ---------------------------------------------------------- */

.legal-page h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 1.875rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 3.5rem 0 1rem;
  scroll-margin-top: 7rem;
}

.legal-page h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1.35;
  margin: 2.25rem 0 0.75rem;
  scroll-margin-top: 7rem;
}

.legal-page h4 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--muted);
  margin: 1.75rem 0 0.5rem;
}

.legal-page p {
  margin: 0 0 1.125rem;
}

.legal-page ul,
.legal-page ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}

.legal-page li {
  margin-bottom: 0.5rem;
}

.legal-page li::marker {
  color: var(--muted-2);
}

.legal-page strong {
  font-weight: 700;
  color: var(--text);
}

.legal-page em {
  font-style: normal;
  color: var(--muted);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
}

/* --- Table of contents --------------------------------------------------- */

.legal-toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
}

.legal-toc h2 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 0.875rem;
}

.legal-toc ol {
  margin: 0;
  padding-left: 1.25rem;
  columns: 2;
  column-gap: 2rem;
}

.legal-toc li {
  margin-bottom: 0.375rem;
  break-inside: avoid;
}

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

.legal-toc a:hover {
  color: var(--text);
}

@media (max-width: 640px) {
  .legal-toc ol {
    columns: 1;
  }
}

/* --- Summary callout -----------------------------------------------------
 *
 * The "En resumen" box that opens most sections. It is the one thing carried
 * over from the WardUs documents unchanged in spirit: a plain-language sentence
 * before the precise one.
 */

.summary {
  border-left: 2px solid var(--line-strong);
  padding: 0.125rem 0 0.125rem 1.125rem;
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.summary strong {
  color: var(--text);
}

/* A stronger note, for the handful of things a reader must not skim past. */
.notice {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}

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

/* --- Tables --------------------------------------------------------------
 *
 * Wide on desktop, scrollable on a phone. The wrapper is what scrolls, never
 * the page.
 */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.75rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid var(--line);
}

thead th {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
  background: var(--surface);
  white-space: nowrap;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: none;
}

tbody th {
  font-weight: 700;
  color: var(--text);
}

td {
  color: var(--muted);
}

/* --- Footer, restated from the home page --------------------------------- */

.legal-footer {
  border-top: 1px solid var(--line);
  margin-top: 5rem;
  padding: 2.5rem 1.5rem 3rem;
}

.legal-footer__inner {
  max-width: var(--measure);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.legal-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted-2);
  font-size: 0.875rem;
}

.legal-footer__brand img {
  height: 20px;
  width: auto;
  display: block;
}

.legal-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.875rem;
}

.legal-footer__links a {
  color: var(--muted-2);
  text-decoration: none;
}

.legal-footer__links a:hover {
  color: var(--text);
}
