/* Sibonix — shared stylesheet (home, privacy, terms) */

/* ---------- Fonts: self-hosted only, zero third-party requests ----------
   Drop the two files into /fonts (see fonts/README.txt).
   local() lets a machine that already has Playfair use it; if neither the
   local face nor the file is available the stack falls back to Georgia. */
@font-face {
  font-family: "Playfair Display";
  src: local("Playfair Display"), url("/fonts/PlayfairDisplay-Variable.woff2") format("woff2-variations");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: local("Playfair Display Italic"), url("/fonts/PlayfairDisplay-Italic-Variable.woff2") format("woff2-variations");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #1a202c;
  --ink-deep: #12161f;
  --cream: #fcf8f2;
  --cream-2: #f4ece0;
  --muted: #59616f;
  --muted-dark: #a2a9b6;
  --clay: #9a5f3f;
  --clay-light: #c98d63;
  --rule: rgba(26, 32, 44, 0.16);
  --rule-soft: rgba(26, 32, 44, 0.09);
  --rule-dark: rgba(252, 248, 242, 0.18);

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;

  --gut: clamp(1.25rem, 5vw, 5.5rem);
  --max: 1360px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  letter-spacing: 0.004em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--clay); }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 1px; }

.shell { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gut); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Wordmark ---------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--serif);
  font-size: 1.3125rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
}
.wordmark:hover { color: var(--ink); }
.wordmark .mark {
  width: 1.72em;
  height: 1.72em;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--cream);
  border-radius: 0.34em;
  font-size: 0.78em;
  line-height: 1;
  padding-bottom: 0.06em;
  transition: transform 0.4s var(--ease);
}
.wordmark:hover .mark { transform: rotate(-4deg); }
.wordmark--invert { color: var(--cream); }
.wordmark--invert:hover { color: var(--cream); }
.wordmark--invert .mark { background: var(--cream); color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--cream);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s linear;
}
.site-header.is-stuck { border-bottom-color: var(--rule); }
.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.25rem;
}
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); }
.nav-link {
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding-block: 0.5rem;
}
.nav-link:hover { color: var(--clay); }
@media (max-width: 30rem) {
  .site-header .shell { min-height: 4.5rem; }
  .wordmark { font-size: 1.125rem; }
  .site-nav { gap: 1rem; }
  .nav-link { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  min-height: 3rem;
  padding: 0.85em 1.6em;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover { background: var(--clay); border-color: var(--clay); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.btn--on-dark { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.btn--on-dark:hover { background: var(--clay-light); border-color: var(--clay-light); color: #1a1206; }
.btn--sm { min-height: 2.6rem; padding: 0.6em 1.2em; font-size: 0.75rem; }

/* ---------- Hero ---------- */
.hero {
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(3.5rem, 9vw, 8rem) clamp(3rem, 6vw, 5rem);
  min-height: min(92svh, 60rem);
  display: flex;
  align-items: center;
}
.hero .shell { width: 100%; }
.hero__title {
  font-size: clamp(3.75rem, 15.5vw, 13.5rem);
  line-height: 0.86;
  letter-spacing: -0.035em;
  margin-left: -0.045em;
}
.hero__title em { font-style: italic; display: block; }
.hero__foot {
  margin-top: clamp(2.75rem, 7vw, 5.5rem);
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid var(--rule);
  display: grid;
  gap: clamp(1.75rem, 4vw, 4rem);
  grid-template-columns: 1fr;
  align-items: start;
}
.hero__sub {
  font-size: clamp(1.0625rem, 1.9vw, 1.375rem);
  line-height: 1.5;
  max-width: 34ch;
  color: var(--ink);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (min-width: 56rem) {
  .hero__foot { grid-template-columns: minmax(0, 1fr) auto; }
  .hero__actions { justify-content: flex-end; }
}

/* ---------- Section frame ---------- */
.section-head {
  padding-block: clamp(4rem, 10vw, 8.5rem) clamp(2rem, 4vw, 3.5rem);
}
.section-head h2 {
  font-size: clamp(2.5rem, 8vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

/* ---------- Entries (the four items) ---------- */
.entries { border-top: 1px solid var(--ink); }
.entry {
  position: relative;
  border-bottom: 1px solid var(--rule);
  transition: background-color 0.4s var(--ease);
}
.entry:hover { background: var(--cream-2); }
.entry > .shell {
  display: grid;
  gap: clamp(1.5rem, 3.5vw, 3.5rem);
  padding-block: clamp(2.75rem, 6vw, 5rem);
  grid-template-columns: 1fr;
}
.entry__title {
  font-size: clamp(2rem, 5.4vw, 3.5rem);
  line-height: 1.02;
  transition: color 0.3s var(--ease);
}
.entry:hover .entry__title { color: var(--clay); }
.entry__body {
  margin-top: 1.1rem;
  max-width: 38ch;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.62;
}
.entry__pull {
  margin-top: 1.4rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.375rem, 3.4vw, 2.125rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 24ch;
}
.entry__count {
  margin-top: 1.75rem;
  display: none;
}

/* capability index */
.index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  column-gap: clamp(1rem, 3vw, 2.5rem);
  border-top: 1px solid var(--rule-soft);
}
.index li {
  border-bottom: 1px solid var(--rule-soft);
  padding-block: 0.85rem;
  font-size: 0.8125rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.25s var(--ease), padding-left 0.3s var(--ease);
}
.index li:hover { color: var(--clay); padding-left: 0.35rem; }
@media (min-width: 56rem) {
  .entry > .shell { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .entry__head { position: sticky; top: 7.5rem; align-self: start; }
  .index { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
}

/* ---------- CTA ---------- */
.cta {
  background: var(--ink);
  color: var(--cream);
  padding-block: clamp(5rem, 14vw, 11rem);
}
.cta h2 {
  font-size: clamp(3rem, 12vw, 9rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
  margin-left: -0.04em;
}
.cta__foot {
  margin-top: clamp(2.25rem, 5vw, 4rem);
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--rule-dark);
  display: grid;
  gap: 2rem;
  align-items: center;
  grid-template-columns: 1fr;
}
.cta__line { font-size: clamp(1.0625rem, 2vw, 1.375rem); color: var(--cream); max-width: 30ch; }
@media (min-width: 56rem) {
  .cta__foot { grid-template-columns: minmax(0, 1fr) auto; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-deep);
  color: var(--cream);
  padding-block: clamp(3rem, 7vw, 5rem) 2rem;
}
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--clay-light); }
.footer-top {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule-dark);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
}
.footer-nav a {
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--muted-dark);
}
.footer-bottom a { color: var(--muted-dark); }
@media (min-width: 56rem) {
  .footer-top { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .footer-nav { justify-content: flex-end; }
}

/* ---------- Long-form legal pages ---------- */
.legal { padding-block: clamp(3.5rem, 8vw, 7rem) clamp(4rem, 9vw, 8rem); }
.legal__header { border-bottom: 1px solid var(--ink); padding-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.legal__header h1 {
  font-size: clamp(2.75rem, 9vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.legal__updated { margin-top: 1.25rem; }
.prose { max-width: 68ch; margin-top: clamp(2.5rem, 5vw, 4rem); }
.prose > * + * { margin-top: 1.35rem; }
.prose h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.125rem);
  line-height: 1.15;
  margin-top: clamp(2.75rem, 5vw, 4rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.prose p, .prose li { font-size: 1.0625rem; line-height: 1.75; color: #2b323d; }
.prose ul { display: grid; gap: 0.75rem; padding-left: 0; }
.prose li { position: relative; padding-left: 1.35rem; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.82em;
  width: 0.5rem;
  height: 1px;
  background: var(--clay);
}
.prose strong { font-weight: 600; }
.prose a { color: var(--ink); text-decoration: underline; }
.prose a:hover { color: var(--clay); }
.prose .lede { font-size: clamp(1.1875rem, 2.2vw, 1.5rem); line-height: 1.5; color: var(--ink); }

/* ---------- Scroll reveal ---------- */
html.js .reveal { opacity: 0; transform: translateY(18px); }
html.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, html.js .reveal.is-in { opacity: 1; transform: none; transition: none; }
}
