/* ============================================================
   DownSouth - global styles
   1rem is fluid: 0.6667vw on desktop (9.6px @ 1440w).
   ============================================================ */

:root {
  --bg: #f2f2f2;
  --ink: #000;
  --white: #fff;
  --panel: #121212;
  --card: #1d1d1d;
  --muted: #848484;
  --muted-dark: rgba(255, 255, 255, 0.55);
  --line: rgba(0, 0, 0, 0.2);
  --line-dark: rgba(255, 255, 255, 0.2);
  --accent: #ff0000;
  --pill-yellow: #eeefba;
  --pill-green: #beee98;

  --font-sans: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-disp: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  --header-h: 8rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: max(0.6667vw, 6.5px);
  scroll-behavior: smooth;
}
@media (max-width: 900px) {
  html { font-size: min(2.56vw, 9.6px); }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 2.1rem;
  line-height: 1.38;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.is-locked { overflow: hidden; }

::selection { background: var(--accent); color: var(--white); }

a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
ul { list-style: none; }
img, svg { display: block; }

:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.container {
  width: 100%;
  max-width: 133.8rem;
  margin-inline: auto;
}
@media (max-width: 900px) {
  .container { padding-inline: 2.8rem; max-width: none; }
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 2.4rem;
}

/* ---- shared type ---- */

/* visually hidden but available to screen readers & search engines */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.label {
  font-size: 2.1rem;
  font-weight: 500;
  text-transform: uppercase;
}

.display {
  font-family: var(--font-disp);
  font-weight: 500;
  text-transform: uppercase;
  line-height: 0.99;
  letter-spacing: -0.025em;
}

/* ---- underline link animations ---- */

.uline,
.uline-double {
  display: inline-flex;
  position: relative;
  font-weight: 500;
  white-space: nowrap;
}
.uline::after,
.uline-double::before,
.uline-double::after {
  content: "";
  display: block;
  position: absolute;
  bottom: -0.275em;
  left: 0;
  right: 0;
  border-bottom: 1px solid;
  transition: transform 0.75s var(--ease);
}
.uline::after {
  transform: scaleX(0);
  transform-origin: right center;
}
.uline:hover::after,
.uline.is-active::after {
  transform: scaleX(1);
  transform-origin: left center;
}
.uline-double::before {
  transform: scaleX(0);
  transform-origin: left center;
}
.uline-double::after { transform-origin: right center; }
.uline-double:hover::before {
  transform: scaleX(1);
  transition-delay: 0.25s;
}
.uline-double:hover::after { transform: scaleX(0); }

/* ---- pills ---- */

.pill {
  display: inline-flex;
  align-items: center;
  height: 3.6rem;
  padding-inline: 2rem;
  border-radius: 99rem;
  font-size: 1.5rem;
  font-weight: 500;
  text-transform: uppercase;
  background: var(--pill-yellow);
  color: var(--ink);
}
.pill--green { background: var(--pill-green); }

/* ============================================================
   Header - fixed, mix-blend difference (white ink inverts)
   ============================================================ */

.site-head {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: flex-end;
  color: var(--white);
  mix-blend-mode: difference;
}

.site-head nav {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-head a,
.site-head button { transition: color 0.7s var(--ease); }

/* logo: the ↓S mark stays put; the "DownSouth" wordmark fades out on scroll */
.logo {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.36em;
  font-size: 2.9rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.logo sup {
  font-size: 0.42em;
  line-height: 1;
  transform: translateY(0.25em);
}
.logo__word { transition: opacity 0.5s var(--ease); }
body.is-scrolled:not(.is-head-active) .logo__word { opacity: 0; }

/* centered link list */
.site-head__list {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  display: flex;
}
.site-head__list li { transition: opacity 0.5s var(--ease), translate 0.5s var(--ease); }
.site-head__list a,
.site-head__list button { margin-inline: 2rem; font-size: 2.1rem; }
body.is-scrolled:not(.is-head-active) .site-head__list li {
  opacity: 0;
  translate: 0 -1.2rem;
  pointer-events: none;
}
body.is-scrolled:not(.is-head-active) .site-head__list li:nth-child(2) { transition-delay: 0.04s; }
body.is-scrolled:not(.is-head-active) .site-head__list li:nth-child(3) { transition-delay: 0.08s; }

/* right cluster: CTA + Menu */
.site-head__right {
  display: flex;
  align-items: center;
  gap: 4rem;
  font-size: 2.1rem;
}
.site-head__menu-btn {
  display: none;
  opacity: 0;
  translate: 0 -1rem;
  transition: opacity 0.5s var(--ease), translate 0.5s var(--ease);
  pointer-events: none;
}
@media (min-width: 901px) {
  .site-head__menu-btn { display: inline-flex; }
  body.is-scrolled:not(.is-head-active) .site-head__menu-btn {
    opacity: 1;
    translate: 0 0;
    pointer-events: auto;
    transition-delay: 0.15s;
  }
}
.site-head__mm-btn { display: none; font-size: 2.1rem; font-weight: 500; }

@media (max-width: 900px) {
  :root { --header-h: 6rem; }
  .site-head__list, .site-head__cta, .site-head__menu-btn { display: none; }
  .site-head__mm-btn { display: inline-flex; }
}

/* ============================================================
   Services dropdown - black curtain slides from under header
   ============================================================ */

.mdd {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 30;
  background: var(--panel);
  color: var(--white);
  overflow: hidden;
  visibility: hidden;
  transform: translateY(-100%);
  transition: transform 0.75s var(--ease), visibility 0s 0.75s;
}
.mdd__content {
  padding-top: 12rem;
  transform: translateY(100%);
  transition: transform 0.75s var(--ease);
}
.mdd.is-open {
  visibility: visible;
  transform: translateY(0);
  transition: transform 0.75s var(--ease);
}
.mdd.is-open .mdd__content { transform: translateY(0); }

.mdd__inner {
  border-top: 1px solid var(--line-dark);
  padding-top: 6rem;
  padding-bottom: 8rem;
}
.mdd__links { grid-column: span 4; }
.mdd__links li { margin-bottom: 2rem; }
.mdd__links a { font-size: 4rem; }

.mdd__links li,
.mdd__card {
  opacity: 0;
  translate: 0 2.4rem;
  transition: opacity 0.6s var(--ease), translate 0.6s var(--ease);
}
.mdd.is-open .mdd__links li,
.mdd.is-open .mdd__card {
  opacity: 1;
  translate: 0 0;
}
.mdd.is-open .mdd__links li:nth-child(1) { transition-delay: 0.2s; }
.mdd.is-open .mdd__links li:nth-child(2) { transition-delay: 0.26s; }
.mdd.is-open .mdd__links li:nth-child(3) { transition-delay: 0.32s; }
.mdd.is-open .mdd__links li:nth-child(4) { transition-delay: 0.38s; }
.mdd.is-open .mdd__card:nth-child(1) { transition-delay: 0.3s; }
.mdd.is-open .mdd__card:nth-child(2) { transition-delay: 0.38s; }

.mdd__cards {
  grid-column: span 8;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4rem;
}
.mdd__card { position: relative; }
.mdd__card .pill {
  position: absolute;
  top: 3.7rem;
  left: 4.1rem;
  z-index: 2;
}
.mdd__card-media {
  aspect-ratio: 65 / 45;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-dark);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  overflow: hidden;
}
.mdd__card-img { width: 100%; height: 100%; object-fit: cover; }
.mdd__card p { margin-top: 2rem; }

@media (max-width: 900px) { .mdd { display: none; } }

/* ============================================================
   Mobile fullscreen menu
   ============================================================ */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--panel);
  color: var(--white);
  padding: 2.8rem;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s var(--ease), visibility 0s 0.5s;
  overflow-y: auto;
}
.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.5s var(--ease);
}
.mobile-menu__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: calc(var(--header-h) - 2.8rem);
}
.mobile-menu__list { margin-top: 8rem; flex: 1; }
.mobile-menu__list > li {
  opacity: 0;
  translate: 0 3rem;
  transition: opacity 0.6s var(--ease), translate 0.6s var(--ease);
}
.mobile-menu.is-open .mobile-menu__list > li { opacity: 1; translate: 0 0; }
.mobile-menu.is-open .mobile-menu__list > li:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.is-open .mobile-menu__list > li:nth-child(2) { transition-delay: 0.16s; }
.mobile-menu.is-open .mobile-menu__list > li:nth-child(3) { transition-delay: 0.22s; }
.mobile-menu.is-open .mobile-menu__list > li:nth-child(4) { transition-delay: 0.28s; }
.mobile-menu__link {
  font-family: var(--font-disp);
  font-size: 5.2rem;
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1.15;
  display: inline-flex;
  align-items: baseline;
  gap: 1.6rem;
}
.mobile-menu__link small {
  font-family: var(--font-sans);
  font-size: 1.8rem;
  font-weight: 400;
}
.mobile-menu__sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s var(--ease);
}
.mobile-menu__sub.is-open { max-height: 30rem; }
.mobile-menu__sub a {
  display: block;
  font-size: 2.6rem;
  padding: 0.8rem 0 0.8rem 4.4rem;
  color: var(--muted-dark);
}
.mobile-menu__foot {
  padding-top: 4rem;
  border-top: 1px solid var(--line-dark);
  display: flex;
  justify-content: space-between;
  font-size: 1.8rem;
  color: var(--muted-dark);
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  padding-top: 21rem;
  padding-bottom: 10rem;
}

