:root {
  --cream: #F4EFE3;
  --cream-2: #E3D8BC;
  --stone: #D6C9A6;
  --ink: #24312A;
  --ink-soft: #3E4E3F;
  --sage: #93A48F;
  --sage-deep: #6E856B;
  --clay: #B47259;
  --body: #5A5347;
  --body-soft: #7A7264;
  --hairline: rgba(36, 49, 42, 0.16);
  --hairline-soft: rgba(36, 49, 42, 0.10);

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;

  --page-max: 1240px;
  --gutter: clamp(20px, 4vw, 44px);
  --header-h: 82px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  animation: pageIn 320ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
body.leaving {
  animation: pageOut 200ms cubic-bezier(0.55, 0.06, 0.68, 0.19) forwards;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pageOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  body, body.leaving { animation: none; }
}

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

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 500;
  color: var(--sage-deep);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--sage-deep);
  opacity: 0.6;
}

.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header / Nav ---------- */
header.site {
  height: var(--header-h);
  background: var(--ink);
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 1px 0 rgba(147, 164, 143, 0.12) inset,
              0 6px 24px -12px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 20;
}
header.site .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  color: var(--cream);
}
.brand::before {
  content: "";
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background-color: var(--cream);
  background-image: url("logo.png");
  background-repeat: no-repeat;
  background-size: 170% auto;
  background-position: center -6px;
  align-self: center;
  flex-shrink: 0;
}
.brand .brand-name {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  font-variation-settings: "opsz" 96;
  letter-spacing: -0.01em;
  color: var(--cream);
  line-height: 1.1;
}
.brand .brand-sub {
  grid-column: 2;
  grid-row: 2;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 239, 227, 0.6);
  line-height: 1.1;
  margin-top: 2px;
}
@media (max-width: 720px) {
  .brand { column-gap: 10px; }
  .brand::before { width: 38px; height: 38px; border-radius: 8px; background-size: 170% auto; background-position: center -4px; }
  .brand .brand-name { font-size: 17px; }
  .brand .brand-sub { font-size: 10px; letter-spacing: 0.14em; }
}
nav.primary {
  display: flex;
  gap: 30px;
  font-size: 14px;
  color: rgba(244, 239, 227, 0.72);
}
nav.primary a {
  transition: color 160ms;
  position: relative;
  padding: 4px 0;
}
nav.primary a:hover { color: var(--cream); }
nav.primary a.active {
  color: var(--cream);
}
nav.primary a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -3px;
  height: 1.5px;
  background: var(--sage);
}
@media (max-width: 720px) {
  nav.primary { gap: 18px; font-size: 13px; }
}

/* Hamburger toggle (added by transitions.js on mobile) */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px 6px;
  gap: 5px;
  flex-direction: column;
  align-items: flex-end;
  z-index: 30;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.6px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 240ms ease, opacity 200ms ease, width 240ms ease;
  transform-origin: center;
}
.nav-toggle span:nth-child(2) { width: 16px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 22px; }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 22px; }

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  header.site .wrap { position: relative; }
  nav.primary {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--ink);
    padding: 8px 0 16px;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.35);
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms cubic-bezier(0.22, 0.61, 0.36, 1),
                padding 240ms ease;
    padding-top: 0;
    padding-bottom: 0;
  }
  nav.primary.open {
    max-height: 340px;
    padding-top: 8px;
    padding-bottom: 16px;
  }
  nav.primary a {
    padding: 12px var(--gutter);
    font-size: 15px;
    border-bottom: 1px solid rgba(244, 239, 227, 0.08);
  }
  nav.primary a:last-child { border-bottom: none; }
  nav.primary a.active::after { display: none; }
  nav.primary a.active { color: var(--sage); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  transition: background 180ms, transform 180ms;
}
.btn:hover { background: var(--sage-deep); }
.btn .arrow { transition: transform 200ms; }
.btn:hover .arrow { transform: translateX(3px); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.btn.ghost:hover { background: var(--stone); }

.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 3px;
  transition: color 160ms, border-color 160ms;
}
.link-cta:hover { color: var(--clay); border-color: var(--clay); }

/* ---------- Footer ---------- */
footer.site {
  padding: 26px 0;
  background: var(--cream);
  border-top: 1px solid var(--hairline-soft);
  font-size: 12.5px;
  color: var(--body-soft);
  position: relative;
}
footer.site::before,
footer.site::after {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  width: 62px;
  height: 82px;
  background-image: url("orchid.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center bottom;
  opacity: 0.34;
  pointer-events: none;
  z-index: 0;
}
footer.site::before {
  left: 1.5vw;
  transform: rotate(-5deg);
}
footer.site::after {
  right: 1.5vw;
  transform: rotate(5deg) scaleX(-1);
}
footer.site .wrap {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 720px) {
  footer.site::before,
  footer.site::after { display: none; }
}
footer.site .brand-small {
  font-family: var(--serif);
  color: var(--ink);
  font-size: 15px;
}
footer.site .crisis {
  font-style: italic;
  max-width: 60ch;
}

/* ---------- Interior page shell ---------- */
main.page {
  padding: clamp(48px, 6vw, 80px) 0 clamp(64px, 8vw, 96px);
  min-height: calc(100vh - var(--header-h) - 100px);
}
.page-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.page-head h1 {
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144;
  margin-top: 16px;
}
.page-head .lede {
  margin-top: 22px;
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 34em;
  line-height: 1.55;
}

h2.section-h {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-top: 10px;
}

/* ---------- Hairline divider ---------- */
.rule {
  height: 1px;
  background: var(--hairline);
  border: none;
  margin: 40px 0;
}

/* ---------- Lift-on-hover cards ---------- */
.lift {
  transition:
    transform 260ms cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 260ms cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 260ms ease,
    background-color 260ms ease;
  will-change: transform;
}
.lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 40px -24px rgba(36, 49, 42, 0.28),
              0 6px 16px -12px rgba(36, 49, 42, 0.14);
  border-color: rgba(147, 164, 143, 0.55);
}
a.lift, a.lift:visited { color: inherit; }
@media (prefers-reduced-motion: reduce) {
  .lift { transition: none; }
  .lift:hover { transform: none; box-shadow: none; }
}
