/* Small overrides beyond Tailwind utility classes go here.
   Design tokens live in theme.css; a handful of small brand components
   (logo clear-space, gold rule) are cherry-picked from Web Assets/css/prine.css
   here rather than importing that file wholesale, since its base element
   resets (body/h1/p...) would double up with Tailwind's own Preflight reset. */

html {
  scroll-behavior: smooth;
}

/* Set by initTeamModal() in main.js while the team profile popup is open. */
body.team-modal-open {
  overflow: hidden;
}

/* Set by initPortfolioDemoModal() in main.js while a project's interactive
   demo iframe is open. */
body.portfolio-demo-open {
  overflow: hidden;
}

/* -------------------------------------------------------------- logo -- */
/* Clear space: X on every side, per BRAND.md — 0.167 x width, which works
   out to ~0.5 x the rendered height for the lock-up's 2.987:1 ratio. */
.prine-logo {
  display: block;
  height: 32px;
  width: auto;
  padding: 16px;
  margin: -16px;
  box-sizing: content-box;
}
.prine-logo--footer {
  height: 28px;
  padding: 14px;
  margin: -14px;
}

/* Theme-aware logo swap, driven purely by [data-theme] so it always matches
   whatever set the attribute — the admin's default mode, or a visitor's own
   dark/light toggle (see main.js) — with no extra JS and no flash. */
.logo-img--light { display: none; }
[data-theme='light'] .logo-img--dark { display: none; }
[data-theme='light'] .logo-img--light { display: block; }

/* ------------------------------------------------- the gold underline -- */
.rule {
  width: 96px;
  height: 4px;
  background: var(--accent);
  border: 0;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}
.rule--wide { width: 160px; }
.rule--center { margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------------- hero -- */
/* Hero's own entrance — deliberately NOT wired through AOS. AOS hides
   [data-aos] elements via CSS until its JS runs, and if that script is ever
   slow, blocked, or missing, the element stays invisible forever. That's an
   acceptable risk for a scroll-triggered section further down the page, but
   not for the single most important above-the-fold content on the site —
   so hero reveals itself with a plain CSS animation that needs nothing but
   the stylesheet to have loaded. */
.hero-enter {
  animation: hero-fade-in .7s var(--ease, cubic-bezier(0.2, 0, 0, 1)) both;
}
@keyframes hero-fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-enter { animation: none; }
}

.hero {
  isolation: isolate;
  /* Bleeds the glow background up behind the sticky navbar (80px = its
     pt-4 + h-16) instead of stopping at the hero section's own top edge —
     margin/padding cancel out so content position and page height are
     unaffected, only the background/glow extend further up. */
  margin-top: -80px;
  padding-top: 80px;
}

/* -------------------------------------------------------- headline cycle -- */
.hero-headline {
  display: flex;
  justify-content: center;
  height: clamp(4.75rem, 13vw, 8rem);
  overflow: hidden;
}
.hero-word-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  line-height: 1;
  letter-spacing: var(--tracking-display);
  /* Not --accent-text (always black, meant for text sitting on a solid gold
     fill) — the brush-stroke below only swipes the lower ~2/3 of the word,
     so ascender tops sit directly on the section's own bg. Theme-reactive
     text keeps those readable in both modes, matching .word-highlight
     (the same brush-stroke used inline elsewhere) which never overrides
     color at all. */
  color: var(--text);
  padding: 0.3em 0.6em;
  z-index: 0;
}
/* A real highlighter/marker swipe (textured SVG, torn wavy edges) sitting
   low across the word rather than a chip enclosing it — ascenders (T, h, k)
   poke out above it, same as a hand-drawn highlight. Positioned in %, so it
   scales with the word itself and never needs adjusting per-word. Gold is
   the same hex in both themes, so the asset doesn't need theme variants. */