.hero h1 { font-size: 13.8rem; }
.hero h1 .line { display: block; }
.hero h1 .mask:nth-child(1) .line {
  margin-left: 6%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.hero h1 .mask:nth-child(2) .line { margin-left: 34%; }
.hero h1 .mask:nth-child(3) .line { margin-left: 19%; }
.hero h1 .mask:nth-child(4) .line { margin-left: 30%; }

/* keep every ↓ in the logo font (not the display font it sits in); em-sized to work anywhere */
.hero__mark { flex: none; font-family: var(--font-sans); font-weight: 500; font-size: 0.92em; line-height: 1; }
/* page-title marquees show the full ↓S mark (the "S" is appended so body copy marks stay just ↓) */
.marquee-sec--page .hero__mark::after { content: "S"; }
/* nomark titles: zero-size separator, not display:none (which would merge the words and
   collapse the flex gap). Equal gap + padding-right keeps every repeat evenly spaced. */
.marquee-sec--nomark .hero__mark { display: inline-block; font-size: 0; width: 0; overflow: hidden; }
.marquee-sec--nomark .marquee__track > span { gap: 5rem; padding-right: 5rem; }

/* intro + arrow sit in the left gutter next to lines 2-3 */
.hero__aside {
  position: absolute;
  top: calc(21rem + 14.8rem);
  left: 9%;
  width: 30rem;
}
.hero__aside p { font-size: 2.1rem; }
.hero__arrow {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 13rem;
  line-height: 0.8;
  margin-top: 4rem;
}

/* load-in: lines rise out of masked wrappers */
.hero .mask { display: block; overflow: hidden; }
.hero .mask > * {
  translate: 0 110%;
  transition: translate 1.1s var(--ease);
}
body.is-loaded .hero .mask > * { translate: 0 0; }
.hero .mask:nth-child(2) > * { transition-delay: 0.08s; }
.hero .mask:nth-child(3) > * { transition-delay: 0.16s; }
.hero .mask:nth-child(4) > * { transition-delay: 0.24s; }
.hero__aside {
  opacity: 0;
  transition: opacity 0.9s var(--ease) 0.7s;
}
body.is-loaded .hero__aside { opacity: 1; }

@media (max-width: 900px) {
  .hero { padding-top: 12rem; padding-bottom: 6rem; }
  .hero h1 { font-size: 4.5rem; }
  .hero h1 .mask:nth-child(1) .line { margin-left: 0; gap: 0.6rem; }
  .hero h1 .mask:nth-child(2) .line { margin-left: 13%; }
  .hero h1 .mask:nth-child(3) .line { margin-left: 4%; }
  .hero h1 .mask:nth-child(4) .line { margin-left: 10%; }
  .hero__aside { position: static; width: auto; margin-top: 5rem; }
  .hero__arrow { font-size: 8rem; margin-top: 2.6rem; }
}

/* ============================================================
   Trusted by
   ============================================================ */

.trusted {
  padding-top: 10rem;
  padding-bottom: 10rem;
  text-align: center;
}
.trusted h2 { font-size: 8rem; }
.trusted__logos {
  margin-top: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem 5rem;
  flex-wrap: wrap;
}
.logo-01 { height: 6rem; }
.logo-02 { height: 3.6rem; }
.logo-03 { height: 7rem; }
.logo-05 { height: 3.8rem; }
.logo-04 { height: 3.2rem; }
.logo-06 { height: 3.4rem; }
.logo-07 { height: 4.4rem; }
.logo-08 { height: 5.8rem; }  /* Circle K: boxed logo - sized up so its wordmark reads level with the others */
.logo-09 { height: 4rem; }

/* compact logo band on the App Dev page */
.trusted--appdev { padding-top: 8rem; padding-bottom: 2rem; }
.trusted--appdev .trusted__logos { margin-top: 6rem; }

@media (max-width: 900px) {
  .trusted { padding-top: 6rem; padding-bottom: 6rem; }
  .trusted h2 { font-size: 4.6rem; }
  /* tidy logo wall: smaller, more even heights so they wrap 2-3 per row */
  .trusted__logos { margin-top: 3rem; gap: 3.4rem 3.4rem; }
  .trusted__logos img { max-width: 42vw; }
  .logo-01 { height: 3.8rem; }  /* Victoria's Secret */
  .logo-02 { height: 2.2rem; }  /* Nike */
  .logo-03 { height: 3.8rem; }  /* Sherwin-Williams */
  .logo-04 { height: 2rem; }    /* Strava */
  .logo-05 { height: 2.4rem; }  /* Instacart */
  .logo-06 { height: 2.2rem; }  /* T-Mobile */
  .logo-07 { height: 2.8rem; }  /* United Rentals */
  .logo-08 { height: 3.6rem; }  /* Circle K (boxed logo, sized up) */
  .logo-09 { height: 2.4rem; }  /* Shopify */
}

/* ============================================================
   Services marquee
   ============================================================ */

.marquee-sec {
  padding: 10rem 0;
  overflow: hidden;
}
.marquee { display: flex; width: max-content; }
.marquee--reverse { margin-top: -1.2rem; }
.marquee__track {
  display: flex;
  align-items: center;
  animation: marquee-left 40s linear infinite;
}
.marquee--reverse .marquee__track { animation: marquee-right 46s linear infinite; }
.marquee__track > span {
  display: flex;
  align-items: center;
  gap: 5rem;
  padding-right: 5rem;
  font-size: 14rem;
  white-space: nowrap;
}

@keyframes marquee-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes marquee-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

@media (max-width: 900px) {
  .marquee-sec { padding: 6rem 0; }
  .marquee__track > span { font-size: 7rem; gap: 2.6rem; padding-right: 2.6rem; }
  .marquee-sec--nomark .marquee__track > span { gap: 2.5rem; padding-right: 2.5rem; }
}

/* ============================================================
   About Us (home page section, nav anchor target)
   ============================================================ */

.about {
  padding: 10rem 0;
  scroll-margin-top: 12rem;
}
.about .label { display: block; margin-bottom: 4rem; }
.about__lead {
  font-size: 4.2rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  max-width: 108rem;
}

@media (max-width: 900px) {
  .about { padding: 6rem 0; scroll-margin-top: 8rem; }
  .about__lead { font-size: 2.8rem; }
}

/* ============================================================
   How we work - card carousel
   ============================================================ */

.hww {
  position: relative;
  padding-top: 10rem;
  padding-bottom: 16rem;
  overflow: hidden;
}
.hww__head { align-items: end; }
.hww__head h2 {
  grid-column: 1 / span 8;
  font-size: 10.4rem;
}
.hww__note {
  grid-column: 9 / span 3;
  max-width: 26rem;
}
.hww__count {
  grid-column: 12;
  justify-self: end;
  white-space: nowrap;
}

.hww__slides {
  display: flex;
  align-items: stretch; /* all cards the same height */
  gap: 2.4rem;
  margin-top: 9rem;
  overflow-x: auto;
  overflow-y: hidden; /* setting only overflow-x:auto makes overflow-y compute to auto,
                         creating a phantom inner vertical scroll - lock it explicitly */
  padding-inline: max(2.8rem, (100vw - 133.8rem) / 2);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}
.hww__slides::-webkit-scrollbar { display: none; }
.hww__slides.is-dragging { user-select: none; }

.hww__card {
  flex: 0 0 65rem;
  background: var(--white);
  border-radius: 0.9rem;
  padding: 4.8rem;
  min-height: 26rem;
  display: flex;
  flex-direction: column;
}
.hww__card h3 {
  font-size: 3.2rem;
  font-weight: 500;
  line-height: 1.15;
}
.hww__card p {
  margin-top: 3.6rem;
  font-size: 2.1rem;
}

/* big cursor follower over the carousel */
.hww__follow {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  pointer-events: none;
  display: none;
}
@media (hover: hover) and (min-width: 901px) {
  .hww__follow { display: block; }
  /* the big circle IS the cursor here - hide the native one */
  .hww__slides { cursor: none; }
  body.is-hww-drag,
  body.is-hww-drag * { cursor: none !important; }
}
.hww__follow-inner {
  width: 11.4rem;
  height: 11.4rem;
  margin: -5.7rem 0 0 -5.7rem;
  background: var(--ink);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0);
  opacity: 0;
  transition: transform 0.55s var(--ease), opacity 0.45s var(--ease);
}
/* geometric SVG arrow (same visual weight as the old text glyph) - centers exactly */
.hww__follow-arrow {
  display: block;
  width: 4.2rem;
  height: 2.52rem;
  transition: scale 0.25s var(--ease);
}
.hww__follow-arrow.is-left { scale: -1 1; }
.hww__slides.is-cursor ~ .hww__follow .hww__follow-inner {
  transform: scale(1);
  opacity: 1;
}
.hww__slides.is-cursor.is-dragging ~ .hww__follow .hww__follow-inner {
  transform: scale(0.9);
}

