/* Components on every page: header, language menu, footer, booking button,
   page header, avatars and the areas grid. Ported from the Astro components;
   their scoped styles are namespaced here under each component's root class. */

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Site header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem var(--gutter);
  background: var(--color-ink);
  color: var(--color-paper);
  font-family: var(--font-sans);
}

/* Logged-in editors: keep the header below the WordPress admin bar. */
.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

@media (max-width: 600px) {
  .admin-bar .site-header {
    top: 0;
  }
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
  color: var(--color-paper);
}

.wordmark .wordmark__emblem {
  display: block;
  width: auto;
  height: 2.1rem;
}

.wordmark .wordmark__svg {
  display: block;
  width: auto;
  height: 1.05rem;
}

.site-header .primary {
  display: none;
  margin-right: auto;
  font-size: 0.9375rem;
}

.site-header .primary ul {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header .primary a {
  text-decoration: none;
  text-underline-offset: 0.35em;
}

.site-header .primary a:hover,
.site-header .primary a[aria-current] {
  text-decoration: underline;
  text-decoration-color: var(--color-sage);
  text-decoration-thickness: 2px;
}

.burger summary {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.6rem;
  cursor: pointer;
  list-style: none;
}

.burger summary::-webkit-details-marker {
  display: none;
}

.burger summary:focus-visible {
  outline-color: var(--color-sage);
}

.burger__lines {
  display: grid;
  gap: 5px;
  width: 1.5rem;
}

.burger__lines span {
  display: block;
  height: 2px;
  background: currentColor;
  transition:
    transform 0.3s ease,
    opacity 0.2s ease;
}

.burger[open] .burger__lines span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger[open] .burger__lines span:nth-child(2) {
  opacity: 0;
}

.burger[open] .burger__lines span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.burger__panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 1rem var(--gutter) 2.5rem;
  background: var(--color-ink);
  border-top: 1px solid rgb(237 232 223 / 0.12);
  animation: menu-open 0.3s cubic-bezier(0.2, 0.7, 0.1, 1);
}

.burger__panel ul {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.burger__panel a {
  display: block;
  padding-block: 0.4rem;
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 9vw, 2.75rem);
  line-height: 1.15;
  text-decoration: none;
}

.burger__panel a[aria-current] {
  color: var(--color-sage);
}

@keyframes menu-open {
  from {
    opacity: 0;
    transform: translateY(-0.75rem);
  }
}

@media (min-width: 48rem) {
  .wordmark {
    margin-right: 0.75rem;
  }

  .site-header .primary {
    display: block;
  }

  .burger {
    display: none;
  }
}

/* Language menu */
.lang {
  position: relative;
  font-family: var(--font-sans);
}

.lang summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0 0.35rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-paper);
}

.lang summary::-webkit-details-marker {
  display: none;
}

.lang summary:focus-visible {
  outline-color: var(--color-sage);
}

.lang .flag {
  flex: none;
  width: 1.35rem;
  height: 0.9rem;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgb(237 232 223 / 0.25);
}

/* The flags are drawn in their own proportions inside a 3:2 box. */
.lang .flag use {
  width: 100%;
  height: 100%;
}

.lang .chevron {
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.05rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.12rem) rotate(45deg);
  transition: transform 0.2s ease;
}

.lang[open] .chevron {
  transform: translateY(0.12rem) rotate(-135deg);
}

.lang__panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 40;
  min-width: 12rem;
  padding: 0.4rem;
  border-radius: 0.6rem;
  background: var(--color-paper-raised);
  color: var(--color-ink);
  box-shadow:
    0 0 0 1px rgb(23 23 23 / 0.08),
    0 0.75rem 2rem rgb(23 23 23 / 0.3);
  animation: lang-open 0.2s cubic-bezier(0.2, 0.7, 0.1, 1);
}

.lang__panel ul {
  display: grid;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang__panel a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.7rem;
  border-radius: 0.4rem;
  font-size: 0.9375rem;
  text-decoration: none;
}

.lang__panel .flag {
  box-shadow: 0 0 0 1px rgb(23 23 23 / 0.12);
}

.lang__panel .code {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-ink-muted);
}

.lang__panel a:hover {
  background: var(--color-paper);
}

.lang__panel a[aria-current='true'] {
  background: var(--color-paper);
  font-weight: 600;
}

.lang__panel a[aria-current='true'] .name {
  text-decoration: underline;
  text-decoration-color: var(--color-sage-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

@keyframes lang-open {
  from {
    opacity: 0;
    transform: translateY(-0.4rem);
  }
}

/* Site footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-inline: var(--gutter);
  padding: 1.75rem 0;
  border-top: 1px solid var(--color-rule);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--color-ink-muted);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--color-sage-deep);
  text-underline-offset: 0.3em;
}

/* Booking button */
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  font-family: var(--font-sans);
}

.cta__primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border-radius: 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
}

.cta--light .cta__primary {
  background: var(--color-ink);
  color: var(--color-paper);
}

.cta--light .cta__primary:hover {
  background: var(--color-sage-deep);
}

.cta--dark .cta__primary {
  background: var(--color-paper);
  color: var(--color-ink);
}

.cta--dark .cta__primary:hover {
  background: var(--color-sage);
}

.cta__secondary {
  font-weight: 500;
  text-underline-offset: 0.3em;
}

.cta--light .cta__secondary {
  color: var(--color-sage-deep);
}

.cta--dark .cta__secondary {
  color: var(--color-paper);
}

/* Page header */
.page-header {
  display: grid;
  gap: 1.25rem;
  max-width: 52rem;
}

.page-header .label a {
  color: inherit;
  text-underline-offset: 0.3em;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.page-header__lead {
  max-width: 44rem;
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--color-ink-muted);
}

/* Avatar: photo, or initials when there is none */
.avatar {
  flex: none;
  width: var(--avatar-size, 4rem);
  height: var(--avatar-size, 4rem);
  border-radius: 50%;
  object-fit: cover;
}

.avatar--initials {
  display: grid;
  place-items: center;
  background: var(--color-ink);
  color: var(--color-paper);
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.avatar--large {
  font-size: 2.2rem;
}

/* Person card (service pages) */
.person {
  --avatar-size: 3.5rem;
  display: flex;
  gap: 0.9rem;
  align-items: center;
  text-decoration: none;
}

.person__text {
  display: grid;
  gap: 0.1rem;
}

.person__name {
  font-family: var(--font-sans);
  font-weight: 600;
}

.person:hover .person__name {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.person__role {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--color-ink-muted);
}

/* "What we do": one card per area (home and services pages) */
.areas {
  display: grid;
  gap: 1.25rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

/* As many columns as fit: works for three areas or six. */
@media (min-width: 56rem) {
  .areas {
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  }
}

.areas .area {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid var(--color-rule);
  border-radius: 0.75rem;
  background: var(--color-paper-raised);
}

.area__num {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-sage-deep);
}

.area__title {
  font-family: var(--font-serif);
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.2;
}

.area__services {
  display: grid;
  gap: 1rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.area__services li {
  display: grid;
  gap: 0.25rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--color-rule);
}

.area__services a {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--color-ink);
  text-decoration: none;
}

.area__services a:hover {
  color: var(--color-sage-deep);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.area__services p {
  font-size: 0.95rem;
  color: var(--color-ink-muted);
}

/* Pinned to the bottom so the areas line up. */
.area__label {
  margin-top: auto;
  padding-top: 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-ink-muted);
}

.area__best {
  font-size: 0.95rem;
}
