/* ============================================================
   Brightwork Dental, Calm Clinical Premium
   Vanilla CSS. Soft teal and white, abundant whitespace.
   ============================================================ */

:root {
  /* Palette (locked) */
  --bg: #ffffff;
  --bg-2: #f5fafb;
  --mint: #eaf6f6;
  --primary: #2e9da8;
  --primary-deep: #237b84;
  --soft: #6fcbd2;
  --text: #1f3a44;
  --text-dim: #5e7178;

  /* Type */
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Rhythm */
  --section-y: clamp(5rem, 10vw, 9rem);
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --maxw: 1240px;
  --radius: 18px;
  --radius-lg: 28px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hairline: rgba(46, 157, 168, 0.18);
  --shadow: 0 18px 50px -28px rgba(31, 58, 68, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}

p {
  margin: 0;
  text-wrap: pretty;
}
h1, h2, h3, .section-head .lede, .welcome p, .moment p, .why__item p, .quote p, .footer__brand p, .bw-index__desc, .cta__body { text-wrap: balance; }

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 999;
  border-radius: 0 0 12px 0;
}
.skip-link:focus {
  left: 0;
}

/* ----------------------------- Shared layout ----------------------------- */
.section {
  padding: var(--section-y) var(--gutter);
}

/* Keep section headings clear of the fixed header on native hash navigation:
   a pasted link, the skip link, or browser back and forward. Those paths do
   not run through the smooth-scroll handler in main.js, which applies its own
   offset. scrollTo ignores scroll-margin-top, so the two never double up. */
main > section[id],
#site-footer {
  scroll-margin-top: 6rem;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 1rem;
}

.section-head {
  max-width: 720px;
  margin: 0 auto 3.5rem;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(1.65rem, 4.4vw, 3.1rem);
}
.section-head .lede {
  margin-top: 1.1rem;
  color: var(--text-dim);
  font-size: 1.08rem;
}

/* ----------------------------- Buttons ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.5s var(--ease), background 0.5s var(--ease),
    color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 30px -14px rgba(46, 157, 168, 0.7);
}
.btn--primary:hover {
  background: var(--primary-deep);
  transform: translateY(-2px);
}
.btn--ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--hairline);
}
.btn--ghost:hover {
  background: var(--mint);
}
.btn--light {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
}
.btn--light:hover {
  background: #fff;
  transform: translateY(-2px);
}

/* ----------------------------- Header ----------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem var(--gutter);
  transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease),
    padding 0.5s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  box-shadow: 0 1px 0 var(--hairline);
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}
.brand-mark {
  font-family: var(--font-head);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #fff;
  transition: color 0.5s var(--ease);
}
.brand-mark span {
  color: var(--soft);
}
.is-scrolled .brand-mark {
  color: var(--text);
}
.is-scrolled .brand-mark span {
  color: var(--primary);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
  margin-right: 1.5rem;
}
.site-nav a {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.4s var(--ease);
  position: relative;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease);
}
.site-nav a:hover::after {
  width: 100%;
}
.is-scrolled .site-nav a {
  color: var(--text-dim);
}
.is-scrolled .site-nav a:hover {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  padding: 0.3rem;
  line-height: 0;
  transition: color 0.5s var(--ease);
}
.is-scrolled .nav-toggle {
  color: var(--text);
}
.nav-toggle svg line {
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
  transform-origin: center;
}

/* Slide-down mobile menu panel */
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(140%) blur(12px);
  box-shadow: 0 18px 40px -24px rgba(31, 58, 68, 0.4);
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.5s var(--ease), opacity 0.4s var(--ease),
    padding 0.5s var(--ease);
}
.is-menu-open .mobile-menu {
  max-height: 70vh;
  opacity: 1;
  pointer-events: auto;
  padding: 1rem var(--gutter) 1.6rem;
}
.mobile-menu__nav {
  display: flex;
  flex-direction: column;
}
.mobile-menu__nav a {
  padding: 0.95rem 0.25rem;
  font-size: 1.05rem;
  color: var(--text);
  border-bottom: 1px solid var(--hairline);
}
.mobile-menu__nav a:hover {
  color: var(--primary);
}
.mobile-menu__cta {
  margin-top: 1.1rem;
  justify-content: center;
}
/* Hamburger morphs to an X when open */
.is-menu-open .nav-toggle .nav-toggle__top {
  transform: translateY(5px) rotate(45deg);
}
.is-menu-open .nav-toggle .nav-toggle__bot {
  transform: translateY(-5px) rotate(-45deg);
}
.is-menu-open .nav-toggle .nav-toggle__mid {
  opacity: 0;
}
/* When the menu is open over the transparent hero, keep the header legible */
.is-menu-open.site-header {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(140%) blur(12px);
}
.is-menu-open .brand-mark {
  color: var(--text);
}
.is-menu-open .brand-mark span {
  color: var(--primary);
}
.is-menu-open .nav-toggle {
  color: var(--text);
}