@media (max-width: 900px) {
  .hww { padding-top: 6rem; padding-bottom: 10rem; }
  .hww__head h2 { grid-column: 1 / -1; font-size: 5.2rem; }
  .hww__note { grid-column: 1 / span 8; margin-top: 2.4rem; }
  .hww__count { grid-column: 9 / -1; justify-self: end; margin-top: 2.4rem; }
  .hww__slides { margin-top: 5rem; }
  .hww__card { flex-basis: calc(100vw - 5.6rem); padding: 3.4rem 2.8rem; min-height: 0; }
  .hww__card h3 { font-size: 2.6rem; }
  .hww__card p { margin-top: 3.6rem; }
}

/* ============================================================
   Footer
   ============================================================ */

.site-foot {
  background: #000;
  color: var(--white);
  overflow: hidden;
  padding-top: 14rem;
}
.site-foot__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 10rem;
}
.foot-logo-slot {
  align-self: flex-start;
  display: inline-flex;
  font-family: var(--font-sans);
  font-size: 4.6rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--white);
}
.foot-logo-slot sup {
  font-size: 0.32em;
  transform: translateY(0.2em);
}
.site-foot__wordmark {
  font-family: var(--font-disp);
  font-weight: 500;
  font-size: 13.4rem;
  line-height: 0.8;
  letter-spacing: -0.03em;
  display: inline-flex;
}
.site-foot__wordmark sup {
  font-size: 0.18em;
  transform: translateY(0.9em);
}

