/* =====================================================================
   AIS Web Studio — theme.css
   Design tokens, modern reset, base typography, layout, shared
   components (header/nav/rail/footer, sections, buttons, cards,
   mockup frames, avatars) and responsive behavior.

   Tokens only — never hardcode color outside the :root token block.
   All tokens are overridden at runtime by inc/enqueue.php (inline
   style from the ais-branding fields), so these are sensible defaults.
   ===================================================================== */

/* ------------------------------------------------------------------ */
/* 1. DESIGN TOKENS (contract §4)                                     */
/* ------------------------------------------------------------------ */
:root {
  /* Brand / accent */
  --ais-orange:      #FF5722;
  --ais-orange-soft: color-mix(in srgb, var(--ais-orange), #ffffff 18%);
  --ais-orange-deep: color-mix(in srgb, var(--ais-orange), #000000 12%);
  --ais-glow:        color-mix(in srgb, var(--ais-orange) 38%, transparent);

  /* Neutrals — dark */
  --ais-black:   #212121;
  --ais-dark:    #08090D;
  --ais-dark-2:  #0F1117;
  --ais-dark-3:  #161922;

  /* Neutrals — light */
  --ais-gray:     #E0E0E0;
  --ais-offwhite: #F7F7F4;
  --ais-white:    #FFFFFF;

  /* Text on dark */
  --ais-text:       #EDEEF2;
  --ais-text-muted: #A0A4AE;

  /* Text on light */
  --ais-ink:       #14151A;
  --ais-ink-muted: #5A5E6B;

  /* Borders */
  --ais-border:     rgba(255, 255, 255, var(--ais-border-opacity, .16));
  --ais-border-ink: rgba(20, 21, 26, .14);

  /* Surfaces */
  --ais-card-dark:  #12141B;
  --ais-card-light: #FFFFFF;

  /* Typography */
  --ais-heading-font: 'Poppins', sans-serif;
  --ais-body-font:    'Inter', sans-serif;
  --ais-type-display-scale: 1;
  --ais-type-heading-scale: 1;
  --ais-type-body-scale: 1;

  /* Shape */
  --ais-radius:      14px;
  --ais-radius-lg:   22px;
  --ais-radius-pill: 999px;

  /* Metrics */
  --ais-container:   1240px;
  --ais-gutter:      clamp(20px, 5vw, 56px);
  --ais-section-pad: calc(clamp(56px, 7vw, 104px) * var(--ais-space-scale, 1));

  /* Motion */
  --ais-ease: cubic-bezier(.22, .61, .36, 1);
  --ais-dur:  600ms;
  /* Interactive control durations — reveals stay at 600ms; direct-manipulation
     feedback (filters, inputs, status) and accordion controls resolve faster. */
  --ais-dur-fast: 200ms;
  --ais-dur-ui:   260ms;

  /* Elevation */
  --ais-shadow: 0 24px 60px -28px var(--ais-shadow-color);

  /* Runtime knobs (enqueue/JS may override) */
  --ais-anim-speed: 1;
  --ais-loader-max: 1200ms;
  --ais-ambient-opacity: 1;
  --ais-tilt-max: 8;

  /* Internal layout helper */
  --ais-header-h: 76px;

  /* === Type scale (refinement §4.1) === */
  --ais-fs-display: calc(clamp(2.8rem, 6.4vw, 5rem) * var(--ais-type-display-scale));
  --ais-fs-h1:      calc(clamp(2.2rem, 5vw, 3.6rem) * var(--ais-type-display-scale));
  --ais-fs-h2:      calc(clamp(1.75rem, 3.5vw, 2.5rem) * var(--ais-type-heading-scale));
  --ais-fs-h3:      calc(clamp(1.2rem, 2vw, 1.5rem) * var(--ais-type-heading-scale));
  --ais-fs-h4:      calc(clamp(1.1rem, 1.5vw, 1.25rem) * var(--ais-type-heading-scale));
  --ais-fs-h5:      calc(clamp(1.02rem, 1.2vw, 1.12rem) * var(--ais-type-heading-scale));
  --ais-fs-h6:      calc(1rem * var(--ais-type-heading-scale));
  --ais-fs-body:    calc(1rem * var(--ais-type-body-scale));
  --ais-fs-sm:      calc(0.875rem * var(--ais-type-body-scale));
  --ais-fs-label:   calc(0.78rem * var(--ais-type-body-scale));
  --ais-fs-lead:    calc(clamp(1.05rem, 1.45vw, 1.22rem) * var(--ais-type-body-scale));
  --ais-leading-display: 1.02;
  --ais-leading-heading: 1.2;
  --ais-leading-body:    1.65;
  --ais-leading-tight:   1.5;
  --ais-tracking-display: 0;
  --ais-tracking-tight:   0;
  --ais-tracking-label:   0.14em;
  --ais-display-weight: 800;
  --ais-heading-weight: 700;
  --ais-title-transform: uppercase;
  --ais-measure:      62ch;
  --ais-measure-lead: 50ch;

  /* === Spacing scale (§4.2) === */
  --ais-space-1: 4px;  --ais-space-2: 8px;  --ais-space-3: 12px;
  --ais-space-4: 16px; --ais-space-5: 24px; --ais-space-6: 32px;
  --ais-space-7: 48px; --ais-space-8: 64px; --ais-space-9: 96px; --ais-space-10: 128px;
  --ais-space-scale: 1;
  --ais-stack-gap: calc(clamp(32px, 5vw, 56px) * var(--ais-space-scale, 1));
  --ais-grid-gap:  calc(clamp(20px, 2.4vw, 28px) * var(--ais-space-scale, 1));
  --ais-tap-min:   44px;

  /* === New color tokens (§4.3) — accessibility-safe === */
  --ais-on-primary:   #15161B;
  --ais-orange-ink:   #C2410C;
  --ais-focus:        var(--ais-orange);
  --ais-focus-width:  2px;
  --ais-focus-offset: 3px;
  --ais-link:         var(--ais-orange);
  --ais-border-opacity: 0.16;
  --ais-announce-bg:   var(--ais-orange-deep);
  --ais-announce-text: var(--ais-on-primary);
  --ais-selection-bg:   var(--ais-orange);
  --ais-selection-text: var(--ais-on-primary);
  --ais-shadow-color:    rgba(0, 0, 0, .55);
  --ais-shadow-strength: 1;
  --ais-glow-color: var(--ais-orange);
  --ais-accent-2:   var(--ais-orange-soft);
  --ais-hl-color:   var(--ais-orange);

  /* === Semantic component colors === */
  --ais-page-bg:        var(--ais-dark);
  --ais-surface:        var(--ais-dark-2);
  --ais-surface-raised: var(--ais-dark-3);
  --ais-surface-soft:   color-mix(in srgb, var(--ais-surface-raised) 82%, transparent);
  --ais-card-bg:        var(--ais-card-dark);
  --ais-card-bg-light:  var(--ais-card-light);
  --ais-text-strong:    var(--ais-text);
  --ais-muted:          var(--ais-text-muted);
  --ais-border-soft:    var(--ais-border);
  --ais-border-strong:  color-mix(in srgb, var(--ais-text) 42%, transparent);
  --ais-input-bg:       var(--ais-surface-raised);
  --ais-input-text:     var(--ais-text);
  --ais-input-border:   var(--ais-border);
  --ais-input-placeholder: color-mix(in srgb, var(--ais-text-muted) 82%, transparent);
  --ais-input-focus-bg: var(--ais-surface-raised);
  --ais-input-focus-border: var(--ais-focus);
  --ais-focus-ring:     color-mix(in srgb, var(--ais-focus) 34%, transparent);
  --ais-label:          var(--ais-text);
  --ais-icon:           var(--ais-text-muted);
  --ais-icon-strong:    var(--ais-text);
  --ais-disabled-bg:    color-mix(in srgb, var(--ais-surface-raised) 76%, transparent);
  --ais-disabled-text:  color-mix(in srgb, var(--ais-text-muted) 68%, transparent);
  --ais-disabled-border: color-mix(in srgb, var(--ais-border) 68%, transparent);
  --ais-success:        #4ADE80;
  --ais-warning:        #FBBF24;
  --ais-danger:         #FB7185;
  --ais-status-success-bg: color-mix(in srgb, var(--ais-success) 16%, var(--ais-card-bg));
  --ais-status-success-text: var(--ais-text);
  --ais-status-success-border: color-mix(in srgb, var(--ais-success) 44%, transparent);
  --ais-status-warning-bg: color-mix(in srgb, var(--ais-warning) 16%, var(--ais-card-bg));
  --ais-status-warning-text: var(--ais-text);
  --ais-status-warning-border: color-mix(in srgb, var(--ais-warning) 44%, transparent);
  --ais-status-danger-bg: color-mix(in srgb, var(--ais-danger) 15%, var(--ais-card-bg));
  --ais-status-danger-text: var(--ais-text);
  --ais-status-danger-border: color-mix(in srgb, var(--ais-danger) 42%, transparent);
  --ais-status-error-bg: var(--ais-status-danger-bg);
  --ais-status-error-text: var(--ais-status-danger-text);
  --ais-status-error-border: var(--ais-status-danger-border);

  /* === Component tokens === */
  --ais-btn-radius:   var(--ais-radius-pill);
  --ais-card-radius:  var(--ais-radius-lg);
  --ais-input-radius: var(--ais-radius);
  --ais-btn-bg:       var(--ais-orange);
  --ais-btn-bg-hover: var(--ais-orange-soft);
  --ais-social-size:  46px;
  --ais-card-pad:     calc(clamp(22px, 2.4vw, 32px) * var(--ais-space-scale, 1));
  --ais-elevation:    1;
}

/* ------------------------------------------------------------------ */
/* 2. MODERN RESET                                                    */
/* ------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-padding-top: calc(var(--ais-header-h) + 16px);
}
/* Static (non-sticky) header scrolls away, so anchors need no header reserve. */
html:has(.ais-header--static) { scroll-padding-top: 16px; }
html[data-ais-mode="dark"] { color-scheme: dark; }
html[data-ais-mode="light"] { color-scheme: light; }

body {
  min-height: 100vh;
  font-family: var(--ais-body-font);
  font-size: var(--ais-fs-body);
  line-height: var(--ais-leading-body, 1.65);
  color: var(--ais-text);
  background: var(--ais-page-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
picture,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Icons are Lucide stroke outlines (fill="none" attribute on the SVG). Never
   flood-fill them globally — that renders closed glyphs as solid blobs. */
.ais-icon { fill: none; }
/* Rating stars: base styling here (not only animations.css) so MAX SEO mode —
   which does not load animations.css — keeps the filled/empty distinction. */
.ais-stars { display: inline-flex; gap: 3px; color: var(--ais-text-muted); }
.ais-stars .ais-icon { width: 18px; height: 18px; }
.ais-star--filled { color: var(--ais-orange); fill: var(--ais-orange); }

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  accent-color: var(--ais-orange);
  caret-color: var(--ais-orange);
}

button { background: none; border: 0; cursor: pointer; }

a {
  color: inherit;
  text-decoration: none;
  transition: color .25s var(--ais-ease);
}

ul, ol { list-style: none; padding: 0; }

p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

:focus-visible {
  outline: var(--ais-focus-width, 2px) solid var(--ais-focus);
  outline-offset: var(--ais-focus-offset, 3px);
}

::selection {
  background: var(--ais-selection-bg);
  color: var(--ais-selection-text);
}

hr {
  border: 0;
  height: 1px;
  background: var(--ais-border);
  margin: 2rem 0;
}

/* Noise / film-grain texture overlay (toggled by ais-noise body class) */
body.ais-noise::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------------ */
/* 3. BASE TYPOGRAPHY + FLUID SCALE                                   */
/* ------------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ais-heading-font);
  font-weight: var(--ais-heading-weight, 700);
  line-height: var(--ais-leading-heading, 1.2);
  letter-spacing: var(--ais-tracking-tight, 0);
  color: var(--ais-text);
}

h1 { font-size: var(--ais-fs-h1); line-height: var(--ais-leading-display, 1.05); }
h2 { font-size: var(--ais-fs-h2); }
h3 { font-size: var(--ais-fs-h3); }
h4 { font-size: var(--ais-fs-h4); }
h5 { font-size: var(--ais-fs-h5); }
h6 { font-size: var(--ais-fs-h6); }

p { color: var(--ais-text); }

strong, b { font-weight: 700; color: var(--ais-text); }

small { font-size: calc(.8125rem * var(--ais-type-body-scale)); }

code, pre, kbd, samp {
  font-family: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: .9em;
}

/* Highlighted word in headlines (contract §9) */
.ais-hl {
  color: var(--ais-hl-color, var(--ais-orange));
  text-shadow: 0 0 34px var(--ais-glow);
}

/* Accessibility helpers */
/* Contact-form honeypot — visually hidden but present for bots (§13) */
.ais-hp {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.ais-sr-only,
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ais-skip {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 12px 22px;
  background: var(--ais-orange);
  color: var(--ais-on-primary);
  font-weight: 700;
  border-radius: 0 0 var(--ais-radius) var(--ais-radius);
  transition: top .25s var(--ais-ease);
}
.ais-skip:focus { top: 0; }

/* ------------------------------------------------------------------ */
/* 4. LAYOUT — container + sections                                   */
/* ------------------------------------------------------------------ */
.ais-container {
  width: 100%;
  max-width: var(--ais-container);
  margin-inline: auto;
  padding-inline: var(--ais-gutter);
}

.ais-section {
  position: relative;
  padding-block: var(--ais-section-pad);
  background: var(--ais-page-bg);
  color: var(--ais-text);
  z-index: 2;
}

/* Adjacent sections share one breath of air instead of two full pads. */
.ais-section + .ais-section {
  padding-block-start: calc(var(--ais-section-pad) * 0.65);
}

/* Light editorial sections (Portfolio + Case Study) */
.ais-section--light {
  background: var(--ais-offwhite);
  color: var(--ais-ink);
  --ais-focus: var(--ais-orange-ink);
  --ais-link: var(--ais-orange-ink);
}
.ais-section--light h1,
.ais-section--light h2,
.ais-section--light h3,
.ais-section--light h4,
.ais-section--light h5,
.ais-section--light h6 { color: var(--ais-ink); }
.ais-section--light p { color: var(--ais-ink-muted); }
.ais-section--light strong { color: var(--ais-ink); }

/* Section head */
.ais-section__head {
  max-width: var(--ais-measure);
  margin-bottom: var(--ais-stack-gap);
}
.ais-section__head--center {
  margin-inline: auto;
  text-align: center;
}

/* Eyebrow — orange dot + uppercase tracked label */
.ais-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--ais-space-5);
  font-family: var(--ais-heading-font);
  font-size: var(--ais-fs-label);
  font-weight: 600;
  letter-spacing: var(--ais-tracking-label);
  text-transform: uppercase;
  color: var(--ais-text-muted);
}
.ais-section--light .ais-eyebrow { color: var(--ais-ink-muted); }

.ais-eyebrow__dot {
  width: 9px;
  height: 9px;
  border-radius: var(--ais-radius-pill);
  background: var(--ais-orange);
  box-shadow: 0 0 0 4px var(--ais-glow);
  flex: none;
}

/* Big uppercase display title */
.ais-section__title {
  font-family: var(--ais-heading-font);
  font-size: var(--ais-fs-h1);
  font-weight: var(--ais-display-weight, 800);
  line-height: var(--ais-leading-display, 1.02);
  letter-spacing: 0;
  text-transform: var(--ais-title-transform, uppercase);
  color: var(--ais-text);
  text-wrap: balance;
}
.ais-section--light .ais-section__title { color: var(--ais-ink); }

.ais-section__intro {
  margin-top: var(--ais-space-5);
  font-size: var(--ais-fs-lead);
  line-height: var(--ais-leading-body);
  color: var(--ais-text-muted);
  max-width: var(--ais-measure);
}
.ais-section--light .ais-section__intro { color: var(--ais-ink-muted); }
.ais-section__head--center .ais-section__intro { margin-inline: auto; }

/* ------------------------------------------------------------------ */
/* 5. BUTTONS                                                         */
/* ------------------------------------------------------------------ */
.ais-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  font-family: var(--ais-heading-font);
  font-size: calc(.95rem * var(--ais-type-body-scale));
  font-weight: 600;
  line-height: 1;
  letter-spacing: .01em;
  border-radius: var(--ais-btn-radius);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .3s var(--ais-ease),
              box-shadow .3s var(--ais-ease),
              background-color .3s var(--ais-ease),
              border-color .3s var(--ais-ease),
              color .3s var(--ais-ease);
}
.ais-btn .ais-icon { width: 1.15em; height: 1.15em; }
.ais-btn:active { transform: translateY(1px); }

/* Primary — orange with subtle glow */
.ais-btn--primary {
  background: var(--ais-btn-bg);
  color: var(--ais-on-primary);
  box-shadow: 0 10px 30px -10px var(--ais-glow);
}
.ais-btn--primary:hover {
  background: var(--ais-btn-bg-hover);
  box-shadow: 0 16px 42px -12px var(--ais-glow),
              0 0 0 1px var(--ais-orange-soft);
  transform: translateY(-2px);
}

/* Ghost — thin border */
.ais-btn--ghost {
  background: transparent;
  color: var(--ais-text);
  border-color: var(--ais-border-strong);
}
.ais-btn--ghost:hover {
  border-color: var(--ais-orange);
  color: var(--ais-text);
  transform: translateY(-2px);
}
.ais-section--light .ais-btn--ghost {
  color: var(--ais-ink);
  border-color: var(--ais-border-ink);
}
.ais-section--light .ais-btn--ghost:hover {
  color: var(--ais-ink);
  border-color: var(--ais-orange);
}

/* Light — solid ink button for light sections */
.ais-btn--light {
  background: var(--ais-ink);
  color: var(--ais-offwhite);
}
.ais-btn--light:hover {
  background: var(--ais-orange);
  transform: translateY(-2px);
  box-shadow: 0 16px 42px -12px var(--ais-glow);
}
.ais-btn--primary:active,
.ais-btn--ghost:active,
.ais-btn--light:active { transform: translateY(1px); }

.ais-btn--block { width: 100%; }
.ais-btn--sm { padding: 11px 20px; font-size: calc(.85rem * var(--ais-type-body-scale)); }

/* ------------------------------------------------------------------ */
/* 6. CARDS                                                           */
/* ------------------------------------------------------------------ */
.ais-card {
  position: relative;
  padding: var(--ais-card-pad);
  background: var(--ais-card-bg);
  border: 1px solid var(--ais-border);
  border-radius: var(--ais-card-radius);
  transition: transform .4s var(--ais-ease),
              box-shadow .4s var(--ais-ease),
              border-color .4s var(--ais-ease);
}
.ais-section--light .ais-card {
  background: var(--ais-card-bg-light);
  border-color: var(--ais-border-ink);
  box-shadow: 0 1px 2px rgba(20, 21, 26, .04);
}

/* Hover lift + orange glow (only under body.ais-hover-lift) */
body.ais-hover-lift .ais-card {
  will-change: transform;
}
body.ais-hover-lift .ais-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--ais-orange) 55%, transparent);
  box-shadow: var(--ais-shadow),
              0 0 0 1px color-mix(in srgb, var(--ais-orange) 30%, transparent),
              0 30px 60px -30px var(--ais-glow);
}
/* Non-interactive cards must not claim the click affordance */
body.ais-hover-lift .ais-contact-form:hover,
body.ais-hover-lift .ais-contact__panel:hover,
body.ais-hover-lift .ais-empty:hover {
  transform: none;
  border-color: var(--ais-border);
  box-shadow: none;
}

