/* ==========================================================================
   Components — header, navigation, dialogs, accordion, form controls
   ========================================================================== */

/* ---- Brand / logo -------------------------------------------------------
   assets/img/logo.png has a white wordmark, so it is always shown on navy
   (header + footer). Swap the file to change it; the slot is fixed-height,
   so the layout never shifts.                                               */

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.brand__logo {
  display: block;
  flex: none;
  height: 2.125rem;
}

.brand__logo img {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
}

.footer .brand__logo {
  width: min(15.5rem, 100%);
  height: auto;
}

.footer .brand__logo img {
  width: 100%;
  height: auto;
}

@media (min-width: 1200px) {
  .brand__logo {
    height: clamp(1.9rem, 2.6vw, 2.35rem);
  }
}

@media (max-width: 720px) {
  .brand__logo {
    height: 1.9rem;
  }
}

@media (max-width: 359px) {
  .brand__logo {
    height: 1.7rem;
  }
}

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

.site-header {
  --focus: var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 22, 38, 0.94);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.site-header.is-scrolled {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.55);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--header-h);
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.nav {
  display: none;
  align-items: center;
  gap: clamp(1.1rem, 1.8vw, 1.9rem);
  margin-inline: auto;
}

.nav a {
  position: relative;
  padding: 0.6rem 0;
  font-size: 0.9375rem;
  font-weight: 550;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.15rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav a:hover,
.nav a[aria-current="location"] {
  color: #fff;
}

.nav a:hover::after,
.nav a[aria-current="location"]::after {
  transform: scaleX(1);
}

.site-header__cta {
  display: none;
  flex: none;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.nav-toggle {
  position: relative;
  width: 2.875rem;
  height: 2.875rem;
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--r-sm);
  background: transparent;
  transition: border-color 0.2s, background-color 0.2s;
}

.nav-toggle:hover {
  border-color: #fff;
}

.nav-toggle span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.25rem;
  height: 2px;
  margin: -1px 0 0 -0.625rem;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.2s, background-color 0.2s;
}

.nav-toggle span:nth-child(1) {
  transform: translateY(-6px);
}

.nav-toggle span:nth-child(3) {
  transform: translateY(6px);
}

.nav-toggle[aria-expanded="true"] {
  background: var(--accent);
  border-color: var(--accent);
}

.nav-toggle[aria-expanded="true"] span {
  background: var(--on-accent);
}

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

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

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

@media (min-width: 1200px) {
  .nav {
    display: flex;
  }

  .site-header__cta {
    display: inline-flex;
  }

  .site-header__actions {
    margin-left: 0;
  }

  .nav-toggle,
  .mobile-menu {
    display: none;
  }
}

@media (min-width: 560px) and (max-width: 1199px) {
  .site-header__cta {
    display: inline-flex;
  }
}

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

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: 0.5rem var(--gutter) calc(2rem + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--ink-900);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-0.75rem);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease), visibility 0s linear 0.4s;
}

.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  width: min(100%, 36rem);
  margin-inline: auto;
}

.mm-link {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: clamp(1.3rem, 4.6vw, 1.75rem);
  font-weight: 600;
  font-stretch: 106%;
  letter-spacing: -0.015em;
  color: #fff;
  text-decoration: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease), color 0.2s;
}

.mm-link small {
  min-width: 1.6rem;
  font: 500 0.75rem/1 var(--font-mono);
  color: var(--accent);
}

.mm-link:hover,
.mm-link[aria-current="location"] {
  color: var(--accent);
}

.mobile-menu.is-open .mm-link {
  opacity: 1;
  transform: none;
  transition-delay: calc(60ms + var(--i, 0) * 45ms);
}

.mobile-menu__foot {
  display: grid;
  gap: 1rem;
  width: min(100%, 36rem);
  margin: 2rem auto 0;
}

.mobile-menu__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.72);
}

.mobile-menu__contact a {
  text-decoration: none;
}

/* ---- Mobile action bar (call + consultation) --------------------------- */

.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: none;
  gap: 0.6rem;
  padding: 0.65rem var(--gutter) calc(0.65rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--stone-200);
  box-shadow: 0 -14px 30px -20px rgba(11, 22, 38, 0.35);
  transform: translateY(110%);
  transition: transform 0.4s var(--ease);
}

.action-bar.is-shown {
  transform: none;
}

.action-bar .btn {
  min-height: 3rem;
}

.action-bar .btn:first-child {
  flex: none;
  width: 3rem;
  padding: 0;
}

.action-bar .btn:last-child {
  flex: 1;
}

@media (max-width: 720px) {
  .action-bar {
    display: flex;
  }
}

/* ---- Chips ------------------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font: 500 0.6875rem/1.2 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(7, 15, 27, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ---- Dialogs ----------------------------------------------------------- */

.modal {
  width: min(100% - 1.5rem, 44rem);
  max-height: calc(100dvh - 1.5rem);
  padding: 0;
  border: 0;
  border-radius: var(--r-lg);
  background: #fff;
  color: var(--text);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.modal[open] {
  display: flex;
  flex-direction: column;
  animation: modal-in 0.4s var(--ease);
}

.modal::backdrop {
  background: rgba(7, 15, 27, 0.66);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fade-in 0.3s;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--stone-200);
  border-radius: 50%;
  background: #fff;
  color: var(--ink-900);
  transition: background-color 0.2s, color 0.2s, transform 0.3s var(--ease);
}