/* ----------------------------- Hero ----------------------------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
      to right,
      rgba(20, 45, 52, 0.55),
      rgba(20, 45, 52, 0.15) 60%,
      rgba(20, 45, 52, 0.05)
    ),
    linear-gradient(to top, rgba(20, 45, 52, 0.45), rgba(20, 45, 52, 0) 45%);
}
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  color: #fff;
}
.hero__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.3rem;
}
.hero__headline {
  color: #fff;
  font-size: clamp(2.6rem, 5.2vw, 4.4rem);
  max-width: 22ch;
}
.hero__subhead {
  margin-top: 1.4rem;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.92);
}
.hero__actions {
  margin-top: 2.2rem;
}
.hero__hint {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.hero__hint::after {
  content: "";
  width: 1px;
  height: 38px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), transparent);
  animation: hintPulse 2.4s var(--ease) infinite;
}
@keyframes hintPulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scaleY(0.6);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* ----------------------------- Depth elements -----------------------------
   Dot matrix, ripple rings and line-icon constellations. Corners and edges
   only, low opacity, never behind body copy. No blueprint grid on this site. */
.welcome, .services, .experience, .why, .technology, .testimonials {
  position: relative;
  overflow: clip;
}
.section > .wrap { position: relative; z-index: 1; }
.deco { position: absolute; z-index: 0; pointer-events: none; }
.deco--dots {
  width: clamp(220px, 26vw, 380px);
  aspect-ratio: 1;
  background-image: radial-gradient(rgba(46, 157, 168, 0.42) 1.3px, transparent 1.8px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(closest-side, #000 20%, transparent);
  mask-image: radial-gradient(closest-side, #000 20%, transparent);
}
.deco--rings {
  width: clamp(300px, 36vw, 540px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 34px, rgba(46, 157, 168, 0.16) 34px 35px);
  -webkit-mask-image: radial-gradient(closest-side, #000 45%, transparent);
  mask-image: radial-gradient(closest-side, #000 45%, transparent);
}
.deco--tl { left: clamp(-160px, -8vw, -60px); top: clamp(-160px, -8vw, -60px); }
.deco--tr { right: clamp(-160px, -8vw, -60px); top: clamp(-140px, -7vw, -50px); }
.deco--bl { left: clamp(-160px, -8vw, -60px); bottom: clamp(-160px, -8vw, -60px); }
.deco--br { right: clamp(-160px, -8vw, -60px); bottom: clamp(-160px, -8vw, -60px); }
.constellation { position: absolute; z-index: 0; pointer-events: none; top: 50%; width: clamp(160px, 18vw, 260px); height: 300px; transform: translateY(-50%); }
.constellation--left { left: clamp(1rem, 6vw, 7rem); }
.constellation--right { right: clamp(1rem, 6vw, 7rem); }
.constellation__i {
  position: absolute;
  display: grid; place-items: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  color: var(--primary);
  background: rgba(234, 246, 246, 0.8);
  border: 1px solid rgba(46, 157, 168, 0.16);
  opacity: 0.75;
}
.constellation__i svg { width: 28px; height: 28px; }
.constellation__i--1 { top: 0; left: 30%; }
.constellation__i--2 { top: 42%; left: 0; width: 48px; height: 48px; }
.constellation__i--2 svg { width: 22px; height: 22px; }
.constellation__i--3 { bottom: 0; left: 52%; width: 54px; height: 54px; }
.constellation--right .constellation__i--1 { left: auto; right: 30%; }
.constellation--right .constellation__i--2 { left: auto; right: 0; }
.constellation--right .constellation__i--3 { left: auto; right: 52%; }
/* hairline with a node: the site's quiet, clinical divider */
.node-rule {
  display: block; position: relative;
  width: min(320px, 70%); height: 1px; margin: 2.4rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(46, 157, 168, 0.5), transparent);
}
.node-rule::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 9px; height: 9px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #fff; border: 1px solid var(--primary);
  box-shadow: 0 0 0 4px var(--mint);
}

/* ----------------------------- Welcome ----------------------------- */
.welcome {
  background: var(--bg);
  text-align: center;
}
.welcome__inner {
  max-width: 760px;
  margin: 0 auto;
}
.welcome h2 {
  font-size: clamp(1.65rem, 4vw, 2.8rem);
  margin-bottom: 1.2rem;
}
.welcome p {
  color: var(--text-dim);
  font-size: 1.12rem;
}

/* ----------------------------- Services: Index & Stage ----------------------------- */
.services {
  background: var(--bg-2);
}
.bw-services {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.18fr);
  gap: clamp(1.8rem, 4vw, 3.6rem);
  align-items: stretch;
}
.bw-index {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-self: center;
}
.bw-index__item {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: grid;
  grid-template-columns: 48px 1fr 22px;
  align-items: center;
  column-gap: 0.9rem;
  padding: 0.85rem 1.1rem;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.bw-index__item:hover { background: rgba(255, 255, 255, 0.6); }
.bw-index__item.is-active {
  background: #fff;
  border-color: var(--hairline);
  box-shadow: 0 18px 40px -26px rgba(31, 58, 68, 0.35);
}
.bw-index__item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.bw-index__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--primary);
  background: var(--mint);
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}
.bw-index__icon svg { width: 23px; height: 23px; }
.bw-index__title {
  font-family: var(--font-head);
  font-size: 1.32rem;
  font-weight: 300;
  color: var(--text-dim);
  transition: color 0.5s var(--ease);
}
.bw-index__arrow { color: var(--hairline); transition: color 0.5s var(--ease), transform 0.5s var(--ease); line-height: 0; }
.bw-index__arrow svg { width: 20px; height: 20px; }
.bw-index__desc {
  grid-column: 2 / 4;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.5s var(--ease), opacity 0.4s var(--ease);
  color: var(--text-dim);
  font-size: 0.96rem;
  line-height: 1.55;
}
.bw-index__desc > span { overflow: hidden; }
.bw-index__item.is-active .bw-index__icon { background: var(--primary); color: #fff; }
.bw-index__item.is-active .bw-index__title { color: var(--text); }
.bw-index__item.is-active .bw-index__arrow { color: var(--primary); transform: translateX(3px); }
.bw-index__item.is-active .bw-index__desc { grid-template-rows: 1fr; opacity: 1; padding-top: 0.35rem; }

.bw-stage {
  position: relative;
  min-height: 540px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--mint);
  box-shadow: var(--shadow);
}
.bw-stage__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s var(--ease), transform 1.4s var(--ease);
}
.bw-stage__img.is-on { opacity: 1; transform: scale(1); }
.bw-stage__count {
  position: absolute; top: 1.1rem; right: 1.1rem;
  font-size: 0.78rem; letter-spacing: 0.16em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  padding: 0.4rem 0.8rem; border-radius: 999px;
}
.bw-stage__cap {
  position: absolute; left: 50%; bottom: 1.4rem;
  transform: translateX(-50%);
  width: min(88%, 460px);
  text-align: center;
  padding: 1rem 1.4rem 1.05rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px -24px rgba(31, 58, 68, 0.45);
}
.bw-stage__k { display: block; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--primary-deep); font-weight: 500; }
.bw-stage__t { display: block; margin-top: 0.3rem; font-family: var(--font-head); font-size: 1.4rem; font-weight: 300; color: var(--text); }

