/* Reuse these sizes and classes for every new content section. */
.homepage {
  --section-background: #E8EDE7;
  --section-gradient: linear-gradient(76deg, #CFDDE4 0%, #E8E7DF 29%, #F5F2EA 57%, #E9E5D7 82%, #EEEDE6 100%);
  --section-title-color: #000000;
  --section-text-color: #000000;
  --section-divider: #19293C3B; /* Navy at approximately 23% opacity. */
  --section-title-size: clamp(40px, min(6.8vw, 11vh), 96px);
  --section-subtitle-size: clamp(24px, 2.3vw, 32px);
  --section-text-size: clamp(18px, min(1.6vw, 2.8vh), 24px);
}

.content-section {
  background: var(--section-background);
  color: var(--section-text-color);
}
.section-title {
  margin: 0;
  color: var(--section-title-color);
  font-family: "Playfair Display", serif;
  font-size: var(--section-title-size);
  font-weight: 400;
  line-height: 1.08;
}
.section-subtitle {
  margin: 0 0 14px;
  color: #000000;
  font-family: "Playfair Display", serif;
  font-size: var(--section-subtitle-size);
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
}
.section-text {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: var(--section-text-size);
  font-weight: 400;
  line-height: 1.5;
}
.section-introduction { margin-top: 32px; }

.mission-section {
  background: var(--section-gradient);
  display: grid;
  grid-template-columns: 43% 57%;
}
.mission-title-accent,
.section-title-accent { color: #B64627; }
.mission-introduction {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 24px 100px var(--page-padding);
  border-right: 1px solid var(--section-divider);
}
.mission-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 8vh, 112px) var(--page-padding) clamp(48px, 8vh, 112px) clamp(32px, 5.3vw, 80px);
}
.mission-statement {
  padding: 24px 6px 48px;
  border-top: 1px solid var(--section-divider);
}
.mission-statement + .mission-statement { padding-bottom: 64px; }
.mission-statement:last-child { border-bottom: 1px solid var(--section-divider); }
.mission-rings {
  position: absolute;
  z-index: -1;
  width: 310px;
  height: 310px;
  right: -70px;
  bottom: -100px;
  border: 1px solid #19293C1A;
  border-radius: 50%;
  pointer-events: none;
}
.mission-rings::before,
.mission-rings::after {
  content: "";
  position: absolute;
  inset: 40px;
  border: 1px solid #19293C1A;
  border-radius: 50%;
}
.mission-rings::after { inset: 80px; }

@media (max-width: 900px) {
  .mission-section { grid-template-columns: 1fr; }
  .mission-introduction { padding: 56px var(--page-padding) 40px; border-right: 0; }
  .mission-details { padding: 0 var(--page-padding) 48px; }
  .mission-statement, .mission-statement + .mission-statement { padding: 24px 0 32px; }
  .mission-desktop-break { display: none; }
}

/* Services use native disclosures for mouse, touch, and keyboard support. */
.services-section {
  position: relative;
  isolation: isolate;
  background: var(--section-gradient);
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-content: center;
  gap: clamp(40px, 7vw, 110px);
  padding: clamp(48px, 8vh, 112px) var(--page-padding);
}
.services-introduction { min-width: 0; }
.services-botanicals {
  --botanical-origin: bottom left;
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: -1;
  width: 42%;
  height: auto;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}
@media (max-width: 600px) {
  .services-botanicals { width: 70%; }
}
.services-accordion { min-width: 0; }
.service-item { box-sizing: border-box; border-top: 1px solid var(--section-divider); }
.service-item:last-child { border-bottom: 1px solid var(--section-divider); }
.service-item summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(22px, 3.6vh, 36px) 0;
  color: #000000;
  font-family: "Playfair Display", serif;
  font-size: var(--section-subtitle-size);
  font-weight: 600;
  line-height: 1.2;
  list-style: none;
  cursor: pointer;
}
.service-item summary::-webkit-details-marker { display: none; }
.service-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}
.service-item[open] summary::after { content: "−"; }
.service-item summary:focus-visible {
  outline: 2px solid #19293C;
  outline-offset: 5px;
}
.service-item .section-text {
  padding: 0 32px 28px 0;
  color: #000000;
}
@media (max-width: 900px) {
  .services-section { grid-template-columns: 1fr; gap: 40px; padding: 56px var(--page-padding); }
  .service-item .section-text { padding-right: 0; }
}

