/*
  Silo site — shared design layer.
  Loaded after system.css, cards.css, motion.css and layout.css.
  Owns the palette, type scale, nav, buttons, page mastheads, forms, legal pages and footer.
  Page-only composition lives in silo-home.css and silo-inner.css.
*/

/* ---------------------------------------------------------------- palette */
:root {
  --p-bg: #f4efe4;
  --p-surface: #eae3d5;
  --p-ink: #131c25;
  --p-muted: #59626e;
  --p-accent: #7a4a26;
  --p-accent-ink: #ffffff;
  --p-action: #7a4a26;
  --p-action-ink: #ffffff;
  --p-inv-bg: #131c25;
  --p-inv-surface: #1d2935;
  --p-inv-ink: #f4efe4;
  --p-inv-muted: #a9b0b8;
  --p-inv-accent: #d6ac70;
  --p-inv-accent-ink: #131c25;
  --p-inv-action: #f4efe4;
  --p-inv-action-ink: #131c25;

  --sage: #2f5b3f;
  --sage-soft: #dbe3d7;
  --plum: #7b3b2c;

  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-btn: 6px;

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 400;
  --display-tracking: -0.025em;

  --nav: 80px;
  --pad-x: 80px;
  --gutter: 24px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: 200ms;
  --shadow-card: 0 1px 2px rgb(19 28 37 / .04), 0 18px 40px -28px rgb(19 28 37 / .35);
}

@media (max-width: 1279px) {
  :root { --pad-x: 56px; }
}
@media (max-width: 1023px) {
  :root { --pad-x: 40px; --gutter: 20px; }
}
@media (max-width: 639px) {
  :root { --nav: 60px; --pad-x: 22px; --gutter: 14px; }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav) + 24px);
}
body {
  background: var(--p-bg);
  color: var(--p-ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
}
@media (max-width: 639px) {
  body { font-size: 16px; }
}

::selection { background: color-mix(in oklab, var(--p-accent) 24%, transparent); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.025em;
}
p { text-wrap: pretty; }
figure { margin: 0; }

/* one container for every page */
.wrap { width: min(100% - 2 * var(--pad-x), 1280px); }

/* the design's own sections are free of the kit's fixed heights */
main > section:not(.hero) {
  height: auto !important;
  min-height: 0 !important;
  padding-block: 0;
}
main > section:not(.hero) > .wrap {
  height: auto !important;
}

/* ---------------------------------------------------------------- type helpers */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--p-accent);
  font: 500 11px/1.2 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 26px;
  height: 1px;
  background: currentColor;
}
.eyebrow--light { color: var(--p-inv-accent); }
.eyebrow--plain::before { display: none; }
.eyebrow__num { color: color-mix(in oklab, currentColor 62%, transparent); }

.sec-title {
  margin: 0;
  font-size: clamp(42px, 4.4vw, 68px);
  font-weight: 400;
  line-height: 0.99;
  letter-spacing: -0.032em;
  text-wrap: balance;
}
.sec-lead {
  max-width: 56ch;
  color: var(--p-muted);
  font-size: clamp(17px, 1.2vw, 20px);
  line-height: 1.55;
}
.sec-head { display: grid; gap: 20px; max-width: 860px; }

