/* A calmer navigation and playful, cloud-shaped section transitions. */
.site-header {
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand actions" "navigation navigation";
  gap: 0 2rem;
}

.site-branding {
  grid-area: brand;
  width: fit-content;
  margin-block: 1rem;
  gap: 1rem;
}

.site-branding__logo { height: 4.8rem; }
.site-branding__name {
  display: grid;
  max-width: none;
  gap: 0.2rem;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.25;
}
.site-branding__overline {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 550;
  letter-spacing: 0.05em;
  color: var(--color-muted);
}

.header-actions {
  grid-area: actions;
  display: flex;
  justify-self: end;
  gap: 0.8rem;
}
.header-actions .button { padding: 0.7rem 1.4rem; font-size: 0.94rem; }
.site-header .menu-toggle { display: none; grid-area: toggle; }

.site-header .site-navigation {
  grid-area: navigation;
  display: block;
  width: 100%;
  padding: 0.35rem 0;
  justify-self: stretch;
  border-top: 1px solid var(--color-border);
}
.site-navigation .menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.3rem, 1.8vw, 1.7rem);
}
.site-navigation .menu-item {
  display: flex;
  align-items: center;
  min-width: 0;
}
.site-navigation a {
  min-height: 2.85rem;
  padding: 0.65rem 1rem;
  border-radius: 0.65rem;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}
.site-navigation .has-submenu-toggle > a { padding-inline-end: 0.3rem; }
.submenu-toggle {
  display: inline-grid;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.85rem;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  color: var(--color-link);
}
.submenu-toggle:hover, .submenu-toggle[aria-expanded="true"] { background: var(--color-sun-soft); }
.submenu-toggle svg { width: 0.85rem; height: 0.85rem; transition: transform 180ms ease; }
.submenu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.site-navigation .sub-menu {
  top: 100%;
  min-width: 15rem;
  padding: 0.5rem;
  border-radius: 1rem;
  border-color: var(--color-border);
  box-shadow: 0 1rem 2.5rem rgba(54,54,54,.13);
}
.site-navigation .sub-menu a { white-space: normal; }
.site-navigation[data-enhanced] .menu-item > .sub-menu { display: none; }
.site-navigation[data-enhanced] .menu-item.is-submenu-open > .sub-menu { display: block; }
.site-navigation .current-menu-item > a, .site-navigation .current-menu-ancestor > a {
  background: var(--color-gold-soft);
  color: var(--color-link-hover);
}

