@import url("tokens.css");

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--lh-relaxed);
  color: var(--text);
  background: var(--bg);
}

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

a {
  color: var(--accent-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: var(--lh-display);
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-4);
  font-weight: 700;
}

h1 {
  font-size: var(--text-5xl);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
  font-weight: 600;
}

p {
  margin: 0 0 var(--space-4);
  color: var(--text-muted);
  max-width: 62ch;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  padding: 1rem 1.4rem;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 200ms var(--ease-out), color 200ms var(--ease-out),
    transform 200ms var(--ease-out);
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-deep);
  color: #fbfbfa;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #9a3412;
  color: #fbfbfa;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: #fbfbfa;
  border: 1px solid rgba(251, 251, 250, 0.45);
}

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

.btn-ink {
  background: var(--ink);
  color: #fbfbfa;
}

.btn-ink:hover {
  background: #000;
  color: #fbfbfa;
}

.btn:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 251, 250, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease-out);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: var(--header-h);
}

.logo img {
  width: 156px;
  height: auto;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-7);
}

.nav-list > li > a:not(.btn) {
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}

.nav-list > li > a:not(.btn):hover,
.nav-list > li > a:not(.btn).is-active {
  color: var(--accent-deep);
}

.has-submenu {
  position: relative;
}

.submenu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 300px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: 180ms var(--ease-out);
  z-index: 20;
}

.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu,
.has-submenu.is-open .submenu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.submenu li + li {
  border-top: 1px solid var(--border);
}

.submenu a {
  display: block;
  padding: 0.85rem 1.1rem;
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}

.submenu a:hover {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

/* Official Codee pattern. Media ends on the bottom curve; the matte is the next surface. */
.has-fn-wave,
.fn-image {
  --wave-matte: var(--bg);
}

.has-fn-wave::before,
.fn-image::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 3;
  aspect-ratio: 610.35 / 95.11;
  background: var(--wave-matte);
  pointer-events: none;
  -webkit-mask-image: url("../assets/images/codee-curve-matte.svg");
  mask-image: url("../assets/images/codee-curve-matte.svg");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.has-fn-wave::before {
  height: var(--wave-h);
  aspect-ratio: auto;
}

.fn-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 4;
  height: auto;
  aspect-ratio: 610.35 / 95.11;
  pointer-events: none;
  line-height: 0;
  overflow: hidden;
}

.has-fn-wave > .fn-wave {
  height: var(--wave-h);
  aspect-ratio: auto;
}

.fn-wave img {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.fn-image {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  isolation: isolate;
}

.fn-image > img:not(.float-img) {
  width: 100%;
  display: block;
}

.fn-image .fn-wave {
  height: auto;
}

/* Hero — asymmetric, brand-first, highlight-box for photo legibility */
.hero {
  position: relative;
  min-height: min(92vh, 920px);
  display: grid;
  align-items: end;
  color: #fbfbfa;
  overflow: hidden;
  background: var(--surface);
  --wave-matte: var(--surface);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media .hero-video,
.hero-media .hero-fallback,
.hero-media .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media .hero-fallback {
  z-index: 0;
}

.hero-media .hero-video {
  z-index: 1;
}

.hero-media .slide {
  opacity: 0;
  transition: opacity 1s var(--ease-out);
}

.hero-media .slide.is-active {
  opacity: 1;
}

.hero.is-reduced-motion .hero-video {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-media .hero-video {
    display: none;
  }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* Keep left readable; leave the wave band of the video bright */
  background: linear-gradient(
    105deg,
    rgba(28, 25, 23, 0.9) 0%,
    rgba(28, 25, 23, 0.55) 36%,
    rgba(28, 25, 23, 0.12) 68%,
    rgba(28, 25, 23, 0) 100%
  );
}

.hero .container {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--space-8);
  align-items: end;
  padding-block: var(--space-11) calc(var(--wave-h) + 2.5rem);
}

.hero-copy {
  max-width: 46rem;
}

.brand-mark {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--space-5);
}