.lead {
  font-size: clamp(18px, 1.25vw, 21px);
  line-height: 1.55;
  color: var(--p-ink);
}
.muted { color: var(--p-muted); }
.mono {
  font-family: var(--font-mono);
  font-size: 0.86em;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.num { font-variant-numeric: tabular-nums; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------------------------------------------------------------- buttons */
.btn {
  height: 48px;
  padding: 0 22px;
  border-radius: var(--r-btn);
  font: 500 15px/1 var(--font-text);
  letter-spacing: 0;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn--primary { background: var(--p-action); color: var(--p-action-ink); }
.btn--primary:hover { background: color-mix(in oklab, var(--p-action) 84%, var(--p-ink)); }
.btn--secondary {
  background: transparent;
  color: var(--p-ink);
  border-color: color-mix(in oklab, var(--p-ink) 24%, transparent);
}
.btn--secondary:hover {
  background: color-mix(in oklab, var(--p-ink) 5%, transparent);
  border-color: color-mix(in oklab, var(--p-ink) 42%, transparent);
}
.btn--lg { height: 56px; padding-inline: 28px; font-size: 16px; }
.btn--ghost { background: transparent; color: inherit; border-color: transparent; padding-inline: 4px; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.btn--ghost:hover { text-decoration-color: currentColor; }
@media (max-width: 639px) {
  .btn { height: 48px; }
  .btn--lg { height: 52px; }
}
.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--p-ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, var(--p-ink) 30%, transparent);
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color var(--dur) var(--ease);
}
.link::after {
  content: "\2192";
  display: inline-block;
  text-decoration: none;
  transition: transform var(--dur) var(--ease);
}
.link:hover { text-decoration-color: currentColor; }
.link:hover::after { transform: translateX(3px); }

/* ---------------------------------------------------------------- nav */
.nav {
  height: var(--nav);
  background: var(--p-bg);
  border-bottom: 1px solid color-mix(in oklab, var(--p-ink) 12%, transparent);
}
.nav__bar { gap: 40px; }
.nav__logo { gap: 10px; font: 500 25px/1 var(--font-display); letter-spacing: -0.03em; }
.nav__logo img { height: 30px; }
.nav__links { gap: 2px; }
.nav__link {
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.005em;
}
.nav__link::before { height: 1px; bottom: 4px; left: 14px; right: 14px; }
.nav__link[aria-current="page"]::after { height: 1px; bottom: 4px; left: 14px; right: 14px; }
.nav__actions { gap: 22px; }
.nav__actions .btn { height: 44px; font-size: 14px; padding-inline: 18px; }
.nav__actions .nav__link { padding-inline: 0; color: var(--p-muted); }
.nav__actions .nav__link:hover { color: var(--p-ink); }
.nav__actions .nav__link::before { left: 0; right: 0; bottom: 6px; }
@media (max-width: 1100px) {
  .nav__bar { gap: 24px; }
  .nav__link { padding-inline: 9px; }
  .nav__link::before, .nav__link[aria-current="page"]::after { left: 9px; right: 9px; }
  .nav__actions { gap: 14px; }
  .nav__actions .btn { padding-inline: 14px; }
}
@media (max-width: 1023px) {
  .nav__link { padding-inline: 12px; }
}
@media (max-width: 639px) {
  .nav:not(.is-open) .nav__actions { display: none; }
  .nav:not(.is-open) .nav__toggle { margin-left: auto; }
  .nav__logo { font-size: 21px; gap: 7px; }
  .nav__logo img { height: 25px; }
  .nav__toggle { border-radius: var(--r-sm); }
}
:where(main) { position: relative; }

/* skip link */
.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--p-ink);
  color: var(--p-bg);
  font: 500 14px/1 var(--font-text);
  transform: translateY(-160%);
  transition: transform 160ms var(--ease);
}
.skip-link:focus-visible { transform: none; outline: 2px solid var(--p-bg); outline-offset: 2px; }

/* ---------------------------------------------------------------- page masthead (inner pages) */
main > section.page-hero,
main > section.legal-hero {
  padding: calc(var(--nav) + clamp(52px, 7vw, 92px)) 0 clamp(44px, 5vw, 64px);
}
.page-hero {
  border-bottom: 1px solid var(--line);
}
.page-hero__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.page-hero__top p { margin: 0; }
.page-hero__meta {
  color: var(--p-muted);
  font: 400 12px/1.4 var(--font-mono);
  letter-spacing: 0.02em;
}
.page-hero h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(46px, 5.6vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.page-hero__lead {
  max-width: 58ch;
  margin-top: clamp(24px, 3vw, 36px);
  color: var(--p-ink);
  font-size: clamp(18px, 1.35vw, 22px);
  line-height: 1.5;
}
.page-hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: end;
}
.page-hero__grid > h1 { grid-column: 1 / span 8; }
.page-hero__aside { grid-column: 10 / -1; align-self: end; }
@media (max-width: 1023px) {
  .page-hero__grid > h1 { grid-column: 1 / -1; }
  .page-hero__aside { grid-column: 1 / -1; }
}
.page-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin: clamp(32px, 4vw, 48px) 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--p-muted);
  font: 400 12px/1.5 var(--font-mono);
  letter-spacing: 0.01em;
}
.page-hero__facts li { display: flex; align-items: center; gap: 9px; }
.page-hero__facts li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--p-accent);
}

/* ---------------------------------------------------------------- generic inner section */
.page-section { padding-block: clamp(56px, 6.4vw, 96px); border-bottom: 1px solid var(--line); }
.page-section:last-of-type { border-bottom: 0; }
.page-section__head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 6vw, 96px);
  align-items: start;
  margin-bottom: clamp(36px, 4vw, 56px);
}
.page-section__head .sec-title { max-width: 16ch; }
.page-section__head p { max-width: 52ch; margin-top: 6px; }
@media (max-width: 900px) {
  .page-section__head { grid-template-columns: 1fr; gap: 18px; }
}

