/* Header, navigation, links, buttons, footer and the opening screen. */

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--gutter);
  border-bottom: 1px solid #a8a194;
}
/* Always a white bar with a bottom rule, so the line stays put while the page scrolls.
   The blur sits on its own layer: on the header itself it would trap the phone menu
   (a fixed element) inside the header's 64px box. */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(255 255 255 / .94);
  backdrop-filter: blur(10px);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: auto; height: 68px; }

.site-nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }
.site-nav ul { display: flex; gap: clamp(18px, 2.4vw, 36px); }
.site-nav li a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 14px;
  line-height: 1.5;
}
.nav-label { font-family: var(--serif); font-size: 17px; font-weight: 700; letter-spacing: .1em; }
.site-nav li a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease-out);
}
.site-nav li a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-contact {
  padding: 10px 24px;
  border: 1px solid var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.5;
  transition: background-color .4s, color .4s;
}
.nav-contact:hover { background: var(--ink); color: var(--paper); }

.menu-toggle { display: none; }

.nav-label, .nav-contact { white-space: nowrap; }
/* Narrow desktops: tighten the menu so every item stays on one line. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .site-nav { gap: 18px; }
  .site-nav ul { gap: 18px; }
  .nav-label { font-size: 15px; letter-spacing: .06em; }
  .nav-contact { padding: 8px 16px; font-size: 15px; letter-spacing: .06em; }
}

/* The extra block (buttons and phone number) belongs to the phone menu only. */
.nav-extra { display: none; }

/* Phones and tablets: a white panel under the header with one row per page,
   each marked with a red ›, and the buttons and phone number at the bottom. */
@media (max-width: 1023px) {
  .brand img { height: 52px; }

  /* X (or two lines) over the word MENU, set off by a thin rule on its left. */
  .menu-toggle {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    align-self: stretch;
    width: 72px;
    margin-right: calc(var(--gutter) * -1);
    border-left: 1px solid var(--line);
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1;
  }
  .menu-toggle-bars { position: relative; width: 24px; height: 14px; }
  .menu-toggle-bars::before, .menu-toggle-bars::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    transition: transform .3s ease, top .3s ease;
  }
  .menu-toggle-bars::before { top: 2px; }
  .menu-toggle-bars::after { top: 10px; }
  .menu-toggle[aria-expanded='true'] .menu-toggle-bars::before { top: 6px; transform: rotate(45deg); }
  .menu-toggle[aria-expanded='true'] .menu-toggle-bars::after { top: 6px; transform: rotate(-45deg); }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: clamp(32px, 9vh, 88px) var(--gutter) 32px;
    background: var(--paper);
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    opacity: 0;
    transition: opacity .3s ease, visibility 0s .3s;
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transition: opacity .3s ease; }

  .site-nav ul { flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav li a {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 20px 4px;
  }
  .site-nav li a::after { display: none; }
  /* The red › in front of each page name. */
  .site-nav li a::before {
    content: '';
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
    transform: rotate(45deg);
  }
  .nav-label { font-family: var(--sans); font-size: 17px; font-weight: 700; letter-spacing: .06em; }
  .site-nav li a:hover, .site-nav li a[aria-current='page'] { color: var(--accent); }

  /* The desktop contact button is replaced by the pill row below. */
  .site-nav > .nav-contact { display: none; }
  .nav-extra { display: block; margin-top: auto; padding-top: 48px; }
  .nav-pills { display: flex; flex-wrap: wrap; gap: 10px 8px; }
  .nav-pill {
    padding: 6px 14px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.6;
  }
  .nav-pill--accent { border-color: var(--accent); color: var(--accent); }
  .nav-tel {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin-top: 24px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.3;
  }
  .nav-tel-note { font-size: 12px; font-weight: 400; color: var(--ink-soft); }
}

body.menu-open { overflow: hidden; }

/* ---------- Links and buttons ---------- */
/* Text followed by a thin circle with an arrow; the circle fills in on hover. */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 15px;
  letter-spacing: .1em;
}
.text-link::after {
  content: '→';
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 15px;
  letter-spacing: 0;
  line-height: 1;
  transition: background-color .4s, color .4s, transform .4s var(--ease-out);
}
.text-link:hover::after { background: var(--ink); border-color: var(--ink); color: var(--white); transform: translateX(4px); }
.text-link--small { font-size: 14px; gap: 12px; }
.text-link--small::after { width: 34px; height: 34px; font-size: 13px; }
.text-link.text-link--no-arrow::after {
  content: none;
  display: none;
}

.button {
  position: relative;
  display: inline-flex;
  justify-content: center;
  min-width: 240px;
  padding: 18px 40px;
  border: 1px solid var(--ink);
  font-size: 15px;
  letter-spacing: .12em;
  overflow: hidden;
  isolation: isolate;
  transition: color .5s var(--ease-out);
}
.button::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .5s var(--ease-out);
}
.button:hover { color: var(--paper); }
.button:hover::before { transform: scaleY(1); }
.button--light { border-color: var(--white); color: var(--white); }
.button--light::before { background: var(--white); }
.button--light:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 80px var(--gutter) 32px;
  border-top: 1px solid var(--line);
}
.footer-inner {
  max-width: var(--max);
  margin-inline: auto;
  display: grid;
  gap: 40px;
}
.footer-brand img { width: 108px; }
.footer-info address { font-size: 15px; line-height: 2; letter-spacing: .06em; }
.footer-map {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 10px 24px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: .08em;
  transition: background-color .3s, color .3s;
}
.footer-map:hover { background: var(--ink); color: var(--paper); }
.footer-nav ul {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 20px 56px;
  font-size: 15px;
  letter-spacing: .06em;
}
.footer-nav a { transition: color .3s; }
.footer-nav a:hover { color: var(--accent); }
.footer-related { align-self: start; }
.footer-related-title { font-size: 15px; font-weight: 600; letter-spacing: .12em; }
.footer-related a {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  min-height: 44px;
  margin-top: 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .12em;
  transition: color .3s;
}
.footer-related a:hover { color: var(--accent); }
.footer-related-note {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.footer-bottom {
  max-width: var(--max);
  margin: 56px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--latin);
  font-size: 14px;
  color: var(--ink-faint);
}
.back-top { letter-spacing: .12em; }
.back-top:hover { color: var(--ink); }

@media (min-width: 900px) {
  /* Logo, address and links sit in one row, the links in two columns of four. */
  .footer-inner { grid-template-columns: repeat(3, auto); justify-content: center; column-gap: clamp(48px, 6vw, 96px); }
  .footer-nav ul { grid-auto-flow: column; grid-template-rows: repeat(4, auto); column-gap: clamp(56px, 7vw, 120px); }
  .footer-related { grid-column: 3; }
}
@media (min-width: 1200px) {
  /* Center the address and links as one group while keeping the logo at the left. */
  .footer-inner { position: relative; grid-template-columns: repeat(2, max-content); }
  .footer-brand { position: absolute; inset: 0 auto auto 0; }
  .footer-related { position: absolute; inset: 0 0 auto auto; grid-column: auto; }
}

/* ---------- Opening ---------- */
.opening { display: none; }
.js .opening {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 28px;
  background: var(--paper);
  pointer-events: none;
}
.opening-logo { width: 96px; opacity: 0; transform: translateY(10px); }
.opening-line { width: 120px; height: 1px; background: var(--ink); transform: scaleX(0); }
