:root {
  --paper: #f7f6f2;
  --paper-raised: #ffffff;
  --ink: #26251f;
  --copy: #55544b;
  --muted: #77766c;
  --line: #e2e0d8;
  --oxide: #1f7458;
  --oxide-deep: #14543f;
  --focus: #1e8f52;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  overflow-x: hidden;
}

button,
a {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 9px 13px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--paper-raised);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: none;
}

body > nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.94) !important;
}

body > nav > a:first-child,
body > footer a[href="index.html"]:first-child {
  display: inline-flex;
  align-items: baseline;
  gap: 0.16em;
  font-family: "DM Sans", sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
}

body > nav > a:first-child {
  font-size: 26px !important;
}

body > footer a[href="index.html"]:first-child {
  font-size: 23px !important;
}

body > nav > a:first-child span,
body > footer a[href="index.html"]:first-child span {
  font-family: "Spectral", serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.035em;
}

body > nav > a:first-child span {
  color: var(--oxide) !important;
}

body > footer a[href="index.html"]:first-child span {
  color: #8fd0b5 !important;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(31, 116, 88, 0.35);
  outline-offset: 4px;
}

a[href$="ai-audit.html"] {
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

a[href$="ai-audit.html"]:hover {
  background: var(--oxide-deep) !important;
  opacity: 1;
  transform: translateY(-1px);
}

body > nav details > div a:hover {
  background: #faf7f2;
  opacity: 1;
}

body > nav a[aria-current="page"],
body > nav summary[aria-current="page"] {
  color: var(--oxide-deep) !important;
}

body > nav details[open] summary span {
  transform: rotate(180deg);
}

body > nav summary span {
  display: inline-block;
  transition: transform 160ms ease;
}

.mobile-audit-cta {
  display: none;
}

.modal-open {
  overflow: hidden;
}

.booking-dialog {
  width: min(960px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-raised);
  color: var(--ink);
  box-shadow: 0 30px 100px rgba(38, 37, 31, 0.28);
}

.booking-dialog::backdrop {
  background: rgba(38, 37, 31, 0.58);
  backdrop-filter: blur(5px);
}

.booking-modal {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 32px);
}

.booking-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-raised);
}

.booking-modal-head div {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.booking-modal-head small {
  color: var(--oxide-deep);
  font: 500 11px "DM Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.booking-modal-head strong {
  font-family: "Spectral", serif;
  font-size: 21px;
  font-weight: 600;
}

.booking-modal-close {
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
  border: 1px solid #c9c7bd;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: 600 14px "DM Sans", sans-serif;
}

.booking-modal-close:hover {
  border-color: var(--oxide);
  color: var(--oxide-deep);
}

.booking-dialog iframe {
  display: block;
  width: 100%;
  height: min(720px, calc(100dvh - 104px));
  min-height: 560px;
  border: 0;
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 1000px) {
  body > nav,
  main > *,
  body > footer {
    padding-left: 32px !important;
    padding-right: 32px !important;
  }

  main > [style*="display:grid"] {
    grid-template-columns: 1fr !important;
    gap: 48px !important;
  }

  main [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  main [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  main > [style*="display:flex"][style*="justify-content:space-between"] {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px !important;
  }

  body > nav {
    height: 68px !important;
    gap: 14px !important;
    padding-right: 18px !important;
    padding-left: 18px !important;
  }

  body > nav > a:first-child {
    font-size: 20px !important;
    white-space: nowrap;
  }

  body > nav > div {
    display: flex !important;
    margin-left: auto;
  }

  body > nav > div > a {
    display: none !important;
  }

  body > nav > div > details {
    display: block !important;
  }

  body > nav details > div {
    right: 0 !important;
    left: auto !important;
    transform: none !important;
  }

  body > nav > a:last-child {
    display: none !important;
  }

  main > *,
  body > footer {
    padding-right: 20px !important;
    padding-left: 20px !important;
  }

  main > header,
  main > [style*="padding:96px"],
  main > [style*="padding:104px"],
  main > [style*="padding:88px"] {
    padding-top: 64px !important;
    padding-bottom: 64px !important;
  }

  h1 {
    font-size: clamp(44px, 14vw, 62px) !important;
    line-height: 1.02 !important;
  }

  h2 {
    font-size: clamp(34px, 10vw, 46px) !important;
  }

  main [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  main [style*="display:flex"] {
    flex-wrap: wrap !important;
  }

  main [style*="display:flex"][style*="justify-content:space-between"],
  main [style*="display:flex"][style*="align-items:flex-end"] {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  main a[href$="ai-audit.html"],
  main a[href$="contact.html"] {
    justify-content: center;
    width: 100%;
    padding-right: 18px !important;
    padding-left: 18px !important;
  }

  body > footer {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  body {
    padding-bottom: 76px;
  }

  .mobile-audit-cta {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 70;
    display: block;
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 20px));
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .mobile-audit-cta.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-audit-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    border-radius: 6px;
    background: var(--oxide);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(38, 37, 31, 0.24);
  }

  .booking-dialog {
    width: calc(100% - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 9px;
  }

  .booking-modal {
    max-height: calc(100dvh - 12px);
  }

  .booking-modal-head {
    padding: 12px 14px;
  }

  .booking-modal-head div {
    display: block;
  }

  .booking-modal-head small {
    display: block;
    margin-bottom: 2px;
  }

  .booking-modal-head strong {
    font-size: 18px;
  }

  .booking-modal-close {
    min-height: 38px;
    padding: 0 12px;
  }

  .booking-dialog iframe {
    height: calc(100dvh - 76px);
    min-height: 480px;
  }
}