/* ------------------------------------------------------------------ */
/* 7. SHARED MOCKUP COMPONENT (contract §7)                           */
/*    Browser / device frame with faux toolbar + content.            */
/*    Markup convention (section agents build this):                  */
/*    .ais-mockup[.ais-mockup--browser|--phone|--before|--after]      */
/*      .ais-mockup__bar > .ais-mockup__dots > span.ais-mockup__dot*3 */
/*                       > .ais-mockup__address                       */
/*      .ais-mockup__screen                                           */
/*        .ais-mockup__hero (optional feature block)                  */
/*        .ais-mockup__line (faux text rows)                          */
/* ------------------------------------------------------------------ */
.ais-mockup {
  position: relative;
  width: 100%;
  border: 1px solid var(--ais-border);
  border-radius: var(--ais-radius-lg);
  background: linear-gradient(160deg, var(--ais-dark-2), var(--ais-dark-3));
  box-shadow: var(--ais-shadow);
  overflow: hidden;
  isolation: isolate;
}
/* Screen glow */
.ais-mockup::after {
  content: "";
  position: absolute;
  top: -40%;
  left: 50%;
  width: 130%;
  height: 80%;
  transform: translateX(-50%);
  background: radial-gradient(50% 60% at 50% 50%, var(--ais-glow), transparent 70%);
  opacity: .55;
  pointer-events: none;
  z-index: 0;
}

