/* ==========================================================================
   FrontRow Events Publisher — legal pages
   Shared stylesheet. Identical in privacy/css and terms/css so that each
   folder deploys as a self-contained Cloudflare Pages project.
   ========================================================================== */

/* ---------- Tokens ---------- */

:root {
  /* Surfaces */
  --paper: #ffffff;
  --mist: #f8f7fc;
  --violet-wash: #f3eefe;

  /* Ink */
  --ink: #14142b;
  --ink-soft: #55556e;
  --ink-mute: #7c7c95;

  /* Accent — #7C3AED for graphics and large type; the deeper tone carries
     small text and links so contrast stays above WCAG AA on white. */
  --violet: #7c3aed;
  --violet-deep: #5b21b6;

  /* Lines and shadows */
  --line: #e7e4f1;
  --line-strong: #d6d1e8;
  --shadow-sm: 0 1px 2px rgba(20, 20, 43, 0.05);
  --shadow-md: 0 4px 20px -4px rgba(20, 20, 43, 0.09), 0 1px 3px rgba(20, 20, 43, 0.04);

  /* Shape and rhythm */
  --radius: 14px;
  --radius-lg: 20px;
  --measure: 68ch;
  --header-h: 64px;

  /* Type */
  --ui: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --doc: "Source Serif 4", Georgia, "Times New Roman", serif;
}

/* ---------- Reset ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  max-width: 100%;
  display: block;
}

/* ---------- Accessibility ---------- */

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--violet-deep);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Layout primitives ---------- */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand__mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--violet);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: none;
}

.brand__name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav a:hover {
  color: var(--ink);
  background: var(--mist);
}

.nav a[aria-current="page"] {
  color: var(--violet-deep);
  background: var(--violet-wash);
  font-weight: 600;
}

/* ---------- Document head ---------- */

.doc-head {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--violet-wash);
  color: var(--violet-deep);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.doc-head h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5.5vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.doc-meta {
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--ink-mute);
  font-size: 0.88rem;
}

.doc-meta strong {
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---------- Summary card ---------- */

.summary {
  margin: 32px 0 0;
  padding: 26px 28px;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.summary h2 {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--violet-deep);
}

.summary ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.summary li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-soft);
  font-size: 0.96rem;
  line-height: 1.55;
}

.summary li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.6em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--violet);
}

/* ---------- Two-column document shell ---------- */

.doc-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding: 44px 0 72px;
  align-items: start;
}

@media (min-width: 900px) {
  .doc-shell {
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 56px;
  }
}

/* ---------- Section index (signature element) ---------- */

.toc {
  font-size: 0.88rem;
}

@media (min-width: 900px) {
  .toc {
    position: sticky;
    top: calc(var(--header-h) + 28px);
    max-height: calc(100vh - var(--header-h) - 56px);
    overflow-y: auto;
  }
}

.toc__title {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.toc__list {
  margin: 0;
  padding: 0 0 0 1px;
  list-style: none;
  border-left: 2px solid var(--line);
}

.toc__list a {
  display: block;
  padding: 7px 0 7px 16px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--ink-soft);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc__list a:hover {
  color: var(--ink);
  border-left-color: var(--line-strong);
}

.toc__list a.is-current {
  color: var(--violet-deep);
  font-weight: 600;
  border-left-color: var(--violet);
}

/* On narrow screens the index collapses into a disclosure. */
.toc__mobile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--mist);
  padding: 4px 18px;
}

.toc__mobile summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  list-style: none;
}

.toc__mobile summary::-webkit-details-marker {
  display: none;
}

.toc__mobile summary::after {
  content: "＋";
  float: right;
  color: var(--violet-deep);
  font-weight: 400;
}

.toc__mobile[open] summary::after {
  content: "－";
}

.toc__mobile .toc__list {
  margin-bottom: 12px;
}

@media (min-width: 900px) {
  .toc__mobile {
    border: 0;
    background: none;
    padding: 0;
  }

  .toc__mobile summary {
    display: none;
  }
}

/* ---------- Document body ---------- */

.doc {
  max-width: var(--measure);
  font-family: var(--doc);
  font-size: 1.06rem;
  line-height: 1.72;
  color: #232338;
}

.doc section + section {
  margin-top: 48px;
}

.doc h2 {
  font-family: var(--ui);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 14px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

/* Legal sections are cited by number, so the numbering carries meaning. */
.doc h2 .num {
  display: inline-block;
  min-width: 1.9em;
  color: var(--violet);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.doc h3 {
  font-family: var(--ui);
  font-size: 1rem;
  font-weight: 650;
  color: var(--ink);
  margin: 26px 0 8px;
}

.doc p {
  margin: 0 0 16px;
}

.doc p:last-child,
.doc ul:last-child {
  margin-bottom: 0;
}

.doc ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.doc li {
  margin-bottom: 8px;
}

.doc li::marker {
  color: var(--violet);
}

.doc a {
  color: var(--violet-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.doc a:hover {
  text-decoration-thickness: 2px;
}

.doc strong {
  font-weight: 650;
  color: var(--ink);
}

/* Contact block */
.contact-card {
  margin-top: 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-md);
  font-family: var(--ui);
  font-size: 0.96rem;
}

.contact-card dl {
  margin: 0;
  display: grid;
  gap: 10px;
}

@media (min-width: 560px) {
  .contact-card dl {
    grid-template-columns: auto 1fr;
    gap: 10px 22px;
  }
}

.contact-card dt {
  color: var(--ink-mute);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.contact-card dd {
  margin: 0;
  color: var(--ink);
}

/* ---------- Cross-document link ---------- */

.crosslink {
  margin-top: 52px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--mist);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--ui);
}

.crosslink p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--violet);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--violet-deep);
  transform: translateY(-1px);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--mist);
  padding: 36px 0;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--ink-mute);
}

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
}

.site-footer a:hover {
  color: var(--violet-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Print ---------- */

@media print {
  .site-header,
  .toc,
  .crosslink,
  .skip-link {
    display: none !important;
  }

  body {
    font-size: 11pt;
  }

  .doc-shell {
    display: block;
    padding: 0;
  }

  .doc {
    max-width: none;
  }

  .summary {
    break-inside: avoid;
  }
}
