/* ========================================================================
   Sculpt Pilates — private concept
   shell.css : concept bar, header, nav, mobile menu, action bar and footer.
   Loaded last by design.
   ======================================================================== */

main section[id] {
  scroll-margin-top: calc(var(--concept-height) + 74px);
}

/* --- Concept bar ------------------------------------------------------ */

.concept-bar {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  height: var(--concept-height);
  padding: 0 20px;
  background: var(--ink);
  color: var(--on-ink-soft);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.concept-bar span + span {
  color: rgba(244, 238, 228, 0.34);
}

/* --- Header ----------------------------------------------------------- */

.site-header {
  position: fixed;
  z-index: 90;
  top: var(--concept-height);
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr);
  align-items: center;
  height: var(--header-height);
  padding-inline: clamp(22px, 5vw, 64px);
  color: var(--paper-bright);
  transition:
    height 380ms var(--ease),
    background 380ms var(--ease),
    color 380ms var(--ease),
    box-shadow 380ms var(--ease),
    border-color 380ms var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  height: 68px;
  color: var(--on-paper);
  background: rgba(250, 245, 236, 0.9);
  border-bottom-color: var(--line);
  box-shadow: 0 14px 34px rgba(24, 19, 16, 0.07);
  backdrop-filter: blur(16px) saturate(1.05);
  -webkit-backdrop-filter: blur(16px) saturate(1.05);
}

.brand {
  display: inline-grid;
  justify-self: start;
  gap: 4px;
  line-height: 0.9;
}
.brand__word {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: 0.08em;
}
.brand__sub {
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: currentColor;
  opacity: 0.62;
}

.global-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.4vw, 40px);
}
.global-nav a {
  position: relative;
  padding: 10px 0;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.global-nav a::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
  background: var(--amber);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 300ms var(--ease);
}
.global-nav a:hover::after,
.global-nav a:focus-visible::after,
.global-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 20px;
}
.language-switcher {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.14em;
  color: currentColor;
}
.language-switcher a {
  display: grid;
  place-items: center;
  min-width: 30px;
  min-height: 44px;
  opacity: 0.5;
  transition: opacity 180ms ease;
}
.language-switcher span {
  opacity: 0.4;
}
.language-switcher a:hover,
.language-switcher a:focus-visible,
.language-switcher a[aria-current="true"] {
  opacity: 1;
  color: var(--amber);
}
.site-header.is-scrolled .language-switcher a[aria-current="true"] {
  color: var(--amber-deep);
}

.header-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 11px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--amber);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition:
    background 240ms var(--ease),
    transform 240ms var(--ease);
}
.header-book:hover,
.header-book:focus-visible {
  background: var(--amber-soft);
  transform: translateY(-2px);
}

.menu-toggle,
.site-mobile-menu,
.mobile-action-bar {
  display: none;
}

/* `hidden` must win over the responsive display rules below. */
.site-mobile-menu[hidden] {
  display: none !important;
}

/* --- Footer ----------------------------------------------------------- */

.site-footer {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 40px;
  align-items: start;
  padding: clamp(56px, 8vw, 96px) clamp(22px, 5vw, 64px) 48px;
  background: var(--ink);
  color: var(--on-ink);
}
.site-footer__brand {
  display: grid;
  gap: 14px;
}
.site-footer__word {
  font-family: var(--serif);
  font-size: 34px;
  letter-spacing: 0.06em;
  color: var(--paper-bright);
}
.site-footer__brand p {
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--on-ink-soft);
}
.site-footer nav {
  display: grid;
  gap: 12px;
}
.site-footer nav a {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-ink);
  transition: color 200ms ease;
}
.site-footer nav a:hover {
  color: var(--amber);
}
.site-footer__meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
}
.site-footer__meta address {
  font-style: normal;
  font-size: 13px;
  line-height: 1.6;
  color: var(--on-ink);
}
.site-footer__concept {
  margin-top: 6px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--on-ink-soft);
}
.site-footer__top {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-light-strong);
  border-radius: 50%;
  color: var(--paper-bright);
  font-size: 15px;
  transition:
    background 220ms ease,
    color 220ms ease;
}
.site-footer__top:hover {
  background: var(--amber);
  color: var(--ink);
}

/* --- Responsive: tablet & down --------------------------------------- */

