/* ===================================================================
   Archer Cross house ad — "no website on file" placement.
   Scoped entirely under .ac-ad-slot so it can drop into any page
   without colliding with that page's own classes/variables.
   =================================================================== */
.ac-ad-slot {
  --ac-ink: #111111;
  --ac-bone: #efe9dc;
  --ac-oxblood: #7a1f2b;
  --ac-gold: #c9962b;
  --ac-gold-bright: #e4b857;
  --ac-radius: 18px;

  /* `size` (not just inline-size): the slot always has a definite size on
     both axes (aspect-ratio + width, or explicit width/height), so a very
     short-but-wide shape like the 970x250 billboard can also react to its
     own block-size, not just its width. */
  container-type: size;
  position: relative;
  width: 100%;
  border-radius: var(--ac-radius);
  overflow: hidden;
  /* Reserves the exact frame before anything loads -- the aspect-ratio
     here is overridden per breakpoint below (desktop/tablet "wide" vs
     mobile "tall"), so nothing on the page ever jumps once the ad
     actually paints. */
  aspect-ratio: 728 / 400;
  background: var(--ac-ink);
  color: var(--ac-bone);
}
@media (max-width: 600px) {
  .ac-ad-slot { aspect-ratio: 360 / 480; }
}

.ac-ad {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  isolation: isolate; /* contain the blend-mode grain layer */
}

/* ---------- Background: drifting color + orbs + vignette + grain ---------- */
.ac-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.ac-bg::before {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(60% 55% at 18% 20%, color-mix(in oklab, var(--ac-oxblood) 55%, transparent) 0%, transparent 70%),
    radial-gradient(55% 50% at 85% 80%, color-mix(in oklab, var(--ac-gold) 38%, transparent) 0%, transparent 70%),
    var(--ac-ink);
  @media (prefers-reduced-motion: no-preference) {
    animation: ac-drift 22s ease-in-out infinite alternate;
  }
}
@keyframes ac-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-3%, 2%, 0) scale(1.06); }
}
.ac-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(var(--blur, 18px));
  opacity: var(--op, .5);
  background: radial-gradient(circle at 35% 30%, var(--c, var(--ac-gold)), transparent 72%);
  will-change: transform;
}
.ac-orb-far   { --blur: 34px; --op: .35; }
.ac-orb-near  { --blur: 14px; --op: .55; }
.ac-orb-1 { width: 46%; aspect-ratio: 1; top: -10%;  left: -8%;  --c: var(--ac-oxblood); }
.ac-orb-2 { width: 38%; aspect-ratio: 1; bottom: -14%; right: -6%; --c: var(--ac-gold); }
.ac-orb-3 { width: 16%; aspect-ratio: 1; top: 55%;  left: 6%;   --c: var(--ac-gold-bright); }
.ac-orb-4 { width: 12%; aspect-ratio: 1; top: 12%;  right: 20%; --c: var(--ac-bone); }
@media (prefers-reduced-motion: no-preference) {
  .ac-orb-1 { animation: ac-float-a 13s ease-in-out infinite; }
  .ac-orb-2 { animation: ac-float-b 16s ease-in-out infinite; }
  .ac-orb-3 { animation: ac-float-c 9s ease-in-out infinite; }
  .ac-orb-4 { animation: ac-float-a 11s ease-in-out infinite reverse; }
}
@keyframes ac-float-a { 0%,100% { translate: 0 0; } 50% { translate: 3% 4%; } }
@keyframes ac-float-b { 0%,100% { translate: 0 0; } 50% { translate: -4% -3%; } }
@keyframes ac-float-c { 0%,100% { translate: 0 0; } 50% { translate: 2% -5%; } }

.ac-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 50% 50%, transparent 55%, rgba(0,0,0,.55) 100%);
  pointer-events: none;
}
.ac-grain {
  position: absolute;
  inset: 0;
  opacity: .05;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Parallax wrapper (hover-driven tilt) ---------- */
.ac-parallax {
  position: absolute;
  inset: 0;
  z-index: 0;
  transform-style: preserve-3d;
  transition: transform .4s ease-out;
}
@media (hover: none) { .ac-parallax { transition: none; } }

/* ---------- Stage: copy + carousel ---------- */
.ac-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  min-height: 0;
  padding: clamp(14px, 3.2cqi, 28px);
  gap: clamp(10px, 2.4cqi, 28px);
  align-items: center;
}
.ac-ad-slot[data-shape="wide"] .ac-stage { flex-direction: row; }
.ac-ad-slot[data-shape="tall"] .ac-stage,
.ac-ad-slot[data-shape="compact"] .ac-stage { flex-direction: column; }
.ac-ad-slot[data-shape="compact"] .ac-stage { justify-content: center; gap: 10px; }
/* spec: "300x250 = carousel top, headline and button only" */
.ac-ad-slot[data-shape="compact"] .ac-eyebrow-text,
.ac-ad-slot[data-shape="compact"] .ac-subline { display: none; }
.ac-ad-slot[data-shape="compact"] .ac-wordmark { margin-bottom: 0; }
.ac-ad-slot[data-shape="compact"] .ac-headline { margin-bottom: 2px; }

