:root {
  --bg: #25231e;
  --surface: #2e2b26;
  --cream: #f7f4ee;
  --ink-soft: #a39b90;
  --crema: #c08a3e;
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Fraunces', Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(247, 244, 238, .048) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 244, 238, .048) 1px, transparent 1px),
    url('/heropg/bg3.webp');
  background-position: left top, left top, center;
  background-size: 48px 48px, 48px 48px, cover;
  background-attachment: fixed;
  background-repeat: repeat, repeat, no-repeat;
  color: var(--cream);
  font-family: var(--font-body);
}

.page-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-shell > smiths-footer,
.page-shell > footer { margin-top: auto; }

.legal-main {
  flex: 1;
  padding: 155px 20px 110px;
}

.legal-document {
  width: min(100%, 72ch);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 14px;
  background: rgba(37, 35, 30, .78);
  backdrop-filter: blur(20px) saturate(190%) brightness(110%);
  -webkit-backdrop-filter: blur(20px) saturate(190%) brightness(110%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .4),
    inset 0 -1px 2px rgba(0, 0, 0, .1),
    0 12px 40px rgba(0, 0, 0, .15);
}

.legal-document h1 {
  margin: 0 0 14px;
  color: var(--cream);
  font: 500 clamp(36px, 6vw, 56px)/1.08 'Tempting', cursive;
  letter-spacing: -.025em;
}

.legal-document .legal-updated {
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.legal-intro {
  margin: 30px 0 0;
  color: rgba(247, 244, 238, .9);
  font-size: 16px;
  line-height: 1.7;
}

.legal-toc {
  margin: 40px 0 54px;
  padding: 26px 28px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  background: rgba(255, 255, 255, .07);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .18),
    0 10px 28px rgba(0, 0, 0, .12);
}

.legal-toc h2 {
  margin: 0 0 18px;
  color: var(--cream);
  font: 500 21px/1.3 var(--font-heading);
}

.legal-toc ol {
  columns: 2;
  column-gap: 42px;
  margin: 0;
  padding-left: 24px;
}

.legal-toc li {
  margin: 9px 0;
  break-inside: avoid;
  color: var(--crema);
  font-size: 14px;
  line-height: 1.5;
}

.legal-toc a {
  color: rgba(247, 244, 238, .9);
  text-decoration-color: rgba(192, 138, 62, .55);
  text-underline-offset: 4px;
  transition: color .2s ease, text-decoration-color .2s ease;
}

.legal-toc a:hover {
  color: var(--crema);
  text-decoration-color: currentColor;
}

.legal-document section { scroll-margin-top: 100px; }

.legal-document section + section {
  margin-top: 48px;
  padding-top: 44px;
  border-top: 1px solid rgba(247, 244, 238, .12);
}

.legal-document section h2 {
  margin: 0 0 18px;
  color: var(--cream);
  font: 500 clamp(25px, 4vw, 32px)/1.2 var(--font-heading);
}

.legal-section-number { color: var(--crema); }

.site-nav .nav-mark {
  font-family: 'Tempting', cursive;
  font-style: italic;
}

.legal-document section h3 {
  margin: 28px 0 10px;
  color: var(--cream);
  font-size: 17px;
  line-height: 1.4;
}

.legal-document p,
.legal-document section li {
  color: rgba(247, 244, 238, .88);
  font-size: 16px;
  line-height: 1.7;
}

.legal-document p { margin: 0 0 18px; }
.legal-document ul { margin: 0 0 20px; padding-left: 24px; }
.legal-document li + li { margin-top: 10px; }

.legal-document section a {
  color: #e4ae63;
  text-underline-offset: 4px;
  transition: color .2s ease;
}

.legal-document section a:hover { color: #f0c486; }

.legal-toc a:focus-visible,
.legal-document section a:focus-visible {
  border-radius: 2px;
  outline: 3px solid rgba(247, 244, 238, .9);
  outline-offset: 3px;
}

.legal-contact {
  padding: 26px;
  border-left: 3px solid var(--crema);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, .06);
}

.legal-contact address {
  color: rgba(247, 244, 238, .88);
  font-style: normal;
  line-height: 1.8;
}

/* Nav action buttons match the shared treatment used by the 404 page. */
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-cta,
.nav-cart { display: inline-flex; align-items: center; justify-content: center; width: 43px; height: 43px; padding: 0; border: 0; border-radius: 50%; background: var(--crema); color: #1a1815; text-decoration: none; transition: transform .2s, background .2s; }
.nav-cta:hover,
.nav-cart:hover { background: #d09849; transform: translateY(-1px); }
.nav-cta:focus-visible,
.nav-cart:focus-visible { outline: 3px solid rgba(247, 244, 238, .85); outline-offset: 3px; }
.nav-cta svg,
.nav-cart svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 620px) {
  .legal-main { padding: 112px 14px 72px; }
  .legal-document { padding: 30px 22px 38px; }
  .legal-toc { margin: 32px 0 44px; padding: 22px; }
  .legal-toc ol { columns: 1; }
  .legal-document section + section { margin-top: 38px; padding-top: 36px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  .legal-toc a,
  .legal-document section a,
  .nav-cta,
  .nav-cart,
  .site-nav { transition: none; }
}