.hero-word-chip::before {
  content: '';
  position: absolute;
  left: -6%;
  right: -6%;
  top: 32%;
  bottom: -16%;
  background: url('/assets/images/brush-stroke.svg') no-repeat center / 100% 100%;
  transform: rotate(-2deg);
  z-index: -1;
  pointer-events: none;
}
.hero-word-chip.word-in { animation: hero-slide-up .6s var(--ease) both; }
@keyframes hero-slide-up {
  0% { transform: translateY(65%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Fixed (not min-) height, reserved for the longest of the three cycling
   definitions at 3 lines — the three admin-edited strings (home_hero_define_
   think/plan/do) aren't the same length, so with only a min-height the row
   grew and shrank as shorter/longer ones swapped in, dragging the headline
   chip beside it up and down every 3s via the shared flex row's
   items-center. Centering the text inside this fixed box keeps a genuinely
   1- or 2-line definition looking intentional rather than stranded at the top. */
.hero-define {
  height: 5.25rem;
  display: flex;
  align-items: center;
  overflow: hidden;
  transition: opacity .25s ease;
}
@media (min-width: 768px) {
  .hero-define { height: 6rem; }
}
.hero-define.is-switching { opacity: 0; }

/* Definition column next to the word chip — full width and centered on a
   stacked mobile layout, capped to a comfortable reading width and left
   aligned once the row layout kicks in at md. */
.hero-define-col {
  max-width: min(28rem, 88vw);
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 768px) {
  .hero-define-col {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-word-chip.word-in { animation: none; }
  .hero-define { transition: none; }
}

/* Hero's "Explore Our {product}" button — see initProductsCycle() in
   main.js. A small, button-scaled version of the same swap-and-fade
   .word-in does for the giant headline word above; not reusing
   .hero-word-chip itself since that carries a 44–72px display font size
   meant for that headline, not inline button text. */
.hero-product-name { display: inline-block; }
.hero-product-name.word-in { animation: hero-product-fade .4s var(--ease) both; }
@keyframes hero-product-fade {
  0% { opacity: 0; transform: translateY(3px); }
  100% { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-product-name.word-in { animation: none; }
}

/* ------------------------------------------------------ word highlight -- */
/* Site-wide rule: "Think" / "Plan" / "Do" get the same brush-stroke
   highlighter mark wherever they appear as their own word or heading, not
   just in the hero's large word chip — see highlightThinkPlanDo() in
   site/content/loader.php, the single place that applies this markup. Sized
   in em so it scales with whatever heading/body size it's dropped into. */
.word-highlight {
  position: relative;
  display: inline-block;
  padding: 0 .18em;
  z-index: 0;
}
.word-highlight::before {
  content: '';
  position: absolute;
  left: -4%;
  right: -4%;
  top: 28%;
  bottom: -14%;
  background: url('/assets/images/brush-stroke.svg') no-repeat center / 100% 100%;
  transform: rotate(-2deg);
  z-index: -1;
  pointer-events: none;
}

/* Soft gradient blooms behind the headline — the one visual signature
   carried over from the reference layout, reinterpreted in Prine's own
   black+gold palette rather than its green. */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: -1;
}
.hero-glow--a {
  width: 620px; height: 620px;
  top: -220px; left: -160px;
  background: radial-gradient(circle, var(--prine-gold) 0%, transparent 70%);
  opacity: .22;
}
.hero-glow--b {
  width: 560px; height: 560px;
  top: -120px; right: -180px;
  background: radial-gradient(circle, var(--prine-gold) 0%, transparent 70%);
  opacity: .14;
}
.hero-glow--c {
  width: 640px; height: 640px;
  bottom: -320px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--prine-amber) 0%, transparent 70%);
  opacity: .16;
}
[data-theme="light"] .hero-glow--a { opacity: .3; }
[data-theme="light"] .hero-glow--b { opacity: .2; }
[data-theme="light"] .hero-glow--c { opacity: .22; }

/* --------------------------------------------------------------- cta dot -- */
.cta-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
}

/* --------------------------------------------------------- feature spotlight -- */
.stage-card { position: relative; max-width: 440px; }
.stage-card-glow {
  position: absolute; inset: -12%;
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
  background: radial-gradient(circle, rgba(249, 199, 1, .18) 0%, transparent 70%);
}
.stage-card-frame {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .03);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 1.5rem;
  min-height: 260px;
}
[data-theme="light"] .stage-card-frame {
  border-color: rgba(0, 0, 0, .1);
  background: rgba(0, 0, 0, .03);
}
.stage-card-chrome { display: flex; gap: 6px; margin-bottom: 1.25rem; }
.stage-card-chrome span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
}
[data-theme="light"] .stage-card-chrome span { background: rgba(0, 0, 0, .18); }
.stage-panel-text {
  font-family: var(--font-body);
  color: rgba(255, 255, 255, .82);
  line-height: var(--leading-relaxed);
}
[data-theme="light"] .stage-panel-text { color: rgba(0, 0, 0, .75); }
.stage-panel-list {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .625rem;
}
.stage-panel-list li {
  display: flex;
  align-items: center;
  gap: .625rem;
  font-family: var(--font-body);
  font-size: var(--text-small);
  color: rgba(255, 255, 255, .6);
  padding: .625rem .75rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .04);
}
[data-theme="light"] .stage-panel-list li {
  color: rgba(0, 0, 0, .6);
  background: rgba(0, 0, 0, .04);
}
.stage-panel-list li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--prine-gold);
  flex: 0 0 auto;
}