.training-section {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: clamp(40px, 5vw, 80px);
  padding: clamp(56px, 8vh, 112px) var(--page-padding);
  background: var(--section-gradient);
}
.training-introduction,
.training-details { min-width: 0; }
.training-eyebrow {
  margin: 0 0 24px;
  color: #B64627;
  font: 500 13px/1.5 "DM Sans", sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.training-eyebrow::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  margin-top: 16px;
  background: #B64627;
}
.training-introduction .section-introduction { max-width: 560px; }
.training-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
  margin: 0;
  color: #19293C;
  font-family: "DM Sans", sans-serif;
}
.training-facts > div { padding: 20px 0; border-top: 1px solid var(--section-divider); }
.training-facts > div:first-child { border-top: 0; }
.training-fact-wide { grid-column: 1 / -1; }
.training-facts dt { margin-bottom: 8px; font-size: 14px; }
.training-facts dd { margin: 0; font-size: var(--section-text-size); font-weight: 500; line-height: 1.4; }
.training-detail-note { display: block; margin-top: 6px; font-size: 16px; font-weight: 400; }
.training-register { margin-top: 24px; }
.training-register:focus-visible { outline-color: #B64627; }
.training-link-note { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 900px) {
  .training-section { grid-template-columns: 1fr; gap: 40px; }
}

/* The gradient runs gently upward from the blue left edge to warm ivory. */
.approach-section {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(48px, 9vh, 96px);
  padding: clamp(48px, 8vh, 96px) var(--page-padding);
  background: var(--section-gradient);
}
.approach-botanicals {
  position: absolute;
  top: 0;
  right: 0;
  z-index: -1;
  width: 48%;
  height: auto;
  /* Hidden before JavaScript starts; the PNG supplies its own final transparency. */
  opacity: 0;
  pointer-events: none;
  user-select: none;
  transform-origin: top right;
}
@media (max-width: 600px) {
  .approach-botanicals { width: 62%; }
}
.approach-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}
.approach-step { min-width: 0; }
.approach-number {
  position: relative;
  display: block;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--section-divider);
  color: #B64627;
  font-family: "Playfair Display", serif;
  font-size: clamp(40px, 4.5vw, 64px);
  font-weight: 400;
  line-height: 1;
}
.approach-number::after {
  content: "";
  position: absolute;
  left: 4px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: #B64627;
}
.approach-step-title {
  margin: 32px 28px 20px 0;
  color: #000000;
  font-family: "Playfair Display", serif;
  font-size: var(--section-subtitle-size);
  font-weight: 600;
  line-height: 1.2;
}
.approach-step .section-text { padding-right: 28px; }
.approach-step:last-child .section-text { padding-right: 0; }

@media (max-width: 900px) {
  .approach-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
}
@media (max-width: 600px) {
  .approach-steps { grid-template-columns: 1fr; }
  .approach-step .section-text { padding-right: 0; }
}

