@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-normal-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-normal-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f3eddf;
  --paper-deep: #e6dac3;
  --paper-light: #fffaf0;
  --ink: #272722;
  --ink-soft: #5e5a50;
  --teal: #006d71;
  --teal-deep: #004f53;
  --orange: #f18a24;
  --coral: #e95e45;
  --line: rgba(39, 39, 34, 0.2);
  --shadow: 0 10px 24px rgba(50, 43, 31, 0.09);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Manrope", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-width: 280px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(243, 237, 223, 0.88), rgba(243, 237, 223, 0.88)),
    url("../images/papel-amassado.webp");
  background-size: auto, 760px auto;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--teal-deep);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

a:hover,
a:focus-visible {
  color: var(--coral);
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  color: #fff;
  background: var(--teal-deep);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(100% - 2rem, 1120px);
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.82);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.25rem;
  padding-block: 0.75rem;
}


.legal-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1rem;
  font-size: 0.77rem;
  font-weight: 700;
  line-height: 1.4;
}

.legal-nav a {
  padding-block: 0.3rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.legal-nav a[aria-current="page"] {
  color: var(--teal-deep);
  box-shadow: inset 0 -0.22rem 0 rgba(241, 138, 36, 0.48);
}

.page-intro {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  color: var(--paper-light);
  background: var(--teal-deep);
}

.page-intro::after {
  content: "B";
  position: absolute;
  right: max(1rem, calc((100vw - 1120px) / 2));
  bottom: -2.35rem;
  color: rgba(243, 237, 223, 0.07);
  font-family: var(--serif);
  font-size: 11rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.intro-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(2.4rem, 7vw, 4.8rem);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.9rem;
  padding: 0.22rem 0.55rem;
  color: var(--ink);
  background: var(--orange);
  font-size: 0.69rem;
  font-weight: 800;
  line-height: 1.45;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: var(--serif);
  letter-spacing: 0;
  text-wrap: balance;
}

h1 {
  max-width: 17ch;
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  font-weight: 700;
  line-height: 0.98;
}

.intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 1.2rem 0 0;
  color: rgba(255, 250, 240, 0.8);
  font-size: 0.76rem;
  font-weight: 700;
}

.document-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  padding-block: clamp(2.4rem, 7vw, 5.5rem);
}

.toc {
  position: sticky;
  top: 1.25rem;
  padding-top: 0.55rem;
  border-top: 5px solid var(--orange);
}

.toc-title {
  margin: 0 0 0.8rem;
  color: var(--teal-deep);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.15;
}

.toc ol {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
}

.document {
  min-width: 0;
  max-width: 47rem;
}

.document > :first-child {
  margin-top: 0;
}

.document h2 {
  margin: 3.3rem 0 1rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  color: var(--teal-deep);
  font-size: clamp(1.72rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.08;
  scroll-margin-top: 1.25rem;
}

.document h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.document h3 {
  margin: 2rem 0 0.7rem;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.35;
}

.document p {
  margin: 0 0 1rem;
}

.document ul,
.document ol {
  display: grid;
  gap: 0.48rem;
  margin: 0.8rem 0 1.3rem;
  padding-left: 1.35rem;
}

.document li {
  padding-left: 0.25rem;
}

.document strong {
  color: var(--ink);
  font-weight: 800;
}

.document hr {
  height: 1px;
  margin: 2.5rem 0;
  border: 0;
  background: var(--line);
}

.legal-note {
  margin-top: 3.5rem;
  padding: 1.1rem 1.25rem;
  border-left: 5px solid var(--coral);
  background: rgba(255, 250, 240, 0.64);
  box-shadow: 0 10px 24px rgba(50, 43, 31, 0.09);
  font-size: 0.82rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--paper-light);
  background: var(--ink);
}

.footer-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 2rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.65;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem 1rem;
}

.site-footer a {
  color: var(--paper-light);
  font-size: 0.72rem;
}

@media (max-width: 820px) {
  .document-layout {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .toc {
    position: static;
  }

  .toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 1rem;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 1.5rem, 1120px);
  }

  .footer-row {
    flex-direction: column;
  }

  .header-row {
    min-height: 3.8rem;
  }

  .legal-nav {
    max-width: none;
    justify-content: center;
    gap: 0.18rem 0.8rem;
  }

  .page-intro::after {
    right: -0.35rem;
    font-size: 8rem;
  }

  .intro-inner {
    padding-block: 2.25rem 2.55rem;
  }

  h1 {
    max-width: 100%;
    font-size: 2.65rem;
  }

  .toc ol {
    grid-template-columns: 1fr;
  }

  .document {
    font-size: 0.94rem;
    line-height: 1.68;
  }

  .document h2 {
    margin-top: 2.5rem;
    font-size: 1.8rem;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 340px) {
  .shell {
    width: min(100% - 1rem, 1120px);
  }

  h1 {
    font-size: 2.25rem;
  }

  .legal-nav {
    font-size: 0.72rem;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 10.5pt;
  }

  .site-header,
  .toc,
  .site-footer,
  .skip-link {
    display: none;
  }

  .page-intro {
    color: #000;
    border: 0;
    background: #fff;
  }

  .intro-inner {
    padding: 0 0 1.5rem;
  }

  .eyebrow {
    padding: 0;
    background: none;
  }

  h1 {
    font-size: 28pt;
  }

  .intro-meta {
    color: #333;
  }

  .document-layout {
    display: block;
    padding: 0;
  }

  .document {
    max-width: none;
  }

  .document h2 {
    break-after: avoid;
  }

  .document p,
  .document li {
    orphans: 3;
    widows: 3;
  }
}