.site-foot__mid {
  border-top: 1px solid var(--line-dark);
  padding-top: 8rem;
  padding-bottom: 10rem;
}
.foot-col { grid-column: span 2; }
.foot-col h3 {
  font-size: 2.1rem;
  font-weight: 500;
  margin-bottom: 4.6rem;
}
.foot-col li { margin-bottom: 1.4rem; }
.foot-col a { color: rgba(255, 255, 255, 0.82); transition: color 0.4s var(--ease); }
.foot-col a:hover { color: var(--white); }

.foot-news { grid-column: 8 / span 5; }
.foot-news h3 {
  font-size: 2.1rem;
  font-weight: 500;
  max-width: 44rem;
}
.foot-news__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4rem;
  background: var(--white);
  color: #000;
  font-size: 2.1rem;
  font-weight: 500;
  padding: 2.4rem 6rem;
  border-radius: 99rem;
  transition: opacity 0.4s var(--ease);
}
.foot-news__cta:hover { opacity: 0.85; }

.site-foot__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
  font-size: 1.9rem;
}
.site-foot__social { display: flex; gap: 2.6rem; }
.site-foot__social svg { width: 2rem; height: 2rem; fill: var(--white); }
.site-foot__social a { opacity: 0.9; transition: opacity 0.4s var(--ease); }
.site-foot__social a:hover { opacity: 0.6; }