.ac-copy {
  flex: 1 1 42%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2cqi, 18px);
}
.ac-ad-slot[data-shape="tall"] .ac-copy,
.ac-ad-slot[data-shape="compact"] .ac-copy {
  /* spec: "tall = carousel on top, text below". `order` only changes
     paint position, not DOM/tab order -- copy (eyebrow, headline, CTA)
     stays first for keyboard/screen-reader reading order in every
     shape, which also reads more sensibly linearly: what this is, then
     the carousel of supporting detail. */
  order: 2;
  flex: 0 0 auto;
  width: 100%;
  text-align: center;
  align-items: center;
}

/* Real Archer Cross logo: the full combined wordmark (AC monogram +
   "ARCHER CROSS" type) when there's enough width for it to read clearly,
   just the AC monogram mark when there isn't -- recolored from their
   actual brand files (ink #111 -> bone) for legibility on this dark
   ground; the oxblood arrow and gold star are untouched, since both
   already matched --ac-oxblood/--ac-gold almost exactly. */
.ac-wordmark {
  display: block;
  margin-bottom: 8px;
  line-height: 0;
}
.ac-wordmark-full,
.ac-wordmark-mark {
  display: block;
  height: 22px;
  width: auto;
}
.ac-wordmark-mark { display: none; }
.ac-ad-slot[data-shape="tall"] .ac-wordmark-full,
.ac-ad-slot[data-shape="compact"] .ac-wordmark-full { display: none; }
.ac-ad-slot[data-shape="tall"] .ac-wordmark-mark,
.ac-ad-slot[data-shape="compact"] .ac-wordmark-mark {
  display: block;
  height: 26px;
  margin-inline: auto;
}
.ac-eyebrow-text {
  display: block;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  font-size: clamp(12.5px, 2cqi, 15px);
  color: color-mix(in oklab, var(--ac-bone) 78%, transparent);
  line-height: 1.4;
  max-width: 46ch;
}

/* ---------- Typewriter headline/subline: full text sits in the DOM so
   assistive tech reads it once, normally -- only the VISUAL reveal is
   animated (a clipping overlay), so there is no per-letter DOM mutation
   for a screen reader to stumble over. ---------- */
.ac-copy-main { min-width: 0; }
.ac-headline {
  position: relative;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: clamp(26px, 6.2cqi, 46px);
  line-height: 1.05;
  letter-spacing: -.01em;
  margin: 0 0 6px;
  background: linear-gradient(100deg in oklab, var(--ac-bone) 0%, var(--ac-gold-bright) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
/* Typewriter reveal via clip-path, NOT width: a width-animated box keeps
   changing its own layout size while it grows, and when any ancestor
   centers it (text-align:center for the tall/compact shapes' centered
   copy column, or a centered flex column) the browser re-centers that
   shrinking/growing box on every frame -- which shows a moving WINDOW
   into the middle of the string instead of typing it in from the left.
   clip-path leaves the element at its final, full natural width the
   entire time (so centering is computed once and never shifts) and only
   animates what's painted. */
.ac-headline .ac-reveal-clip {
  display: inline-block;
  vertical-align: top;
  clip-path: inset(0 100% 0 0);
  @media (prefers-reduced-motion: no-preference) {
    animation: ac-type-reveal 900ms steps(var(--ac-chars, 8), end) 150ms both;
  }
}
.ac-cursor {
  display: inline-block;
  width: .06em;
  margin-left: 2px;
  background: var(--ac-gold-bright);
  opacity: 0;
  @media (prefers-reduced-motion: no-preference) {
    animation: ac-blink 1s step-end infinite 1.2s;
  }
}
.ac-subline {
  position: relative;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  font-size: clamp(13px, 1.9cqi, 16px);
  line-height: 1.5;
  color: color-mix(in oklab, var(--ac-bone) 85%, transparent);
  margin: 0;
}
.ac-subline .ac-reveal-clip {
  display: inline-block;
  vertical-align: top;
  clip-path: inset(0 100% 0 0);
  @media (prefers-reduced-motion: no-preference) {
    animation: ac-type-reveal 1100ms steps(var(--ac-chars, 20), end) 950ms both;
  }
}
.ac-subline .ac-cursor {
  width: .045em;
  background: color-mix(in oklab, var(--ac-bone) 85%, transparent);
  @media (prefers-reduced-motion: no-preference) {
    animation: ac-blink 1s step-end infinite 2.1s;
  }
}
@keyframes ac-type-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0% 0 0); } }
@keyframes ac-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ac-headline .ac-reveal-clip,
  .ac-subline .ac-reveal-clip { clip-path: inset(0 0% 0 0); }
  .ac-cursor { display: none; }
}