/* ----------------------------- Split rows (Experience, Technology) -----------------------------
   The title sits in the text column above the copy; the photo spans both
   rows, so it runs from the eyebrow to the last line of copy (grid stretch
   plus object-fit cover). */
.split {
  display: grid;
  gap: 0 clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
}
.split__head { margin-bottom: 1.4rem; }
.split h2 { font-size: clamp(1.65rem, 3.2vw, 2.6rem); }
.split--media-left { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); }
.split--media-right { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
.split--media-right .split__head { grid-column: 1; grid-row: 1; }
.split--media-right .split__text { grid-column: 1; grid-row: 2; }
.split--media-right .split__media { grid-column: 2; grid-row: 1 / span 2; }
.split--media-left .split__head { grid-column: 2; grid-row: 1; }
.split--media-left .split__text { grid-column: 2; grid-row: 2; }
.split--media-left .split__media { grid-column: 1; grid-row: 1 / span 2; }
.split__media { position: relative; min-height: 200px; }
.split__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* ----------------------------- Experience ----------------------------- */
.experience {
  background: var(--bg);
}
.experience__body {
  color: var(--text-dim);
  font-size: 1.08rem;
  margin-bottom: 2rem;
}
.moments {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.moment {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}
.moment__dot {
  margin-top: 0.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--soft);
  box-shadow: 0 0 0 5px var(--mint);
}
.moment h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 0.2rem;
}
.moment p {
  color: var(--text-dim);
  font-size: 0.96rem;
}