/* Toolbar */
.ais-mockup__bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  height: 46px;
  background: color-mix(in srgb, var(--ais-dark-3) 72%, var(--ais-dark));
  border-bottom: 1px solid var(--ais-border);
}
.ais-mockup__dots { display: flex; gap: 8px; flex: none; }
.ais-mockup__dot {
  width: 11px;
  height: 11px;
  border-radius: var(--ais-radius-pill);
  background: var(--ais-text-muted);
  opacity: .45;
}
.ais-mockup__address {
  flex: 1;
  height: 24px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: var(--ais-radius-pill);
  font-size: .68rem;
  letter-spacing: .04em;
  color: var(--ais-orange);
  background: color-mix(in srgb, var(--ais-orange) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--ais-orange) 38%, transparent);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
html[data-ais-mode="light"] .ais-mockup__address {
  color: var(--ais-link);
  border-color: color-mix(in srgb, var(--ais-link) 45%, transparent);
}

/* Screen / content */
.ais-mockup__screen {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 3vw, 30px);
  min-height: 230px;
}
.ais-mockup__hero {
  height: 92px;
  border-radius: var(--ais-radius);
  background:
    linear-gradient(120deg,
      color-mix(in srgb, var(--ais-orange) 30%, transparent),
      color-mix(in srgb, var(--ais-orange) 8%, transparent)),
    var(--ais-dark-3);
  border: 1px solid var(--ais-border);
  position: relative;
  overflow: hidden;
}
.ais-mockup__hero::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 22px;
  width: 46%;
  height: 12px;
  border-radius: var(--ais-radius-pill);
  background: var(--ais-input-placeholder);
  opacity: .85;
}
.ais-mockup__hero::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 44px;
  width: 28%;
  height: 12px;
  border-radius: var(--ais-radius-pill);
  background: var(--ais-orange);
}
.ais-mockup__line {
  height: 10px;
  border-radius: var(--ais-radius-pill);
  background: var(--ais-border);
}
.ais-mockup__line:nth-child(2) { width: 90%; }
.ais-mockup__line:nth-child(3) { width: 78%; }
.ais-mockup__line:nth-child(4) { width: 84%; }
.ais-mockup__line:nth-child(5) { width: 62%; }
.ais-mockup__line--accent {
  width: 38% !important;
  background: var(--ais-orange);
  opacity: .9;
}
.ais-mockup__row {
  display: flex;
  gap: 12px;
}
.ais-mockup__chip {
  height: 30px;
  flex: 1;
  border-radius: var(--ais-radius);
  background: var(--ais-dark-3);
  border: 1px solid var(--ais-border);
}

/* Modifier: browser (explicit, default already browser-like) */
.ais-mockup--browser .ais-mockup__screen { min-height: 250px; }

/* Modifier: phone */
.ais-mockup--phone {
  max-width: 290px;
  margin-inline: auto;
  border-radius: 38px;
  padding: 12px;
  background: linear-gradient(160deg, var(--ais-dark-3), var(--ais-dark-2));
}
.ais-mockup--phone .ais-mockup__bar {
  height: 30px;
  justify-content: center;
  background: transparent;
  border-bottom: 0;
}
.ais-mockup--phone .ais-mockup__address { display: none; }
.ais-mockup--phone .ais-mockup__dots {
  width: 90px;
  height: 7px;
  background: var(--ais-dark);
  border-radius: var(--ais-radius-pill);
  gap: 0;
}
.ais-mockup--phone .ais-mockup__dot { display: none; }
.ais-mockup--phone .ais-mockup__screen {
  border-radius: 28px;
  background: var(--ais-dark);
  min-height: 380px;
}

/* Modifier: before — dull, grayscale */
.ais-mockup--before {
  filter: grayscale(1) brightness(.82) contrast(.92);
  box-shadow: 0 18px 40px -26px rgba(0, 0, 0, .6);
}
.ais-mockup--before::after { opacity: 0; }
.ais-mockup--before .ais-mockup__address {
  color: var(--ais-text-muted);
  background: var(--ais-border);
  border-color: var(--ais-border);
}
.ais-mockup--before .ais-mockup__hero::after,
.ais-mockup--before .ais-mockup__line--accent {
  background: var(--ais-text-muted);
}

/* Modifier: after — bright, orange accents */
.ais-mockup--after {
  filter: none;
  box-shadow: var(--ais-shadow),
              0 0 0 1px color-mix(in srgb, var(--ais-orange) 28%, transparent),
              0 36px 80px -34px var(--ais-glow);
}
.ais-mockup--after::after { opacity: .8; }

/* ------------------------------------------------------------------ */
/* 8. AVATAR — grayscale placeholder with orange ring                 */
/* ------------------------------------------------------------------ */
.ais-avatar {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: var(--ais-radius-pill);
  flex: none;
  background:
    radial-gradient(60% 60% at 50% 35%, var(--ais-gray), transparent 60%),
    linear-gradient(160deg, var(--ais-dark-3), var(--ais-black));
  border: 2px solid var(--ais-dark-2);
  box-shadow: 0 0 0 2px var(--ais-orange);
  filter: grayscale(1);
  overflow: hidden;
}
/* simple head + shoulders silhouette */
.ais-avatar::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 26%;
  width: 34%;
  height: 34%;
  transform: translateX(-50%);
  border-radius: var(--ais-radius-pill);
  background: var(--ais-text-muted);
  opacity: .6;
}
.ais-avatar::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18%;
  width: 70%;
  height: 50%;
  transform: translateX(-50%);
  border-radius: 50% 50% 0 0;
  background: var(--ais-text-muted);
  opacity: .6;
}
.ais-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}
/* When a real photo is present, drop the placeholder silhouette */
.ais-avatar:has(img)::before,
.ais-avatar:has(img)::after { content: none; }
.ais-avatar--lg { width: 84px; height: 84px; }