.stage-tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.stage-tab {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  color: rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-pill);
  padding: .625rem 1.25rem;
  cursor: pointer;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
[data-theme="light"] .stage-tab {
  color: rgba(0, 0, 0, .55);
  background: rgba(0, 0, 0, .04);
  border-color: rgba(0, 0, 0, .1);
}
.stage-tab:hover { color: rgba(255, 255, 255, .85); }
[data-theme="light"] .stage-tab:hover { color: rgba(0, 0, 0, .85); }
/* Always gold fill + black text, per brand: a solid gold pill with dark
   text reads fine in both themes — this is not "gold text on light". */
.stage-tab.is-active {
  background: var(--prine-gold);
  border-color: var(--prine-gold);
  color: var(--prine-black);
}

/* ----------------------------------------------------------- channels row -- */
.channel-badge {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .75rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-raised);
}
.channel-badge-icon { display: flex; width: 18px; height: 18px; color: var(--accent); }
.channel-badge-icon svg { width: 100%; height: 100%; }
.channel-badge-label {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--text);
}

/* ------------------------------------------------------- partners strip -- */
.partners-viewport { overflow: hidden; }
.partners-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: partners-scroll 32s linear infinite;
}
.partners-track:hover { animation-play-state: paused; }
.partners-logo {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  height: 44px;
  padding: 0 1.75rem;
}
/* Height-first, not a fixed contain-box: every logo renders at the exact
   same height regardless of its own file's aspect ratio, so a wide
   logotype and a squarish mark read as the same visual size — a fixed
   width+contain box instead lets width become the binding constraint for
   wide logos, rendering them noticeably smaller than tall/square ones.
   max-width is just a safety cap for an extreme outlier. */
.partners-logo img {
  height: 100%; width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .5;
  transition: filter var(--duration-slow) var(--ease), opacity var(--duration-slow) var(--ease);
}
.partners-logo:hover img,
.partners-logo:focus-visible img {
  filter: grayscale(0);
  opacity: 1;
}
@keyframes partners-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .partners-track { animation: none; overflow-x: auto; }
}

/* ------------------------------------------------------ section canvas -- */
/* One continuous gradient behind a group of sections instead of each one
   carrying its own flat bg-bg/bg-bg-raised block + border-t divider —
   sections inside just go transparent so this shows through. Introduced
   for the About page, reused as the shared minimalist wrapper on Services,
   Portfolio and Contact. */
.section-canvas {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-raised) 50%, var(--bg) 100%);
}
.section-canvas::before,
.section-canvas::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: -1;
}
.section-canvas::before {
  width: 720px; height: 720px;
  top: 8%; right: -260px;
  background: radial-gradient(circle, var(--prine-gold) 0%, transparent 70%);
  opacity: .08;
}
.section-canvas::after {
  width: 640px; height: 640px;
  bottom: 10%; left: -220px;
  background: radial-gradient(circle, var(--prine-amber) 0%, transparent 70%);
  opacity: .08;
}
[data-theme="light"] .section-canvas::before,
[data-theme="light"] .section-canvas::after { opacity: .12; }
.section-canvas section {
  background: transparent;
  border-top: 0;
}

/* ------------------------------------------------------ portfolio showcase -- */
/* Filterable image grid (Portfolio page) — see portfolio-showcase.php and
   initPortfolioFilter() in main.js. Each tile is a single <a> so the whole
   card is clickable through to that project's /portfolio/{slug}/ page;
   overlay/arrow/label all fade in together via the shared .group hover
   (same group/group-hover pattern already used by faq.php). */
