/* ============================================================
   SILICA WORKS - the legal pages (privacy, cookies, terms)
   ------------------------------------------------------------
   A reference page rather than a document: the title across the
   sheet, then two columns that share one grid -

     left   the date, then the contents (sticky, js/legal.js)
     right  the short version, then the numbered sections

   Every piece of type is a home.html style, value for value:
     title      the hero words (css/page-type.css)
     headings   the "Who we are." mark (.sw-label-display)
     text       the "Silica Works is..." paragraph (.ap-who .sw-section-body)
     captions   the reel's "(01) Showreel" caption (.ap-cap)
     contents   the "Small by choice." aside (.ap-who-aside)
   The section rules are the inner pages' hairline (--pg-line).
   ============================================================ */

.lg-sheet {
  --lg-cols: minmax(0, 1fr) minmax(0, 2fr);
  --lg-gap: clamp(2.5rem, 6vw, 6rem);
  --lg-soft: var(--pg-soft, #6c6c65);
  z-index: 2;
  display: block;
  min-height: 100vh;
  color: var(--sw-ink);
  padding: var(--sw-sheet-top) 2.5rem calc(var(--sw-park-off) + var(--sw-bar-h, 60px) + var(--sw-park-air));
}

/* The page titles' cut (css/page-type.css). */
.lg-title {
  font-family: "sohne-bold", "Inter Tight", sans-serif;
  font-weight: 800;
  font-size: var(--pt-title);
  line-height: var(--pt-title-lh);
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

/* The reel caption (.ap-cap): the date, the contents label, the
   numbers. */
.lg-date,
.lg-toc-label,
.lg-idx {
  font-family: "Inter Tight", sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--lg-soft);
}

.lg-idx {
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------
   The intro row - the date over the contents, the short version
   over the text
   ------------------------------------------------------------ */
.lg-intro,
.lg-layout {
  display: grid;
  grid-template-columns: var(--lg-cols);
  column-gap: var(--lg-gap);
}

.lg-intro {
  align-items: start;
  margin-top: clamp(3rem, 8vh, 5.5rem);
  padding-bottom: clamp(3rem, 8vh, 5.5rem);
  border-bottom: 1px solid var(--pg-line);
}

.lg-date {
  padding-top: 0.35rem;
}

/* Home's "Silica Works is an independent..." paragraph
   (.ap-who .sw-section-body), as the sections below set it. */
.lg-lede {
  max-width: 44rem;
}

/* ------------------------------------------------------------
   The contents
   ------------------------------------------------------------ */
.lg-layout {
  align-items: start;
}

.lg-toc {
  position: sticky;
  top: 2.5rem;
  padding-top: clamp(2.5rem, 6vh, 4rem);
}

.lg-toc ol {
  margin-top: 1.25rem;
  list-style: none;
}

.lg-toc li + li {
  margin-top: 0.15rem;
}

.lg-toc a {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.3rem 0;
  /* .ap-who-aside */
  font-family: "sohne-normal", "Inter Tight", sans-serif;
  font-size: clamp(0.9rem, 0.4vw + 0.6rem, 1.3rem);
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--lg-soft);
  text-decoration: none;
  transition: color 0.25s ease;
}

.lg-toc a .lg-idx {
  flex: none;
  min-width: 2.4em;
  color: inherit;
  transition: color 0.25s ease;
}

.lg-toc a:hover,
.lg-toc a:focus-visible,
.lg-toc a[aria-current="true"] {
  color: var(--sw-ink);
}

/* The section in view: its number takes the accent as a ground,
   the only way the accent may carry type (home's .ap-hl). */
.lg-toc a[aria-current="true"] .lg-idx {
  color: var(--sw-ink);
  background: var(--sw-accent);
  box-shadow: 0 0 0 0.2em var(--sw-accent);
}

.lg-toc a:focus-visible {
  outline: 1.5px solid var(--sw-ink);
  outline-offset: 0.2rem;
}

/* ------------------------------------------------------------
   The sections
   ------------------------------------------------------------
   The running text is home's "Silica Works is an independent..."
   paragraph (.ap-who .sw-section-body), and the lede with it. */
.lg-body,
.lg-lede {
  font-family: "Inter Tight", sans-serif;
  font-size: 1.25rem;
  line-height: 1.55;
  letter-spacing: normal;
  color: #000;
}

.lg-body {
  max-width: 44rem;
}

.lg-sec {
  padding: clamp(2.5rem, 6vh, 4rem) 0;
  /* Clear of the sheet's top edge when jumped to. */
  scroll-margin-top: 1.5rem;
}

.lg-sec + .lg-sec {
  border-top: 1px solid var(--pg-line);
}

.lg-sec:last-child {
  padding-bottom: 0;
}

.lg-sec > * + * {
  margin-top: 1rem;
}

.lg-sec .lg-idx {
  display: block;
}

/* The "Who we are." mark (.sw-label-display + .sw-label-dot), level
   rather than tilted - ten of them at an angle would read as noise. */
.lg-sec h2 {
  margin-top: 0.4rem;
  font-family: "Shadows Into Light", "Inter Tight", cursive;
  font-size: 2.1rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.035em;
  -webkit-text-stroke: 0.028em currentColor;
  color: #14140f;
}

.lg-sec h2::after {
  content: ".";
  content: "." / "";
  font-size: 1.15em;
  margin-left: 0.04em;
}

.lg-sec h2 + * {
  margin-top: 0.75rem;
}

.lg-body p,
.lg-body li,
.lg-lede {
  text-wrap: pretty;
}

/* The inner pages' bold in a lead paragraph (css/page-type.css). */
.lg-body b,
.lg-lede b {
  font-family: "Inter Tight", sans-serif;
  font-weight: 600;
  color: #000;
}

.lg-body ul {
  padding-left: 1.1rem;
}

.lg-body li {
  padding-left: 0.25rem;
}

.lg-body li + li {
  margin-top: 0.5rem;
}

.lg-body li::marker {
  color: #a3a39b;
}

.lg-body code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.875em;
  padding: 0.1em 0.35em;
  color: var(--sw-ink);
  background: rgba(20, 20, 15, 0.06);
}

.lg-body a {
  color: var(--sw-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(20, 20, 15, 0.35);
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
  transition: text-decoration-color 0.2s ease;
}

.lg-body a:hover,
.lg-body a:focus-visible {
  text-decoration-color: var(--sw-ink);
}

/* ------------------------------------------------------------
   Narrow - one column: the date, the short version, the contents
   as a plain list, then the sections
   ------------------------------------------------------------ */
@media (max-width: 1000px) {
  .lg-sheet {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .lg-intro,
  .lg-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .lg-intro {
    row-gap: 1.25rem;
    margin-top: 2rem;
    padding-bottom: 2.5rem;
  }

  .lg-date {
    padding-top: 0;
  }

  .lg-toc {
    position: static;
    padding: 2rem 0;
    border-bottom: 1px solid var(--pg-line);
  }

  /* Home's phone size for the same paragraph (css/home-mobile.css). */
  .lg-body,
  .lg-lede {
    font-size: 1.0625rem;
  }

  .lg-sec {
    padding: 2.5rem 0;
  }

  .lg-sec:first-child {
    border-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lg-toc a,
  .lg-toc a .lg-idx,
  .lg-body a {
    transition: none;
  }
}