@media (max-width: 900px) {
  .site-foot { padding-top: 8rem; }
  .site-foot__top { flex-direction: column; align-items: flex-start; gap: 6rem; }
  .site-foot__wordmark { font-size: 5.4rem; }
  .foot-col { grid-column: span 6; margin-bottom: 5rem; }
  .foot-news { grid-column: 1 / -1; margin-top: 2rem; }
  .site-foot__bar { flex-direction: column; gap: 2.4rem; padding-bottom: 5rem; }
}

/* ============================================================
   Contact page
   ============================================================ */

.marquee-sec--page {
  padding: calc(var(--header-h) + 4rem) 0 4rem;
}

.contact { padding-bottom: 20rem; }
.contact__intro {
  font-size: 4.6rem;
  line-height: 1.25;
  max-width: 104rem;
  margin-top: 6rem;
}
.contact__bar {
  display: flex;
  justify-content: space-between;
  margin-top: 8rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--line);
}
.contact__form {
  margin-top: 8rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem 2.4rem;
}
.field {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
}
.field--half { grid-column: span 1; }
.field label { font-size: 2.1rem; margin-bottom: 1.6rem; }
.field input,
.field textarea {
  font: inherit;
  font-size: 2.1rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 0.6rem;
  padding: 2.6rem 2.4rem;
  outline: none;
  transition: border-color 0.4s var(--ease);
}
.field input::placeholder,
.field textarea::placeholder { color: #b1b1b1; }
.field input:focus,
.field textarea:focus { border-color: var(--ink); }
.field textarea { min-height: 40rem; resize: vertical; }
.contact__submit {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 2rem;
  background: #000; /* same as the site footer */
  color: var(--white);
  font-size: 2.1rem;
  font-weight: 500;
  padding: 3rem 15rem;
  border-radius: 99rem;
  transition: opacity 0.4s var(--ease);
}
.contact__submit:hover { opacity: 0.85; }
.contact__submit:disabled { opacity: 0.5; cursor: default; }

/* honeypot: kept out of sight and out of the tab order */
.contact__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* send error */
.contact__error { margin-top: 2.8rem; color: var(--accent); font-size: 2.1rem; line-height: 1.38; }
/* per-field validation errors */
.field__error { margin-top: 1rem; color: var(--accent); font-size: 1.7rem; line-height: 1.3; }
.field.is-invalid input,
.field.is-invalid textarea { border-color: var(--accent); }

/* success state: hide the form, show the thank-you message */
.contact.is-submitted .contact__intro,
.contact.is-submitted .contact__bar,
.contact.is-submitted .contact__form { display: none; }
.contact.is-submitted .contact__success { display: block; }
.contact__success {
  padding-top: 6rem;
  max-width: 90rem;
}
.contact__success p {
  font-size: 4.6rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

@media (max-width: 900px) {
  .contact__intro { font-size: 3.2rem; margin-top: 4rem; }
  .contact__success p { font-size: 3.2rem; }
  .contact__success { padding-top: 4rem; }
  .contact__bar { margin-top: 5rem; }
  .contact__form { grid-template-columns: 1fr; margin-top: 5rem; gap: 3.6rem; }
  .field--half { grid-column: 1 / -1; }
  .field textarea { min-height: 28rem; }
  .contact__submit { width: 100%; padding: 2.6rem 0; justify-content: center; text-align: center; }
}

/* ============================================================
   Medical page
   ============================================================ */

.page-intro { padding-top: calc(var(--header-h) + 10rem); }
.page-intro p { max-width: 96rem; }
.page-intro__lead { font-size: 4rem; font-weight: 500; line-height: 1.14; }
.page-intro p:not(.page-intro__lead) {
  margin-top: 4rem;
  font-size: 2.1rem;
  color: var(--muted);
}
.page-intro__sub {
  margin-top: 7rem;
  max-width: 96rem;
  font-size: 3.2rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.page-intro__sub + p { margin-top: 2.4rem; }

/* App Dev intro: copy left, image placeholder right */
.app-intro {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 6rem;
  align-items: center;
}
.app-intro__copy p { max-width: none; }
/* Web Dev intro: two heading+copy blocks stacked in the copy column */
.app-intro--wd .app-intro__copy h2 {
  font-size: 3.4rem;
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.01em;
}
.app-intro--wd .app-intro__copy p { font-size: 2.1rem; color: var(--muted); margin-top: 2.2rem; }
.app-intro--wd .app-intro__copy p + h2 { margin-top: 4.6rem; }
/* Web Dev intro has no image: one full-width column, capped for a readable line length */
.app-intro--wd { grid-template-columns: 1fr; }
.app-intro--wd .app-intro__copy { max-width: 108rem; }
.app-intro__media {
  aspect-ratio: 4 / 3;
  background: var(--card);
  border-radius: 0.9rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-dark);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.app-intro__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* medical intro carousel: 3:2 box matches the mockups exactly (no crop); crossfade in JS */
.app-intro__media--carousel { position: relative; aspect-ratio: 3 / 2; }
.media-carousel__img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}
.media-carousel__img.is-active { opacity: 1; }
.media-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 5.2rem;
  height: 5.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 99rem;
  color: var(--white);
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.4s var(--ease), background 0.3s var(--ease);
}
.media-carousel__arrow svg { width: 2.4rem; height: 2.4rem; }
.media-carousel__arrow--prev { left: 1.6rem; }
.media-carousel__arrow--next { right: 1.6rem; }
.app-intro__media--carousel:hover .media-carousel__arrow,
.media-carousel__arrow:focus-visible { opacity: 1; }
.media-carousel__arrow:hover { background: rgba(0, 0, 0, 0.72); }
/* touch devices have no hover: keep the arrows visible so the carousel stays navigable */
@media (hover: none) {
  .media-carousel__arrow { opacity: 1; background: rgba(0, 0, 0, 0.5); }
}
@media (prefers-reduced-motion: reduce) {
  .media-carousel__img { transition: none; }
}

.trusted--medical { padding-top: 10rem; padding-bottom: 0; }
.marquee-sec--specialties { padding: 4rem 0 9rem; }
.marquee-sec--specialties .marquee__track > span {
  font-size: 4.6rem;
  gap: 2.4rem;
  padding-right: 2.4rem;
}

/* Medical content sections (Mobile & App Dev, Branding, Scheduling, Pricing) */
.content-sec {
  padding: 9rem 0;
  border-top: 1px solid var(--line);
}
.content-sec .container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 2.4rem;
}
.content-sec__title {
  grid-column: 1 / span 4;
  font-size: 3.2rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.content-sec__body { grid-column: 6 / span 7; }
.content-sec__body p {
  font-size: 2.1rem;
  line-height: 1.5;
}
.content-sec__body p + p { margin-top: 2.4rem; }

@media (max-width: 900px) {
  .content-sec { padding: 6rem 0; }
  .content-sec .container { display: block; }
  .content-sec__title { font-size: 2.6rem; margin-bottom: 3rem; }
}


/* rotating "Best X in Y" search line (medical page) */
.search-line {
  padding-top: 14rem;
  text-align: center;
}
.search-line__main {
  font-size: 4rem;
  line-height: 1.3;
}
.search-line strong { font-weight: 500; }
.search-line__sub {
  margin-top: 3rem;
  font-size: 2rem;
  line-height: 1.4;
  color: var(--muted);
  max-width: 76rem;
  margin-inline: auto;
}
/* typewriter caret for the "Best {practice} in {city}" search line */
.type-caret {
  display: inline-block;
  width: 0.09em;
  height: 1.05em;
  margin-left: 0.04em;
  background: currentColor;
  vertical-align: -0.14em;
  animation: caret-blink 1.05s step-end infinite;
}
@keyframes caret-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .type-caret { display: none; }
}