/* Values gallery: expanding photographs share a single horizontal row. */
.values-section { padding: clamp(48px, 8vh, 96px) var(--page-padding); }
.values-introduction { max-width: 720px; }
.values-gallery {
  display: flex;
  gap: 12px;
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
}
.value-panel {
  position: relative;
  isolation: isolate;
  flex: 1 1 0%;
  min-width: 0;
  height: clamp(420px, 52vh, 540px);
  overflow: hidden;
  background: #19293C;
  color: #FFFFFF;
  transition: flex-grow 950ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.value-panel.is-open { flex-grow: 3.5; }
.value-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-value="strategic"] .value-photo { object-position: 63% center; }
[data-value="trustworthy"] .value-photo { object-position: 32% center; }
[data-value="excellence"] .value-photo { object-position: 22% center; }
[data-value="sustainability"] .value-photo { object-position: 83% center; }
.value-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #19293C00 25%, #19293C33 48%, #101923E6 100%);
  pointer-events: none;
}
.value-toggle {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #FFFFFF;
  cursor: pointer;
}
.value-toggle:focus-visible { outline: 3px solid #FFFFFF; outline-offset: -6px; }
.value-letter {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  font: 400 clamp(72px, 8vw, 120px)/1 "Playfair Display", serif;
  transition: left 950ms cubic-bezier(0.22, 0.61, 0.36, 1), transform 950ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.is-open .value-letter { left: 24px; transform: none; }
.value-copy {
  position: absolute;
  z-index: 3;
  left: clamp(112px, 10vw, 148px);
  right: 24px;
  bottom: 32px;
  pointer-events: none;
}
.value-title { margin: 0 0 12px; color: #FFFFFF; font: 400 clamp(24px, 2vw, 30px)/1.2 "Playfair Display", serif; }
.value-copy p { margin: 0; font: 400 16px/1.5 "DM Sans", sans-serif; }
.values-gallery.is-ready .value-copy {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s 180ms;
}
.values-gallery.is-ready .is-open .value-copy {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 400ms 350ms ease, transform 400ms 350ms ease, visibility 0s;
}
/* Readable fallback when scripting is unavailable. */
.values-gallery:not(.is-ready) { flex-wrap: wrap; }
.values-gallery:not(.is-ready) .value-panel { flex-basis: 300px; }
.values-gallery:not(.is-ready) .value-letter { left: 24px; transform: none; }
/* Fit the gallery into the viewport after measuring the heading and intro
   through normal flex layout, rather than imposing a minimum photo height. */
@media (min-width: 701px) {
  .values-section:has(.values-gallery.is-ready) {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    padding-block: clamp(24px, 6vh, 64px);
  }
  .values-section > .section-title,
  .values-section > .values-introduction { flex-shrink: 0; }
  .values-section > .values-introduction { margin-top: clamp(16px, 3vh, 32px); }
  .values-gallery.is-ready {
    flex: 1 1 0;
    min-height: 0;
    margin-top: clamp(24px, 5vh, 48px);
  }
  .values-gallery.is-ready .value-panel { height: auto; min-height: 0; }
}
@media (min-width: 701px) and (max-height: 550px) {
  .values-gallery.is-ready .value-letter { font-size: 64px; bottom: 16px; }
  .values-gallery.is-ready .value-copy { left: 100px; right: 16px; bottom: 16px; }
  .values-gallery.is-ready .value-title { font-size: 22px; margin-bottom: 8px; }
  .values-gallery.is-ready .value-copy p { font-size: 14px; line-height: 1.4; }
}
@media (max-width: 700px) {
  .values-gallery { flex-direction: column; gap: 10px; margin-top: 36px; }
  .value-panel::after {
    background:
      linear-gradient(90deg, #101923D9 0%, #10192380 30%, #10192300 70%),
      linear-gradient(180deg, #19293C00 25%, #19293C33 48%, #101923E6 100%);
  }
  .value-panel { flex: none; height: 100px; transition: height 800ms cubic-bezier(0.22, 0.61, 0.36, 1); }
  .value-panel.is-open { flex: none; height: 380px; }
  .value-letter { font-size: 64px; left: 24px; bottom: 20px; transform: none; }
  .value-copy { left: 100px; bottom: 24px; right: 20px; }
  .values-gallery:not(.is-ready) .value-panel { flex-basis: auto; height: 380px; }
}
@media (prefers-reduced-motion: reduce) {
  .value-panel, .value-letter,
  .values-gallery.is-ready .value-copy,
  .values-gallery.is-ready .is-open .value-copy { transition: none; }
}

/* The artwork fills the right edge; a separate fade blends it into the page. */
.publication-section {
  position: relative;
  display: flex;
  align-items: center;
  padding: clamp(48px, 8vh, 96px) var(--page-padding);
  background: #E8EDE7;
}
.publication-art {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 60%;
  overflow: hidden;
}
.publication-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}
.publication-art::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 60%;
  /* Figma blend stops: 100%, 97%, 65%, and 0% opacity. */
  background: linear-gradient(90deg, #E8EDE7 0%, #E8EDE7F7 42%, #E8EDE7A6 75%, #E8EDE700 100%);
  pointer-events: none;
}
.publication-copy { position: relative; width: 55%; }
.publication-copy .section-text { max-width: 570px; }
.publication-detail { margin-top: 24px; }

@media (max-width: 700px) {
  .publication-section {
    flex-direction: column;
    align-items: stretch;
    padding: 48px 0 0;
  }
  .publication-copy { box-sizing: border-box; width: 100%; padding: 0 var(--page-padding) 32px; }
  .publication-art { position: relative; order: 1; width: 100%; height: 60vh; height: 60dvh; min-height: 360px; }
  .publication-art::after {
    width: 100%;
    height: 35%;
    background: linear-gradient(180deg, #E8EDE7 0%, #E8EDE7F7 42%, #E8EDE7A6 75%, #E8EDE700 100%);
  }
}

/* The book collection is taller than a screen; its portrait sticks until the end. */
.library-section {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: #E8EDE7;
}
.library-copy {
  grid-area: 1 / 1;
  box-sizing: border-box;
  width: 54%;
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: clamp(64px, 9vh, 112px) 24px 80px var(--page-padding);
}
.library-copy .section-introduction { max-width: 620px; }
.library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px 24px;
  width: 90%;
  max-width: 600px;
  list-style: none;
  padding: 0;
  margin: 56px 0 0;
}
.library-book { min-width: 0; text-align: center; }
.library-cover {
  position: relative;
  width: 82%;
  max-width: 140px;
  aspect-ratio: 3 / 4;
  margin: 0 auto;
}
.library-cover img {
  position: absolute;
  top: 0;
  left: 50%;
  width: auto;
  height: 100%;
  max-width: none;
  /* Center the cover itself, compensating for the shadow inside the PNG. */
  transform: translateX(-42.5%);
}
.library-book-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 44px;
  margin: 18px 0 10px;
  font: 400 16px/22px "Playfair Display", serif;
  color: #19293C;
}
.library-buy {
  display: inline-block;
  box-sizing: border-box;
  padding: 4px 16px;
  min-height: 30px;
  border: 1px solid #19293C;
  border-radius: 100px;
  color: #19293C;
  background: transparent;
  font: 400 12px/20px "DM Sans", sans-serif;
  text-decoration: none;
}
.library-buy:hover { background: #DFE6DF; }
.library-buy:focus-visible { outline: 2px solid #19293C; outline-offset: 4px; }
.library-art {
  /* Share the content row so the photo extends behind the scrolling copy. */
  grid-area: 1 / 1;
  justify-self: end;
  width: 72%;
  pointer-events: none;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  height: 100dvh;
  min-width: 0;
}
.library-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}
.library-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #E8EDE7 0%, #E8EDE7F7 20%, #E8EDE7A6 38%, #E8EDE700 58%),
    linear-gradient(0deg, #E8EDE7 0%, #E8EDE700 22%);
  pointer-events: none;
}
@media (max-width: 900px) {
  .library-section { grid-template-columns: 1fr; }
  .library-copy { grid-area: auto; width: 100%; padding: 56px var(--page-padding); }
  .library-grid { width: 100%; max-width: none; }
  .library-art { grid-area: auto; position: relative; width: 100%; height: 70vh; height: 70dvh; }
  .library-art::after {
    background: linear-gradient(180deg, #E8EDE7 0%, #E8EDE700 25%);
  }
}
@media (max-width: 600px) {
  .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 20px; }
}

/* A compact closing invitation, deliberately without the full-screen minimum. */
.services-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: #19293C;
  color: #FFFFFF;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.cta-copy {
  padding: clamp(48px, 7vw, 96px) clamp(32px, 4vw, 64px) clamp(48px, 7vw, 96px) var(--page-padding);
}
.cta-copy h2 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(32px, 4.5vw, 64px);
  font-weight: 400;
  line-height: 1.15;
  color: #FFFFFF;
}
.cta-copy .section-text { max-width: 510px; margin-top: 28px; }
.cta-button { border: 1px solid #FFFFFF; margin-top: 36px; }
.cta-art { position: relative; min-width: 0; }
.cta-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
@media (max-width: 700px) {
  .services-cta { grid-template-columns: 1fr; }
  .cta-copy { padding: 48px var(--page-padding); }
  .cta-art { aspect-ratio: 3086 / 2056; }
}

.library-category { grid-column: 1 / -1; margin-bottom: 0; }
.library-category h3 {
  margin: 0;
  color: #19293C;
  font-family: "Playfair Display", serif;
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 400;
  line-height: 1.3;
}
