/* ========================================================================== */
/*                                                                            */
/*  ██╗  ██╗ █████╗ ███████╗ █████╗ ██████╗ ███████╗███╗   ██╗                */
/*  ██║ ██╔╝██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔════╝████╗  ██║                */
/*  █████╔╝ ███████║███████╗███████║██║  ██║█████╗  ██╔██╗ ██║                */
/*  ██╔═██╗ ██╔══██║╚════██║██╔══██║██║  ██║██╔══╝  ██║╚██╗██║                */
/*  ██║  ██╗██║  ██║███████║██║  ██║██████╔╝███████╗██║ ╚████║                */
/*  ╚═╝  ╚═╝╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝╚═════╝ ╚══════╝╚═╝  ╚═══╝                */
/*                                                                            */
/*  File: legal.css                                                           */
/*  GitHub: https://github.com/kasaden                                        */
/*  Created: 2026/09/29 23:46:29                                              */
/*  Updated: 2026/10/02 12:00:00                                              */
/*                                                                            */
/* ========================================================================== */

:root {
  color-scheme: light;
  --ground: #f6f2ec;
  --surface: #fbf8f4;
  --ink: #1f1d1b;
  --muted: #625b54;
  --line: #e2dacf;
  --accent-ink: #ad4129;
  --accent-soft: #f6e0d7;
  --ink-soft: #3b3733;
  --line-strong: #cbc0b2;
  --color-accent: var(--accent-ink);
  --radius: 8px;
  --header-height: 4.25rem;
  --gutter: clamp(1.25rem, 0.8rem + 2.4vw, 2.75rem);
}

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: var(--ground);
}

.skip-link:focus {
  top: 1rem;
}

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

/* Header: mirrors the portfolio site header (src/styles/global.css). =============== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ground) 90%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 74rem;
  min-height: var(--header-height);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

:where(.site-header ul) {
  margin: 0;
  padding: 0;
  list-style: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
}

.brand__logo {
  flex: none;
  width: auto;
  height: 1.5rem;
}

.site-nav__link {
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition:
    color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    text-decoration-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.site-nav__link:hover,
.site-nav__link[aria-current='page'] {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.lang-switch {
  order: 2;
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.lang-switch__option {
  display: inline-grid;
  place-items: center;
  min-width: 2.4rem;
  min-height: 2rem;
  padding: 0 0.75rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition:
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.lang-switch__option:hover {
  color: var(--ink);
}

.lang-switch__option[aria-current='true'] {
  background: var(--ink);
  color: var(--ground);
}

.menu-toggle {
  order: 3;
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  display: block;
  width: 1rem;
  height: 1.5px;
  background: var(--ink);
}

@media (prefers-reduced-motion: no-preference) {
  .menu-toggle__bars::before,
  .menu-toggle__bars::after {
    transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
  }
}

.menu-toggle__bars {
  position: relative;
  background: transparent;
}

.menu-toggle__bars::before,
.menu-toggle__bars::after {
  content: '';
  position: absolute;
  left: 0;
}

.menu-toggle__bars::before {
  transform: translateY(-3px);
}

.menu-toggle__bars::after {
  transform: translateY(3px);
}

.menu-toggle[aria-expanded='true'] .menu-toggle__bars::before {
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded='true'] .menu-toggle__bars::after {
  transform: rotate(-45deg);
}

@media (max-width: 51.99rem) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ground);
    border-bottom: 1px solid var(--line);
  }

  .site-nav[data-open='false'] {
    display: none;
  }

  .site-nav__list {
    padding: 0.5rem var(--gutter) 1.5rem;
  }

  .site-nav__link {
    display: block;
    padding-block: 1rem;
    border-bottom: 1px solid var(--line);
    font-size: clamp(1.2rem, 1.1rem + 0.45vw, 1.4rem);
    text-decoration: none;
  }
}

@media (min-width: 52rem) {
  .menu-toggle {
    display: none;
  }

  .brand {
    margin-right: 0;
  }

  .site-nav {
    margin-left: auto;
  }

  .site-nav__list {
    display: flex;
    gap: 1.5rem;
  }

  .lang-switch {
    margin-left: 1.5rem;
  }
}

.legal-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.legal-wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem);
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-footer .legal-nav {
  margin-bottom: 0.75rem;
}

main.legal-wrap {
  padding-block: 2.5rem 4rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.5rem);
  font-weight: 500;
  line-height: 1.15;
}

h2 {
  margin: 2.25rem 0 0.5rem;
  font-size: 1.2rem;
  line-height: 1.3;
}

h3 {
  margin: 1.5rem 0 0.25rem;
  font-size: 1rem;
}

p,
ul,
dl {
  margin: 0 0 0.75rem;
}

dt {
  font-weight: 600;
}

dd {
  margin: 0 0 0.5rem;
}

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

.todo {
  padding: 0 0.25em;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
}

.notice {
  margin: 1.5rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent-ink);
  background: var(--surface);
}

code {
  font-family: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Menlo, Consolas, monospace;
  font-size: 0.9em;
}