.hero h1 {
  color: #fbfbfa;
  margin-bottom: var(--space-5);
  max-width: 14em;
  font-size: clamp(2.6rem, 1.5rem + 2.5vw, 4.25rem);
  line-height: 1.08;
}

.hero .lede {
  color: rgba(251, 251, 250, 0.86);
  font-size: var(--text-lg);
  max-width: 34ch;
  margin-bottom: var(--space-7);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.hero-note {
  color: rgba(251, 251, 250, 0.68);
  font-size: var(--text-sm);
  margin: 0;
  max-width: 36ch;
}

.hero-proof {
  justify-self: end;
  width: min(100%, 320px);
  padding: var(--space-6);
  background: rgba(20, 24, 22, 0.72);
  border: 1px solid rgba(251, 251, 250, 0.14);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
}

.hero-proof p {
  color: rgba(251, 251, 250, 0.82);
  font-size: var(--text-sm);
  margin: 0 0 var(--space-4);
  max-width: none;
}

.hero-proof strong {
  display: block;
  color: #fbfbfa;
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}

.hero-proof .mini-creds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.hero-proof .mini-creds img {
  width: 100%;
  height: 52px;
  object-fit: contain;
  background: #fbfbfa;
  border-radius: var(--radius-sm);
  padding: 6px 8px;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: max(1.25rem, calc((100% - var(--max)) / 2));
  bottom: clamp(6.5rem, 13vw, 9rem);
  display: flex;
  gap: 0.5rem;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #fbfbfa;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--accent);
  border-color: var(--accent);
}

/* Credentials — horizontal proof rail, not 4 equal cards */
.credentials {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--space-7) 0;
}

.credentials .container {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: var(--space-8);
  align-items: center;
}

.credentials h2 {
  font-size: var(--text-2xl);
  margin: 0 0 var(--space-3);
}

.credentials > .container > div:first-child p {
  margin: 0;
  font-size: var(--text-sm);
}

.credential-rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-5) var(--space-6);
}

.credential-rail img {
  width: auto;
  height: 72px;
  max-width: 100%;
  object-fit: contain;
  background: transparent;
}

/* Sections */
.section {
  padding: var(--space-11) 0;
}

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

.section-ink {
  background: var(--ink);
  color: #fbfbfa;
  position: relative;
  overflow: hidden;
}

.section-ink h2,
.section-ink h3 {
  color: #fbfbfa;
}

.section-ink p {
  color: rgba(251, 251, 250, 0.78);
}

.section-head {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-9);
  max-width: 40ch;
}

.kicker {
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 0 0 var(--space-3);
}

.section-ink .kicker {
  color: var(--accent);
}

/* Asymmetric editorial split — 5/7 not 50/50 */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.split.wide-media {
  grid-template-columns: 0.85fr 1.15fr;
}

.split.reverse {
  grid-template-columns: 0.85fr 1.15fr;
}

.split.reverse > :first-child {
  order: 2;
}

.media-frame {
  position: relative;
}

.media-frame > img:not(.float-img) {
  width: 100%;
  height: auto;
  max-height: min(72vh, 720px);
  object-fit: contain;
  object-position: center top;
  background: #eceae6;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.media-frame .float-img {
  position: absolute;
  width: 46%;
  right: -6%;
  bottom: -10%;
  border: 5px solid var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.stat {
  padding: var(--space-5) var(--space-4);
  background: var(--surface-2);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}

.stat strong {
  display: block;
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2);
}

.stat span {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Services — asymmetric mosaic (not 3 equal cards) */
.service-mosaic {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-auto-rows: minmax(220px, auto);
  gap: var(--space-3);
}

.service-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 260px;
  padding: var(--space-6);
  border-radius: var(--radius);
  overflow: hidden;
  color: #fbfbfa;
  text-decoration: none;
  isolation: isolate;
}

.service-tile:nth-child(1) {
  grid-row: span 2;
  min-height: 100%;
}

.service-tile:nth-child(6) {
  grid-column: 2 / span 2;
  min-height: 240px;
}

.service-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 600ms var(--ease-out);
}

