/* ==========================================================================
   Components — buttons, header, icon rings, form controls
   ========================================================================== */

/* Buttons ----------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 52px;
  padding: 0 1.6rem;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}

.btn .icon {
  transition: transform 0.3s var(--ease);
}

.btn:hover .icon {
  transform: translateX(3px);
}

.btn-sm {
  height: 42px;
  padding: 0 1.2rem;
  font-size: var(--fs-sm);
}

.btn-gold {
  color: var(--teal-950);
  background: var(--gold);
}

.btn-gold:hover {
  background: var(--gold-light);
}

.btn-outline {
  color: var(--white);
  border-color: var(--gold-line);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

.btn-teal {
  color: var(--white);
  background: var(--teal-800);
}

.btn-teal:hover {
  background: var(--teal-700);
}

.btn-ghost {
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Text link --------------------------------------------------------------- */

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--teal-800);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  transition: color 0.25s;
}

.text-link .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--ease);
}

.text-link:hover {
  color: var(--gold-deep);
}

.text-link:hover .icon {
  transform: translateX(3px);
}

/* Icon ring: gold-outlined circle holding a line icon --------------------- */

.ring {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--ring, 96px);
  height: var(--ring, 96px);
  flex-shrink: 0;
  color: var(--white);
  background: var(--teal-850);
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(212, 172, 106, 0.06), 0 0 28px -6px rgba(212, 172, 106, 0.45);
}

.ring .glyph {
  width: 46%;
  height: 46%;
}

.ring-sm {
  --ring: 64px;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  color: var(--white);
  transition: background-color 0.35s, box-shadow 0.35s;
}

.site-header.is-scrolled {
  background: var(--teal-950);
  box-shadow: 0 1px 0 var(--gold-faint);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 92px;
  transition: height 0.35s var(--ease);
}

.is-scrolled .nav {
  height: 72px;
}

.nav-logo img {
  height: 46px;
  width: auto;
  transition: height 0.35s var(--ease);
}

.is-scrolled .nav-logo img {
  height: 38px;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-links a {
  position: relative;
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.9375rem;
  color: var(--on-dark-muted);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--white);
}

.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.2rem;
  height: 1.5px;
  background: var(--gold);
}

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  left: 50%;
  width: 16px;
  height: 1.5px;
  background: var(--white);
  transform: translateX(-50%);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.nav-toggle span:first-child { top: 18px; }
.nav-toggle span:last-child  { top: 24px; }

.nav-toggle[aria-expanded="true"] span:first-child,
.nav-toggle[aria-expanded="true"] span:last-child {
  top: 21px;
}

.nav-toggle[aria-expanded="true"] span:first-child { transform: translateX(-50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { transform: translateX(-50%) rotate(-45deg); }

/* Mobile menu ------------------------------------------------------------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2.5rem;
  padding: 7rem var(--gutter) 2.5rem;
  background: var(--teal-950);
  color: var(--white);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu li {
  border-top: 1px solid var(--line-light);
}

.mobile-menu a:not(.btn) {
  display: block;
  padding: 0.9rem 0;
  font-family: var(--serif);
  font-size: 2.25rem;
  line-height: 1.1;
}

/* Form controls ----------------------------------------------------------- */

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2rem;
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}

.field label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--muted);
}

.field .optional {
  margin-left: 0.35rem;
  font-weight: 400;
  opacity: 0.7;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.6rem 0 0.7rem;
  font-size: var(--fs-md);
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s;
}

.field textarea {
  resize: vertical;
  min-height: 96px;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-bottom-color: rgba(10, 46, 54, 0.35);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--gold);
}

.field select:invalid {
  color: var(--muted);
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 2px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
}

.field.has-error input,
.field.has-error select {
  border-bottom-color: #b4442f;
}

.field-error {
  margin-top: 0.4rem;
  font-size: var(--fs-sm);
  color: #b4442f;
}

.field-error:empty {
  display: none;
}

/* Checkbox */

.checkbox {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}

.checkbox input {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: 0;
  opacity: 0;
}

.checkbox-box {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1px solid rgba(10, 46, 54, 0.35);
  border-radius: 3px;
  transition: background-color 0.2s, border-color 0.2s;
}

.checkbox-box::after {
  content: "";
  width: 4px;
  height: 9px;
  margin-top: -2px;
  border-right: 1.5px solid var(--white);
  border-bottom: 1.5px solid var(--white);
  transform: rotate(45deg);
  opacity: 0;
}

.checkbox input:checked + .checkbox-box {
  background: var(--teal-800);
  border-color: var(--teal-800);
}

.checkbox input:checked + .checkbox-box::after {
  opacity: 1;
}

.checkbox input:focus-visible + .checkbox-box {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 960px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    height: 76px;
  }

  .nav-logo img,
  .is-scrolled .nav-logo img {
    height: 36px;
  }
}

@media (max-width: 600px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}