/* a two-column editorial block: copy left, content right */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: start;
}
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split--right { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
@media (max-width: 900px) {
  .split, .split--even, .split--right { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- rows (fees, add-ons, contents) */
.rows { border-top: 1px solid var(--line); }
.rows > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: border-color var(--dur) var(--ease);
}
.rows > li:hover { border-bottom-color: color-mix(in oklab, var(--p-ink) 32%, transparent); }
.rows__name { font-family: var(--font-display); font-size: clamp(21px, 1.5vw, 25px); line-height: 1.2; letter-spacing: -0.02em; }
.rows__value { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; font: 500 13px/1.4 var(--font-mono); color: var(--p-accent); }
.rows > li > p { grid-column: 1; max-width: 58ch; color: var(--p-muted); font-size: 15px; }
@media (max-width: 639px) {
  .rows > li { grid-template-columns: 1fr; gap: 6px; }
  .rows__value { grid-column: 1; grid-row: auto; text-align: left; }
}

/* ---------------------------------------------------------------- check list */
.checks { gap: 12px; }
.checks li { grid-template-columns: 16px minmax(0, 1fr); gap: 12px; }
.checks li::before {
  width: 16px;
  height: 16px;
  margin-top: 4px;
  background: var(--p-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.6 6 12.1 13.5 4.4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px 15px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.6 6 12.1 13.5 4.4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px 15px no-repeat;
}

/* ---------------------------------------------------------------- forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; }
.form-grid > .full { grid-column: 1 / -1; }
.field { display: grid; gap: 8px; }
.field > label,
.field > .label {
  font: 500 13px/1.4 var(--font-text);
  letter-spacing: 0.01em;
  color: var(--p-ink);
}
.field .req { color: var(--p-accent); }
.field :is(input, select, textarea) {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid color-mix(in oklab, var(--p-ink) 20%, transparent);
  border-radius: var(--r-sm);
  background: color-mix(in oklab, #ffffff 70%, var(--p-bg));
  color: var(--p-ink);
  font: 400 16px/1.4 var(--font-text);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.field :is(input, select, textarea):hover { border-color: color-mix(in oklab, var(--p-ink) 38%, transparent); }
.field :is(input, select, textarea):focus {
  outline: none;
  border-color: var(--p-accent);
  background: #fffdf8;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--p-accent) 14%, transparent);
}
.field textarea { height: auto; min-height: 132px; padding: 12px 14px; resize: vertical; }
.field__hint { color: var(--p-muted); font-size: 13px; line-height: 1.45; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%2359626e' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
@media (max-width: 639px) {
  .form-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* ---------------------------------------------------------------- footer */
.site-footer {
  background: var(--p-inv-bg);
  color: var(--p-inv-ink);
  padding: clamp(72px, 8vw, 112px) 0 28px;
}
.site-footer__cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 40px;
  padding-bottom: clamp(48px, 6vw, 72px);
  border-bottom: 1px solid color-mix(in oklab, var(--p-inv-ink) 18%, transparent);
}
.site-footer__cta h2 {
  max-width: 12ch;
  margin: 18px 0 0;
  font-size: clamp(48px, 6.2vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--p-inv-ink);
}
.site-footer__cta .btn { background: var(--p-inv-ink); color: var(--p-inv-bg); }
.site-footer__cta .btn:hover { background: color-mix(in oklab, var(--p-inv-ink) 86%, var(--p-inv-bg)); }
.site-footer__cta p { max-width: 42ch; margin: 16px 0 0; color: var(--p-inv-muted); font-size: 17px; }
.site-footer__photo {
  height: clamp(150px, 18vw, 240px);
  overflow: hidden;
  border-bottom: 1px solid color-mix(in oklab, var(--p-inv-ink) 18%, transparent);
}
.site-footer__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; }
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 0.65fr));
  gap: 32px 40px;
  padding: clamp(44px, 5vw, 64px) 0 clamp(36px, 4vw, 52px);
}
.site-footer__brand .nav__logo { color: var(--p-inv-ink); font-size: 21px; }
.site-footer__brand .nav__logo img { height: 26px; }
.site-footer__brand p { max-width: 30ch; margin-top: 18px; color: var(--p-inv-muted); font-size: 15px; line-height: 1.6; }
.site-footer__col h3 {
  margin-bottom: 16px;
  color: var(--p-inv-muted);
  font: 500 11px/1.2 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-footer__col ul { display: grid; gap: 11px; }
.site-footer__col a { color: var(--p-inv-ink); font-size: 15px; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color var(--dur) var(--ease); }
.site-footer__col a:hover { border-bottom-color: var(--p-inv-ink); }
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
  padding-top: 24px;
  border-top: 1px solid color-mix(in oklab, var(--p-inv-ink) 18%, transparent);
  color: var(--p-inv-muted);
  font-size: 12px;
  line-height: 1.6;
}
.site-footer__legal span:nth-child(2) { max-width: 62ch; }
.site-footer__legal details summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; list-style: none; }
.site-footer__legal details summary::-webkit-details-marker { display: none; }
.site-footer__legal details summary::after { content: "+"; color: var(--p-inv-accent); font-family: var(--font-mono); }
.site-footer__legal details[open] summary::after { content: "–"; }
.site-footer__legal details p { margin-top: 8px; max-width: 90ch; }
.site-footer__credit {
  margin-top: 18px;
  color: var(--p-inv-muted);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}