.portfolio-tile {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-raised);
}
.portfolio-tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter var(--duration-slow) var(--ease), transform var(--duration-slow) var(--ease);
}
.portfolio-tile-img--placeholder { filter: none; }
.portfolio-tile:hover .portfolio-tile-img,
.portfolio-tile:focus-visible .portfolio-tile-img {
  filter: grayscale(0);
  transform: scale(1.04);
}
.portfolio-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .55) 100%);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}
.portfolio-tile:hover .portfolio-tile-overlay,
.portfolio-tile:focus-visible .portfolio-tile-overlay {
  opacity: 1;
}
.portfolio-tile-arrow {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  opacity: 0;
  transform: scale(.6);
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.portfolio-tile:hover .portfolio-tile-arrow,
.portfolio-tile:focus-visible .portfolio-tile-arrow {
  opacity: 1;
  transform: scale(1);
}
.portfolio-tile-label {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .75rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: translateY(.5rem);
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.portfolio-tile:hover .portfolio-tile-label,
.portfolio-tile:focus-visible .portfolio-tile-label {
  opacity: 1;
  transform: translateY(0);
}
.portfolio-tile-label-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  font-size: var(--text-body);
}
.portfolio-tile-label-category {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--prine-gold);
}
.portfolio-tile[hidden] { display: none; }

/* -------------------------------------------------- project detail page -- */
/* "Client / Industry / Date / Status" metadata strip — see portfolio-item.php.
   Same bold-value/muted-label pill language as .stepper-badge, but not that
   class itself: .stepper-badge is position:absolute against a stepper-frame
   parent, which this page doesn't have. */
.project-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.project-meta-chip {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .6rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-raised);
}
.project-meta-chip b {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 700;
  color: var(--text);
}
.project-meta-chip span {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}

/* ------------------------------------------------------- portfolio cards -- */
/* Grid-style preview cards (home "Selected work" + About "Work We're Proud
   Of") — same mono/colour image treatment as .portfolio-shot above.
   .portfolio-card--lift adds the homepage's shadow-lift: a box-shadow, which
   CSS always paints behind the card's own content, so hovering never
   overlays or dims the title/category text underneath the image. */
.portfolio-card img {
  filter: grayscale(1);
  transition: filter var(--duration-slow) var(--ease);
}
.portfolio-card:hover img,
.portfolio-card:focus-within img {
  filter: grayscale(0);
}
.portfolio-card--lift {
  transition: transform var(--duration-slow) var(--ease), box-shadow var(--duration-slow) var(--ease), border-color var(--duration-slow) var(--ease);
}
.portfolio-card--lift:hover,
.portfolio-card--lift:focus-within {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}

/* -------------------------------------------------------- service folders -- */
/* A file-folder silhouette: a small tab sits above a light card, backed by
   an angled gold panel with a cut-corner clip-path. No shadow/border — the
   frame behind it is what defines the edge. */
.service-folder {
  isolation: isolate;
  transition: transform var(--duration-slow) var(--ease);
}
.service-folder:hover {
  transform: translateY(-6px);
}
.service-folder-frame {
  position: absolute;
  inset: -8% 10% 10% -8%;
  z-index: -1;
  background: var(--accent);
  border-radius: var(--radius-lg);
  clip-path: polygon(0 0, 84% 0, 100% 18%, 100% 100%, 0 100%);
}
.service-folder-frame--amber { background: var(--prine-amber); }
/* A real manila-folder tab: flush with the body's sharp top-left corner,
   with the diagonal cut on its right edge that reads as an actual folder
   (not just a rounded flap) — the desktop-file-icon silhouette. */
.service-folder-tab {
  position: absolute;
  top: -18px;
  left: 0;
  width: 45%;
  height: 26px;
  clip-path: polygon(0 0, 75% 0, 100% 100%, 0 100%);
}
@media (prefers-reduced-motion: reduce) {
  .service-folder:hover { transform: none; }
}