.modal__close:hover {
  background: var(--ink-900);
  color: #fff;
  transform: rotate(90deg);
}

.modal__scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Service dialog */

.sd__head {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 2rem 4.5rem 1.5rem 2rem;
  background: var(--ink-900);
  color: #fff;
}

.sd__head .eyebrow {
  color: var(--accent);
}

.sd__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

.sd__icon .icon {
  width: 1.75rem;
  height: 1.75rem;
}

.sd__head h2 {
  margin-top: 0.35rem;
  font-size: var(--step-3);
  color: #fff;
}

.sd__body {
  display: grid;
  gap: 1.75rem;
  padding: 2rem;
}

.sd__lead {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--text);
}

.sd__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.sd__cols h3 {
  margin-bottom: 0.9rem;
  font: 500 0.75rem/1.2 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.sd__list {
  display: grid;
  gap: 0.7rem;
  list-style: none;
  font-size: 0.9688rem;
  color: var(--text-muted);
}

.sd__list li {
  position: relative;
  padding-left: 1.4rem;
}

.sd__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.5rem;
  height: 2px;
  background: var(--accent);
}

ol.sd__list {
  counter-reset: s;
}

ol.sd__list li {
  counter-increment: s;
  padding-left: 2rem;
}

ol.sd__list li::before {
  content: counter(s);
  top: 0.1em;
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--stone-100);
  font: 500 0.6875rem/1 var(--font-mono);
  color: var(--ink-900);
}

.sd__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--stone-200);
  background: var(--stone-50);
}

.sd__foot p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Project dialog */

.modal--wide {
  width: min(100% - 1.5rem, 68rem);
}

.pd {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  min-height: 0;
}

.pd__media {
  position: relative;
  min-height: 22rem;
  background: var(--ink-900);
}

.pd__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd__body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 2.5rem 2rem 2rem;
}

.pd__body h2 {
  font-size: var(--step-3);
}

.pd__note {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.pd__nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
}

.pd__nav .count {
  font: 500 0.75rem var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.round-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.875rem;
  height: 2.875rem;
  border: 1.5px solid var(--stone-300);
  border-radius: 50%;
  background: #fff;
  color: var(--ink-900);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
}

.round-btn:hover:not(:disabled) {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: #fff;
}

.round-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Legal dialog */

.legal {
  display: grid;
  gap: 1rem;
  padding: 2.5rem 2rem 2rem;
}

.legal h2 {
  font-size: var(--step-3);
  padding-right: 3rem;
}

/* ---- Accordion --------------------------------------------------------- */

.acc {
  border-top: 1px solid var(--stone-300);
}

.acc__item {
  border-bottom: 1px solid var(--stone-300);
}

.acc__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: 1.45rem 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: var(--step-1);
  font-weight: 600;
  font-stretch: 104%;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink-900);
}

.acc__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1.5px solid var(--stone-300);
  border-radius: 50%;
  transition: transform 0.4s var(--ease), background-color 0.25s, border-color 0.25s, color 0.25s;
}

.acc__icon .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.acc__btn:hover .acc__icon {
  border-color: var(--ink-900);
}

.acc__btn[aria-expanded="true"] .acc__icon {
  transform: rotate(45deg);
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: var(--accent);
}

.acc__panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.4s var(--ease), visibility 0s linear 0.4s;
}

.acc__panel.is-open {
  grid-template-rows: 1fr;
  visibility: visible;
  transition-delay: 0s;
}

.acc__panel > div {
  min-height: 0;
  overflow: hidden;
}

.acc__panel p {
  max-width: 40rem;
  padding: 0 3.5rem 1.6rem 0;
  color: var(--text-muted);
}

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

.field {
  display: grid;
  gap: 0.4rem;
  align-content: start;
}

.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-900);
}

.field label .req {
  color: var(--accent-deep);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3.125rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--stone-300);
  border-radius: var(--r-sm);
  background: #fff;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink-900);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230b1626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--stone-500);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--stone-400);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid transparent;
  border-color: var(--ink-700);
  box-shadow: 0 0 0 4px rgba(242, 106, 27, 0.22);
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--danger);
  background-color: #fff8f7;
}

.field.is-invalid input:focus,
.field.is-invalid select:focus,
.field.is-invalid textarea:focus {
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.18);
}

.field__error {
  min-height: 1.15rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--danger);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 720px) {
  .sd__head {
    padding: 1.5rem 4rem 1.25rem 1.25rem;
  }

  .sd__body {
    padding: 1.5rem 1.25rem;
  }

  .sd__cols {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .sd__foot {
    padding: 1rem 1.25rem;
  }

  .sd__foot .btn {
    width: 100%;
  }

  .pd {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .pd__media {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .pd__body {
    padding: 1.5rem 1.25rem 1.5rem;
  }

  .acc__panel p {
    padding-right: 0;
  }

  .modal__close {
    top: 0.75rem;
    right: 0.75rem;
  }
}
