/* ==========================================================================
   Layout: containers, sections, site header (+ mobile menu), site footer
   Mobile-first. Larger-screen refinements live in responsive.css.
   ========================================================================== */
.container,
.container--wide,
.container--text {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container { max-width: calc(var(--container) + 2 * var(--gutter)); }
.container--wide { max-width: calc(var(--container-wide) + 2 * var(--gutter)); }
.container--text { max-width: calc(var(--container-text) + 2 * var(--gutter)); }

.section { position: relative; padding-block: var(--section-space); }
.section--tight { padding-block: calc(var(--section-space) * 0.6); }
.section--flush-top { padding-top: 0; }
.section--soft { background-color: var(--color-bg-soft); background-image: var(--paper-grain); }
.section--clip { overflow: clip; }

.section-head { max-width: 46rem; margin-bottom: var(--space-7); }
.section-head > :last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  transition: box-shadow var(--dur-2) var(--ease);
}
/* the translucent + blurred layer lives on a pseudo-element: a backdrop-filter on the header itself would
   become the containing block of the fixed-position mobile menu and collapse it */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--color-bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  backdrop-filter: saturate(1.2) blur(12px);
}
@supports not (backdrop-filter: blur(1px)) {
  .site-header::before { background: var(--color-bg); }
}
.site-header.is-scrolled { box-shadow: var(--shadow-header); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-h);
}

.brand { display: block; flex: none; line-height: 0; border-radius: 2px; }
.brand img { height: 2.35rem; width: auto; }

/* burger --------------------------------------------------------------------- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.75rem;
  padding: 0 0.25rem 0 0.75rem;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.nav-toggle__bars {
  position: relative;
  width: 1.5rem;
  height: 0.75rem;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur-2) var(--ease), top var(--dur-2) var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { top: calc(100% - 2px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: calc(50% - 1px); transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: calc(50% - 1px); transform: rotate(-45deg); }

/* mobile menu panel ---------------------------------------------------------- */
.site-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 59;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-6) var(--gutter) calc(var(--space-7) + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: var(--color-bg);
  background-image: var(--paper-grain);
  border-top: 1px solid var(--color-border);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-0.5rem);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
}
.site-nav.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}
.site-nav__list { list-style: none; margin: 0; padding: 0; }
.site-nav__list > li { margin: 0; border-bottom: 1px solid var(--color-border); }
.site-nav__list a,
.site-nav__sub-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.5rem 0;
  border: 0;
  background: none;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--color-text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.site-nav__list a:hover,
.site-nav__sub-toggle:hover { color: var(--color-terracotta-text); }
.site-nav a[aria-current="page"] { color: var(--color-terracotta-text); }

.site-nav__chevron { width: 1.1rem; height: 1.1rem; flex: none; transition: transform var(--dur-2) var(--ease); }
.site-nav__sub-toggle[aria-expanded="true"] .site-nav__chevron { transform: rotate(180deg); }

.site-nav__sub { list-style: none; margin: 0; padding: 0 0 var(--space-4) var(--space-4); display: none; }
.site-nav__sub.is-open { display: block; }
.site-nav__sub li { margin: 0; }
.site-nav__sub a {
  min-height: 2.75rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
}
.site-nav__cta { align-self: flex-start; }

/* place groups (v012): "Dojo" and "Studio" carry a one-line descriptor and their place colour */
.site-nav__group--dojo { --group-accent: var(--place-dojo); }
.site-nav__group--studio { --group-accent: var(--place-studio-text); }
.site-nav__label { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; line-height: 1.1; }
.site-nav__name { position: relative; display: inline-flex; align-items: center; gap: 0.55rem; }
.site-nav__name::before {
  content: "";
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--group-accent, var(--color-brand-teal));
}
.site-nav__hint {
  padding-left: 1rem;                     /* aligned with the name, after the place dot */
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--color-text-muted);
}
/* the name + hint is a link to the place page; the chevron beside it opens the disciplines */
.site-nav__group-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.site-nav__group-head .site-nav__place { flex: 1 1 auto; width: auto; }
.site-nav__group-head .site-nav__sub-toggle { flex: none; width: 2.75rem; min-height: 2.75rem; padding: 0; justify-content: center; }
.site-nav__group.is-current .site-nav__place { color: var(--color-terracotta-text); }
.site-nav__group--studio.is-current .site-nav__place { color: var(--place-studio-text); }
.site-nav__sub-intro a { font-family: var(--font-display); font-size: 1.25rem; }
.site-nav__sub-intro a span { margin-left: 0.6rem; font-family: var(--font-body); font-size: 0.875rem; font-weight: 500; color: var(--color-text-muted); }
.site-nav__contact { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin: 0; font-size: var(--fs-small); }
.site-nav__contact a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; font-weight: 600; text-decoration: none; color: var(--color-text); }
.site-nav__contact svg { width: 1.1rem; height: 1.1rem; }