/* ------------------------------------------------------------------ */
/* 9. HEADER / NAV / ANNOUNCEMENT / SIDE RAIL                         */
/*    Baseline layout for header.php markup (FOUNDATION-PHP).         */
/*    Selectors documented in the build return — PHP must match.      */
/* ------------------------------------------------------------------ */

/* Announcement bar */
.ais-announce {
  position: relative;
  z-index: 60;
  text-align: center;
  padding: 10px 16px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ais-announce-text);
  background: var(--ais-announce-bg);
}
.ais-announce__text { margin: 0; color: inherit; }
.ais-announce a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
/* Light mode: darker band + white text keeps the small announce copy at AA */
html[data-ais-mode="light"] {
  --ais-announce-bg: var(--ais-orange-ink);
  --ais-announce-text: var(--ais-white);
  --ais-shadow-color: rgba(20, 21, 26, .18);
}

/* Sticky header bar */
.ais-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  transition: background-color .35s var(--ais-ease),
              border-color .35s var(--ais-ease),
              backdrop-filter .35s var(--ais-ease),
              box-shadow .35s var(--ais-ease);
  border-bottom: 1px solid transparent;
}
.ais-header > .ais-container {
  max-width: min(100%, calc(var(--ais-container) + 240px));
}
.ais-header--static { position: static; }
.ais-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 32px);
  min-height: var(--ais-header-h);
}
.ais-header__brand { display: inline-flex; align-items: center; flex: none; }
.ais-header__actions { display: flex; align-items: center; gap: 12px; flex: none; }
.ais-mode-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: var(--ais-tap-min);
  min-height: var(--ais-tap-min);
  padding: 6px 10px;
  border: 1px solid var(--ais-border-strong);
  border-radius: var(--ais-radius-pill);
  color: var(--ais-text);
  background: color-mix(in srgb, var(--ais-dark-2) 78%, transparent);
  transition: color .25s var(--ais-ease),
              border-color .25s var(--ais-ease),
              background-color .25s var(--ais-ease),
              transform .25s var(--ais-ease);
}
.ais-mode-toggle:hover,
.ais-mode-toggle:focus-visible {
  color: var(--ais-orange);
  border-color: color-mix(in srgb, var(--ais-orange) 44%, transparent);
}
.ais-mode-toggle__icon {
  width: 18px;
  height: 18px;
  flex: none;
}
.ais-mode-toggle__track {
  position: relative;
  width: 38px;
  height: 22px;
  padding: 3px;
  flex: 0 0 38px;
  border-radius: var(--ais-radius-pill);
  background: color-mix(in srgb, var(--ais-text) 12%, transparent);
  border: 1px solid var(--ais-border);
}
.ais-mode-toggle__thumb {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: var(--ais-radius-pill);
  background: var(--ais-orange);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--ais-orange) 30%, transparent);
  transition: transform .25s var(--ais-ease);
}
.ais-mode-toggle[aria-pressed="true"] .ais-mode-toggle__thumb {
  transform: translateX(16px);
}
.ais-mode-toggle__text {
  min-width: 34px;
  text-align: start;
  font-family: var(--ais-heading-font);
  font-size: .78rem;
  font-weight: 600;
  line-height: 1;
}
.ais-logo__name {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
/* Transparent at top (when enabled); solid once scrolled */
body.is-scrolled .ais-header,
.ais-header--solid {
  background: color-mix(in srgb, var(--ais-dark) 86%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--ais-border);
  box-shadow: 0 10px 40px -28px var(--ais-shadow-color);
}

/* Logo */
.ais-logo {
  display: inline-flex;
  align-items: center;
  flex: none;
}
.ais-logo img { width: var(--ais-logo-w, 150px); height: auto; }
/* Bundled AIS emblem — a runtime dark/light adaptive pair (both variants ship;
   CSS shows the one that matches the live color mode). Sized by height so the
   tall-ish mark fits the bar regardless of the global logo-width slider. */
.ais-logo .ais-logo__img--auto { width: auto; height: var(--ais-logo-emblem-h, 40px); }
.ais-logo--footer .ais-logo__img--auto { height: var(--ais-logo-emblem-h-footer, 46px); }
html[data-ais-mode="dark"] .ais-logo__img--auto-light,
html[data-ais-mode="light"] .ais-logo__img--auto-dark { display: none; }

/* Primary nav links */
.ais-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ais-nav__menu {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ais-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--ais-tap-min);
  padding: 10px 12px;
  font-size: .92rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ais-text-muted);
  border-radius: var(--ais-radius);
  transition: color .25s var(--ais-ease);
}
.ais-nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: var(--ais-radius-pill);
  background: var(--ais-orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ais-ease);
}
.ais-nav__link:hover,
.ais-nav__link.is-active { color: var(--ais-text); }
.ais-nav__link:hover::after,
.ais-nav__link.is-active::after { transform: scaleX(1); }
.ais-nav__menu a:not(.ais-nav__link) {
  display: flex;
  align-items: center;
  min-height: var(--ais-tap-min);
  padding: 10px 14px;
  border-radius: var(--ais-radius);
  color: var(--ais-text-muted);
}
.ais-nav__menu a:not(.ais-nav__link):hover,
.ais-nav__menu a:not(.ais-nav__link):focus-visible {
  color: var(--ais-text);
}

/* Drawer CTA: markup always present in the menu; shown only in the collapsed
   drawer (the desktop bar has its own .ais-header__cta). */
.ais-nav__cta { display: none; }

/* Mobile menu toggle (hamburger) */
.ais-nav__toggle {
  display: none;
  position: relative;
  z-index: 70;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  align-items: center;
  justify-content: center;
  border-radius: var(--ais-radius);
  border: 1px solid var(--ais-border-strong);
  color: var(--ais-text);
  background: color-mix(in srgb, var(--ais-dark-2) 84%, transparent);
}
.ais-nav__toggle .ais-icon { width: 30px; height: 30px; }
.ais-nav__toggle .ais-icon--close { display: none; }
.ais-nav__toggle[aria-expanded="true"] .ais-icon--menu { display: none; }
.ais-nav__toggle[aria-expanded="true"] .ais-icon--close { display: block; }

/* Side rail (vertical scrollspy dots) */
.ais-rail {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ais-rail__list { display: flex; flex-direction: column; gap: 2px; }
/* Link = generous (≥32px) hit area centered on the dot */
.ais-rail__link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}
.ais-rail__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--ais-radius-pill);
  background: var(--ais-border);
  transition: background-color .3s var(--ais-ease), transform .3s var(--ais-ease);
}
.ais-rail__link:hover .ais-rail__dot,
.ais-rail__link:focus-visible .ais-rail__dot {
  background: var(--ais-text-muted);
  transform: scale(1.3);
}
.ais-rail__link.is-active .ais-rail__dot {
  background: var(--ais-orange);
  transform: scale(1.35);
  box-shadow: 0 0 0 4px var(--ais-glow);
}
/* Label = visually-hidden tooltip, shown on hover/keyboard-focus */
.ais-rail__label {
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  padding: 5px 11px;
  font-family: var(--ais-heading-font);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ais-text);
  background: var(--ais-dark-3);
  border: 1px solid var(--ais-border);
  border-radius: var(--ais-radius-pill);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ais-ease), transform .25s var(--ais-ease);
}
.ais-rail__link:hover .ais-rail__label,
.ais-rail__link:focus-visible .ais-rail__label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
/* Labels are hover/focus-only tooltips now (removed per request): the current
   section's label no longer stays pinned open — the orange dot marks it. */

