/* Marleya Studio — shared styles for legal pages and the 404 page */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

:root {
  --ground:   #0c0a0a;
  --ground-2: #161210;
  --ground-3: #221a18;
  --wine:     #722f37;
  --ink:      #efe6de;
  --ink-2:    #bcb0a7;
  --accent:   #c9577a;
  --accent-ink: #0c0a0a;
  --font-head: 'Hanken Grotesk', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;
  --gutter: clamp(1rem, 4vw, 2rem);
  --measure: 40rem;
}

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

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

.skip-link {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 20;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.75rem 1.25rem; font-weight: 600; text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* ── Bar ─────────────────────────────────────────────── */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem var(--gutter);
  background: var(--ground);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-head); font-weight: 500; font-size: 1.15rem;
  text-decoration: none; color: var(--ink);
}
.wordmark img { width: 28px; height: 28px; filter: invert(1); background: var(--ink); padding: 3px; }
.bar-links { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2rem); }
.bar-links a:not(.btn) { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; transition: color 0.2s ease; }
.bar-links a:not(.btn):hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0.7rem 1.4rem; border-radius: 0;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.97); }

/* ── Document ────────────────────────────────────────── */
main { flex: 1; }
.doc-head {
  background: var(--wine);
  padding: clamp(3.5rem, 9vw, 7.5rem) var(--gutter) clamp(2.5rem, 6vw, 4.5rem);
}
.doc-head h1 {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 7.5vw, 6rem);
  font-weight: 500; line-height: 0.92; letter-spacing: -0.05em;
  max-width: 16ch;
  text-wrap: balance;
}
.doc-head .lede {
  margin-top: 1.5rem; max-width: var(--measure);
  font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.5;
  text-wrap: pretty;
}

.doc-switch {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 1.25rem var(--gutter);
  background: var(--ground-2);
}
.doc-switch a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0.5rem 1.1rem; border-radius: 0;
  background: var(--ground-3); color: var(--ink-2);
  text-decoration: none; font-size: 0.95rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.doc-switch a:hover { color: var(--ink); }
.doc-switch a[aria-current="page"] { background: var(--ink); color: var(--ground); font-weight: 600; }

.doc {
  display: grid; gap: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(3rem, 7vw, 6rem) var(--gutter) clamp(4rem, 9vw, 8rem);
  max-width: 76rem;
}
.doc section { max-width: var(--measure); }
.doc h2 {
  font-family: var(--font-head);
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  font-weight: 500; line-height: 1.1; letter-spacing: -0.03em;
  margin-bottom: 1rem;
  text-wrap: balance;
}
.doc p + p, .doc p + ul, .doc ul + p { margin-top: 1rem; }
.doc ul { padding-left: 1.25rem; display: grid; gap: 0.5rem; }
.doc li::marker { color: var(--accent); }
.doc a { text-decoration-color: var(--accent); text-underline-offset: 3px; }
.doc a:hover { color: var(--accent); }
.doc strong { font-weight: 600; }

.fact-sheet { display: grid; gap: 0.25rem; background: var(--ground-2); padding: 1.5rem; }
.fact-sheet div { display: grid; gap: 0.1rem; padding: 0.5rem 0; }
.fact-sheet dt { color: var(--ink-2); font-size: 0.9rem; }
.fact-sheet dd { font-weight: 500; }

@media (min-width: 900px) {
  .doc { grid-template-columns: 1fr 1fr; column-gap: clamp(3rem, 6vw, 6rem); }
  .doc .span-all { grid-column: 1 / -1; }
  .fact-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
}

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  background: var(--ground-2);
  padding: clamp(3rem, 7vw, 5rem) var(--gutter) 2rem;
}
.footer-name {
  font-family: var(--font-head); font-weight: 500;
  font-size: clamp(2.6rem, 12.5vw, 12rem);
  line-height: 0.9; letter-spacing: -0.05em;
  color: var(--ink);
}
.footer-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--ink-2); font-size: 0.95rem;
}
.footer-row nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-row a { text-decoration: none; transition: color 0.2s ease; }
.footer-row a:hover, .footer-row a[aria-current="page"] { color: var(--ink); }

.wordmark, .btn { white-space: nowrap; }

@media (max-width: 560px) {
  .bar-links .hide-sm { display: none; }
  .bar { padding-block: 1rem; }
  .wordmark { font-size: 0.95rem; }
  .bar .btn { padding-inline: 1.1rem; font-size: 0.9rem; }
}

/* ── Entrance ────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .rise-2 { animation-delay: 0.08s; }
  .rise-3 { animation-delay: 0.16s; }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
}
