/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: var(--header-bg);
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  height: var(--header-h);
  width: min(100% - (var(--margin-x) * 2), var(--max-wide));
  margin-inline: auto;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  height: var(--nav-control-h);
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.site-logo img {
  width: var(--nav-control-h);
  height: var(--nav-control-h);
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
}

.site-logo__text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  line-height: 1;
  font-weight: 600;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  height: var(--nav-control-h);
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}

.site-nav__list li {
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0;
}

.site-nav__list li + li {
  margin-top: 0;
}

.site-nav__list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--nav-control-h);
  padding: 0 0.55rem;
  font-family: var(--font-ui);
  font-size: var(--step-small);
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.06em;
}

.site-nav__list a:hover,
.site-nav__list a[aria-current="page"] {
  color: var(--accent);
}

.site-nav__list a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.35rem;
  height: var(--nav-control-h);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  height: var(--nav-control-h);
  gap: 0.15rem;
  font-family: var(--font-ui);
  font-size: var(--step-small);
  line-height: 1;
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  height: var(--nav-control-h);
  padding: 0 0.4rem;
  font: inherit;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.lang-switch button.is-active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.lang-switch__sep {
  color: var(--border);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  height: var(--nav-control-h);
}

.nav-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--nav-control-h);
  height: var(--nav-control-h);
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-social svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

.site-nav .btn {
  min-height: var(--nav-control-h);
  height: var(--nav-control-h);
  padding: 0 1rem;
  line-height: 1;
  box-sizing: border-box;
}

.nav-toggle {
  display: none;
  appearance: none;
  border: 0;
  background: transparent;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 1.25rem;
  height: 1.5px;
  background: var(--ink);
  margin: 0.3rem auto;
  transition: transform 0.25s var(--ease-out), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* ========== Footer ========== */
.site-footer {
  position: relative;
  background-color: var(--field-1);
  color: var(--field-1-ink);
  padding: var(--space-xl) 0 var(--space-lg);
  overflow: hidden;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.site-footer a {
  color: rgba(255, 248, 239, 0.72);
}

.site-footer a:hover {
  color: var(--field-1-ink);
}

.site-footer .btn--on-ink {
  color: var(--accent);
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}

.site-footer .btn--on-ink:hover {
  color: var(--accent-ink);
  background: transparent;
  border-color: var(--accent-ink);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: var(--space-lg);
  width: min(100% - (var(--margin-x) * 2), var(--max-wide));
  margin-inline: auto;
}

.site-footer__brand {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  letter-spacing: 0.12em;
  margin-bottom: var(--space-sm);
  color: var(--field-1-ink);
}

.site-footer__invite {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  letter-spacing: 0.16em;
  line-height: 1.35;
  margin: 0 0 var(--space-md);
  max-width: 12em;
  color: var(--field-1-ink);
}

.site-footer__nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__nav a {
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: var(--step-small);
  display: inline-block;
  padding: 0.25rem 0;
  letter-spacing: 0.06em;
}

.site-footer__meta {
  position: relative;
  z-index: 1;
  margin-top: var(--space-lg);
  padding: var(--space-md) 0;
  width: min(100% - (var(--margin-x) * 2), var(--max-wide));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: var(--step-small);
  color: rgba(255, 248, 239, 0.55);
}

.site-footer__credits {
  font-size: var(--step-small);
  color: rgba(255, 248, 239, 0.55);
  max-width: 52ch;
  line-height: 1.45;
}

.site-footer__credits a {
  color: rgba(255, 248, 239, 0.7);
}

.site-footer h2 {
  font-family: var(--font-ui);
  font-size: var(--step-small);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: rgba(255, 248, 239, 0.55);
  margin-bottom: var(--space-sm);
}

.site-footer__crop {
  font-family: var(--font-brush);
  font-size: clamp(3.5rem, 16vw, 9rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  line-height: 0.9;
  white-space: nowrap;
  color: rgba(255, 248, 239, 0.1);
  transform: none;
  pointer-events: none;
  user-select: none;
  text-align: center;
  margin: var(--space-md) 0 0;
  padding: 0;
}

/* ========== Page sections ========== */
.section {
  padding: var(--space-xl) 0;
}

.section--tight {
  padding: var(--space-lg) 0;
}

.section--loose {
  padding: clamp(5rem, 16vh, 10rem) 0;
}

.section--ink {
  background: var(--field-1);
  color: var(--field-1-ink);
}

.section--ink .lead,
.section--ink .text-muted {
  color: var(--ink-soft);
}

.section--surface {
  background: var(--surface);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-md);
  align-items: start;
}

.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-7 { grid-column: span 7; }
.col-4 { grid-column: span 4; }
.col-8 { grid-column: span 8; }
.col-3 { grid-column: span 3; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

.offset-down {
  margin-top: 4.5rem;
}

/* ========== Back to top ========== */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 900;
  width: 2.75rem;
  height: 2.75rem;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s var(--ease-out);
  font-size: 1.1rem;
  line-height: 1;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

/* ========== Mobile nav ========== */
@media (max-width: 1100px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    height: auto;
    background: var(--bg);
    padding: var(--space-md) var(--margin-x) var(--space-lg);
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-md);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s var(--ease-out), opacity 0.25s, visibility 0.25s;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    height: auto;
  }

  .site-nav__list li {
    height: auto;
  }

  .site-nav__list a {
    font-size: 1.05rem;
    height: auto;
    padding: 0.55rem 0;
    justify-content: flex-start;
  }

  .site-nav__actions {
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    height: auto;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .site-footer {
    min-height: auto;
    padding-bottom: var(--space-lg);
  }

  .site-footer__crop {
    font-size: clamp(3.5rem, 28vw, 8rem);
    transform: translateY(18%);
  }

  .grid-12 {
    grid-template-columns: 1fr;
  }

  .col-6,
  .col-5,
  .col-7,
  .col-4,
  .col-8,
  .col-3,
  .col-9,
  .col-12 {
    grid-column: span 1;
  }

  .offset-down {
    margin-top: 0;
  }
}

body.nav-open {
  overflow: hidden;
}