/* ------------------------------------------------------------------ */
/* 10. FOOTER                                                         */
/* ------------------------------------------------------------------ */
.ais-footer {
  position: relative;
  z-index: 2;
  background: var(--ais-surface);
  border-top: 1px solid var(--ais-border);
  padding-block: clamp(56px, 7vw, 90px) 36px;
  color: var(--ais-text-muted);
}
.ais-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  padding-bottom: 48px;
  border-bottom: 1px solid var(--ais-border);
}
.ais-footer__brand img { width: var(--ais-logo-w, 150px); margin-bottom: 20px; }
.ais-footer__about { max-width: 34ch; line-height: 1.7; }
.ais-footer__tagline {
  margin-top: 18px;
  font-family: var(--ais-heading-font);
  font-weight: 600;
  color: var(--ais-text);
}
.ais-footer__email {
  display: inline-block;
  margin-top: 16px;
  color: var(--ais-text-muted);
  transition: color .25s var(--ais-ease);
}
.ais-footer__email:hover,
.ais-footer__email:focus-visible { color: var(--ais-link); }
.ais-footer__heading {
  margin: 0 0 18px;
  font-family: var(--ais-heading-font);
  font-size: var(--ais-fs-label);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: var(--ais-tracking-label);
  text-transform: uppercase;
  color: var(--ais-text-muted);
}
.ais-footer__col li,
.ais-footer__links li { margin-bottom: 10px; }
.ais-footer__col a,
.ais-footer__links a {
  display: inline-block;
  padding-block: 8px;
  margin-block: -8px;
}
.ais-footer__col a:hover,
.ais-footer__links a:hover { color: var(--ais-orange); }
.ais-footer__bar { padding-top: 30px; }
.ais-footer__barinner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: .85rem;
  color: var(--ais-text-muted);
}
.ais-footer__bar-right {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 18px;
  margin-left: auto;
}
.ais-footer__copy {
  margin: 0;
}
.ais-footer__credit {
  margin: 0;
}
.ais-footer__legal-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 14px;
}
.ais-footer__legal-links a {
  color: var(--ais-text-muted);
  transition: color .25s var(--ais-ease);
}
.ais-footer__legal-links a:hover,
.ais-footer__legal-links a:focus-visible {
  color: var(--ais-orange);
}
.ais-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ais-social-size);
  height: var(--ais-social-size);
  min-width: var(--ais-tap-min);
  min-height: var(--ais-tap-min);
  border-radius: var(--ais-radius-pill);
  border: 1px solid var(--ais-border-strong);
  color: var(--ais-icon);
  background: color-mix(in srgb, var(--ais-icon-strong) 4%, transparent);
  transition: color .25s var(--ais-ease),
              border-color .25s var(--ais-ease),
              background-color .25s var(--ais-ease),
              transform .25s var(--ais-ease);
}
.ais-social .ais-icon {
  width: 20px;
  height: 20px;
}
.ais-social:hover,
.ais-social:focus-visible {
  color: var(--ais-orange);
  border-color: color-mix(in srgb, var(--ais-orange) 54%, transparent);
  background: color-mix(in srgb, var(--ais-orange) 12%, transparent);
  transform: translateY(-2px);
}
.ais-social--disabled,
.ais-social--disabled:hover,
.ais-social--disabled:focus-visible {
  color: var(--ais-disabled-text);
  background: var(--ais-disabled-bg);
  border-color: var(--ais-disabled-border);
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}
.ais-footer__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: var(--ais-space-5);
}
.ais-footer__social a {
  width: var(--ais-social-size);
  height: var(--ais-social-size);
}

/* Light mode: repoint chrome hover accents to the per-mode AA-safe link color */
html[data-ais-mode="light"] .ais-mode-toggle:hover,
html[data-ais-mode="light"] .ais-mode-toggle:focus-visible,
html[data-ais-mode="light"] .ais-footer__col a:hover,
html[data-ais-mode="light"] .ais-footer__links a:hover,
html[data-ais-mode="light"] .ais-social:hover,
html[data-ais-mode="light"] .ais-social:focus-visible,
html[data-ais-mode="light"] .ais-link-arrow:hover,
html[data-ais-mode="light"] .ais-postcard__title a:hover {
  color: var(--ais-link);
}

/* Reserve the back-to-top FAB's lane so the bottom-bar credit can't slide under it */
@media (min-width: 641px) and (max-width: 1500px) {
  .ais-footer__barinner { padding-right: 96px; }
}

/* ------------------------------------------------------------------ */
/* 11. EDITORIAL CONTENT (blog / page output)                        */
/* ------------------------------------------------------------------ */
.ais-prose,
.entry-content {
  max-width: 72ch;
  line-height: 1.75;
  color: var(--ais-text);
}
.ais-section--light .ais-prose,
.ais-section--light .entry-content { color: var(--ais-ink); }
.ais-prose > * + *,
.entry-content > * + * { margin-top: 1.3em; }
.ais-prose h2, .entry-content h2 { margin-top: 1.6em; }
.ais-prose h3, .entry-content h3 { margin-top: 1.4em; }
.ais-prose a, .entry-content a {
  color: var(--ais-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ais-prose ul, .entry-content ul { list-style: disc; padding-inline-start: 1.3em; }
.ais-prose ol, .entry-content ol { list-style: decimal; padding-inline-start: 1.3em; }
.ais-prose li, .entry-content li { margin-top: .5em; }
.ais-prose img, .entry-content img { border-radius: var(--ais-radius); }
.ais-prose blockquote,
.entry-content blockquote {
  margin-inline: 0;
  padding: 14px 24px;
  border-inline-start: 3px solid var(--ais-orange);
  background: var(--ais-dark-2);
  border-radius: 0 var(--ais-radius) var(--ais-radius) 0;
  font-style: italic;
  color: var(--ais-text);
}
.ais-section--light .entry-content blockquote {
  background: var(--ais-card-bg-light);
  color: var(--ais-ink);
}
.ais-prose pre, .entry-content pre {
  padding: 18px 20px;
  background: var(--ais-dark);
  border: 1px solid var(--ais-border);
  border-radius: var(--ais-radius);
  overflow-x: auto;
}
.ais-prose code, .entry-content code {
  padding: .15em .4em;
  background: var(--ais-dark);
  border: 1px solid var(--ais-border);
  border-radius: 6px;
}
.ais-prose pre code, .entry-content pre code { padding: 0; border: 0; background: none; }
.ais-prose table, .entry-content table {
  width: 100%;
  border-collapse: collapse;
}
.ais-prose th, .ais-prose td,
.entry-content th, .entry-content td {
  padding: 10px 14px;
  border: 1px solid var(--ais-border);
  text-align: start;
}

.ais-single .ais-container.ais-prose {
  max-width: min(100%, 820px);
}
.ais-single__head {
  margin-bottom: clamp(30px, 5vw, 54px);
}
.ais-single__back {
  margin-bottom: var(--ais-space-5);
}
.ais-single__back .ais-icon {
  transform: rotate(180deg);
}
.ais-single__back:hover .ais-icon {
  transform: rotate(180deg) translateX(4px);
}
.ais-single__title {
  max-width: 24ch;
  line-height: 1.15;
  text-wrap: balance;
}
.ais-single__cta {
  margin-top: var(--ais-space-7);
  display: grid;
  justify-items: start;
  gap: var(--ais-space-4);
}
.ais-single__cta-title {
  font-size: var(--ais-fs-h3);
}
.ais-single__img {
  width: 100%;
  aspect-ratio: 21 / 10;
  object-fit: cover;
  border-radius: var(--ais-radius-lg);
  border: 1px solid var(--ais-border);
}
.ais-single__meta,
.ais-comments,
.ais-comments p,
.ais-comments li,
.ais-comments .comment-metadata,
.ais-postnav {
  color: var(--ais-text);
}
.ais-single__meta,
.ais-comments .comment-metadata,
.ais-comments .reply {
  font-size: var(--ais-fs-sm);
}
.ais-single__content {
  max-width: 72ch;
  color: var(--ais-text);
}
.ais-single__content p,
.ais-single__content li,
.ais-comments .comment-content,
.ais-comments .comment-content p {
  color: var(--ais-text);
}
.ais-single__meta,
.ais-comments .comment-metadata,
.ais-comments .comment-notes,
.ais-comments .logged-in-as,
.ais-comments__closed {
  color: var(--ais-text-muted);
}
.ais-prose a,
.entry-content a,
.ais-comments a,
.ais-postnav a,
.ais-tags a,
.ais-postcard a:not(.ais-postcard__media),
.ais-searchlist__item a {
  color: var(--ais-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.ais-prose a:hover,
.entry-content a:hover,
.ais-comments a:hover,
.ais-postnav a:hover,
.ais-tags a:hover,
.ais-postcard a:not(.ais-postcard__media):hover,
.ais-searchlist__item a:hover {
  color: var(--ais-link);
  text-decoration-thickness: 2px;
}
.ais-eyebrow a {
  color: inherit;
  text-decoration-color: currentColor;
}
.ais-section--light a:not(.ais-btn):not(.ais-logo):not(.ais-social) {
  color: var(--ais-orange-ink);
}

/* Comment thread — avatars, nesting, separation */
.ais-comments {
  margin-top: var(--ais-space-8);
  padding-top: var(--ais-space-7);
  border-top: 1px solid var(--ais-border);
}
.ais-comments__list > li + li { margin-top: var(--ais-space-5); }
.ais-comments .comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}
.ais-comments .comment-author .avatar {
  border-radius: var(--ais-radius-pill);
  border: 2px solid var(--ais-border);
}
.ais-comments .comment-author .says { display: none; }
.ais-comments .comment-metadata { margin-top: 2px; }
.ais-comments .comment-content { margin-top: var(--ais-space-3); }
.ais-comments .reply { margin-top: var(--ais-space-3); }
.ais-comments .children {
  margin-top: var(--ais-space-4);
  padding-inline-start: clamp(14px, 4vw, 36px);
  border-inline-start: 2px solid var(--ais-border);
}
.ais-comments .children li + li { margin-top: var(--ais-space-4); }

/* Post tags — pill chips */
.ais-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--ais-space-6);
}
.ais-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 14px;
  font-size: var(--ais-fs-sm);
  font-weight: 600;
  color: var(--ais-text-muted);
  background: var(--ais-surface-soft);
  border: 1px solid var(--ais-border);
  border-radius: var(--ais-radius-pill);
  text-decoration: none;
}
.ais-tags a:hover {
  color: var(--ais-orange);
  border-color: color-mix(in srgb, var(--ais-orange) 44%, transparent);
  text-decoration: none;
}

