@font-face {
  font-family: "Niasam Display";
  src: url("/assets/fonts/moonthorn-display-800.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #f5ecd5;
  --muted: #aebbb5;
  --gold: #e8c36f;
  --gold-soft: rgba(232, 195, 111, .18);
  --line: rgba(232, 195, 111, .22);
  --panel: rgba(8, 22, 25, .9);
  --deep: #061115;
  --teal: #7dd0bd;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -12%, rgba(48, 115, 105, .34), transparent 42rem),
    linear-gradient(145deg, #07171b 0%, #050d11 54%, #0b1518 100%);
  font: 500 16px/1.65 "Trebuchet MS", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: .32;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

a { color: #f4d889; text-underline-offset: 3px; }
a:hover { color: #fff1bd; }

.legal-shell {
  position: relative;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.legal-topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 10px 0;
  background: linear-gradient(to bottom, rgba(6, 17, 21, .98) 72%, transparent);
}

.legal-brand,
.legal-home {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.legal-brand img { width: 45px; height: 45px; object-fit: contain; }
.legal-brand span { display: grid; line-height: 1; }
.legal-brand strong { font: 800 25px/1 "Niasam Display", Georgia, serif; letter-spacing: .035em; }
.legal-brand small { margin-top: 5px; color: var(--muted); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }

.legal-home {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 15, 18, .72);
  font-size: 13px;
  font-weight: 800;
}

.legal-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: end;
  margin: 26px 0 24px;
  padding: clamp(30px, 6vw, 66px);
  border: 1px solid rgba(232, 195, 111, .3);
  border-radius: 30px;
  background:
    radial-gradient(circle at 82% 18%, rgba(108, 206, 179, .18), transparent 20rem),
    linear-gradient(135deg, rgba(25, 61, 58, .88), rgba(7, 21, 25, .96) 62%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .38), inset 0 0 0 5px rgba(255,255,255,.018);
}

.legal-hero::after {
  position: absolute;
  right: -70px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(232, 195, 111, .16);
  border-radius: 50%;
  content: "";
  box-shadow: inset 0 0 90px rgba(232, 195, 111, .08), 0 0 70px rgba(74, 175, 151, .08);
}

.legal-eyebrow { display: block; color: var(--gold); font-size: 12px; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; }
.legal-hero h1 { max-width: 760px; margin: 8px 0 12px; font: 800 clamp(38px, 7vw, 72px)/.98 "Niasam Display", Georgia, serif; letter-spacing: .01em; }
.legal-hero p { max-width: 760px; margin: 0; color: #c8d1cb; font-size: clamp(15px, 2vw, 19px); }
.legal-updated { position: relative; z-index: 1; min-width: 155px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(3, 12, 15, .62); }
.legal-updated small { display: block; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.legal-updated strong { display: block; margin-top: 4px; color: var(--gold); font-size: 14px; }

.legal-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.legal-nav { position: sticky; top: 82px; display: grid; gap: 5px; padding: 15px; border: 1px solid var(--line); border-radius: 20px; background: rgba(5, 16, 20, .86); }
.legal-nav small { margin: 2px 8px 8px; color: var(--gold); font-size: 10px; font-weight: 900; letter-spacing: .17em; }
.legal-nav a { padding: 8px 10px; border-radius: 10px; color: #c6d0cb; font-size: 13px; font-weight: 700; text-decoration: none; }
.legal-nav a:hover, .legal-nav a:focus-visible { color: #fff0be; background: var(--gold-soft); }

.legal-content { min-width: 0; }
.legal-card { scroll-margin-top: 88px; margin-bottom: 16px; padding: clamp(22px, 4vw, 38px); border: 1px solid rgba(232, 195, 111, .19); border-radius: 22px; background: var(--panel); box-shadow: 0 16px 42px rgba(0,0,0,.19); }
.legal-card h2 { margin: 0 0 12px; color: #fff0c3; font: 800 clamp(23px, 4vw, 34px)/1.08 "Niasam Display", Georgia, serif; }
.legal-card h3 { margin: 22px 0 7px; color: #f1d68b; font-size: 16px; }
.legal-card p { margin: 0 0 13px; color: #c2cdc8; }
.legal-card p:last-child { margin-bottom: 0; }
.legal-card ul { margin: 10px 0 0; padding-left: 20px; color: #c2cdc8; }
.legal-card li + li { margin-top: 8px; }

.privacy-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.privacy-summary article { padding: 19px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(150deg, rgba(26, 66, 61, .55), rgba(6, 18, 22, .86)); }
.privacy-summary i { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 12px; border-radius: 50%; color: var(--gold); background: var(--gold-soft); font-style: normal; }
.privacy-summary strong { display: block; color: #f7e8bb; }
.privacy-summary span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }

.legal-callout { display: flex; gap: 15px; align-items: flex-start; margin-top: 18px; padding: 17px; border: 1px solid rgba(125, 208, 189, .28); border-radius: 16px; background: rgba(47, 118, 103, .13); }
.legal-callout i { color: var(--teal); font-style: normal; font-size: 21px; }
.legal-callout p { margin: 0; }
.legal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.legal-action { display: inline-flex; align-items: center; justify-content: center; min-height: 45px; padding: 10px 18px; border: 1px solid rgba(232,195,111,.48); border-radius: 12px; color: #172023; background: linear-gradient(135deg, #f0cd72, #c69640); font-weight: 900; text-decoration: none; }
.legal-action.secondary { color: #f4e5bd; background: rgba(232,195,111,.08); }

.support-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 18px; }
.support-aside { display: grid; align-content: start; gap: 12px; }
.support-aside article { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(8, 23, 27, .78); }
.support-aside strong { display: block; color: #f3d98f; }
.support-aside p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.support-form { display: grid; gap: 15px; padding: clamp(22px, 4vw, 34px); border: 1px solid rgba(232,195,111,.25); border-radius: 22px; background: var(--panel); }
.support-form label { display: grid; gap: 7px; color: #ead8ac; font-size: 12px; font-weight: 900; letter-spacing: .05em; }
.support-form :is(input, select, textarea) { width: 100%; min-height: 46px; border: 1px solid rgba(232,195,111,.25); border-radius: 12px; padding: 11px 13px; color: #f7edd3; background: rgba(1,9,12,.72); font: 600 16px/1.4 "Trebuchet MS", sans-serif; }
.support-form textarea { min-height: 170px; resize: vertical; }
.support-form :is(input, select, textarea):focus { outline: 2px solid rgba(232,195,111,.72); outline-offset: 2px; }
.support-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.support-challenge { padding: 16px; border: 1px solid rgba(125,208,189,.25); border-radius: 15px; background: rgba(42,105,92,.12); }
.support-challenge header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.support-challenge header span { color: var(--muted); font-size: 12px; }
.support-challenge output { color: var(--gold); font-weight: 900; }
.support-challenge input[type="range"] { min-height: 26px; padding: 0; accent-color: #e8c36f; }
.support-form button { min-height: 50px; border: 1px solid #f2d17a; border-radius: 13px; color: #172023; background: linear-gradient(135deg, #f2cf76, #c89a43); font: 900 15px/1 "Trebuchet MS", sans-serif; cursor: pointer; }
.support-form button:disabled { cursor: wait; opacity: .55; }
.support-status { min-height: 23px; margin: 0; color: #e7c46f; font-size: 13px; }
.support-status.is-success { color: #8fe0b8; }
.support-note { margin: -3px 0 0; color: #859995; font-size: 12px; }

.legal-footer { display: flex; justify-content: space-between; gap: 18px; margin-top: 28px; padding: 20px 4px; border-top: 1px solid var(--line); color: #81908c; font-size: 12px; }
.legal-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }

@media (max-width: 800px) {
  .legal-shell { width: min(100% - 20px, 720px); padding-top: 8px; }
  .legal-topbar { min-height: 58px; }
  .legal-brand img { width: 38px; height: 38px; }
  .legal-brand strong { font-size: 21px; }
  .legal-brand small { display: none; }
  .legal-home { padding: 7px 11px; font-size: 11px; }
  .legal-hero { grid-template-columns: 1fr; margin-top: 12px; padding: 27px 22px; border-radius: 22px; }
  .legal-updated { width: fit-content; }
  .legal-layout { display: block; }
  .legal-nav { position: relative; top: auto; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; margin-bottom: 14px; padding: 9px; border-radius: 15px; scrollbar-width: none; }
  .legal-nav small { display: none; }
  .privacy-summary { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }
  .support-aside { grid-template-columns: 1fr 1fr; }
  .legal-footer { display: grid; }
}

@media (max-width: 520px) {
  .support-aside { grid-template-columns: 1fr; }
  .legal-card { padding: 21px 18px; }
  .legal-actions { display: grid; }
  .legal-action { width: 100%; }
}

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