/* The photo and copy have their own space, with decoration outside the text. */
.hero.hero--clouds {
  display: block;
  min-height: 0;
  overflow: clip;
  background: var(--color-sun-soft);
}
.hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(3rem, 5vw, 5rem) 2rem;
}
.hero--clouds .hero__copy {
  max-width: none;
  padding: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
  color: var(--color-ink);
}
.hero--clouds .hero__copy h1 {
  color: var(--color-ink);
  font-size: clamp(2.45rem, 4.2vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: pretty;
}
.hero__copy h1 span { color: var(--color-olive); }
.hero--clouds .hero__copy > p {
  max-width: 32rem;
  font-size: 1.06rem;
  line-height: 1.75;
}
.hero--clouds .hero__copy .eyebrow { color: var(--color-link); font-size: 0.8rem; }
.hero--clouds .hero__actions { align-items: center; gap: 1rem 1.4rem; margin-block-start: 1.8rem; }
.hero__text-link { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: 0.95rem; font-weight: 650; }
.hero--clouds .hero__copy .hero__location { margin-block: 1.5rem 0; color: var(--color-muted); font-size: 0.85rem; }
.hero__visual { position: relative; min-width: 0; isolation: isolate; padding-block: 1.2rem 0; }
.hero__picture-wrap::before {
  position: absolute;
  z-index: -1;
  inset: 1rem -1rem -0.5rem 1rem;
  background: var(--color-olive);
  border-radius: 48% 49% 28% 25%;
  transform: rotate(5deg);
  content: "";
}
.hero__photo { margin: 0; }
.hero__picture-wrap { position: relative; isolation: isolate; }
.hero__photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.12;
  object-fit: cover;
  object-position: 52% center;
  border: 0.45rem solid var(--color-paper);
  border-radius: 46% 46% 24% 24%;
  box-shadow: 0 1.25rem 2.5rem rgba(54,54,54,.14);
}
.hero__photo figcaption { position: relative; z-index: 3; margin-top: 1rem; padding-inline: 0.6rem; color: var(--color-muted); background: var(--color-sun-soft); font-size: 0.7rem; line-height: 1.5; text-align: center; }
.hero__cloud-scene { position: absolute; z-index: 2; inset: -1rem -1.5rem 0; pointer-events: none; }
.hero__cloud-scene canvas { width: 100%; height: 100%; display: block; }
.hero__cloud-scene canvas[hidden] { display: none; }
.cloud-fallback {
  position: absolute;
  display: block;
  width: 8rem;
  aspect-ratio: 2;
  background: url('../images/decorative-cloud.svg?v=20260908-brand') center / contain no-repeat;
  filter: drop-shadow(0 0.6rem 0.65rem rgba(54,54,54,.09));
}
.cloud-fallback--one { top: 7%; left: -3%; width: 9rem; transform: rotate(-7deg); }
.cloud-fallback--two { right: -3%; bottom: 10%; width: 7rem; transform: rotate(8deg); }
.cloud-fallback--three { right: -2%; top: 2%; width: 5rem; }
.hero__cloud-scene.is-ready .cloud-fallback { display: none; }
.hero__motion-controls { position: relative; z-index: 3; min-height: 2.75rem; margin-top: 0.25rem; text-align: center; background: var(--color-sun-soft); }
.motion-toggle {
  display: inline-flex;
  gap: 0.5rem;
  min-height: 2.75rem;
  align-items: center;
  padding: 0.4rem 0.75rem;
  background: transparent;
  color: var(--color-muted);
  border: 1px solid transparent;
  border-radius: 99px;
  font-size: 0.78rem;
}
.motion-toggle:hover { color: var(--color-ink); border-color: var(--color-border); background: var(--color-paper); }
.motion-toggle svg { width: 0.95rem; height: 0.95rem; }
.motion-toggle[hidden] { display: none; }

.cloud-divider { height: clamp(2.8rem, 6vw, 6.2rem); margin-block: -1px; pointer-events: none; }
.cloud-divider svg { width: 100%; height: 100%; }
.cloud-divider--paper { color: var(--color-paper); }
.cloud-divider--sage { color: var(--color-sage-soft); }
.cloud-divider--olive { color: var(--color-olive); }
.cloud-divider path { fill: currentColor; }
.cloud-divider-wrap--sage { background: var(--color-sage-soft); }
.cloud-divider-wrap--olive { background: var(--color-olive); }
.section--cloud-edge { padding-block-start: clamp(2rem, 4vw, 3.5rem); }
.home .quick-grid { margin-block-start: 0; }
.home .quick-card { min-height: 12rem; border-top: 0; border-radius: 1.4rem; box-shadow: var(--shadow-sm); transition: transform 180ms ease, box-shadow 180ms ease; }
.home .quick-card:nth-child(1) { background: var(--color-gold-soft); border-color: var(--color-gold); }
.home .quick-card:nth-child(2) { background: var(--color-sage); border-color: var(--color-olive); }
.home .quick-card:nth-child(3) { background: var(--color-orange-soft); border-color: var(--color-gold); }
.home .quick-card:nth-child(4) { background: var(--color-border); border-color: var(--brand-humble); }
.home .quick-card:nth-child(2) .quick-card__icon { background: var(--color-olive); color: var(--color-on-olive); }
.home .quick-card:nth-child(3) .quick-card__icon { background: var(--color-gold); color: var(--color-ink); }
.home .quick-card:nth-child(4) .quick-card__icon { background: var(--color-white); color: var(--color-ink); }
.home .quick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.home main { overflow-wrap: anywhere; }
.home :is(.quick-grid,.values-grid,.featured-grid,.groups-grid,.split) > * { min-width: 0; }
.home main .button { max-width: 100%; }
.home .split__media img { border-radius: 2.5rem 5rem 2.5rem 5rem; }
.home .value-card { border-radius: 1.5rem; }

@keyframes cloud-section-appear { from { transform: translateY(12px); } to { transform: none; } }
html:not([data-motion="paused"]):not([data-contrast="high"]) .cloud-reveal { animation: cloud-section-appear 550ms ease both; }