/* Prev / next post navigation — two-column row */
.ais-postnav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--ais-space-4);
  margin-top: var(--ais-space-7);
  padding-top: var(--ais-space-5);
  border-top: 1px solid var(--ais-border);
}
.ais-postnav__next { text-align: end; }
.ais-postnav a { display: inline-block; font-weight: 600; }

/* Search results list */
.ais-searchlist { display: grid; gap: var(--ais-grid-gap); }
.ais-searchlist__item { display: grid; gap: 10px; justify-items: start; }
.ais-searchlist__title {
  font-size: var(--ais-fs-h4);
  line-height: var(--ais-leading-heading);
}
.ais-searchlist__meta {
  font-size: var(--ais-fs-label);
  letter-spacing: var(--ais-tracking-label);
  text-transform: uppercase;
  color: var(--ais-text-muted);
}
.ais-searchlist__excerpt { color: var(--ais-text-muted); max-width: 66ch; }

/* WordPress alignment + caption helpers */
.alignleft  { float: left;  margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.alignwide { width: min(100%, calc(var(--ais-container) + 120px)); margin-inline: auto; }
.alignfull { width: 100%; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .wp-element-caption {
  margin-top: .6em;
  font-size: .85rem;
  color: var(--ais-text-muted);
  text-align: center;
}
.sticky, .gallery-caption, .bypostauthor { display: block; }

.search-form,
.comment-form {
  display: grid;
  gap: var(--ais-space-4);
  max-width: var(--ais-measure);
}
.search-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}
.search-field,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  min-height: var(--ais-tap-min);
  padding: 12px 14px;
  border: 1px solid var(--ais-input-border);
  border-radius: var(--ais-input-radius);
  color: var(--ais-input-text);
  background: var(--ais-input-bg);
  font-size: max(16px, var(--ais-fs-body));
}
.search-field::placeholder,
.comment-form input[type="text"]::placeholder,
.comment-form input[type="email"]::placeholder,
.comment-form input[type="url"]::placeholder,
.comment-form textarea::placeholder {
  color: var(--ais-input-placeholder);
  opacity: 1;
}
.search-field:focus,
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--ais-input-focus-border);
  background: var(--ais-input-focus-bg);
  box-shadow: 0 0 0 3px var(--ais-focus-ring);
}
.search-submit,
.comment-form .submit {
  min-height: var(--ais-tap-min);
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--ais-btn-radius);
  font-family: var(--ais-heading-font);
  font-weight: 600;
  color: var(--ais-on-primary);
  background: var(--ais-btn-bg);
  cursor: pointer;
  transition: background-color .3s var(--ais-ease), transform .3s var(--ais-ease);
}
.search-submit:hover,
.comment-form .submit:hover {
  background: var(--ais-btn-bg-hover);
  transform: translateY(-1px);
}
.search-submit:focus-visible,
.comment-form .submit:focus-visible {
  outline: var(--ais-focus-width) solid var(--ais-focus);
  outline-offset: var(--ais-focus-offset);
}

/* Comment-form labels + branded checkboxes/radios */
.comment-form label {
  display: block;
  margin-bottom: 8px;
  font-size: var(--ais-fs-sm);
  font-weight: 600;
  color: var(--ais-label);
}
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 10px; }
.comment-form-cookies-consent label {
  display: inline;
  margin: 0;
  font-weight: 400;
  color: var(--ais-text-muted);
}
input[type="checkbox"],
input[type="radio"] { accent-color: var(--ais-orange); }

/* Theme Chrome/Edge autofill on the dark inputs */
.ais-field__input:-webkit-autofill,
.ais-field__input:-webkit-autofill:hover,
.search-field:-webkit-autofill,
.comment-form input:-webkit-autofill {
  -webkit-text-fill-color: var(--ais-input-text);
  -webkit-box-shadow: 0 0 0 1000px var(--ais-input-bg) inset;
  caret-color: var(--ais-input-text);
}
.ais-field__input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 3px var(--ais-focus-ring), 0 0 0 1000px var(--ais-input-focus-bg) inset;
}

/* Archives / blog listings */
.ais-archive {
  min-height: 70vh;
  overflow: hidden;
}
.ais-archive .ais-container {
  max-width: min(var(--ais-container), 1160px);
}
.ais-archive__head {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(20px, 4vw, 48px);
  margin-bottom: clamp(34px, 5vw, 64px);
}
.ais-archive__copy {
  max-width: 760px;
}
.ais-archive .ais-section__title {
  margin-top: .18em;
  max-width: 22ch;
}
.ais-archive__count {
  display: inline-grid;
  place-items: center;
  min-width: 112px;
  min-height: 96px;
  padding: 16px 18px;
  border: 1px solid var(--ais-border);
  border-radius: var(--ais-card-radius);
  background: color-mix(in srgb, var(--ais-card-bg) 86%, transparent);
  color: var(--ais-text);
  text-align: center;
}
.ais-archive__count strong {
  display: block;
  font-family: var(--ais-heading-font);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: .92;
}
.ais-archive__count span {
  display: block;
  margin-top: 6px;
  font-size: var(--ais-fs-label);
  font-weight: 700;
  letter-spacing: var(--ais-tracking-label);
  text-transform: uppercase;
  color: var(--ais-text-muted);
}
.ais-postgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(22px, 3vw, 34px);
  align-items: stretch;
}
.ais-postcard {
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  min-height: 280px;
  overflow: hidden;
  isolation: isolate;
}
.ais-postcard--no-media {
  grid-template-columns: 1fr;
}
.ais-postcard__media {
  display: block;
  min-height: 100%;
  overflow: hidden;
  background: color-mix(in srgb, var(--ais-orange) 10%, var(--ais-card-bg));
}
.ais-postcard__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s var(--ais-ease);
}
.ais-postcard:hover .ais-postcard__img {
  transform: scale(1.035);
}
.ais-postcard__body {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: clamp(24px, 3vw, 38px);
}
.ais-postcard--no-media .ais-postcard__body {
  min-height: 230px;
}
.ais-postcard__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-size: var(--ais-fs-label);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: var(--ais-tracking-label);
  text-transform: uppercase;
  color: var(--ais-text-muted);
}
.ais-postcard__meta > * {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ais-postcard__meta > * + *::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: var(--ais-radius-pill);
  background: var(--ais-orange);
}
.ais-postcard__cat a {
  color: inherit;
}
.ais-postcard__cat a:hover {
  color: var(--ais-link);
}
.ais-postcard__title {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.15;
}
.ais-postcard .ais-postcard__title a {
  color: inherit;
  text-decoration: none;
}
.ais-postcard .ais-postcard__title a:hover,
.ais-postcard .ais-postcard__title a:focus-visible {
  color: var(--ais-orange);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
/* Stretch the title link over the whole card; keep meta + arrow independently clickable above it. */
.ais-postcard__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.ais-postcard__meta,
.ais-postcard .ais-link-arrow { position: relative; z-index: 2; }
.ais-postcard__excerpt {
  max-width: 66ch;
  color: var(--ais-text-muted);
}
.ais-link-arrow {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-weight: 700;
  color: var(--ais-text);
  text-decoration: none;
}
.ais-link-arrow .ais-icon {
  width: 18px;
  height: 18px;
  transition: transform .25s var(--ais-ease);
}
.ais-link-arrow:hover {
  color: var(--ais-orange);
}
.ais-link-arrow:hover .ais-icon {
  transform: translateX(4px);
}
.ais-postcard a.ais-link-arrow {
  color: var(--ais-text);
  text-decoration: none;
}
.ais-postcard a.ais-link-arrow:hover {
  color: var(--ais-orange);
}
.ais-empty {
  max-width: 720px;
}

/* Pagination */
.ais-pagination {
  display: block;
  margin-top: 48px;
}
.ais-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ais-pagination a,
.ais-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--ais-border-strong);
  border-radius: var(--ais-radius);
  color: var(--ais-text-muted);
  transition: all .25s var(--ais-ease);
}
.ais-pagination a:hover {
  color: var(--ais-text);
  border-color: var(--ais-orange);
  background: color-mix(in srgb, var(--ais-orange) 14%, transparent);
}
.ais-pagination .current {
  color: var(--ais-on-primary);
  border-color: var(--ais-orange);
  background: var(--ais-orange);
  font-weight: 700;
}

