/* DealerMoMo — shared styles for the long-form legal pages.
   Both documents share every rule, so the CSS lives in one file rather than
   being duplicated twice; index.html stays self-contained as before.
   Still dependency-free and build-free. */

:root {
  --ink: #15120c;
  --ink-2: #1d1810;
  --ink-3: #241d14;
  --bone: #f4ecdd;
  --body: #ddd3c2;
  --bone-dim: #b6ad9b;
  --amber: #efab53;
  --clay: #e0612f;
  --ember: #ff7a3d;
  --line: rgba(244, 236, 221, 0.12);
  --line-soft: rgba(244, 236, 221, 0.07);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--ink);
  color: var(--body);
  font-family: "Schibsted Grotesk", sans-serif;
  font-size: clamp(0.95rem, 0.4vw + 0.86rem, 1.03rem);
  line-height: 1.72;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- atmosphere: same warm light + grain as the landing page ---- */
.atmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 82% -6%, rgba(239, 171, 83, 0.13), transparent 55%),
    radial-gradient(90% 60% at 8% 104%, rgba(224, 97, 47, 0.11), transparent 60%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
}
.atmos::after {
  content: "";
  position: absolute;
  inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.045;
  mix-blend-mode: overlay;
}
.lanes {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 118px,
    var(--line) 118px,
    var(--line) 119px
  );
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
}

/* ---- skip link ---- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.6rem 1rem;
  background: var(--ink-3);
  border: 1px solid var(--amber);
  border-radius: 8px;
  color: var(--bone);
  text-decoration: none;
}

/* ---- sticky top bar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem clamp(1.1rem, 4vw, 3rem);
  background: rgba(21, 18, 12, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.brand-mini {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 0.95rem;
  color: var(--bone);
  text-decoration: none;
  white-space: nowrap;
}
.brand-mini b { color: var(--amber); font-weight: 700; }
.brand-mini:hover b { color: var(--ember); }

.topnav {
  display: flex;
  align-items: center;
  gap: clamp(0.7rem, 2vw, 1.5rem);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.topnav a {
  color: var(--bone-dim);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.topnav a:hover { color: var(--bone); border-bottom-color: var(--amber); }
.topnav a[aria-current="page"] { color: var(--amber); border-bottom-color: var(--amber); }

/* reading progress — transform-only, sits under the bar */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 40;
  pointer-events: none;
}
.progress i {
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--amber), var(--ember) 60%, var(--clay));
}

/* ---- page frame ---- */
.wrap {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.1rem, 4vw, 3rem) 0;
}

.page-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(1.6rem, 3vw, 2.4rem);
}
.kicker {
  font-size: 0.7rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--amber);
}
.page-head h1 {
  font-family: "Unbounded", sans-serif;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-size: clamp(2rem, 6vw, 3.9rem);
  color: var(--bone);
  margin: 0.7rem 0 0;
}
.page-head h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--amber), var(--ember) 55%, var(--clay));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
}
.pill {
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.32rem 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.63rem;
  color: var(--bone-dim);
  white-space: nowrap;
}
.lede {
  margin-top: 1.5rem;
  font-size: clamp(1rem, 0.6vw + 0.9rem, 1.15rem);
  color: var(--bone);
  max-width: 68ch;
}