.service-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgba(20, 24, 22, 0.92) 0%,
    rgba(20, 24, 22, 0.2) 70%
  );
}

.service-tile:hover img {
  transform: scale(1.04);
}

.service-tile h3 {
  color: #fbfbfa;
  margin-bottom: var(--space-2);
}

.service-tile p {
  color: rgba(251, 251, 250, 0.8);
  font-size: var(--text-sm);
  margin: 0;
  max-width: 36ch;
}

.service-tile .more {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--accent);
}

/* Page hero */
.page-hero {
  padding: var(--space-10) 0 var(--space-8);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.page-hero {
  --wave-matte: var(--bg);
}

.page-hero:has(+ .credentials),
.page-hero:has(+ .section-alt),
.section.has-fn-wave,
.section-dark.has-fn-wave {
  --wave-matte: var(--surface);
}

.page-hero.has-fn-wave,
.section.has-fn-wave,
.section-dark.has-fn-wave {
  padding-bottom: calc(var(--wave-h) + 1.5rem);
}

.page-hero.has-fn-wave + .section {
  padding-top: var(--space-7);
}

.page-hero h1 {
  font-size: clamp(2.4rem, 1.5rem + 2.2vw, 3.6rem);
  line-height: 1.08;
  max-width: 16em;
}

.page-hero .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: var(--space-6) var(--space-8);
}

.page-hero .container > div:first-child {
  flex: 1 1 36rem;
  min-width: min(100%, 20rem);
}

.page-hero p {
  font-size: var(--text-lg);
  margin: 0;
}

.page-hero .hero-actions {
  margin: 0;
}

.page-hero.has-photo {
  min-height: min(82vh, 820px);
  display: grid;
  align-items: end;
  padding-top: var(--space-10);
  color: #fbfbfa;
  background: var(--ink);
}

.page-hero.has-photo .hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero.has-photo .hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.page-hero.has-photo.hero-fit-people .hero-media {
  background: #1c1917;
}

.page-hero.has-photo.hero-fit-people .hero-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

.page-hero.has-photo.hero-focus-mid .hero-media img {
  object-position: center 42%;
}

.page-hero.has-photo.hero-focus-low .hero-media img {
  object-position: center 58%;
}

.page-hero.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    rgba(28, 25, 23, 0.82) 0%,
    rgba(28, 25, 23, 0.42) 46%,
    rgba(28, 25, 23, 0.12) 100%
  );
}

.page-hero.has-photo .container {
  position: relative;
  z-index: 4;
}

.page-hero.has-photo h1,
.page-hero.has-photo p {
  color: #fbfbfa;
}

.page-hero.has-photo p {
  color: rgba(251, 251, 250, 0.86);
}

.section-ink.has-photo .hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.section-ink.has-photo .hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.45);
}

.section-ink.has-photo .container {
  position: relative;
  z-index: 4;
}

/* Testimonials — staggered, not identical cards */
.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.testimonial {
  padding: var(--space-7) var(--space-6);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.testimonial:nth-child(even) {
  margin-top: var(--space-7);
}

.testimonial .stars {
  width: 96px;
  margin-bottom: var(--space-4);
}

.testimonial p {
  color: var(--text);
  font-size: var(--text-lg);
  max-width: none;
}

.testimonial .name {
  font-weight: 800;
  margin: var(--space-6) 0 0;
  color: var(--text);
  font-size: var(--text-base);
}

.testimonial .role {
  color: var(--accent-deep);
  font-size: var(--text-sm);
  font-weight: 700;
  margin: 0;
}

/* Quote / forms */
.quote-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-9);
  align-items: start;
}

.quote-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}

.quote-form label {
  display: block;
}

.quote-form input,
.quote-form select,
.quote-form textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  margin-bottom: var(--space-4);
}

.quote-form textarea {
  min-height: 120px;
  resize: vertical;
}

.form-status {
  margin: var(--space-3) 0 0;
  font-size: var(--text-sm);
  font-weight: 600;
  min-height: 1.2em;
}

.form-status.is-error {
  color: #b42318;
}