/* 404 — centered dead-end treatment (token-driven, all skins × modes) */
.ais-404 {
  min-height: 60vh;
  display: grid;
  align-items: center;
  text-align: center;
}
.ais-404__inner {
  display: grid;
  justify-items: center;
  gap: var(--ais-space-5);
  max-width: 640px;
}
.ais-404__code {
  font-size: clamp(6rem, 22vw, 12rem);
  font-weight: var(--ais-display-weight, 800);
  line-height: .9;
  color: var(--ais-orange);
  text-shadow: 0 0 60px var(--ais-glow);
}
.ais-404__text { color: var(--ais-text-muted); max-width: 44ch; }
.ais-404__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.ais-404__search { width: min(100%, 440px); }

/* Breadcrumb trail (single / archive) — mirrors the JSON-LD BreadcrumbList */
.ais-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: var(--ais-fs-sm);
  color: var(--ais-text-muted);
}
.ais-crumbs a { color: var(--ais-text-muted); }
.ais-crumbs a:hover { color: var(--ais-orange); }
.ais-crumbs [aria-current] { color: var(--ais-text); }

/* Homepage-section quick links on 404 + empty search (posts don't index sections) */
.ais-search__quick,
.ais-404__quick {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ais-search__hint,
.ais-404__hint { color: var(--ais-text-muted); }
.ais-search__quick a,
.ais-404__quick a {
  display: inline-flex;
  min-height: var(--ais-tap-min);
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--ais-border);
  border-radius: var(--ais-radius-pill);
}
.ais-search__quick a:hover,
.ais-404__quick a:hover { border-color: var(--ais-orange); color: var(--ais-orange); }

/* Touch: neutralize sticky transform-based hover states */
@media (hover: none) {
  body.ais-hover-lift .ais-card:hover,
  body.ais-hover-lift .ais-lift:hover,
  body.ais-hover-lift [data-lift]:hover,
  .ais-portfolio__card:hover,
  .ais-portfolio__filter:hover,
  .ais-services__card:hover .ais-services__icon,
  .ais-process__step:hover .ais-process__node,
  .ais-process__step:hover .ais-process__icon,
  .ais-contact__method:hover .ais-contact__method-icon,
  .ais-social:hover { transform: none; }
  .ais-postcard:hover .ais-postcard__img { transform: none; }
}

/* ------------------------------------------------------------------ */
/* 12. RESPONSIVE                                                     */
/* ------------------------------------------------------------------ */
@media (min-width: 1241px) {
  .ais-nav__item--secondary { display: none; }
}
@media (max-width: 1380px) and (min-width: 1241px) {
  .ais-header__bar { gap: 14px; }
  .ais-header__actions { gap: 8px; }
  .ais-nav__menu { gap: 0; }
  .ais-nav__link {
    padding-inline: 8px;
    font-size: .875rem;
  }
  .ais-header__cta {
    padding-inline: 18px;
    font-size: .84rem;
  }
  .ais-mode-toggle {
    gap: 6px;
    padding-inline: 8px;
  }
}

@media (max-width: 1240px) {
  .ais-rail { display: none; }
  .ais-header { z-index: 70; }
  .ais-header__bar { gap: 12px; }
  .ais-header__actions { gap: 10px; }
  .ais-header__cta { display: none; }

  /* Collapse desktop nav before the CTA and long menu labels collide. */
  .ais-nav__toggle { display: inline-flex; }
  .ais-nav__menu {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(420px, 86vw);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    padding: calc(var(--ais-header-h) + 36px) 28px max(40px, env(safe-area-inset-bottom));
    background: var(--ais-dark-2);
    border-left: 1px solid var(--ais-border);
    box-shadow: -30px 0 80px -40px var(--ais-shadow-color);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .4s var(--ais-ease), visibility .4s var(--ais-ease);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .ais-nav__menu.is-open {
    transform: translateX(0);
    visibility: visible;
  }
  .ais-nav__link {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--ais-border);
    border-radius: 0;
  }
  .ais-nav__menu a:not(.ais-nav__link) {
    width: 100%;
    min-height: 52px;
    border-bottom: 1px solid var(--ais-border);
    border-radius: 0;
  }
  .ais-nav__link::after { display: none; }
  .ais-nav__cta {
    display: block;
    position: sticky;
    bottom: 0;
    margin: auto 0 0;
    padding: 14px 0 10px;
    border-bottom: 0;
    background: linear-gradient(to top, var(--ais-dark-2) 68%, transparent);
  }
  .ais-nav__cta .ais-btn { width: 100%; }

  /* You-are-here for the drawer (the underline spy is disabled here). */
  .ais-nav__link.is-active {
    color: var(--ais-orange);
    border-inline-start: 3px solid var(--ais-orange);
    padding-inline-start: 13px; /* 16px minus the 3px rule */
  }

  body.is-menu-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, .55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
  body.is-menu-open { overflow: hidden; }
  .ais-nav__menu { z-index: 60; }
  body.is-menu-open .ais-header {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    transition: none !important;
  }
}

@media (max-width: 1024px) {
  :root { --ais-gutter: 20px; }

  .ais-rail { display: none; }

  /* Drop the full-viewport blur (scroll/open jank on mid-range GPUs); a near-opaque
     tokenized surface reads the same over a dark page. Aurora re-blurs its own header. */
  body.is-scrolled .ais-header,
  .ais-header--solid {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: color-mix(in srgb, var(--ais-dark) 97%, transparent);
  }
  body.is-menu-open::after {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(0, 0, 0, .62);
  }

  .ais-section__head { margin-bottom: clamp(32px, 5vw, 56px); }
  .ais-header { z-index: 70; }
  .ais-header__bar { gap: 12px; }
  .ais-header__actions { gap: 10px; }
  .ais-header__cta { display: none; }

  /* Collapse desktop nav → hamburger */
  .ais-nav__toggle { display: inline-flex; }
  .ais-nav__menu {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(420px, 86vw);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    padding: calc(var(--ais-header-h) + 36px) 28px max(40px, env(safe-area-inset-bottom));
    background: var(--ais-dark-2);
    border-left: 1px solid var(--ais-border);
    box-shadow: -30px 0 80px -40px var(--ais-shadow-color);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .4s var(--ais-ease), visibility .4s var(--ais-ease);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .ais-nav__menu.is-open {
    transform: translateX(0);
    visibility: visible;
  }
  .ais-nav__link {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--ais-border);
    border-radius: 0;
  }
  .ais-nav__menu a:not(.ais-nav__link) {
    width: 100%;
    min-height: 52px;
    border-bottom: 1px solid var(--ais-border);
    border-radius: 0;
  }
  .ais-nav__link::after { display: none; }
  .ais-nav__cta {
    display: block;
    position: sticky;
    bottom: 0;
    margin: auto 0 0;
    padding: 14px 0 10px;
    border-bottom: 0;
    background: linear-gradient(to top, var(--ais-dark-2) 68%, transparent);
  }
  .ais-nav__cta .ais-btn { width: 100%; }

  /* Scrim behind mobile menu */
  body.is-menu-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, .55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
  body.is-menu-open { overflow: hidden; }
  .ais-nav__menu { z-index: 60; }
  /* When scrolled, the sticky header gains a backdrop-filter (L907) which makes
     it a containing block for the position:fixed menu (a header child) — so the
     menu gets clipped to the 77px header instead of filling the viewport. Kill it
     while the menu is open (the header sits behind the menu + scrim anyway).
     transition:none so the blur drops INSTANTLY — otherwise the 0.35s header
     transition keeps the menu clipped (visibly "broken") until it finishes. */
  body.is-menu-open .ais-header {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    transition: none !important;
  }
}