/* ----------------------------- Why Brightwork ----------------------------- */
.why {
  background: var(--mint);
}
.why__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
.why__item {
  position: relative;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.66));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 2.3rem 1.3rem 2.1rem;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 24px 50px -32px rgba(31, 58, 68, 0.4), inset 0 0 0 1px rgba(46, 157, 168, 0.06);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.why__item:hover { transform: translateY(-5px); box-shadow: 0 30px 60px -30px rgba(31, 58, 68, 0.45); }
.why__icon {
  width: 64px; height: 64px;
  margin: 0 auto 1.3rem;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--primary);
  background: radial-gradient(circle at 50% 35%, #fff, var(--mint));
  border: 1px solid rgba(46, 157, 168, 0.22);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.7);
}
.why__icon svg { width: 28px; height: 28px; }
.why__item h3 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(1.12rem, 1.45vw, 1.32rem);
  margin-bottom: 0.6rem;
}
.why__item p {
  color: var(--text-dim);
  font-size: 0.96rem;
}

/* ----------------------------- Technology ----------------------------- */
.technology {
  background: var(--bg);
}
.technology__body {
  color: var(--text-dim);
  font-size: 1.08rem;
  margin-bottom: 1.8rem;
}
.tech-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.tech-points li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
  font-weight: 500;
}
.tech-points svg {
  flex: none;
  color: var(--primary);
}

/* ----------------------------- Gallery ----------------------------- */
.gallery {
  background: var(--bg-2);
}
/* Let the gallery use more of the screen than the rest of the page on
   large desktops. Has no effect below ~1480px, so tablet/mobile are untouched. */