@media (max-width: 60rem) {
  .site-header__inner { grid-template-areas: "brand toggle" "actions actions" "navigation navigation"; gap: 0 1rem; }
  .site-branding { margin-block: 0.8rem; }
  .site-branding__logo { height: 4.3rem; }
  .site-branding__name { max-width: none; font-size: 1.2rem; }
  .site-header .menu-toggle { display: inline-flex; justify-self: end; border-color: var(--color-border); background: var(--color-paper); padding: 0.6rem 0.8rem; }
  .site-header .menu-toggle[hidden] { display: none; }
  .header-actions { width: 100%; justify-self: stretch; padding: 0.1rem 0 0.85rem; gap: 0.65rem; }
  .header-actions .button { flex: 1; min-width: 0; padding: 0.5rem 0.75rem; }
  .site-header .site-navigation { padding: 0.65rem 0; }
  .nav-ready .site-header .site-navigation:not(.is-open) { display: none; }
  .site-navigation .menu { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: 0.25rem; }
  .site-navigation .menu-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .site-navigation a { padding: 0.8rem 0.9rem; white-space: normal; }
  .site-navigation .sub-menu { position: static; grid-column: 1 / -1; display: block; min-width: 0; width: 100%; margin: 0.2rem 0 0.45rem; padding: 0.4rem 0.65rem; border: 0; background: var(--color-sage-soft); box-shadow: none; border-radius: 0.65rem; }
  .site-navigation .sub-menu a { font-size: 0.92rem; }
  .submenu-toggle { width: 3rem; height: 3rem; }
}
@media (min-width: 60.001rem) {
  .site-header .site-navigation { display: block !important; }
}
@media (max-width: 52rem) {
  .hero__layout { grid-template-columns: 1fr; gap: 1.5rem; padding-block: 2.5rem 1rem; }
  .hero--clouds .hero__copy { max-width: 39rem; margin-inline: auto; }
  .hero--clouds .hero__copy h1 { font-size: clamp(2.5rem, 7vw, 3.65rem); }
  .hero--clouds .hero__copy > p { max-width: none; }
  .hero__visual { width: min(100%, 35rem); margin-inline: auto; }
  .hero__photo img { aspect-ratio: 1.35; border-radius: 42% 42% 22% 22%; }
  .hero__cloud-scene { inset: -0.5rem -0.5rem 0; }
  .hero__picture-wrap::before { inset-inline: 0.5rem -0.3rem; }
  .hero--clouds .hero__actions { flex-direction: row; align-items: center; }
  .hero--clouds .hero__actions .button { width: auto; }
}
@media (max-width: 38rem) {
  .site-branding { gap: 0.65rem; }
  .site-branding__logo { height: 3.7rem; }
  .site-branding__name { font-size: 1rem; max-width: 12rem; }
  .site-branding__overline { font-size: 0.7rem; letter-spacing: 0; }
  .site-header .menu-toggle { padding: 0.5rem 0.6rem; }
  .site-header .menu-toggle [data-menu-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .hero--clouds .hero__copy h1 { font-size: clamp(2.3rem, 9.5vw, 3rem); }
  .hero--clouds .hero__copy > p { font-size: 1rem; }
  .hero--clouds .hero__actions { gap: 0.7rem 1rem; }
  .hero__text-link { font-size: 0.88rem; }
  .home .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .home .quick-card { padding: 1rem; min-height: 0; }
  .home .quick-card h2 { font-size: 1.2rem; }
  .home .quick-card p { font-size: 0.85rem; line-height: 1.55; }
  .home .quick-card__link { font-size: 0.82rem; padding-block-start: 0.75rem; }
  .home .quick-card__icon { width: 2.5rem; height: 2.5rem; margin-bottom: 0.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cloud-reveal { animation: none !important; }
}
html[data-motion="paused"] .cloud-reveal { animation: none; }
html[data-contrast="high"] .hero--clouds { background: #fff; }
html[data-contrast="high"] .hero__photo figcaption, html[data-contrast="high"] .hero__motion-controls { background: #fff; }
html[data-contrast="high"] .hero__picture-wrap::before,
html[data-contrast="high"] .hero__cloud-scene { display: none; }
html[data-contrast="high"] .home .quick-card { background: #fff; border-color: #222; }
@media print {
  .hero__cloud-scene, .hero__motion-controls, .cloud-divider { display: none; }
  .hero__layout { display: block; }
}
