/* fern Studio — legal pages (terms.html, privacy.html).

   Standalone: no scrollcraft.css, no head.js, no reveal. The CSP's
   style-src 'self' blocks inline <style>, so this is the one stylesheet
   both pages link. Same six tokens as site.css (black canvas, #EDE4D3 ink --
   the warmer tone site.css's .on-cream also uses -- #D97757 accent),
   restated locally rather than shared, because these pages never load
   site.css -- there is no engine here to extend. */

@font-face {
  font-family: "fern Mark";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/fern-mark-500.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/dm-sans-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/dm-sans-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/dm-sans-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --canvas:     #000000;
  --ink:        #EDE4D3;
  --ink-soft:   #A3A099;
  --accent:     #D97757;
  --hairline:   rgba(237, 228, 211, .16);
  --font-text:    "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mark:    "fern Mark", "Comfortaa", ui-rounded, system-ui, sans-serif;
  --gut:  clamp(1.25rem, 6vw, 3rem);
  --maxw: 42.5rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.5;
}
a { color: inherit; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.legal-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.25rem, 8vh, 4rem) var(--gut) clamp(4rem, 12vh, 6rem);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -.5rem 0 clamp(1.5rem, 5vh, 2.5rem) -.6rem;
  padding: .5rem .6rem;
  font-size: .9rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.legal-back:hover, .legal-back:focus-visible { color: var(--ink); }

.legal-mark {
  font-family: var(--font-mark);
  font-weight: 500;
  font-size: 1.3rem;
  margin: 0 0 clamp(1.5rem, 5vh, 2.5rem);
}

h1 {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0 0 .5rem;
}

.legal-updated {
  margin: 0 0 clamp(2.25rem, 7vh, 3.5rem);
  color: var(--ink-soft);
  font-size: .85rem;
}
/* privacy.html's lead-in sentence, a normal paragraph in every other way.
   Sharing .legal-updated's own bottom margin means the gap above the first
   h2 on both pages comes from ordinary margin collapsing with h2's
   margin-top (the larger of the two wins), not a first-of-type special
   case -- which left this h2 cramped under a plain <p>'s 1rem margin. */
.legal-intro { margin-bottom: clamp(2.25rem, 7vh, 3.5rem); }

h2 {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
  margin: clamp(2.25rem, 6vh, 3rem) 0 .65rem;
}

p {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: clamp(.95rem, 1.6vw, 1.02rem);
  line-height: 1.7;
}
p:last-child { margin-bottom: 0; }

/* Scoped to running-text links only, so .legal-footer's own soft-ink link
   style (below) isn't overridden by a broader .legal-main selector --
   .legal-footer nests inside .legal-main. */
.legal-main p a, .legal-main li a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem clamp(1rem, 3vw, 1.5rem);
  margin-top: clamp(3rem, 8vh, 4.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  font-size: .85rem;
  color: var(--ink-soft);
}
.legal-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  text-decoration: none;
}
.legal-footer a:hover, .legal-footer a:focus-visible { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