/* branding page: typed statement (reuses .type-caret) */
.brand-statement { padding: 8rem 0 6rem; text-align: center; }
.brand-statement__text {
  font-size: 5.8rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  max-width: 118rem;
  margin-inline: auto;
}
.brand-statement__text u { text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
@media (max-width: 900px) {
  .brand-statement { padding: 5rem 0; }
  .brand-statement__text { font-size: 3.4rem; }
}

/* variant for pages that open with a title marquee instead of the fixed header gap */
.page-intro--sub { padding-top: 6rem; }
.page-intro--careers { padding-bottom: 14rem; } /* breathing room above the footer */

@media (max-width: 900px) {
  .page-intro__lead { font-size: 3rem; }
  .page-intro p:not(.page-intro__lead) { font-size: 2.1rem; }
  .page-intro__sub { font-size: 2.6rem; margin-top: 5rem; }
  .app-intro { grid-template-columns: 1fr; gap: 3.2rem; }
  .app-intro__media { order: 2; }
  .marquee-sec--specialties { padding-bottom: 10rem; }
  .marquee-sec--specialties .marquee__track > span { font-size: 3rem; gap: 1.6rem; padding-right: 1.6rem; }
  .search-line { padding-top: 8rem; }
  .search-line__main { font-size: 2.8rem; }
  .search-line__sub { font-size: 1.8rem; }
  .trusted--medical { padding-top: 6rem; }
}

/* ============================================================
   Web Dev page - alternating heading+copy intro blocks
   ============================================================ */

.intro-blocks { padding-top: 6rem; }
.intro-block { padding: 5rem 0; }
/* hero copy spans the full container width (not a half-width column) */
.intro-block__copy { grid-column: 1 / -1; }
.intro-block__copy h2 {
  font-size: 4rem;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 4rem;
}
/* hero-copy paragraphs (branding + web-dev): larger and full column width */
.intro-block__copy p { color: var(--muted); font-size: 2.8rem; }

@media (max-width: 900px) {
  .intro-blocks { padding-top: 2rem; }
  .intro-block { padding: 3rem 0; }
  .intro-block__copy,
  .intro-block:nth-of-type(even) .intro-block__copy { grid-column: 1 / -1; }
  .intro-block__copy h2 { font-size: 3rem; margin-bottom: 2.4rem; }
  .intro-block__copy p { font-size: 2.4rem; }
}

/* ============================================================
   App Dev page - stats, offer/process rows, CTA
   ============================================================ */

.stats { padding: 10rem 0 4rem; }
.stats .grid-12 > div {
  grid-column: span 4;
  border-top: 1px solid var(--line);
  padding-top: 3rem;
}
.stats strong {
  display: block;
  font-family: var(--font-disp);
  font-weight: 500;
  font-size: 12rem;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stats span {
  display: block;
  margin-top: 1.6rem;
  color: var(--muted);
}
.stats small {
  display: block;
  margin-top: 1.2rem;
  font-size: 1.5rem;
  color: var(--muted);
  opacity: 0.75;
}
/* medical stats carry full-sentence labels, so ease the giant number down a touch */
.stats--medical strong { font-size: 9rem; }

.rows-sec { padding: 10rem 0 4rem; }
.rows-sec .label { display: block; margin-bottom: 5rem; }
.row-item {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 2.4rem;
  padding: 4.6rem 0;
  border-top: 1px solid var(--line);
}
.row-item:last-child { border-bottom: 1px solid var(--line); }
.row-item h3 {
  grid-column: 1 / span 5;
  font-size: 3.2rem;
  font-weight: 500;
  line-height: 1.2;
  display: flex;
  align-items: baseline;
  gap: 2rem;
}
.row-item h3 small {
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--muted);
}
.row-item p {
  grid-column: 7 / span 6;
  color: var(--muted);
}

.cta-sec {
  padding: 18rem 0 22rem;
  text-align: center;
}
.cta-sec h2 { font-size: 10.4rem; }
.cta-sec__note {
  margin-top: 3rem;
  color: var(--muted);
}
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 5rem;
  background: #000;
  color: var(--white);
  font-size: 2.1rem;
  font-weight: 500;
  padding: 3rem 10rem;
  border-radius: 99rem;
  transition: opacity 0.4s var(--ease);
}
.btn-dark:hover { opacity: 0.85; }

@media (max-width: 900px) {
  .stats { padding-top: 6rem; }
  .stats .grid-12 { column-gap: 1.2rem; }
  .stats strong { font-size: 5rem; letter-spacing: -0.03em; }
  .stats span { font-size: 1.9rem; }
  .rows-sec { padding-top: 6rem; }
  .row-item { padding: 3rem 0; }
  .row-item h3 { grid-column: 1 / -1; }
  .row-item p { grid-column: 1 / -1; margin-top: 1.8rem; }
  .cta-sec { padding: 10rem 0 12rem; }
  .cta-sec h2 { font-size: 5.2rem; }
}

/* ============================================================
   Scroll reveals
   ============================================================ */

.reveal {
  opacity: 0;
  translate: 0 2rem;
  transition: opacity 0.9s var(--ease), translate 0.9s var(--ease);
}
.reveal.in-view { opacity: 1; translate: 0 0; }

@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;
    transition-delay: 0s !important;
  }
  .hero .mask > *, .hero__aside, .reveal { opacity: 1; translate: 0 0; }
}
