@font-face {
  font-family: "Manrope";
  src: url("/mangroup/fonts/manrope-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/mangroup/fonts/manrope-600.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant";
  src: url("/mangroup/fonts/cormorant-500.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #f0eadf;
  --paper-deep: #e5ddcf;
  --ink: #12110f;
  --muted: #66675f;
  --oxide: #a94e2e;
  --line: rgba(18, 17, 15, 0.18);
  --gutter: clamp(20px, 4.5vw, 76px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  margin: 0;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(240, 234, 223, 0.9);
  border-bottom: 1px solid var(--line);
  display: flex;
  font-size: 11px;
  font-weight: 600;
  justify-content: space-between;
  letter-spacing: 0.1em;
  min-height: 70px;
  padding: 0 var(--gutter);
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 10;
}

.back-link, .download-link { border-bottom: 1px solid transparent; padding: 7px 0; }
.back-link:hover, .download-link:hover { border-bottom-color: currentColor; }
.download-link { color: var(--oxide); }

.contract-hero {
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: clamp(72px, 9vw, 150px) var(--gutter) 54px;
  position: relative;
}

.contract-hero::after {
  border: 1px solid rgba(169, 78, 46, 0.45);
  border-radius: 50%;
  content: "";
  height: min(58vw, 850px);
  pointer-events: none;
  position: absolute;
  right: -22vw;
  top: -28vw;
  width: min(58vw, 850px);
}

.eyebrow, .section-kicker, .toc > p {
  color: var(--oxide);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  margin: 0;
  text-transform: uppercase;
}

h1 {
  font-family: "Cormorant", Georgia, serif;
  font-size: clamp(68px, 10vw, 154px);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.73;
  margin: 54px 0 0;
  max-width: 1000px;
  position: relative;
  z-index: 1;
}

h1 em { color: var(--oxide); font-weight: 500; }
.lead { font-family: "Cormorant", Georgia, serif; font-size: clamp(26px, 3.3vw, 48px); line-height: 1; margin: 38px 0 0; max-width: 840px; }

.summary-grid {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 76px;
  position: relative;
  z-index: 1;
}

.summary-grid > div { border-right: 1px solid var(--line); min-width: 0; padding: 20px 24px 10px 0; }
.summary-grid > div + div { padding-left: 24px; }
.summary-grid > div:last-child { border-right: 0; }
.summary-grid span { color: var(--muted); display: block; font-size: 10px; letter-spacing: 0.12em; margin-bottom: 9px; text-transform: uppercase; }
.summary-grid strong { font-family: "Cormorant", Georgia, serif; font-size: 22px; font-weight: 500; line-height: 1.1; overflow-wrap: anywhere; }
.contract-date { color: var(--muted); font-size: 12px; margin: 28px 0 0; }

.document-layout { display: grid; grid-template-columns: minmax(210px, 0.34fr) minmax(0, 1fr); }
.toc-wrap { border-right: 1px solid var(--line); padding: 68px 34px 68px var(--gutter); }
.toc { position: sticky; top: 106px; }
.toc > p { margin-bottom: 24px; }
.toc a { align-items: baseline; border-top: 1px solid var(--line); display: grid; font-size: 11px; gap: 12px; grid-template-columns: 26px 1fr; line-height: 1.35; padding: 10px 0; }
.toc a span { color: var(--oxide); font-family: "Cormorant", Georgia, serif; font-size: 17px; }
.toc a:hover { color: var(--oxide); }

.contract-body { min-width: 0; padding: 20px var(--gutter) 100px clamp(34px, 5vw, 90px); }
.contract-section { border-top: 1px solid var(--line); max-width: 980px; padding: 66px 0 52px; }
.contract-section:first-child { border-top: 0; }
.contract-section h2 { font-family: "Cormorant", Georgia, serif; font-size: clamp(38px, 4.5vw, 66px); font-weight: 500; letter-spacing: -0.04em; line-height: 0.95; margin: 20px 0 38px; }
.contract-section p { font-size: 14px; line-height: 1.78; margin: 0 0 14px; max-width: 850px; }
.contract-section p:not(.section-kicker)::before { color: var(--oxide); content: "—"; margin-right: 10px; }
.contract-section .consent-choice { border: 1px solid var(--line); font-weight: 600; margin: 10px 0; padding: 14px 16px; }
.contract-section .consent-choice::before { content: ""; margin: 0; }
.appendix { background: var(--paper-deep); margin: 28px calc(var(--gutter) * -1) -100px clamp(-34px, -5vw, -90px); max-width: none; padding: 78px var(--gutter) 100px clamp(34px, 5vw, 90px); }

.table-scroll { margin: 30px 0 18px; overflow-x: auto; }
table { border-collapse: collapse; min-width: 620px; width: 100%; }
th, td { border: 1px solid var(--line); font-size: 12px; line-height: 1.58; padding: 14px 16px; text-align: left; vertical-align: top; }
th { background: rgba(169, 78, 46, 0.08); font-weight: 600; }
td:first-child { font-weight: 600; width: 30%; }

footer { align-items: center; background: #0b0a09; color: #d9d2c5; display: flex; font-size: 10px; justify-content: space-between; letter-spacing: 0.1em; padding: 27px var(--gutter); text-transform: uppercase; }
footer p { color: #8e9684; margin: 0; }
footer a { font-weight: 600; }

@media (max-width: 800px) {
  .contract-hero { padding-top: 72px; }
  .contract-hero::after { height: 520px; right: -390px; top: -200px; width: 520px; }
  h1 { font-size: clamp(64px, 20vw, 94px); margin-top: 42px; }
  .lead { font-size: 29px; }
  .summary-grid { grid-template-columns: 1fr 1fr; margin-top: 54px; }
  .summary-grid > div { border-bottom: 1px solid var(--line); }
  .summary-grid > div:nth-child(2) { border-right: 0; }
  .summary-grid > div + div { padding-left: 16px; }
  .summary-grid > div:nth-child(3) { padding-left: 0; }
  .document-layout { display: block; }
  .toc-wrap { border-bottom: 1px solid var(--line); border-right: 0; padding: 36px var(--gutter); }
  .toc { position: static; }
  .toc a { grid-template-columns: 25px 1fr; }
  .contract-body { padding: 0 var(--gutter) 82px; }
  .contract-section { padding: 54px 0 42px; }
  .contract-section p { font-size: 13px; }
  .appendix { margin: 20px calc(var(--gutter) * -1) -82px; padding: 60px var(--gutter) 82px; }
  table { min-width: 0; table-layout: fixed; }
  th, td { font-size: 11px; overflow-wrap: anywhere; padding: 10px; }
  td:first-child { width: 38%; }
  footer { align-items: flex-start; flex-direction: column; gap: 12px; }
}

@media print {
  .site-header, .toc-wrap, footer, .download-link { display: none !important; }
  body { background: white; }
  .contract-hero { padding: 20mm 15mm 10mm; }
  .contract-hero::after { display: none; }
  .contract-body { padding: 0 15mm; }
  .contract-section, .appendix { background: white; break-inside: auto; margin: 0; padding: 9mm 0; }
  .contract-section h2, table { break-after: avoid; break-inside: avoid; }
  .summary-grid { margin-top: 15mm; }
}