@media (max-width: 760px) {
  .ais-archive__head {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .ais-archive__count {
    min-width: 0;
    min-height: 0;
    grid-auto-flow: column;
    justify-content: start;
    gap: 10px;
    padding: 12px 14px;
  }
  .ais-archive__count strong {
    font-size: 1.4rem;
  }
  .ais-archive__count span {
    margin-top: 0;
  }
  .ais-postcard {
    grid-template-columns: 1fr;
  }
  .ais-postcard__media {
    min-height: auto;
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 768px) {
  .ais-footer__grid { grid-template-columns: 1fr 1fr; }
  .ais-footer__brand { grid-column: 1 / -1; }
  .ais-btn--sm { min-height: var(--ais-tap-min); }
  .ais-footer__social a { width: var(--ais-tap-min); height: var(--ais-tap-min); }
}

@media (max-width: 640px) {
  :root {
    --ais-section-pad: calc(clamp(44px, 9vw, 64px) * var(--ais-space-scale, 1));
    --ais-header-h: 64px;
  }
  .ais-nav__toggle { width: 48px; height: 48px; flex: 0 0 48px; }
  .ais-mode-toggle { padding-inline: 8px; }
  .ais-mode-toggle__text { display: none; }

  .ais-footer__grid { grid-template-columns: 1fr 1fr; }
  .ais-footer__brand { grid-column: 1 / -1; }
  .ais-footer__barinner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .ais-footer__bar-right {
    justify-content: flex-start;
    margin-left: 0;
  }

  .ais-btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }
  .ais-section__head .ais-btn,
  .ais-nav .ais-btn { width: auto; }

  .ais-mockup__screen { min-height: 200px; }
}

/* Reduce hairline thinness blur on very small screens */
@media (max-width: 380px) {
  .ais-footer__grid { grid-template-columns: 1fr; }
}

/* MAX SEO: give the sticky header a legible solid background pre-JS on mobile */
@media (max-width: 1240px) {
  body.ais-max-seo .ais-header {
    background: color-mix(in srgb, var(--ais-dark) 94%, transparent);
    border-bottom-color: var(--ais-border);
  }
}

/* UI-027 (removed per request): the bar CTA is no longer re-shown once the
   hamburger appears (≤1240px). "Start a Project" then lives only inside the
   drawer (.ais-nav__cta), so the top bar shows just the mode toggle + menu. */

/* UI-076: drop the mode-toggle text label in the header squeeze tier (state stays
   communicated by aria-pressed + aria-label); frees space for the nav. */
@media (max-width: 1380px) {
  .ais-mode-toggle__text { display: none; }
  .ais-mode-toggle { padding-inline: 8px; gap: 6px; }
}

/* UX-046: pressed-state feedback for non-button touch controls (tap-highlight is
   removed globally). :active is transient, so no transition needed. */
.ais-portfolio__filter:active { transform: scale(.97); }
.ais-faq__q:active .ais-faq__icon {
  background: color-mix(in srgb, var(--ais-orange) 24%, transparent);
}
.ais-nav__link:active,
.ais-social:active,
.ais-contact__method-value:active { color: var(--ais-orange); }
.ais-totop:active { transform: scale(.92); }
.ais-mode-toggle:active { border-color: var(--ais-orange); }

/* UI-099: print stylesheet. Print is ink-on-paper: literal b/w is intentional here
   (the one sanctioned exception to the token rule). */
@media print {
  .ais-header, .ais-rail, .ais-totop, .ais-announce, .ais-skip,
  .ais-loader-screen, .ais-cursor-dot, .ais-cursor-ring,
  .ais-contact-form, .ais-footer__social, .ais-pagination { display: none !important; }
  body, .ais-section { background: #fff !important; color: #000 !important; }
  .ais-section { padding-block: 20px; }
  .ais-reveal { opacity: 1 !important; transform: none !important; }
  .ais-faq__a { height: auto !important; }
  .entry-content a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: .85em;
  }
}

/* Phones: drop the fixed full-viewport film-grain overlay — its mix-blend-mode
   recomposites every scroll frame for decoration barely visible at 375px. */
@media (max-width: 767px) {
  body.ais-noise::before { display: none; }
}

/* ==================================================================== */
/* 13. RTL / ARABIC SUPPORT                                             */
/* ------------------------------------------------------------------- */
/* Appended, non-destructive. LTR rendering is untouched: every rule    */
/* here is scoped under html[dir="rtl"] / html[lang="ar"], and the       */
/* logical props converted inline above are identical to their physical */
/* counterparts in LTR. The site sets html[dir="rtl"] on Arabic pages.  */
/* ==================================================================== */

/* --- Language switcher pill group (token-only; dir-neutral: inline-flex
   + symmetric pill auto-mirror, so no separate RTL rule needed) ------- */
.ais-lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--ais-border-strong);
  border-radius: var(--ais-radius-pill);
}
.ais-lang__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 2px 12px;
  font-size: var(--ais-fs-sm);
  font-weight: 600;
  color: var(--ais-text-muted);
  border-radius: var(--ais-radius-pill);
  text-decoration: none;
  transition: color .25s var(--ais-ease), background-color .25s var(--ais-ease);
}
.ais-lang__item.is-active {
  background: var(--ais-orange);
  color: var(--ais-on-primary);
}
.ais-lang__item:not(.is-active):hover { color: var(--ais-text); }

/* --- Arabic script: kill Latin tracking/uppercase (break Arabic shaping) */
html[lang="ar"] body { letter-spacing: 0 !important; }
html[lang="ar"] .ais-eyebrow,
html[lang="ar"] .ais-section__title,
html[lang="ar"] .ais-footer__heading {
  letter-spacing: 0;
  text-transform: none;
}

/* --- Isolate Latin/number runs embedded in Arabic (addresses, emails, prices) */
[dir="rtl"] .ais-mockup__address,
[dir="rtl"] .ais-footer__email,
[dir="rtl"] .ais-pricing__price {
  direction: ltr;
  unicode-bidi: isolate;
}

/* --- Directional icons: mirror only the genuinely horizontal ones.
   NOT flipped: chevron-down, arrow-up (back-to-top), brand/social, stars. */
[dir="rtl"] .ais-icon--arrow-right,
[dir="rtl"] .ais-icon--arrow-up-right,
[dir="rtl"] .ais-link-arrow .ais-icon {
  transform: scaleX(-1);
}
/* Keep the hover nudge pointing toward the reading edge (prepended scaleX(-1)
   is the exact horizontal mirror of the LTR transform). */
[dir="rtl"] .ais-link-arrow:hover .ais-icon {
  transform: scaleX(-1) translateX(4px);
}
/* "Back" link arrow (rotated 180deg in LTR) mirrors horizontally in RTL. */
[dir="rtl"] .ais-single__back .ais-icon {
  transform: scaleX(-1) rotate(180deg);
}
[dir="rtl"] .ais-single__back:hover .ais-icon {
  transform: scaleX(-1) rotate(180deg) translateX(4px);
}

/* --- Nav underline grows from the reading edge */
[dir="rtl"] .ais-nav__link::after { transform-origin: right; }

/* --- Mode toggle: thumb rests at the inline-start (right) edge in RTL,
   so the pressed slide goes the other way. */
[dir="rtl"] .ais-mode-toggle[aria-pressed="true"] .ais-mode-toggle__thumb {
  transform: translateX(-16px);
}

/* --- Mockup hero skeleton bars: text placeholders start at the reading edge */
[dir="rtl"] .ais-mockup__hero::before,
[dir="rtl"] .ais-mockup__hero::after {
  left: auto;
  right: 18px;
}

/* --- Editorial blockquote: accent bar is on the inline-start via logical
   border above; mirror the (physical) corner rounding to match. */
[dir="rtl"] .ais-prose blockquote,
[dir="rtl"] .entry-content blockquote {
  border-radius: var(--ais-radius) 0 0 var(--ais-radius);
}

/* --- Contact panel top gradient: mirror the single-axis sweep.
   NOTE: this beats the DEFAULT sections/contact.css rule; the four
   themes/*.css variants define their own same-specificity ::before that
   loads later, so under an active theme variant the sweep stays LTR-angled
   (those files are out of scope for this change). */
[dir="rtl"] .ais-contact__panel::before {
  background: linear-gradient(-90deg, var(--ais-orange), var(--ais-orange-soft), transparent);
}

/* --- Side rail (fixed, desktop-only): dock on the LEFT in RTL */
[dir="rtl"] .ais-rail {
  right: auto;
  left: 22px;
}
[dir="rtl"] .ais-rail__label {
  right: auto;
  left: 30px;
  transform: translateY(-50%) translateX(-6px);
}
[dir="rtl"] .ais-rail__link:hover .ais-rail__label,
[dir="rtl"] .ais-rail__link:focus-visible .ais-rail__label,
[dir="rtl"] .ais-rail__link.is-active .ais-rail__label {
  transform: translateY(-50%) translateX(0);
}

/* --- Mobile drawer: slides in from the LEFT in RTL.
   MUST be media-scoped — .ais-nav__menu is only a fixed slide-in drawer
   below 1240px; on desktop it's a plain flex row with no transform, and an
   unscoped translateX(-100%) would shove the Arabic desktop nav off-screen.
   One max-width:1240px block covers both source drawer definitions (the
   1024px block is a subset and its drawer rules are identical). */
@media (max-width: 1240px) {
  html[dir="rtl"] .ais-nav__menu {
    inset: 0 auto 0 0;
    border-left: 0;
    border-right: 1px solid var(--ais-border);
    box-shadow: 30px 0 80px -40px var(--ais-shadow-color);
    transform: translateX(-100%);
  }
  html[dir="rtl"] .ais-nav__menu.is-open {
    transform: translateX(0);
  }
}
