/* AKI AI Studio — shared styles for legal pages (Privacy Policy, Terms of Service).
   Reuses the site palette, type system and footer treatment; kept calm and readable. */

:root {
  --bg: #0A0A0B;
  --ink: #F0EDE6;
  --accent: #E8A33D;
  --accent2: #A06CF5;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  color: var(--ink);
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: var(--accent); color: var(--bg); }

a { color: var(--accent); }
a:hover { color: var(--accent2); }

/* Subtle film grain, matching the home page (static, non-distracting). */
.legal-grain {
  position: fixed; inset: -80px; z-index: 0; pointer-events: none;
  background-image: url('assets/grain.png'); background-size: 256px 256px;
  opacity: 0.05;
}

.legal-page { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

/* Header — brand lockup identical to the home page. */
.legal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px clamp(20px, 5vw, 44px);
  border-bottom: 1px solid rgba(240,237,230,0.07);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; object-fit: contain; display: block;
  filter: saturate(1.05);
}
.brand-name {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 12px; letter-spacing: 0.32em; color: var(--ink);
  transition: color 0.5s ease;
}
.brand:hover .brand-name { color: var(--accent2); }
.legal-back {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 11px; letter-spacing: 0.24em; color: rgba(240,237,230,0.72);
  text-decoration: none; transition: color 0.45s ease, text-shadow 0.45s ease;
}
.legal-back:hover, .legal-back:focus-visible {
  color: var(--accent2); outline: none;
  text-shadow: 0 0 14px color-mix(in srgb, var(--accent2) 55%, transparent);
}

/* Content container. */
.legal-main {
  flex: 1 0 auto;
  width: 100%; max-width: 820px; margin: 0 auto;
  padding: clamp(48px, 9vh, 96px) clamp(20px, 5vw, 40px) clamp(64px, 10vh, 120px);
}
.legal-kicker {
  margin: 0; font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent);
}
.legal-title {
  margin: 18px 0 0; font-family: 'Instrument Serif', Georgia, serif; font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 3.8rem); line-height: 1.05; color: var(--ink);
}
.legal-updated {
  margin: 18px 0 0; font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 11px; letter-spacing: 0.16em; color: rgba(240,237,230,0.5);
}
.legal-lead {
  margin: 30px 0 0; font-size: clamp(1.05rem, 2vw, 1.2rem); line-height: 1.7;
  color: rgba(240,237,230,0.82); max-width: 62ch; text-wrap: pretty;
}

.legal-section { margin-top: clamp(38px, 6vh, 56px); }
.legal-section > h2 {
  margin: 0 0 16px; font-family: 'Instrument Serif', Georgia, serif; font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; color: var(--ink);
}
.legal-section p,
.legal-section li {
  font-size: 16px; line-height: 1.75; color: rgba(240,237,230,0.8);
  max-width: 66ch; text-wrap: pretty;
}
.legal-section p { margin: 0 0 16px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul {
  margin: 0 0 16px; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 11px;
}
.legal-section li { position: relative; padding-left: 22px; }
.legal-section li::before {
  content: ""; position: absolute; left: 2px; top: 10px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent);
}
.legal-section li strong { color: var(--ink); font-weight: 500; }

/* Small print / disclaimer note. */
.legal-note {
  margin-top: clamp(44px, 7vh, 64px); padding: 22px 24px;
  border: 1px solid rgba(240,237,230,0.1); border-radius: 12px;
  background: rgba(240,237,230,0.02);
}
.legal-note p {
  margin: 0; font-size: 13.5px; line-height: 1.65; color: rgba(240,237,230,0.6);
}

/* Footer — mirrors the home page footer. */
.legal-footer {
  position: relative; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 34px 24px 40px;
  border-top: 1px solid rgba(240,237,230,0.07);
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 11px; letter-spacing: 0.22em; color: rgba(240,237,230,0.45);
}
.legal-footer a { color: rgba(240,237,230,0.45); text-decoration: none; transition: color 0.5s ease; }
.legal-footer a:hover { color: var(--accent); }
.legal-footer .footer-brand { margin: 0; color: rgba(240,237,230,0.7); }
.legal-footer .footer-social { display: flex; gap: 18px; align-items: center; }
/* Social icon links: the glyph is the target, so no underline sweep under it. */
.legal-footer .footer-social a { display: inline-flex; align-items: center; justify-content: center; padding: 7px; }
.legal-footer .footer-social a svg { display: block; }
.legal-footer .footer-social a::after { content: none; }
.legal-footer .footer-copy { margin: 0; }
.legal-footer .footer-tag {
  margin: 4px 0 0; font-family: 'Instrument Serif', Georgia, serif; font-style: italic;
  font-size: 16px; letter-spacing: 0.02em; text-transform: none; color: rgba(240,237,230,0.5);
}

/* Legal links row (shared with the home page footer). */
.footer-legal {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 16px;
  margin-top: 4px;
}
.footer-legal a {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 10.5px; letter-spacing: 0.18em; color: rgba(240,237,230,0.42);
  text-decoration: none; padding: 5px 2px; transition: color 0.4s ease;
}
.footer-legal a:hover, .footer-legal a:focus-visible { color: var(--accent2); outline: none; }
.footer-legal span { color: rgba(240,237,230,0.25); }
/* Cookie settings reopens the consent choice. It is a button (it acts, it doesn't
   navigate) but has to read as a peer of the legal links beside it. */
.footer-legal .footer-cookie {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 10.5px; letter-spacing: 0.18em; color: rgba(240,237,230,0.42);
  background: none; border: 0; padding: 5px 2px; cursor: pointer;
  transition: color 0.4s ease;
}
.footer-legal .footer-cookie:hover, .footer-legal .footer-cookie:focus-visible { color: var(--accent2); outline: none; }

/* ===== Micro-interactions ===== */
a, button, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent2) 65%, transparent);
  outline-offset: 3px; border-radius: 2px;
}
.legal-footer a, .legal-main a, .legal-back, .footer-legal a { position: relative; }
.legal-footer a::after, .legal-main a::after, .legal-back::after, .footer-legal a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: currentColor; opacity: 0.6; transform: scaleX(0); transform-origin: left;
  transition: transform 0.42s cubic-bezier(0.19, 1, 0.22, 1);
}
.legal-footer a:hover::after, .legal-footer a:focus-visible::after,
.legal-main a:hover::after, .legal-main a:focus-visible::after,
.legal-back:hover::after, .legal-back:focus-visible::after,
.footer-legal a:hover::after, .footer-legal a:focus-visible::after { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .legal-footer a::after, .legal-main a::after, .legal-back::after, .footer-legal a::after { transition: none; }
}