/* ------------------------------------------------- services stepper -- */
/* Shared by home-services.php (compact) and services-showcase.php (full) —
   see site/partials/services-stepper.php. A scrollable dark card; a
   vertical line + circular node per service, "checked off" as it scrolls
   past (see initServicesStepper() in main.js). Deliberately kept in the
   site's own tokens (bg-raised/border/text) rather than a copied navy
   palette, so it reads as this brand's own component. */
.stepper-frame {
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.75rem 2.75rem;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .55);
}
.stepper-scroll {
  position: relative;
  z-index: 10; /* above a dimmed .cursor-glow (z-index:5) — on .stepper-scroll
                  itself, not just .stepper-frame, so the unframed variant
                  (no card background to rely on) still reads clearly */
  max-height: 520px;
  overflow-y: auto;
  padding-left: 2.75rem;
  scrollbar-width: thin;
}
.stepper-frame--compact .stepper-scroll { max-height: 380px; }
/* Services page: still an internal scroll region (~6 steps tall before it
   scrolls) so long service lists don't take over the whole page, but with
   no card/border — the top and bottom edges fade the content out via a
   mask instead, so it reads as dissolving into the page background rather
   than being cut off by a frame. */
.stepper-scroll--unframed {
  max-height: 920px;
  overflow-y: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 40px, black calc(100% - 56px), transparent);
          mask-image: linear-gradient(to bottom, transparent, black 40px, black calc(100% - 56px), transparent);
}
.stepper-line {
  position: absolute;
  left: 15px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}
.stepper-step {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 0 0 2rem;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}
.stepper-step:last-child { padding-bottom: 0.25rem; }
.stepper-node {
  position: absolute;
  left: -2.75rem;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  background: var(--bg-raised);
  transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
/* Exactly one of these active at a time (see initServicesStepper() in
   main.js) — the filled treatment is the single "you are here" spotlight,
   not a mark of things already passed. */
.stepper-node.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.stepper-title {
  display: block;
  font-family: var(--font-display, inherit);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  transition: color var(--duration) var(--ease);
}
.stepper-step:hover .stepper-title,
.stepper-step:focus-visible .stepper-title { color: var(--accent); }
.stepper-desc {
  display: block;
  margin-top: .35rem;
  font-size: .875rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 68ch;
}
.stepper-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.stepper-chip {
  display: inline-flex;
  align-items: center;
  padding: .3rem .7rem;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
}
[data-theme="light"] .stepper-chip { background: rgba(0, 0, 0, .03); }
.stepper-badge {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 1.1rem;
  border-radius: 99px;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5);
  font-size: .8rem;
  white-space: nowrap;
}
.stepper-badge b { color: var(--text); font-weight: 700; }
.stepper-badge span { color: var(--text-muted); }
@media (max-width: 640px) {
  .stepper-frame { padding: 1.25rem 1.25rem 2.25rem; }
  .stepper-scroll { padding-left: 2.25rem; }
  .stepper-scroll--unframed { max-height: 640px; }
  .stepper-node { left: -2.25rem; width: 28px; height: 28px; }
  .stepper-badge { font-size: .72rem; padding: .45rem .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  .stepper-scroll { scroll-behavior: auto; }
}

/* ------------------------------------------------------ service modal -- */
/* Full description on click — same open/close pattern as
   .portfolio-demo-modal (see initServiceModal() in main.js), its own class
   so the two never fight over shared state (is-open on two different
   elements at once, in the rare case a demo modal and a service modal both
   exist on one page). */
.service-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--duration) var(--ease), visibility 0s linear var(--duration);
}
.service-modal.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity var(--duration) var(--ease);
}
.service-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
[data-theme="light"] .service-modal-backdrop { background: rgba(23, 23, 28, .5); }
.service-modal-panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--accent);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transform: translateY(12px) scale(.98);
  transition: transform var(--duration-slow) var(--ease);
}
.service-modal.is-open .service-modal-panel { transform: translateY(0) scale(1); }
.service-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.service-modal-head-text { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.service-modal-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 700;
  font-size: .8rem;
}
.service-modal-head h3 { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.service-modal-close {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .04);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.service-modal-close:hover, .service-modal-close:focus-visible { color: var(--text); background: rgba(255, 255, 255, .1); }
.service-modal-body {
  overflow-y: auto;
  padding: 1.35rem;
  font-size: .925rem;
  line-height: 1.7;
  color: var(--text-muted);
}
.service-modal-body p { margin: 0 0 .9em; }
.service-modal-body a { color: var(--link); text-decoration: underline; }
/* The per-service CTA button (.service-modal-cta) is a solid pill, not an
   inline text link — needs to win over the generic ".service-modal-body a"
   rule just above, hence the repeated class for specificity. */
.service-modal-body a.service-modal-cta { color: var(--accent-fg); text-decoration: none; }
.service-modal-features { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); display: grid; gap: .5rem; }
.service-modal-features li { display: flex; align-items: center; gap: .55rem; font-size: .875rem; color: var(--text); }
.service-modal-features li::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
@media (prefers-reduced-motion: reduce) {
  .service-modal, .service-modal-panel { transition: none; }
}