.gallery .wrap {
  max-width: min(1480px, 94vw);
}
/* Asymmetric mosaic, not a uniform grid. Interior spaces run large, detail
   shots run small, and rows are offset so they do not align cleanly across
   the section. Radius is deliberately tight here: large matching rounded
   corners on a regular grid are the strongest template signal, so the
   gallery uses its own small value rather than the page radius. */
.gallery__mosaic {
  --g-gap: 1.6rem;
  --g-radius: 3px;
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 4vw, 4rem);
}

.g-tile {
  margin: 0;
  border-radius: var(--g-radius);
  overflow: hidden;
}
.g-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease);
}
.g-tile:hover img {
  transform: scale(1.04);
}

/* Movement one: wide interior primary, square detail accent dropped lower
   and separated by an empty column of air. */
.g-row--one {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--g-gap);
  align-items: start;
}
.g-tile--wide {
  grid-column: 1 / span 7;
  aspect-ratio: 16 / 9;
}
/* The accent must be visibly SHORTER than the primary, not just smaller in
   area. Side by side, the eye reads height as weight, so a square accent next
   to a 16:9 primary lands at the same height and reads as a co-equal tile. */
.g-tile--accent-a {
  grid-column: 8 / span 5;
  aspect-ratio: 16 / 10;
  margin-top: 4rem;
}

/* Movement two: the break in the rhythm. The only tile spanning the full
   content width, and a far wider crop than anything around it. No hover
   drift, this one is the pause. */
.g-tile--panorama {
  aspect-ratio: 21 / 9;
}
.g-tile--panorama:hover img {
  transform: none;
}

/* Movement three: portrait interior beside a stacked, inset pair of accents.
   Three distinct widths sit side by side and the tops do not line up. */
.g-row--three {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--g-gap);
  align-items: start;
}
/* The column ratio and these three aspect ratios are solved together so the
   stacked pair ends level with the portrait. Both details fill their column
   edge to edge: any width inset here reappears as a block of empty page
   between the portrait and the details, which is what kept going wrong. The
   only space left in this row is the gap itself. */
.g-tile--portrait {
  aspect-ratio: 4 / 5;
}
.g-stack {
  display: flex;
  flex-direction: column;
  gap: var(--g-gap);
}
.g-tile--accent-b {
  width: 100%;
  aspect-ratio: 16 / 9;
}
.g-tile--accent-c {
  width: 100%;
  aspect-ratio: 5 / 4;
}

/* ----------------------------- Testimonials ----------------------------- */
.testimonials {
  background: var(--bg);
}
.section-head--tight { margin-bottom: 2.4rem; }
.quote-ghost {
  position: absolute; z-index: 0; pointer-events: none;
  right: clamp(1rem, 6vw, 7rem); top: clamp(1rem, 3vw, 3rem);
  font-family: var(--font-head);
  font-size: clamp(12rem, 22vw, 20rem);
  line-height: 1;
  color: rgba(46, 157, 168, 0.08);
}
.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.quote {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(180deg, #fff, var(--bg-2));
  border-radius: var(--radius-lg);
  padding: 2.6rem 2.2rem 2.3rem;
  border: 1px solid var(--hairline);
  box-shadow: 0 26px 56px -36px rgba(31, 58, 68, 0.4);
}
.quote__stars { display: flex; gap: 0.2rem; color: var(--primary); }
.quote__star { line-height: 0; }
.quote__star svg { width: 17px; height: 17px; fill: currentColor; }
.quote p {
  margin: 1.3rem 0 1.6rem;
  font-family: var(--font-head);
  font-weight: 300;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--text);
}
.quote__by { margin-top: auto; padding-top: 1.1rem; border-top: 1px solid var(--hairline); width: 100%; }
.quote__who {
  font-weight: 600;
  font-size: 0.96rem;
}
.quote__ctx {
  color: var(--text-dim);
  font-size: 0.86rem;
}