/* ---- two-column body: contents rail + document ---- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.4rem);
  padding: clamp(2rem, 4vw, 3rem) 0 0;
}
@media (min-width: 960px) {
  .layout { grid-template-columns: 232px minmax(0, 1fr); }
}

/* contents rail */
.toc { min-width: 0; }
@media (min-width: 960px) {
  .toc {
    position: sticky;
    top: 5.2rem;
    align-self: start;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}
.toc-title {
  font-size: 0.64rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: 0.9rem;
}
.toc ol {
  list-style: none;
  counter-reset: toc;
  border-left: 1px solid var(--line-soft);
}
.toc li { counter-increment: toc; }
.toc a {
  display: block;
  position: relative;
  padding: 0.34rem 0 0.34rem 0.95rem;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--bone-dim);
  text-decoration: none;
  font-size: 0.83rem;
  line-height: 1.42;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.toc a::before {
  content: counter(toc) ".";
  color: rgba(239, 171, 83, 0.55);
  font-variant-numeric: tabular-nums;
  margin-right: 0.4em;
}
.toc a:hover { color: var(--bone); border-left-color: var(--line); }
.toc a.active {
  color: var(--amber);
  border-left-color: var(--ember);
}
.toc a.active::before { color: var(--ember); }

/* mobile: collapse the rail into a disclosure */
.toc-mobile {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  background: rgba(36, 29, 20, 0.5);
}
.toc-mobile > summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.toc-mobile > summary::-webkit-details-marker { display: none; }
.toc-mobile > summary::after {
  content: "+";
  font-size: 1rem;
  line-height: 1;
  color: var(--bone-dim);
}
.toc-mobile[open] > summary::after { content: "\2013"; }
.toc-mobile .toc-title { display: none; }
.toc-mobile ol { margin-top: 0.9rem; }
@media (min-width: 960px) {
  .toc-mobile {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: none;
  }
  .toc-mobile > summary { display: none; }
  .toc-mobile .toc-title { display: block; }
  .toc-mobile ol { margin-top: 0; }
}

/* ---- the document itself ---- */
.doc { min-width: 0; max-width: 74ch; }
.doc > section { padding-bottom: clamp(1.6rem, 3vw, 2.3rem); }
.doc > section + section {
  border-top: 1px solid var(--line-soft);
  padding-top: clamp(1.8rem, 3.4vw, 2.6rem);
}
.doc h2 {
  font-family: "Unbounded", sans-serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-size: clamp(1.15rem, 1.3vw + 0.85rem, 1.6rem);
  color: var(--bone);
  scroll-margin-top: 5.4rem;
  margin-bottom: 1rem;
}
.doc h2 .n {
  display: block;
  font-family: "Schibsted Grotesk", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--amber);
  margin-bottom: 0.5rem;
}
.doc h3 {
  font-family: "Schibsted Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: var(--amber);
  margin: 1.6rem 0 0.6rem;
  scroll-margin-top: 5.4rem;
}
.doc p { margin-bottom: 1rem; max-width: 72ch; }
.doc p:last-child { margin-bottom: 0; }
.doc strong { color: var(--bone); font-weight: 700; }
.doc a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(239, 171, 83, 0.35);
  transition: color 0.18s ease, border-color 0.18s ease;
}
.doc a:hover { color: var(--ember); border-bottom-color: var(--ember); }

.doc ul {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  max-width: 72ch;
}
.doc ul li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.5rem;
}
.doc ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 1px;
  background: var(--clay);
}
.doc ul li:last-child { margin-bottom: 0; }

/* emphatic legal blocks (all-caps disclaimers, liability limits, arbitration) */
.callout {
  border-left: 2px solid var(--clay);
  background: rgba(224, 97, 47, 0.06);
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}
.callout strong { color: var(--bone); }
.callout p { margin-bottom: 0.8rem; }
.callout p:last-child { margin-bottom: 0; }

/* contact / address card */
.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(1.1rem, 2.4vw, 1.6rem);
  background: rgba(36, 29, 20, 0.45);
}
.card .who {
  font-family: "Unbounded", sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--bone);
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}
.card address {
  font-style: normal;
  color: var(--body);
  margin-bottom: 0.9rem;
}
.card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.9rem;
  font-size: 0.92rem;
}
.card dt {
  font-size: 0.63rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-dim);
  align-self: center;
}
.card dd { margin: 0; }

/* ---- cross-links + footer ---- */
.crosslinks {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
  margin: clamp(2.4rem, 5vw, 3.6rem) 0 0;
}
@media (min-width: 700px) {
  .crosslinks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.crosslink {
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  color: var(--bone-dim);
  background: rgba(36, 29, 20, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.crosslink:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 171, 83, 0.4);
  background: rgba(36, 29, 20, 0.6);
}
.crosslink .eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--amber);
}
.crosslink .title {
  display: block;
  font-family: "Unbounded", sans-serif;
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: -0.015em;
  color: var(--bone);
  margin-top: 0.45rem;
}

.site-footer {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: clamp(2.6rem, 5vw, 4rem) auto 0;
  padding: 1.4rem clamp(1.1rem, 4vw, 3rem) clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--bone-dim);
}
.site-footer nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.site-footer a {
  color: var(--bone-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.site-footer a:hover { color: var(--amber); border-bottom-color: var(--amber); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---- print: legal documents get read on paper ---- */
@media print {
  .atmos, .lanes, .progress, .topbar, .toc, .crosslinks, .skip { display: none !important; }
  body { background: #fff; color: #111; font-size: 11pt; line-height: 1.45; }
  .wrap, .site-footer { max-width: none; padding: 0; margin: 0; }
  .layout { display: block; padding: 0; }
  .doc { max-width: none; }
  .page-head h1, .doc h2, .card .who { color: #000; }
  .page-head h1 em { -webkit-text-fill-color: #000; color: #000; }
  .doc h3 { color: #000; }
  .doc strong, .lede, .card address, .doc p { color: #111; }
  .doc h2 .n { color: #444; }
  .doc a { color: #000; border: 0; }
  /* spell out destinations that a reader cannot click, but not in-page anchors */
  .doc a[href^="http"]::after,
  .doc a[href^="mailto"]::after,
  .doc a[href^="tel"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  .doc > section { page-break-inside: auto; }
  .doc h2 { page-break-after: avoid; }
  .callout, .card, .pill { border-color: #999; background: none; }
}