/* Client logos as a bordered tile grid — see about-logos.php. */
.logo-tile-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 2 / 1;
  padding: 1.5rem 2rem;
}
.logo-tile-cell img {
  max-height: 32px;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .55;
  transition: filter var(--duration-slow) var(--ease), opacity var(--duration-slow) var(--ease);
}
.logo-tile-cell:hover img,
.logo-tile-cell:focus-visible img {
  filter: grayscale(0);
  opacity: 1;
}

/* ------------------------------------------------------- team showcase -- */
/* Hover/focus on either a photo card or a name row highlights both (they
   share a data-team-id) and dims the rest — driven by initTeamShowcase()
   in main.js toggling is-active/is-dimmed. */
.team-photo {
  overflow: hidden;
  border-radius: var(--radius-lg);
  cursor: pointer;
  opacity: 1;
  transition: opacity var(--duration-slow) var(--ease);
}
.team-photo.is-dimmed { opacity: .6; }
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(.8);
  transition: filter var(--duration-slow) var(--ease);
}
.team-photo.is-active img { filter: grayscale(0) brightness(1); }

.team-row {
  cursor: pointer;
  opacity: 1;
  outline: none;
  transition: opacity var(--duration) var(--ease);
}
.team-row.is-dimmed { opacity: .5; }

.team-row-dot {
  display: inline-block;
  width: 1rem;
  height: .7rem;
  border-radius: 5px;
  background: var(--text-muted);
  opacity: .3;
  flex-shrink: 0;
  transition: all var(--duration) var(--ease);
}
.team-row.is-active .team-row-dot {
  background: var(--accent);
  opacity: 1;
  width: 1.25rem;
}

.team-row-name {
  color: var(--text);
  opacity: .8;
  transition: opacity var(--duration) var(--ease);
}
.team-row.is-active .team-row-name { opacity: 1; }

.team-row-social {
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
  transition: opacity var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);
}
.team-row.is-active .team-row-social {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .team-photo, .team-photo img, .team-row, .team-row-dot, .team-row-name, .team-row-social {
    transition: none;
  }
}

/* ---------------------------------------------------- team profile modal -- */
/* Clicking (or Enter/Space on) a photo or name row opens this with that
   member's bio — see initTeamModal() in main.js. Stays in the DOM at all
   times so opacity/transform can transition; visibility flips at the end
   of the opacity transition so it's unreachable by tab/click while closed. */
.team-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--duration) var(--ease), visibility 0s linear var(--duration);
}
.team-modal.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity var(--duration) var(--ease);
}
.team-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
[data-theme="light"] .team-modal-backdrop { background: rgba(23, 23, 28, .5); }
.team-modal-panel {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  background: var(--bg-raised);
  border: 1px solid var(--accent);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  text-align: center;
  transform: translateY(12px) scale(.98);
  transition: transform var(--duration-slow) var(--ease);
  /* Double picture-frame line (5px bg-raised "mat" gap, then a second gold
     line at 6px) plus a soft lift shadow — echoes the gold ring already on
     .team-modal-photo so the whole card, not just the photo, reads as framed. */
  box-shadow: 0 0 0 5px var(--bg-raised), 0 0 0 6px var(--accent), 0 24px 60px -20px rgba(0, 0, 0, .55);
}
.team-modal.is-open .team-modal-panel {
  transform: translateY(0) scale(1);
}
.team-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .04);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.team-modal-close:hover,
.team-modal-close:focus-visible { color: var(--text); background: rgba(255, 255, 255, .1); }
.team-modal-photo {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
}
.team-modal-photo img { width: 100%; height: 100%; object-fit: cover; }