/* ----------------------------- Contact: one unified full-bleed section -----------------------------
   The office photo sits behind the whole section. The white wall on the left
   carries the copy under a soft light scrim; the form rides on a glass card
   over the treatment chair on the right. */
.contact {
  position: relative;
  overflow: clip;
  background: var(--mint);
  isolation: isolate;
}
.cta__media, .cta__scrim { position: absolute; inset: 0; z-index: -1; }
.cta__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.cta__scrim {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.62) 32%, rgba(255, 255, 255, 0.1) 56%, rgba(255, 255, 255, 0) 100%);
}
.cta__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  min-height: clamp(560px, 70vh, 760px);
}
.cta__copy h2 { font-size: clamp(2rem, 4.2vw, 3rem); margin-bottom: 1.1rem; }
.cta__body { color: var(--text); opacity: 0.82; font-size: 1.1rem; max-width: 34ch; }
.cta__details { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-direction: column; gap: 0.8rem; }
.cta__details li { display: flex; align-items: center; gap: 0.75rem; color: var(--text); font-size: 0.98rem; }
.cta__details a:hover { color: var(--primary-deep); }
.cta__ic {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; color: var(--primary);
  background: rgba(255, 255, 255, 0.8); border: 1px solid var(--hairline);
}
.cta__ic svg { width: 18px; height: 18px; }

.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.46));
  backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 40px 80px -40px rgba(31, 58, 68, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.form {
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3vw, 2.6rem);
  display: grid;
  gap: 1.1rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.field--row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}
.field label {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  font-weight: 500;
  color: var(--text);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  color: var(--text);
  padding: 0.85rem 1rem;
  border: 1px solid rgba(46, 157, 168, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  transition: border 0.4s var(--ease), background 0.4s var(--ease);
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.field textarea {
  min-height: 110px;
  resize: vertical;
}
.form__submit {
  width: 100%;
  justify-content: center;
}
.form__success {
  background: var(--mint);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  color: var(--primary-deep);
  font-size: 0.96rem;
  display: none;
}
.form__success.is-visible {
  display: block;
}

/* ----------------------------- Footer ----------------------------- */
.site-footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.82);
  padding: clamp(3.5rem, 7vw, 5.5rem) var(--gutter) 2.5rem;
}
.footer__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer__brand .brand-mark {
  color: #fff;
}
.footer__brand .brand-mark span {
  color: var(--soft);
}
.footer__brand p {
  margin-top: 1rem;
  max-width: 36ch;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
}
.footer__col h4 {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--soft);
  margin: 0 0 1rem;
  font-weight: 600;
}
.footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer__col a:hover {
  color: #fff;
}
.footer__col .muted {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.92rem;
}
/* Keep long tokens (email, address) from pushing past the screen edge. */
.footer__col li,
.footer__col a,
.footer__brand p {
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* Bottom row: fictional-company line left, Summit Oak credit + mark right;
   stacked and centered on phones. */
.footer__bottom {
  max-width: var(--maxw);
  margin: 2rem auto 0;
  display: flex;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.5);
}
.footer__fictional { margin: 0; white-space: nowrap; }
@media (max-width: 760px) {
  .footer__bottom { flex-direction: column; justify-content: center; text-align: center; }
  .footer__fictional { white-space: normal; text-wrap: balance; font-size: .76rem; }
}

.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
}
.footer-credit .soak-mark {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: none;
  background-color: var(--primary);
  -webkit-mask: url(../assets/images/summitoak-mark.png) center / contain no-repeat;
  mask: url(../assets/images/summitoak-mark.png) center / contain no-repeat;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}
.footer-credit:hover .soak-mark {
  opacity: 1;
}
.footer-credit:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ----------------------------- Reveal animation base ----------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
}
.no-motion .reveal {
  opacity: 1;
  transform: none;
}