.ac-cta {
  --ac-ring: color-mix(in oklab, var(--ac-gold-bright) 70%, white 30%);
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 11px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg in oklab, var(--ac-gold-bright), var(--ac-gold));
  color: var(--ac-ink);
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: clamp(13px, 1.9cqi, 15px);
  text-decoration: none;
  box-shadow: 0 8px 20px -8px rgba(0,0,0,.55);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.ac-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -8px rgba(0,0,0,.6); }
.ac-cta:active { transform: translateY(0) scale(.98); }
.ac-cta:focus-visible { outline: 2px solid var(--ac-ring); outline-offset: 3px; }
.ac-cta svg { width: 15px; height: 15px; flex: none; transition: translate 150ms ease-out; }
.ac-cta:hover svg { translate: 3px 0; }
.ac-ad-slot[data-shape="tall"] .ac-cta,
.ac-ad-slot[data-shape="compact"] .ac-cta { align-self: center; }

/* ---------- Disclosure label ---------- */
.ac-disclosure {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 2;
  font-family: Inter, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .03em;
  color: color-mix(in oklab, var(--ac-bone) 65%, transparent);
  background: rgba(0,0,0,.28);
  padding: 4px 9px;
  border-radius: 999px;
  pointer-events: none;
}

/* ---------- Pause/play control (WCAG 2.2.2 -- required since this
   autoplays and runs longer than 5s) ---------- */
.ac-playctrl {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--ac-bone) 35%, transparent);
  background: rgba(0,0,0,.35);
  color: var(--ac-bone);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms ease-out;
}
.ac-playctrl:hover { background: rgba(0,0,0,.55); }
.ac-playctrl:focus-visible { outline: 2px solid var(--ac-gold-bright); outline-offset: 2px; }
.ac-playctrl svg { width: 13px; height: 13px; }
.ac-playctrl .ac-icon-play { display: none; }
.ac-ad-slot[data-playing="false"] .ac-playctrl .ac-icon-pause { display: none; }
.ac-ad-slot[data-playing="false"] .ac-playctrl .ac-icon-play { display: block; }

/* ---------- Carousel ---------- */
.ac-carousel-wrap {
  position: relative;
  flex: 1 1 58%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.ac-ad-slot[data-shape="tall"] .ac-carousel-wrap { flex: 1 1 auto; width: 100%; min-height: 0; }
.ac-ad-slot[data-shape="compact"] .ac-carousel-wrap { flex: 0 0 auto; width: 100%; height: 42%; }

.ac-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 90px;
  /* contains the 3D ring to this box -- without it, a card taller than
     the space this shape's flex layout actually gave the carousel (the
     tall/compact shapes are often tight on height) paints straight over
     the copy text next to it instead of clipping at its own edge.
     Both overflow AND clip-path: some engines don't reliably clip a
     preserve-3d subtree with overflow alone once it's promoted to its
     own compositing layer; clip-path forces a real clip in that case. */
  overflow: hidden;
  clip-path: inset(0);
  perspective: var(--ac-persp-px, 900px);
  touch-action: pan-y;
  cursor: grab;
}
.ac-carousel:active { cursor: grabbing; }
.ac-carousel:focus-visible { outline: 2px solid var(--ac-gold-bright); outline-offset: 4px; border-radius: 12px; }

.ac-ring {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translateZ(calc(-1 * var(--ac-radius-px, 170px))) rotateY(var(--ac-ring-deg, 0deg));
  transition: transform var(--ac-ring-dur, 1250ms) cubic-bezier(.65,0,.35,1);
}
@media (prefers-reduced-motion: reduce) {
  .ac-ring { transition: none; }
}