/* -------------------------------------------------- portfolio demo modal -- */
/* Holds a project's uploaded HTML interactive demo in a sandboxed iframe —
   see initPortfolioDemoModal() in main.js. Same show/hide mechanics as
   .team-modal above, just a wide panel instead of a small profile card. */
.portfolio-demo-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--duration) var(--ease), visibility 0s linear var(--duration);
}
.portfolio-demo-modal.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity var(--duration) var(--ease);
}
.portfolio-demo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
[data-theme="light"] .portfolio-demo-modal-backdrop { background: rgba(23, 23, 28, .5); }
.portfolio-demo-modal-panel {
  position: relative;
  width: 100%;
  max-width: 960px;
  height: min(720px, calc(100vh - 3rem));
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--accent);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transform: translateY(12px) scale(.98);
  transition: transform var(--duration-slow) var(--ease);
  box-shadow: 0 0 0 5px var(--bg-raised), 0 0 0 6px var(--accent), 0 24px 60px -20px rgba(0, 0, 0, .55);
}
.portfolio-demo-modal.is-open .portfolio-demo-modal-panel {
  transform: translateY(0) scale(1);
}
.portfolio-demo-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.portfolio-demo-modal-head h3 {
  font-weight: 700;
  color: var(--text);
}
.portfolio-demo-modal-close {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .04);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.portfolio-demo-modal-close:hover,
.portfolio-demo-modal-close:focus-visible { color: var(--text); background: rgba(255, 255, 255, .1); }
.portfolio-demo-modal-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #fff;
}
@media (prefers-reduced-motion: reduce) {
  .team-modal, .team-modal-panel, .portfolio-demo-modal, .portfolio-demo-modal-panel { transition: none; }
}

/* ------------------------------------------------------- back to top -- */
/* Shown/hidden by initBackToTop() in main.js once the visitor has scrolled
   past the fold. Sits bottom-right so it never collides with the cookie
   consent card anchored bottom-left. */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease), visibility 0s linear var(--duration), background var(--duration) var(--ease), bottom var(--duration-slow) var(--ease);
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease), background var(--duration) var(--ease), bottom var(--duration-slow) var(--ease);
}
.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--prine-amber);
  transform: translateY(-3px);
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: opacity var(--duration) linear, visibility 0s linear var(--duration); }
  .back-to-top:hover, .back-to-top:focus-visible { transform: none; }
}
/* Below 640px the cookie consent card spans the full width (see below),
   so lift the button clear of it — see has-cookie-banner toggle in
   initCookieConsent() in main.js. */
@media (max-width: 639px) {
  body.has-cookie-banner .back-to-top { bottom: 11rem; }
}

/* ------------------------------------------------------ cookie consent -- */
/* Bottom-left card, shown by initCookieConsent() in main.js on first visit
   (i.e. until localStorage's prine-cookie-prefs has consented: true — see
   cookie-preferences.php for the paired Cookie Settings page controls). */
.cookie-consent {
  position: fixed;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 70;
  max-width: 400px;
  margin: 0 auto;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--duration-slow) var(--ease), transform var(--duration-slow) var(--ease);
}
@media (min-width: 640px) {
  .cookie-consent { right: auto; margin: 0; }
}
.cookie-consent.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.cookie-consent-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .625rem;
}
.cookie-consent-btn {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  padding: .625rem 1.25rem;
  border-radius: var(--radius-pill);
  transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.cookie-consent-btn--accent {
  background: var(--accent);
  color: var(--accent-text);
}
.cookie-consent-btn--accent:hover,
.cookie-consent-btn--accent:focus-visible { background: var(--prine-amber); }
.cookie-consent-btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.cookie-consent-btn--ghost:hover,
.cookie-consent-btn--ghost:focus-visible { color: var(--text); border-color: var(--text-muted); }
@media (prefers-reduced-motion: reduce) {
  .cookie-consent { transition: opacity var(--duration) linear; }
}

/* ------------------------------------------------------- cursor glow -- */
/* A soft gold radial gradient that trails the pointer across every page —
   position set on --mx/--my by initCursorGlow() in main.js. mix-blend-mode:
   screen makes it bloom over dark surfaces and self-fade over light/white
   ones (screen of anything with white ≈ white), so one rule works whether
   it's drifting over the black hero or a light .section-canvas without any
   per-section awareness. Faded out entirely for reduced-motion and for
   touch-only devices, which have no pointer to follow. */
:root {
  --mx: 50%;
  --my: 40%;
}
.cursor-glow {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease);
  background: radial-gradient(600px circle at var(--mx) var(--my), rgba(249, 199, 1, .18), transparent 60%);
  mix-blend-mode: screen;
}
.cursor-glow.is-active { opacity: 1; }
/* Hovering a data-glow-dim surface (see initCursorGlow() in main.js) —
   shrinks the circle and drops it below that surface's own z-index
   (.stepper-frame sits at z-index:10; this goes to 5), so its own
   background/content visually sit in front of the glow instead of the glow
   blending on top of them. */