.form-status.is-pending {
  color: var(--text-muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

/* Footer */
.footer {
  color: #fbfbfa;
}

.footer-main {
  background: var(--ink);
  padding: var(--space-10) 0 var(--space-8);
}

.footer-main a {
  color: rgba(251, 251, 250, 0.88);
  text-decoration: none;
}

.footer-main a:hover {
  color: var(--accent);
}

.footer-tagline {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--accent) !important;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
  max-width: 22ch;
}

.footer-main h3,
.footer-main h4 {
  color: rgba(251, 251, 250, 0.5);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: var(--space-5) 0 var(--space-2);
}

.footer-main h4 {
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--text-base);
}

.footer-main p {
  color: rgba(251, 251, 250, 0.8);
  font-size: var(--text-sm);
  max-width: none;
}

.footer-main ul li {
  margin-bottom: var(--space-3);
}

.locations-grid {
  display: grid;
  gap: var(--space-4);
}

.footer-bar {
  background: var(--accent-deep);
  padding: var(--space-4) 0;
  text-align: center;
}

.footer-bar p {
  margin: 0;
  color: #fbfbfa;
  font-weight: 700;
  font-size: var(--text-sm);
  max-width: none;
}

.check-list {
  padding-left: 1.1em;
  list-style: disc;
  color: var(--text-muted);
}

.check-list li {
  margin-bottom: 0.45em;
}

.contact-map {
  width: 100%;
  min-height: 340px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 550ms var(--ease-out), transform 550ms var(--ease-out);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Legacy class bridges used on service pages */
.credential-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.credential-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  padding: var(--space-3);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.credential-card img {
  max-height: 56px;
  width: auto;
  object-fit: contain;
}

.credential-strip {
  margin-top: var(--space-5);
  text-align: center;
}

.credential-strip img {
  margin: 0 auto;
  max-width: min(100%, 720px);
}

.section-dark {
  background: var(--ink);
  color: #fbfbfa;
  position: relative;
  overflow: hidden;
}

.section-dark h2,
.section-dark h3 {
  color: #fbfbfa;
}

.section-dark p {
  color: rgba(251, 251, 250, 0.78);
}

.section-ink {
  --wave-matte: var(--surface);
}

.credentials-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

@media (max-width: 1024px) {
  .hero .container,
  .credentials .container,
  .page-hero .container,
  .quote-layout {
    grid-template-columns: 1fr;
  }

  .hero-proof {
    justify-self: start;
    width: 100%;
  }

  .service-mosaic {
    grid-template-columns: 1fr 1fr;
  }

  .service-tile:nth-child(1),
  .service-tile:nth-child(6) {
    grid-row: auto;
    grid-column: auto;
    min-height: 280px;
  }

  .stat-row {
    grid-template-columns: 1fr;
  }

  .testimonial:nth-child(even) {
    margin-top: 0;
  }
}

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 280ms var(--ease-out);
  }

  .nav.is-open {
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-4) var(--space-5) var(--space-6);
  }

  .nav-list > li > a {
    display: block;
    padding: 0.85rem 0;
  }

  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    display: none;
    margin-left: var(--space-3);
  }

  .has-submenu.is-open .submenu {
    display: block;
  }

  .split,
  .split.reverse,
  .split.wide-media,
  .grid-2,
  .grid-3,
  .testimonial-grid,
  .service-mosaic,
  .credential-grid,
  .credential-rail {
    grid-template-columns: 1fr;
  }

  .split.reverse > :first-child {
    order: 0;
  }

  .media-frame .float-img {
    position: relative;
    width: 72%;
    right: auto;
    bottom: auto;
    margin: -18% 0 0 auto;
  }

  .hero {
    min-height: 680px;
  }

  .hero .container {
    padding-block: var(--space-9) calc(var(--wave-h) + 2rem);
  }

  .hero-copy,
  .hero h1 {
    max-width: none;
  }

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

  .quote-panel {
    padding: var(--space-6);
  }

  .hero-dots {
    left: 1.25rem;
  }
}