.site-footer__credit a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.site-footer__credit a:hover { border-bottom-color: currentColor; }
@media (max-width: 1023px) {
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 800px) {
  .site-footer__cta { grid-template-columns: 1fr; }
}
@media (max-width: 639px) {
  .site-footer { padding-top: 64px; }
  .site-footer__grid { gap: 32px 24px; }
  .site-footer__col a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer__col ul { gap: 0; }
}

/* ---------------------------------------------------------------- legal pages */
.legal-hero { padding: calc(var(--nav) + clamp(52px, 7vw, 88px)) 0 clamp(36px, 4vw, 52px); border-bottom: 1px solid var(--line); }
.legal-hero h1 { font-size: clamp(44px, 5vw, 76px); letter-spacing: -0.035em; margin-top: 22px; }
.legal-hero p { max-width: 56ch; margin-top: 18px; color: var(--p-muted); }
main > section.page-section > .wrap.legal-layout { display: grid; }
.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 760px);
  gap: clamp(40px, 7vw, 96px);
}
.legal-toc { max-height: calc(100svh - var(--nav) - 48px); overflow-y: auto; scrollbar-width: thin; padding-right: 6px; }
.legal-toc { position: sticky; top: calc(var(--nav) + 28px); align-self: start; display: grid; gap: 14px; }
.legal-toc .t-label { color: var(--p-muted); font: 500 11px/1.2 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.legal-toc ol { display: grid; gap: 0; counter-reset: toc; }
.legal-toc li { counter-increment: toc; border-top: 1px solid var(--line); }
.legal-toc li:last-child { border-bottom: 1px solid var(--line); }
.legal-toc a { display: flex; gap: 10px; padding: 9px 0; color: var(--p-muted); font-size: 13px; line-height: 1.45; transition: color var(--dur) var(--ease); }
.legal-toc a::before { content: counter(toc, decimal-leading-zero); color: color-mix(in oklab, var(--p-muted) 65%, transparent); font: 400 10px/1.6 var(--font-mono); }
.legal-toc a:hover, .legal-toc a.is-current { color: var(--p-ink); }
.legal-body { min-width: 0; }
.legal-body > h2 {
  margin: 44px 0 14px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.legal-body > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-body p, .legal-body li { color: color-mix(in oklab, var(--p-ink) 88%, var(--p-muted)); font-size: 16px; line-height: 1.72; }
.legal-body p + p { margin-top: 14px; }
.legal-body ul, .legal-body ol { display: grid; gap: 10px; margin: 14px 0 0; padding-left: 22px; list-style: disc; }
.legal-body ol { list-style: decimal; }
.legal-body li::marker { color: var(--p-accent); }
.legal-body a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: color-mix(in oklab, var(--p-ink) 35%, transparent); }
.legal-body a:hover { text-decoration-color: currentColor; }
.legal-body strong { font-weight: 600; }
.legal-updated { margin-top: 18px; color: var(--p-muted); font: 400 12px/1.5 var(--font-mono); }
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; gap: 32px; }
  .legal-toc { position: static; order: 2; }
  .legal-body { order: 1; }
  .legal-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .legal-toc li { border-top: 1px solid var(--line); }
}

/* ---------------------------------------------------------------- reduce motion */
@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;
    scroll-behavior: auto !important;
  }
}