.cursor-glow.is-dim {
  z-index: 5;
  background: radial-gradient(240px circle at var(--mx) var(--my), rgba(249, 199, 1, .18), transparent 60%);
}
[data-theme="light"] .cursor-glow {
  background: radial-gradient(520px circle at var(--mx) var(--my), rgba(201, 154, 0, .12), transparent 60%);
  mix-blend-mode: normal;
}
[data-theme="light"] .cursor-glow.is-dim {
  background: radial-gradient(220px circle at var(--mx) var(--my), rgba(201, 154, 0, .12), transparent 60%);
}
@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
  .cursor-glow { display: none; }
}

/* --------------------------------------------------- typewriter heading -- */
/* See initTypewriterHeading() in main.js. */
.typewriter-cursor {
  display: inline-block;
  color: var(--accent);
  animation: typewriter-blink .9s step-end infinite;
}
@keyframes typewriter-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .typewriter-cursor { animation: none; }
}

/* ------------------------------------------------- testimonial card stack -- */
/* Drag/shuffle deck — see initTestimonialShuffle() in main.js. Cards are laid
   out via [data-position] rather than DOM order, so JS never has to move
   nodes around, just relabel which slot each one occupies. */
.testimonial-stack-wrap { position: relative; width: 100%; max-width: 300px; }
.testimonial-stack { position: relative; width: 100%; height: 400px; }
.testimonial-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  transition: transform .4s cubic-bezier(0.2, 0, 0, 1), opacity .4s cubic-bezier(0.2, 0, 0, 1);
}
.testimonial-card img {
  -webkit-user-drag: none;
}
/* Quotes are admin-editable free text with no length limit — clamp so a long
   one truncates with an ellipsis instead of pushing the name/role footer
   past the card's own bottom edge (which used to spill onto the card behind). */
.testimonial-card-quote {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  overflow: hidden;
}
/* Only the front card's content is ever legible — cards behind it show just
   their blank shape (bg/border/shadow), never their quote/name/role. Two
   testimonials can share a name, and rotated text peeking out from behind
   will always eventually collide with the front card's own text otherwise. */
.testimonial-card > * {
  transition: opacity .3s ease;
}
.testimonial-card[data-position="middle"] > *,
.testimonial-card[data-position="back"] > *,
.testimonial-card[data-position="hidden"] > * {
  opacity: 0;
}
.testimonial-card[data-position="front"] {
  z-index: 3;
  opacity: 1;
  cursor: grab;
  transform: translateX(-10%) translateY(0) rotate(-6deg) scale(1);
}
.testimonial-card[data-position="middle"] {
  z-index: 2;
  opacity: 1;
  transform: translateX(0%) translateY(10px) rotate(0deg) scale(.96);
}
.testimonial-card[data-position="back"] {
  z-index: 1;
  opacity: 1;
  transform: translateX(10%) translateY(20px) rotate(6deg) scale(.92);
}
.testimonial-card[data-position="hidden"] {
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(10%) translateY(20px) rotate(6deg) scale(.92);
}
.testimonial-card[data-position="front"].is-dragging {
  cursor: grabbing;
  transition: none;
}
.testimonial-dot.is-active { background: var(--link); }
@media (prefers-reduced-motion: reduce) {
  .testimonial-card { transition: none; }
}