@media (max-width: 940px) {
  .site-header {
    grid-template-columns: 1fr auto auto;
    column-gap: 14px;
    color: var(--paper-bright);
  }
  .global-nav,
  .header-book {
    display: none;
  }
  .header-actions {
    gap: 6px;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    justify-self: end;
    width: auto;
    min-width: 44px;
    min-height: 44px;
    padding-inline: 4px;
    border: 0;
    background: transparent;
    color: currentColor;
    cursor: pointer;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }
  .menu-toggle i,
  .menu-toggle i::before {
    display: block;
    width: 22px;
    height: 1px;
    background: currentColor;
    content: "";
    transition: transform 300ms var(--ease);
  }
  .menu-toggle i::before {
    transform: translateY(6px);
  }
  .menu-toggle[aria-expanded="true"] i {
    transform: rotate(45deg);
  }
  .menu-toggle[aria-expanded="true"] i::before {
    transform: rotate(90deg) translateX(-6px);
  }

  .site-mobile-menu {
    position: fixed;
    z-index: 80;
    inset: calc(var(--concept-height) + var(--header-height)) 0 0;
    display: grid;
    align-content: start;
    gap: 0;
    padding: clamp(20px, 6vw, 44px);
    background: var(--ink);
    color: var(--paper-bright);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .site-scrolled .site-mobile-menu {
    inset: calc(var(--concept-height) + var(--header-height)) 0 0;
  }
  .site-mobile-menu nav {
    display: grid;
  }
  .site-mobile-menu nav > a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 18px 0;
    border-bottom: 1px solid var(--line-light);
    font-family: var(--serif);
    font-size: clamp(26px, 8vw, 38px);
  }
  .site-mobile-menu nav > a small {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--sand-deep);
  }
  .site-mobile-menu nav > a[aria-current="page"] {
    color: var(--amber-soft);
  }
  .site-mobile-menu .button {
    margin-top: 30px;
  }
  .site-mobile-menu__note {
    margin-top: 26px;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--on-ink-soft);
  }

  .site-footer {
    grid-template-columns: 1fr auto;
    gap: 32px 24px;
  }
  .site-footer__brand {
    grid-column: 1 / -1;
  }
  .site-footer__meta {
    justify-items: start;
    text-align: left;
  }
  .site-footer__top {
    justify-self: end;
  }
}

/* --- Responsive: phone ------------------------------------------------ */

@media (max-width: 640px) {
  :root {
    --header-height: 72px;
  }
  .concept-bar {
    justify-content: flex-start;
    gap: 0;
    font-size: 8px;
  }
  .concept-bar span + span {
    display: none;
  }
  .site-header {
    padding-inline: 20px;
  }
  .site-header.is-scrolled {
    height: var(--header-height);
  }
  .brand__word {
    font-size: 21px;
  }

  .mobile-action-bar {
    position: fixed;
    z-index: 70;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    min-height: 64px;
    padding: 10px 10px 10px 20px;
    background: rgba(24, 19, 16, 0.97);
    border: 1px solid var(--line-light);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 22px));
    visibility: hidden;
    transition:
      opacity 240ms ease,
      transform 360ms var(--ease);
  }
  .mobile-action-bar.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }
  body.menu-open .mobile-action-bar {
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 22px));
  }
  .mobile-action-bar p {
    display: grid;
    min-width: 0;
    gap: 3px;
    line-height: 1.1;
  }
  .mobile-action-bar p span {
    overflow: hidden;
    font-size: 8px;
    font-weight: 650;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--on-ink-soft);
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-action-bar p strong {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 400;
    color: var(--paper-bright);
  }
  .mobile-action-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 104px;
    min-height: 46px;
    padding: 12px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--amber);
    color: var(--ink);
    cursor: pointer;
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }
  .site-footer__meta {
    justify-items: start;
  }
  .site-footer__top {
    position: absolute;
    top: clamp(56px, 8vw, 96px);
    right: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .header-book,
  .site-footer__top {
    transition: none;
  }
}

@media (max-width: 360px) {
  .site-header {
    column-gap: 6px;
    padding-inline: 16px;
  }
  .header-actions {
    gap: 0;
  }
  .language-switcher a {
    min-width: 26px;
  }
  .menu-toggle span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