/* no-JS fallback: show the menu as a normal block under the header */
@media (scripting: none) {
  .site-nav { position: static; visibility: visible; opacity: 1; transform: none; padding-block: var(--space-4); }
  .nav-toggle { display: none; }
  .site-header__inner { flex-wrap: wrap; }
  .site-nav__sub { display: block; }
  .site-nav__sub-toggle { pointer-events: none; }
  .site-nav__chevron { display: none; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  margin-top: clamp(1rem, 0.5rem + 1.5vw, 2rem);
  padding-top: clamp(1.25rem, 0.95rem + 1vw, 1.75rem);
  background-color: var(--color-bg-soft);
  background-image: var(--paper-grain);
  color: var(--color-text);
}
.site-footer__wave {
  position: absolute;
  inset: 0 0 auto 0;
  height: 1.5rem;
  transform: translateY(-99%);
  background: url("../images/ui/wave-divider.svg") repeat-x center bottom / auto 100%;
  pointer-events: none;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5) var(--space-4);
  font-size: clamp(0.875rem, 0.84rem + 0.15vw, 1rem);
  line-height: 1.45;
}
.site-footer__brand { grid-column: 1 / -1; }
.site-footer__identity { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.site-footer__brand img { flex: 0 0 auto; width: 2.35rem; height: auto; }
.site-footer__brand p { margin: 0; line-height: 1.35; }
.site-footer__brand-name { display: block; font-size: 1rem; }
.site-footer__association { display: block; margin-top: 0.15rem; color: var(--color-text-muted); }
.site-footer__brand address { display: grid; gap: 0.2rem; margin: 0 0 var(--space-2); font-style: normal; line-height: 1.45; }
.site-footer__contact-links { display: flex; flex-wrap: wrap; gap: 0.2rem var(--space-4); }
.site-footer__title {
  margin: 0 0 var(--space-2);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-terracotta-text);
}
.site-footer__title--dojo { color: var(--place-dojo-text); }
.site-footer__title--studio { color: var(--place-studio-text); }
.site-footer__title--pranavia { color: var(--color-brand-teal-deep); }
.site-footer__list { list-style: none; margin: 0; padding: 0; }
.site-footer__list li { margin: 0; break-inside: avoid; }
.site-footer__list a {
  display: inline-block;
  padding: 0.08rem 0;
  min-height: 1.55rem;
  color: var(--color-text);
  text-decoration: none;
}
.site-footer__list a:hover { color: var(--color-terracotta-text); text-decoration: underline; text-underline-offset: 0.25em; }
.site-footer__contact a { color: var(--color-text); }

.social-list { display: flex; gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
.social-list li { margin: 0; }
.social-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  color: var(--color-text);
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.social-list a:hover { background: var(--color-ink-green); border-color: var(--color-ink-green); color: var(--color-text-on-dark); }
.social-list svg { width: 1.15rem; height: 1.15rem; }

.site-footer__bottom {
  margin-top: var(--space-4);
  padding-block: var(--space-3);
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}
.site-footer__bottom-inner { display: flex; flex-direction: column; gap: var(--space-2); }
.site-footer__copyright { margin: 0; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); list-style: none; margin: 0; padding: 0; }
.site-footer__legal li { margin: 0; }
.site-footer__legal a { color: var(--color-text-muted); }
.site-footer__legal a:hover { color: var(--color-terracotta-text); }