/* ----------------------------- Responsive ----------------------------- */
@media (max-width: 1100px) {
  .why__grid { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin: 0 auto; }
  .quotes { grid-template-columns: 1fr; max-width: 680px; margin: 0 auto; }
  .constellation { display: none; }
}
@media (max-width: 1100px) {
  .bw-services { grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; }
  .bw-stage { order: -1; min-height: 0; aspect-ratio: 4 / 3; }
  .bw-index { align-self: stretch; }
  .site-nav,
  .header__cta {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; grid-template-rows: none; }
  .split--media-right .split__head, .split--media-left .split__head,
  .split--media-right .split__text, .split--media-left .split__text,
  .split--media-right .split__media, .split--media-left .split__media { grid-column: 1; grid-row: auto; }
  .split__media { aspect-ratio: 16 / 10; min-height: 0; margin-top: 2rem; }
  .cta__grid { grid-template-columns: 1fr; min-height: 0; }
  .cta__scrim { background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.62) 40%, rgba(255, 255, 255, 0.4)); }
  /* Gallery keeps its hierarchy at tablet, just tighter. */
  .g-tile--wide {
    grid-column: 1 / span 8;
  }
  /* Stays landscape here for the same reason as the base rule: a portrait
     accent would out-measure the primary in height and take back the
     hierarchy. Only the drop is tightened for the narrower column. */
  .g-tile--accent-a {
    margin-top: 2.5rem;
  }
  .g-tile--panorama {
    aspect-ratio: 16 / 9;
  }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (min-width: 1101px) {
  .mobile-menu {
    display: none;
  }
}

@media (max-width: 560px) {
  .why__grid,
  .field--row,
  .footer__grid {
    grid-template-columns: 1fr;
  }
  /* Single column on phones, but the variation stays. Each tile keeps its
     own crop, and the accents stay inset and alternate their alignment so
     this never collapses into a stack of matching cards. */
  .g-row--one,
  .g-row--three {
    grid-template-columns: 1fr;
  }
  /* A 16:9 primary is very short at this width, which would let a portrait
     detail shot outweigh it. Give the primary a taller crop and pull the
     accent back to landscape so the interiors stay dominant. */
  .g-tile--wide {
    grid-column: 1;
    aspect-ratio: 4 / 3;
  }
  .g-tile--accent-a {
    grid-column: 1;
    width: 76%;
    aspect-ratio: 4 / 3;
    margin-left: auto;
    margin-top: 0;
  }
  .g-tile--panorama {
    aspect-ratio: 3 / 2;
  }
  /* One column here, so the details inset again and alternate their edge:
     right, left, right. Both margins are set explicitly, since the desktop
     rules above deliberately carry no auto margin. */
  .g-tile--accent-b {
    width: 88%;
    margin-left: 0;
    margin-right: auto;
  }
  .g-tile--accent-c {
    width: 68%;
    margin-left: auto;
    margin-right: 0;
  }
  .hero {
    min-height: 600px;
  }
  .bw-index__item { grid-template-columns: 42px 1fr 18px; column-gap: 0.7rem; padding: 0.75rem 0.8rem; }
  .bw-index__icon { width: 42px; height: 42px; }
  .bw-index__title { font-size: 1.15rem; }
  .bw-index__desc { grid-column: 1 / 4; }
  .bw-stage__cap { bottom: 0.9rem; padding: 0.75rem 1rem; }
  .bw-stage__t { font-size: 1.15rem; }
  .bw-stage__k { font-size: 0.64rem; letter-spacing: 0.14em; }
  .deco--rings, .deco--dots { opacity: 0.7; }
  .site-header {
    padding: 0.9rem var(--gutter);
  }
}

/* ----------------------------- Reduced motion ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero__hint::after {
    animation: none;
  }
  * {
    transition-duration: 0.001ms !important;
  }
}

/* Mobile: two-column footer (list beside contact) to cut height; brand spans full width. */
@media (max-width: 559px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__col:last-child { grid-column: 1 / -1; }
}