.ac-card {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(46%, 160px);
  height: min(82%, 160px);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  gap: 5px;
  text-align: center;
  background: linear-gradient(160deg in oklab, rgba(255,255,255,.14), rgba(255,255,255,.04));
  border: 1px solid color-mix(in oklab, var(--ac-bone) 32%, transparent);
  box-shadow: 0 16px 30px -16px rgba(0,0,0,.6);
  backdrop-filter: blur(2px);
  transform: rotateY(var(--ac-card-deg)) translateZ(var(--ac-radius-px, 170px));
  transition: filter 300ms ease-out, opacity 300ms ease-out;
  filter: blur(var(--ac-card-blur, 0px)) brightness(var(--ac-card-bright, 1));
  opacity: var(--ac-card-op, 1);
}
.ac-card-icon {
  width: 30px;
  height: 30px;
  margin: 0 auto 2px;
  color: var(--ac-gold-bright);
}
.ac-card-icon svg { width: 100%; height: 100%; display: block; }
.ac-card-icon svg path,
.ac-card-icon svg circle {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.ac-card.is-front .ac-card-icon svg path,
.ac-card.is-front .ac-card-icon svg circle {
  @media (prefers-reduced-motion: no-preference) {
    animation: ac-draw 700ms ease-out forwards;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ac-card-icon svg path,
  .ac-card-icon svg circle { stroke-dashoffset: 0; }
}
@keyframes ac-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.ac-card-word {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: 18px;
  color: var(--ac-bone);
}
.ac-card-sub {
  font-family: Inter, sans-serif;
  font-weight: 300;
  font-size: 11.5px;
  line-height: 1.35;
  color: color-mix(in oklab, var(--ac-bone) 75%, transparent);
  /* The full sentence lives, unclamped, in the big synced headline/subline
     below (the real copy) and in the slide's accessible name -- this tiny
     in-ring card is a glanceable preview, so 2 lines + ellipsis is enough
     and keeps every card the same predictable height regardless of which
     of the 6 sentences is the longest. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ac-ad-slot[data-shape="compact"] .ac-card-sub { display: none; }

.ac-car-nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--ac-bone) 30%, transparent);
  background: rgba(0,0,0,.3);
  color: var(--ac-bone);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.ac-car-nav:hover { background: rgba(0,0,0,.5); }
.ac-car-nav:focus-visible { outline: 2px solid var(--ac-gold-bright); outline-offset: 2px; }
.ac-car-nav svg { width: 13px; height: 13px; }
.ac-car-prev { left: -2px; }
.ac-car-next { right: -2px; }
.ac-ad-slot[data-shape="compact"] .ac-car-nav,
.ac-ad-slot[data-shape="tall"] .ac-car-nav { display: none; }

.ac-visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ---------- Container-query shape fallback for browsers without
   container query support: safe default is "tall" (stacked), which is
   also the mobile default, so the no-JS/no-CQ fallback simply looks
   like the mobile layout everywhere. JS sets data-shape explicitly once
   it measures the real box, overriding this. ---------- */
@container (min-width: 560px) {
  .ac-ad-slot:not([data-shape]) .ac-stage { flex-direction: row; }
}

/* ---------- Short-and-wide compaction (e.g. the 970x250 billboard size):
   same "wide" text-left/carousel-right arrangement, but with only ~190px
   of block-size to work with, the eyebrow body line and the inter-line
   gaps have to give way before anything clips or collides. ---------- */
@container (max-height: 210px) {
  .ac-stage { padding-block: clamp(8px, 2cqb, 14px); gap: 14px; }
  .ac-copy { gap: 4px; }
  .ac-eyebrow-text { display: none; }
  .ac-headline { font-size: clamp(20px, 7cqb, 30px); margin-bottom: 2px; }
  .ac-subline { display: none; }
  .ac-cta { padding: 8px 16px; }
}

/* ---------- Business-page placement: beside the claim-your-business box on
   desktop/tablet, full-width below it narrower (spec: "directly below
   (desktop: beside)"). Wraps the page's existing, untouched claim-slot div
   -- this file only adds the row layout, never restyles .claim-banner
   itself. ---------- */
.ac-placement-row {
  display: flex;
  gap: 22px;
  align-items: stretch;
  margin-top: 18px;
  margin-bottom: 28px;
}
.ac-placement-row .claim-banner { margin: 0; flex: 0 0 300px; display: flex; align-items: center; }
.ac-placement-row .verified-badge { margin: 0; flex: 0 0 300px; display: flex; align-items: center; }
.ac-placement-row .ac-ad-slot { flex: 1 1 auto; margin: 0; }
@media (max-width: 860px) {
  .ac-placement-row { flex-direction: column; }
  .ac-placement-row .claim-banner,
  .ac-placement-row .verified-badge { flex: none; }
}

