/* ============================================================
   Worx | components.css
   Buttons, cards, grids, testimonials, FAQ, forms, marquee.
   ============================================================ */

/* ---- Buttons ----------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 24px rgba(229, 125, 35, 0.22);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--accent-2);
  box-shadow: 0 14px 36px rgba(250, 167, 25, 0.35);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  background: rgba(250, 167, 25, 0.06);
}

/* ---- Home hero --------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 130px 0 90px;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero h1 {
  max-width: 13ch;
}

.hero .tagline {
  margin-top: 26px;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  max-width: 540px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

/* Three.js layered-ridge backdrop (static/js/hero-background.js).
   The CSS blobs below stay visible, and keep doing their own GSAP
   scroll parallax, until this script confirms WebGL is ready, so a
   blocked CDN or unsupported browser never shows an empty hero. */
.hero-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

.hero.hero-bg-ready .hero-bg-canvas {
  opacity: 1;
}

.hero.hero-bg-ready .hero-blob {
  opacity: 0;
}

/* Animated gradient blobs behind the hero */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 1s ease;
}

.hero-blob--amber {
  width: 560px;
  height: 560px;
  background: var(--accent-2);
  top: -140px;
  right: -140px;
  opacity: 0.22;
}

.hero-blob--ember {
  width: 460px;
  height: 460px;
  background: var(--accent-deep);
  bottom: -180px;
  left: -120px;
  opacity: 0.28;
}

/* Brand tile floating on the right of the hero */
.hero-art {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(200px, 24vw, 340px);
  z-index: 1;
  pointer-events: none;
}

.hero-art img {
  width: 100%;
  height: auto;
  border-radius: 14%;
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(254, 238, 207, 0.08);
  transform: rotate(-6deg);
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 12% -10% -14% 10%;
  z-index: -1;
  border-radius: 14%;
  border: 1px solid rgba(250, 167, 25, 0.35);
  transform: rotate(4deg);
}

/* Three.js gem, sits in the same tilted frame as the fallback tile.
   The PNG stays underneath and visible until hero-scene.js confirms
   WebGL initialised, so a blocked CDN / no-WebGL browser never shows
   an empty frame. */
.hero-art--3d {
  aspect-ratio: 1 / 1;
}

.hero-art--3d .hero-art-fallback,
.hero-art--3d .hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.6s ease;
}

.hero-art--3d .hero-canvas {
  opacity: 0;
  border-radius: 14%;
  transform: rotate(-6deg);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(254, 238, 207, 0.08);
}

.hero-art--3d.is-ready .hero-art-fallback {
  opacity: 0;
}

.hero-art--3d.is-ready .hero-canvas {
  opacity: 1;
}

@media (max-width: 980px) {
  .hero {
    padding-top: 120px;
    padding-bottom: 80px;
  }

  .hero-art {
    position: static;
    transform: none;
    width: 112px;
    margin-bottom: 36px;
  }

  .hero-art img {
    transform: rotate(-4deg);
  }

  .hero-art--3d .hero-canvas {
    transform: rotate(-4deg);
  }

  .hero-art::after {
    display: none;
  }
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Stats row --------------------------------------------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-block: 1px solid var(--line);
  padding-block: 48px;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- Card grids (services, blog, values) ------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 980px) {
  .card-grid,
  .card-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .card-grid,
  .card-grid--2,
  .card-grid--4 {
    grid-template-columns: 1fr;
  }
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(26px, 3vw, 32px) clamp(22px, 2.6vw, 28px);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s ease, background 0.35s ease;
}

/* Hover: the site's one hover language, a hairline of the brand
   gradient fading in around the card (a masked ring, so it follows
   the rounded corners), with a small, calm lift. */
.card::after,
.project-card::after,
.cta-band::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 1;
  padding: 1px;
  border-radius: inherit;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.card:hover::after,
.card:focus-within::after,
.project-card:hover::after,
.project-card:focus-within::after {
  opacity: 1;
}

.card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  background: var(--surface-2);
}

.card .card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-radius: 12px;
  font-size: 1.35rem;
  background: rgba(229, 125, 35, 0.12);
  border: 1px solid rgba(229, 125, 35, 0.25);
}

.card h3 {
  margin-bottom: 12px;
}

.card p {
  font-size: 0.95rem;
}

.card .card-link {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-2);
}

/* ---- Portfolio --------------------------------------------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

@media (max-width: 820px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 3.4vw, 36px) clamp(22px, 3vw, 32px);
  background: var(--surface);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s ease;
}

.project-card > * {
  position: relative;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.project-card:hover::before {
  opacity: 0.06;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 14px;
}

.project-card h3 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 14px;
}

.project-card p {
  font-size: 0.96rem;
}

/* ---- Client logo marquee ----------------------------------- */

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: 34px;
}

.marquee-track {
  display: flex;
  gap: 72px;
  width: max-content;
  /* Animated via GSAP in static/js/animations.js;
     falls back to CSS animation when reduced motion is off. */
}

.marquee-track span {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0.75;
}

/* ---- Process / sequence ------------------------------------ */

.sequence {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  counter-reset: step;
}

@media (max-width: 980px) {
  .sequence {
    grid-template-columns: repeat(2, 1fr);
  }
}

.sequence li {
  counter-increment: step;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 16px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.sequence li::before {
  content: "0" counter(step);
  display: block;
  font-size: 1.3rem;
  margin-bottom: 10px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sequence li:hover {
  border-color: var(--accent);
  background: rgba(229, 125, 35, 0.06);
}

/* ---- Testimonials ------------------------------------------ */

.quote-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
}

.quote-card blockquote {
  font-size: 1.02rem;
  color: var(--text);
  margin-bottom: 22px;
}

.quote-card blockquote::before {
  content: "“";
  display: block;
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.quote-card cite {
  font-style: normal;
  font-size: 0.88rem;
  color: var(--muted);
}

.quote-card cite strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
}

/* ---- FAQ accordion ----------------------------------------- */

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 26px 4px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
}

.faq-question .faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1rem;
  color: var(--accent-2);
  transition: transform 0.3s ease;
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-answer p {
  padding: 0 4px 26px;
  max-width: 70ch;
  font-size: 0.97rem;
}

/* ---- CTA band ---------------------------------------------- */

.cta-band {
  position: relative;
  border: 1px solid rgba(229, 125, 35, 0.25);
  border-radius: calc(var(--radius) * 1.5);
  padding: clamp(48px, 7vw, 90px);
  text-align: center;
  overflow: hidden;
  background: var(--panel);
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 50% 120%, rgba(250, 167, 25, 0.35), transparent 60%);
  pointer-events: none;
}

/* A quiet, permanent gradient edge on the band itself (inset 0,
   because the band's overflow clip would hide a ring on the border) */
.cta-band {
  border-color: transparent;
}

.cta-band::after {
  inset: 0;
  opacity: 0.5;
}

.cta-band > * {
  position: relative;
  z-index: 2;
}

.cta-band h2 {
  text-wrap: balance;
}

.cta-band p {
  max-width: 520px;
  margin: 18px auto 34px;
  text-wrap: pretty;
}

/* Primary actions inside the CTA band and the contact planner speak
   the same language as the header's "Quick Enquiry": the brand
   gradient, calm, and on hover it goes dark keeping only the edge. */
.cta-band .btn-primary,
.cw .btn-primary {
  position: relative;
  isolation: isolate;
  justify-content: center;
  min-height: 48px;
  background: var(--gradient);
  color: var(--on-accent);
  box-shadow: 0 12px 30px -14px rgba(229, 125, 35, 0.8);
  transition: color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

.cta-band .btn-primary::before,
.cw .btn-primary::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background: var(--ink);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.cta-band .btn-primary:hover,
.cta-band .btn-primary:focus-visible,
.cw .btn-primary:hover,
.cw .btn-primary:focus-visible {
  transform: none;
  background: var(--gradient);
  color: var(--text);
  box-shadow: 0 12px 30px -14px rgba(229, 125, 35, 0.5);
}

.cta-band .btn-primary:hover::before,
.cta-band .btn-primary:focus-visible::before,
.cw .btn-primary:hover::before,
.cw .btn-primary:focus-visible::before {
  opacity: 1;
}

.cw .btn-primary:disabled {
  opacity: 0.6;
  cursor: progress;
}

.cw .btn-primary:disabled::before {
  opacity: 0;
}

.cw .btn-ghost {
  min-height: 48px;
  justify-content: center;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

/* Interior pages (service details, contact): sections that follow
   one another share one gap instead of stacking two full paddings. */
.page-hero ~ .section + .section {
  padding-top: calc(var(--section-pad) * 0.55);
}

.page-hero h1 {
  text-wrap: balance;
}

.page-hero p {
  text-wrap: pretty;
}

.section-head h2 {
  text-wrap: balance;
}

.card h3,
.project-card h3 {
  text-wrap: balance;
}

/* ---- Contact details (below the questionnaire) -------------- */

.contact-detail {
  display: flex;
  gap: 16px;
  margin-bottom: 26px;
}

.contact-detail:last-child {
  margin-bottom: 0;
}

.contact-detail .label {
  flex: none;
  min-width: 104px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  padding-top: 4px;
}

.contact-detail p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-detail a {
  display: inline-block;
  padding-block: 10px;
  margin-block: -10px;
  background: linear-gradient(var(--accent-2), var(--accent-2)) 0 calc(100% - 8px) / 0 1px no-repeat;
  transition: color 0.3s ease, background-size 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-detail a:hover,
.contact-detail a:focus-visible {
  color: var(--accent-2);
  background-size: 100% 1px;
}

@media (max-width: 420px) {
  .contact-detail {
    flex-direction: column;
    gap: 4px;
  }
}

/* ---- Blog article ------------------------------------------ */

.article-body {
  max-width: 720px;
}

.article-body h2 {
  font-size: 1.6rem;
  margin: 44px 0 16px;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body ul {
  list-style: disc;
  padding-left: 22px;
  color: var(--muted);
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 16px;
}

/* ---- Quick contact dock ---------------------------------------
   A floating WhatsApp beacon that travels with the viewport on every
   page, and the Mission Control console the site's CTAs open
   (static/js/contact-widget.js builds both from one data object). The console: the site's HUD
   glass with the relay's bar and Dubai clock, a status line, Marwan's
   call (WhatsApp), the channels as numbered log rows, and a quick
   transmission form. */

@property --qc-hov {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

.qc-dock {
  position: fixed;
  right: clamp(16px, 4vw, 32px);
  bottom: clamp(16px, 4vw, 32px);
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

/* ---- the WhatsApp beacon -------------------------------------- */
/* A dark glass puck holding a core in the brand gradient. Round it:
   a signal halo sweeping, a satellite on a tilted orbit, pings going
   out. It docks in with a flare when it first appears, buzzes now and
   then like an incoming call, and under the pointer a pill slides out
   to its left with the crew's status and Dubai's clock.
   The link itself never changes size: the pill is a clipped layer
   that opens leftwards, so the orb stays exactly under the pointer
   and hover never flickers. Every hover change is a plain transition
   on transform, opacity or clip-path; no running animation is
   retimed mid-spin. */
.qc-wa-wrap {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.qc-wa {
  --wa-h: 70px;
  --wa-orb: 56px;
  --wa-ease: cubic-bezier(0.2, 0.9, 0.2, 1);
  position: relative;
  isolation: isolate;
  display: block;
  width: var(--wa-h);
  height: var(--wa-h);
  border-radius: 50%;
  color: var(--brand-cream);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transform: translateY(26px) scale(0.6);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s var(--wa-ease), opacity 0.3s ease;
}

.qc-dock.is-ready .qc-wa {
  transform: none;
  opacity: 1;
  pointer-events: auto;
  animation: qc-wa-dock 1.1s var(--wa-ease) both;
}

.qc-wa:focus-visible { outline: none; }

/* arriving: falls in from the dark, overshoots, settles, the flare
   blooms behind it */
@keyframes qc-wa-dock {
  0% { transform: translateY(60px) scale(0.3) rotate(-35deg); opacity: 0; filter: blur(8px) brightness(2); }
  55% { transform: translateY(-8px) scale(1.08) rotate(6deg); opacity: 1; filter: blur(0) brightness(1.4); }
  75% { transform: translateY(2px) scale(0.97) rotate(-2deg); filter: none; }
  100% { transform: none; opacity: 1; filter: none; }
}

/* the glow behind the orb: the arrival flare, and a steady bloom
   while hovered */
.qc-wa::after {
  content: "";
  position: absolute;
  right: calc(var(--wa-h) / 2 - 80px);
  top: 50%;
  z-index: -1;
  width: 160px;
  height: 160px;
  margin-top: -80px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(250, 167, 25, 0.5), rgba(229, 125, 35, 0.14) 35%, transparent 65%);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.5s ease, transform 0.6s var(--wa-ease);
}

.qc-dock.is-ready .qc-wa::after { animation: qc-wa-flare 1.3s ease-out 0.35s; }

@keyframes qc-wa-flare {
  0% { opacity: 0; transform: scale(0.2); }
  30% { opacity: 1; transform: scale(1.3); }
  100% { opacity: 0; transform: scale(1.8); }
}

/* the glass: a puck at rest, a pill when opened */
.qc-wa-shell {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 calc(var(--wa-h) + 2px) 0 24px;
  border-radius: 999px;
  background:
    radial-gradient(ellipse 60% 140% at 100% 50%, rgba(229, 125, 35, 0.22), transparent 70%),
    repeating-linear-gradient(0deg, rgba(254, 238, 207, 0.025) 0 1px, transparent 1px 3px),
    rgba(14, 6, 3, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(250, 167, 25, 0.28),
    inset 0 1px 0 rgba(254, 238, 207, 0.08);
  clip-path: inset(0 0 0 calc(100% - var(--wa-h)) round calc(var(--wa-h) / 2));
  transition: clip-path 0.55s var(--wa-ease);
  will-change: clip-path;
}

.qc-wa-txt {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  line-height: 1;
  white-space: nowrap;
  text-align: left;
  opacity: 0;
  transform: translateX(14px);
  transition: opacity 0.2s ease, transform 0.45s var(--wa-ease);
}

.qc-wa-txt b {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.qc-wa-txt small {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(254, 238, 207, 0.72);
  font-variant-numeric: tabular-nums;
}

.qc-wa-txt small i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px 1px rgba(229, 125, 35, 0.9);
  animation: qc-live 1.4s ease-in-out infinite;
}

/* the orb: core, halo, orbit, pings; pinned to the puck's centre */
.qc-wa-orb {
  position: absolute;
  top: calc((var(--wa-h) - var(--wa-orb)) / 2);
  right: calc((var(--wa-h) - var(--wa-orb)) / 2);
  width: var(--wa-orb);
  height: var(--wa-orb);
  transition: transform 0.5s var(--wa-ease);
}

.qc-wa-core {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.5), transparent 32%),
    var(--gradient);
  box-shadow:
    0 10px 26px -8px rgba(229, 125, 35, 0.9),
    inset 0 -6px 14px -4px rgba(66, 29, 15, 0.7),
    inset 0 2px 0 rgba(255, 255, 255, 0.35);
  animation: qc-wa-ring 7s ease-in-out 3.5s infinite;
}

.qc-wa-core svg {
  width: 29px;
  height: 29px;
  fill: #fff;
  filter: drop-shadow(0 2px 3px rgba(66, 29, 15, 0.55));
  transition: transform 0.5s var(--wa-ease);
}

/* an incoming call: a short buzz, then quiet */
@keyframes qc-wa-ring {
  0%, 84%, 100% { transform: none; }
  86% { transform: rotate(-14deg) scale(1.06); }
  88% { transform: rotate(12deg) scale(1.06); }
  90% { transform: rotate(-10deg) scale(1.06); }
  92% { transform: rotate(8deg) scale(1.03); }
  94% { transform: rotate(-4deg); }
}

/* the halo: a signal arc sweeping round the core, one steady speed */
.qc-wa-halo {
  position: absolute;
  inset: -4px;
  z-index: 2;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 55%, rgba(250, 167, 25, 0.15) 70%, rgba(254, 238, 207, 0.95) 88%, transparent 90%);
  -webkit-mask: radial-gradient(circle, transparent calc(50% - 3px), #000 calc(50% - 2px));
  mask: radial-gradient(circle, transparent calc(50% - 3px), #000 calc(50% - 2px));
  opacity: 0.75;
  transition: opacity 0.4s ease;
  animation: qc-sweep 2.8s linear infinite;
}

@keyframes qc-sweep { to { transform: rotate(360deg); } }

/* a ring going out (the console's call beacon) */
@keyframes qc-ping {
  0% { transform: scale(1); opacity: 0.9; }
  45%, 100% { transform: scale(1.7); opacity: 0; }
}

/* the orbit: a tilted ring with a satellite riding it */
.qc-wa-orbit {
  position: absolute;
  inset: -11px;
  z-index: 1;
  border-radius: 50%;
  border: 1px dashed rgba(250, 167, 25, 0.24);
  transform: rotateX(64deg) rotateZ(0deg);
  transition: border-color 0.4s ease;
  animation: qc-wa-orbit 9s linear infinite;
}

.qc-wa-orbit b {
  position: absolute;
  left: 50%;
  top: -3px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--brand-cream);
  box-shadow: 0 0 8px 2px rgba(250, 167, 25, 0.95), 0 0 18px 4px rgba(229, 125, 35, 0.5);
}

@keyframes qc-wa-orbit {
  from { transform: rotateX(64deg) rotateZ(0deg); }
  to { transform: rotateX(64deg) rotateZ(360deg); }
}

/* the pings: signal leaving the beacon */
.qc-wa-ping {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 50%;
  border: 2px solid rgba(229, 125, 35, 0.7);
  opacity: 0;
  animation: qc-wa-ping 3.2s cubic-bezier(0.2, 0.6, 0.3, 1) 1.2s infinite;
}

.qc-wa-ping + .qc-wa-ping { animation-delay: 2.3s; }

@keyframes qc-wa-ping {
  0% { transform: scale(1); opacity: 0.85; }
  60%, 100% { transform: scale(2.1); opacity: 0; border-width: 0.5px; }
}

/* opened: by the pointer (on devices that hover) or the keyboard */
@media (hover: hover) {
  .qc-wa:hover .qc-wa-shell { clip-path: inset(0 0 0 0 round calc(var(--wa-h) / 2)); }
  .qc-wa:hover .qc-wa-txt { opacity: 1; transform: none; transition-delay: 0.1s, 0.06s; }
  .qc-wa:hover .qc-wa-orb { transform: scale(1.06); }
  .qc-wa:hover .qc-wa-core svg { transform: rotate(-12deg); }
  .qc-wa:hover .qc-wa-halo { opacity: 1; }
  .qc-wa:hover .qc-wa-orbit { border-color: rgba(250, 167, 25, 0.5); }
  .qc-wa:hover::after { opacity: 0.55; transform: scale(1); }
}

.qc-wa:focus-visible .qc-wa-shell { clip-path: inset(0 0 0 0 round calc(var(--wa-h) / 2)); }
.qc-wa:focus-visible .qc-wa-txt { opacity: 1; transform: none; }
.qc-wa:focus-visible .qc-wa-orb { transform: scale(1.06); }
.qc-wa:focus-visible .qc-wa-halo { opacity: 1; }
.qc-wa:focus-visible::after { opacity: 0.55; transform: scale(1); }

/* the incoming message: the crew types, then speaks */
.qc-wa-bubble {
  position: absolute;
  right: 4px;
  bottom: calc(100% + 16px);
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: max-content;
  max-width: min(270px, calc(100vw - 40px));
  padding: 12px 16px 12px 12px;
  border: 1px solid rgba(250, 167, 25, 0.22);
  border-radius: 18px 18px 5px 18px;
  background:
    radial-gradient(ellipse 80% 100% at 0% 0%, rgba(229, 125, 35, 0.16), transparent 70%),
    rgba(14, 6, 3, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.85), 0 0 30px -12px rgba(229, 125, 35, 0.5);
  color: var(--brand-cream);
  text-decoration: none;
  transform-origin: bottom right;
  transform: translateY(10px) scale(0.85);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.3, 1.4, 0.5, 1), opacity 0.25s ease;
}

.qc-wa-wrap.is-typing .qc-wa-bubble,
.qc-wa-wrap.is-talking .qc-wa-bubble {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

/* the sender: the Worx tile (logo-dark.png cropped to its orange
   square), flipping in as the message arrives, a light pass across
   it now and then, an amber signal running round its frame */
@property --qc-ang {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.qc-wa-bubble-face {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  perspective: 240px;
}

/* the frame: an amber arc chasing round the tile */
.qc-wa-bubble-face::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 13px;
  padding: 1.5px;
  background: conic-gradient(from var(--qc-ang), rgba(250, 167, 25, 0.12) 0 60%, rgba(254, 238, 207, 0.95) 80%, var(--brand-amber) 88%, rgba(250, 167, 25, 0.12) 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: qc-wa-frame 3s linear infinite;
}

@keyframes qc-wa-frame { to { --qc-ang: 360deg; } }

.qc-wa-bubble-tile {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 8px 18px -6px rgba(229, 125, 35, 0.75), inset 0 0 0 1px rgba(254, 238, 207, 0.12);
  transform-style: preserve-3d;
}

/* the logo is taller than the tile: keep only the orange square */
.qc-wa-bubble-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* the light pass */
.qc-wa-bubble-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 246, 225, 0.7) 50%, transparent 65%) -150% 0 / 250% 100% no-repeat;
  animation: qc-wa-sheen 4.5s ease-in-out 1.2s infinite;
}

@keyframes qc-wa-sheen {
  0% { background-position: 150% 0; }
  30%, 100% { background-position: -150% 0; }
}

.qc-wa-wrap.is-typing .qc-wa-bubble-tile { animation: qc-wa-tile-in 0.9s cubic-bezier(0.2, 0.9, 0.2, 1) both; }

@keyframes qc-wa-tile-in {
  0% { transform: rotateY(-110deg) scale(0.6); opacity: 0; }
  60% { transform: rotateY(14deg) scale(1.06); opacity: 1; }
  100% { transform: none; }
}

/* online */
.qc-wa-bubble-face i {
  position: absolute;
  right: -3px;
  bottom: -3px;
  z-index: 1;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--brand-cream);
  box-shadow: 0 0 0 2px rgba(14, 6, 3, 0.95), 0 0 10px 2px rgba(250, 167, 25, 0.85);
  animation: qc-live 1.4s ease-in-out infinite;
}

.qc-wa-bubble-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.qc-wa-bubble-body small {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.qc-wa-typing {
  display: none;
  gap: 4px;
  padding: 4px 0 2px;
}

.qc-wa-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(254, 238, 207, 0.8);
  animation: qc-wa-dot 1s ease-in-out infinite;
}

.qc-wa-typing i:nth-child(2) { animation-delay: 0.15s; }
.qc-wa-typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes qc-wa-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.qc-wa-bubble-msg {
  display: none;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-line;
}

.qc-wa-wrap.is-typing .qc-wa-typing { display: inline-flex; }
.qc-wa-wrap.is-talking .qc-wa-bubble-msg { display: block; animation: qc-wa-say 0.5s ease-out both; }

@keyframes qc-wa-say {
  from { opacity: 0; transform: translateY(4px); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* while the console is open, the beacon sits back */
.qc-dock.is-open .qc-wa-bubble { display: none; }

/* ---- the console ----------------------------------------------- */
.qc-panel {
  position: relative;
  isolation: isolate;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 200px);
  overflow: auto;
  border: 1px solid rgba(254, 238, 207, 0.14);
  border-radius: 22px;
  background:
    repeating-linear-gradient(0deg, rgba(254, 238, 207, 0.022) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 90% 60% at 100% 0%, rgba(229, 125, 35, 0.16), transparent 60%),
    rgba(14, 6, 3, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(254, 238, 207, 0.06);
  transform-origin: bottom right;
  transform: translateY(16px) scale(0.96);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.135, 0.9, 0.15, 1), opacity 0.22s ease;
  scrollbar-width: thin;
}

.qc-dock.is-open .qc-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
  animation: qc-boot 0.7s steps(1, end);
}

@keyframes qc-boot {
  0% { opacity: 0; }
  15% { opacity: 0.8; }
  24% { opacity: 0.15; }
  38% { opacity: 1; }
}

/* the scan that passes down the glass as it opens */
.qc-panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 40%;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(250, 167, 25, 0.12), transparent);
  transform: translateY(-100%);
}

.qc-dock.is-open .qc-panel::after { animation: qc-scan 0.9s ease-out 0.15s; }

@keyframes qc-scan { to { transform: translateY(260%); } }

.qc-vf {
  --c: rgba(254, 238, 207, 0.45);
  position: absolute;
  inset: 52px 10px 10px;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 0 / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 1px 14px no-repeat;
}

.qc-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(254, 238, 207, 0.1);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: rgba(254, 238, 207, 0.6);
}

.qc-bar-id { flex: 1; }
.qc-bar-t { color: var(--accent-2); font-variant-numeric: tabular-nums; }

.qc-rec {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff4a32;
  box-shadow: 0 0 8px rgba(255, 74, 50, 0.8);
  animation: qc-rec 1.2s steps(2, jump-none) infinite;
}

@keyframes qc-rec { 50% { opacity: 0.15; } }

.qc-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 14px;
}

/* About's status line */
.qc-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.qc-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 6px 1px rgba(250, 167, 25, 0.65);
  animation: qc-live 1.4s ease-in-out infinite;
}

@keyframes qc-live { 50% { opacity: 0.25; } }

.qc-panel-head h3 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.qc-panel-head p:not(.qc-status) {
  margin-top: 6px;
  font-size: 0.86rem;
  color: rgba(254, 238, 207, 0.68);
}

.qc-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(254, 238, 207, 0.2);
  border-radius: 10px;
  background: rgba(21, 9, 5, 0.6);
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.qc-close:hover,
.qc-close:focus-visible { border-color: var(--accent-2); color: var(--accent-2); outline: none; }

/* the console's call, first: open the channel (the contact page) */
.qc-call {
  --qc-hov: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 18px 6px;
  height: 58px;
  padding: 0 8px 0 6px;
  border-radius: 999px;
  color: var(--on-accent);
  background: var(--gradient);
  box-shadow: 0 14px 30px -16px rgba(229, 125, 35, 0.9), inset 0 1px 0 rgba(254, 238, 207, 0.45);
  transition: --qc-hov 0.5s cubic-bezier(0.135, 0.9, 0.15, 1), box-shadow 0.3s ease;
}

.qc-call:hover,
.qc-call:focus-visible { --qc-hov: 1; outline: none; box-shadow: 0 18px 36px -14px rgba(229, 125, 35, 1), 0 0 0 1px rgba(250, 167, 25, 0.6), inset 0 1px 0 rgba(254, 238, 207, 0.55); }

/* its beacon: an amber core in a dark well, pinging */
.qc-call-beacon {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #140804;
  box-shadow: inset 0 0 0 1px rgba(250, 167, 25, 0.4), 0 0 0 2px rgba(21, 9, 5, 0.6);
}

.qc-call-beacon i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #faa719;
  box-shadow: 0 0 10px 2px rgba(250, 167, 25, 0.9);
  transform: scale(calc(1 + var(--qc-hov) * 0.3));
  animation: qc-live 1.4s ease-in-out infinite;
}

.qc-call-beacon::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(250, 167, 25, 0.8);
  animation: qc-ping 2.6s ease-out infinite;
}

.qc-call-face {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(21, 9, 5, 0.85), 0 0 0 calc(3px + var(--qc-hov) * 2px) rgba(254, 238, 207, 0.55);
}

.qc-call-face img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.qc-call-face i {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(21, 9, 5, 0.9), 0 0 8px 1px rgba(250, 167, 25, 0.85);
  animation: qc-live 1.4s ease-in-out infinite;
}

.qc-call-txt { display: flex; flex-direction: column; gap: 4px; line-height: 1; flex: 1; }

.qc-call-txt small {
  position: relative;
  display: block;
  height: 1.1em;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(26, 10, 4, 0.66);
}

.qc-call-txt small span { display: block; transform: translateY(calc(var(--qc-hov) * -100%)); }
.qc-call-txt small span + span { position: absolute; left: 0; top: 100%; }
.qc-call-txt b { font-family: var(--font-display); font-size: 1rem; font-weight: 600; white-space: nowrap; }

.qc-call-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(21, 9, 5, 0.9);
  box-shadow: inset 0 0 0 1px rgba(250, 167, 25, 0.3);
}

.qc-call-arrow svg { width: 16px; height: 16px; fill: none; stroke: var(--accent-2); stroke-width: 1.9; transform: translateX(calc(var(--qc-hov) * 3px)); }

/* the channels as numbered log rows */
.qc-channels {
  padding: 8px 18px 12px;
}

.qc-channel {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(254, 238, 207, 0.08);
  border-radius: 10px;
  transition: background 0.25s ease, padding 0.35s cubic-bezier(0.135, 0.9, 0.15, 1);
}

.qc-channel:last-child { border-bottom: 0; }

.qc-channel:hover,
.qc-channel:focus-visible {
  padding-left: 14px;
  background: linear-gradient(90deg, rgba(250, 167, 25, 0.12), transparent);
  outline: none;
}

.qc-channel:hover::before,
.qc-channel:focus-visible::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 2px;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2);
}

.qc-channel .qc-ico {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: rgba(254, 238, 207, 0.4);
}

.qc-channel:hover .qc-ico { color: var(--accent-2); }

.qc-channel-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.qc-channel .qc-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.qc-channel .qc-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  color: var(--text);
}

.qc-go { font-size: 0.85rem; color: rgba(254, 238, 207, 0.4); transition: color 0.25s ease, transform 0.25s ease; }
.qc-channel:hover .qc-go { color: var(--accent-2); transform: translate(2px, -2px); }

/* the quick transmission */
.qc-form {
  position: relative;
  padding: 16px 22px 22px;
  border-top: 1px solid rgba(254, 238, 207, 0.1);
  display: grid;
  gap: 12px;
}

.qc-form::before {
  content: "QUICK TRANSMISSION";
  position: absolute;
  left: 22px;
  top: -7px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.24em;
  color: var(--accent-2);
  background: #110603;
}

.qc-form label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(254, 238, 207, 0.55);
}

.qc-form input,
.qc-form textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(21, 9, 5, 0.7);
  border: 1px solid rgba(254, 238, 207, 0.12);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.qc-form input:focus,
.qc-form textarea:focus {
  outline: none;
  border-color: rgba(250, 167, 25, 0.7);
  background: rgba(30, 13, 7, 0.9);
  box-shadow: 0 0 0 3px rgba(229, 125, 35, 0.16), 0 0 24px -8px rgba(250, 167, 25, 0.6);
}

.qc-send {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 50px;
  border: 1px solid rgba(250, 167, 25, 0.45);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(250, 167, 25, 0.12), rgba(229, 125, 35, 0.04)), rgba(21, 9, 5, 0.7);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.qc-send:hover,
.qc-send:focus-visible {
  outline: none;
  border-color: var(--accent-2);
  background: var(--gradient);
  color: var(--on-accent);
  box-shadow: 0 14px 30px -14px rgba(229, 125, 35, 0.9);
}

.qc-send-wave { display: inline-flex; align-items: center; gap: 3px; height: 16px; }

.qc-send-wave i {
  width: 2px;
  height: 100%;
  border-radius: 2px;
  background: currentColor;
  animation: qc-talk 1.2s ease-in-out infinite;
}

.qc-send-wave i:nth-child(2) { animation-delay: -0.2s; }
.qc-send-wave i:nth-child(3) { animation-delay: -0.45s; }
.qc-send-wave i:nth-child(4) { animation-delay: -0.7s; }
.qc-send-wave i:nth-child(5) { animation-delay: -0.95s; }

@keyframes qc-talk {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(0.9); }
}

.qc-note {
  min-height: 1.1em;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--accent-2);
}

/* short screens (phones on their side): the beacon alone, smaller, so
   it never sits over half the content */
@media (max-height: 500px) {
  .qc-wa { --wa-h: 56px; --wa-orb: 46px; }
  .qc-wa-core svg { width: 24px; height: 24px; }
  .qc-wa-bubble { display: none; }
  .qc-panel { max-height: calc(100vh - 90px); }
}

/* Phones: full-width bottom sheet, the beacon alone */
@media (max-width: 480px) {
  .qc-dock {
    left: 16px;
    right: 16px;
    align-items: stretch;
  }

  .qc-panel {
    width: 100%;
  }

  .qc-wa-wrap {
    align-self: flex-end;
  }

  .qc-wa {
    --wa-h: 64px;
    --wa-orb: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qc-wa,
  .qc-wa-bubble,
  .qc-wa-shell,
  .qc-wa-txt,
  .qc-wa-orb,
  .qc-panel {
    transition: opacity 0.15s ease;
    transform: none;
  }

  .qc-dock.is-open .qc-panel,
  .qc-dock.is-ready .qc-wa,
  .qc-wa-wrap.is-typing .qc-wa-bubble,
  .qc-wa-wrap.is-talking .qc-wa-bubble {
    transform: none;
  }

  .qc-dock.is-ready .qc-wa, .qc-dock.is-ready .qc-wa::after, .qc-wa-core, .qc-wa-halo, .qc-wa-orbit, .qc-wa-ping,
  .qc-wa-typing i, .qc-wa-txt small i, .qc-wa-bubble-msg, .qc-wa-bubble-face::before, .qc-wa-bubble-face i,
  .qc-wa-bubble-tile, .qc-wa-bubble-tile::after, .qc-rec, .qc-status::before,
  .qc-call-face i, .qc-call-beacon i, .qc-call-beacon::after, .qc-send-wave i, .qc-dock.is-open .qc-panel, .qc-dock.is-open .qc-panel::after { animation: none !important; }
}

/* ---- Contact planner ------------------------------------------
   Built by static/js/contact.js into #contact-wizard: five short
   questions, one at a time, answered with interactive cards and
   plain language rather than a technical spec sheet. Reuses the
   tokens above; .cw-* is self-contained so it never leaks into
   the rest of the site. */

.cw-fallback {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

.cw-fallback a {
  color: var(--accent-2);
}

.cw {
  margin-top: 4px;
}

/* Header: progress + step counter + start over */
.cw-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.cw-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--gradient);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.cw-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  margin-top: 4px;
}

.cw-step-count {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent-2);
}

.cw-startover {
  min-height: 44px;
  padding-inline: 4px;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.25s ease;
}

.cw-startover:hover,
.cw-startover:focus-visible {
  color: var(--text);
}

.cw-startover[hidden] {
  display: none;
}

/* Screen-reader live region */
.cw-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Resume banner */
.cw-resume {
  margin-top: 24px;
  padding: 20px 22px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.cw-resume p {
  color: var(--text);
  font-size: 0.96rem;
}

.cw-resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.cw-resume-actions .btn {
  padding: 10px 22px;
  font-size: 0.9rem;
}

/* One question at a time, in a single centred column */
.cw-stage {
  max-width: 640px;
  margin-top: 32px;
}

/* Question 1 only: let its card row use the full page width. */
.cw-stage--wide {
  max-width: none;
}

.cw-form {
  min-width: 0;
}

.cw-step {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  animation: cw-fade 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cw-fade {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* Answer cards settle in just behind their question */
.cw-step .cw-option {
  animation: cw-fade 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cw-step .cw-option:nth-child(2) { animation-delay: 0.04s; }
.cw-step .cw-option:nth-child(3) { animation-delay: 0.08s; }
.cw-step .cw-option:nth-child(4) { animation-delay: 0.12s; }
.cw-step .cw-option:nth-child(5) { animation-delay: 0.16s; }
.cw-step .cw-option:nth-child(6) { animation-delay: 0.2s; }
.cw-step .cw-option:nth-child(7) { animation-delay: 0.24s; }

.cw-legend {
  padding: 0;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
}

.cw-legend:focus:not(:focus-visible) {
  outline: none;
}

.cw-hint {
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Interactive answer cards, used in place of plain radio buttons */
.cw-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* When a card group has an odd number of options, don't leave the
   last one dangling alone on the left, let it span the full row. */
.cw-options .cw-option:nth-child(odd):last-child {
  grid-column: 1 / -1;
}

/* Question 2 (what it should achieve): a little extra breathing room
   between its cards. */
.cw-options--goal {
  gap: 16px;
}

@media (max-width: 560px) {
  .cw-options {
    grid-template-columns: 1fr;
  }
}

/* Question 1: four cards across the full width, "Not sure yet" on its
   own row underneath, aligned left at the same width as the cards above. */
.cw-options--build {
  grid-template-columns: repeat(4, 1fr);
}

.cw-options--build .cw-option:last-child {
  grid-column: 1 / -1;
  justify-self: start;
  width: calc(25% - 9px);
}

@media (max-width: 860px) {
  .cw-options--build {
    grid-template-columns: repeat(2, 1fr);
  }

  .cw-options--build .cw-option:last-child {
    width: calc(50% - 6px);
  }
}

@media (max-width: 560px) {
  .cw-options--build {
    grid-template-columns: 1fr;
  }

  .cw-options--build .cw-option:last-child {
    grid-column: auto;
    width: 100%;
  }
}

.cw-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.3s ease, background 0.3s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Same gradient hairline as the rest of the site: on hover it fades
   in, once picked it stays */
.cw-option::after {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cw-option:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
}

.cw-option:hover::after {
  opacity: 0.7;
}

.cw-option:has(input:focus-visible) {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.cw-option.is-selected {
  border-color: transparent;
  background: rgba(229, 125, 35, 0.1);
}

.cw-option.is-selected::after {
  opacity: 1;
}

/* A small ring marks the choice, filling with the gradient once picked */
.cw-option-body::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.cw-option-body {
  padding-right: 28px;
}

.cw-option.is-selected .cw-option-body::before {
  border-color: var(--accent-2);
  background: var(--gradient);
  box-shadow: inset 0 0 0 3px var(--surface-2);
}

.cw-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.cw-option-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cw-option-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
}

.cw-option-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Soft panel for the open idea field. Capped at a comfortable reading/
   typing width even when it sits inside the wide Q1 stage. */
.cw-followup {
  max-width: 640px;
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.16);
}

.cw-followup-title {
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.cw-followup .cw-hint {
  margin-top: 0;
}

/* A lightweight conditional reveal (e.g. the "Something else" detail) */
.cw-reveal {
  margin-top: 18px;
  animation: cw-fade 0.3s ease both;
}

/* Company / Personal field groups on the final step */
.cw-field-group + .cw-field-group {
  margin-top: 28px;
}

.cw-field-group-title {
  margin-bottom: 14px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.cw-field + .cw-field {
  margin-top: 14px;
}

.cw-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.cw-input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: max(16px, 1em); /* never below 16px: no iOS focus zoom */
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease,
    background 0.25s ease;
}

.cw-input::placeholder {
  color: rgba(196, 171, 148, 0.55);
}

.cw-input:hover {
  border-color: var(--line-strong);
}

.cw-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(229, 125, 35, 0.18);
}

.cw-input[aria-invalid="true"] {
  border-color: var(--brand-ember);
  box-shadow: 0 0 0 3px rgba(192, 69, 39, 0.2);
}

/* Autofill keeps the dark field instead of the browser's pale fill */
.cw-input:-webkit-autofill,
.cw-input:-webkit-autofill:hover,
.cw-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--surface-2) inset;
  transition: background-color 9999s ease 0s;
}

.cw-textarea-lg {
  min-height: 180px;
  resize: vertical;
  line-height: 1.6;
}

.cw-req {
  margin-left: 4px;
  color: var(--muted);
}

.cw-error {
  margin-top: 16px;
  padding: 10px 14px;
  border-left: 2px solid var(--brand-ember);
  border-radius: 0 8px 8px 0;
  background: rgba(192, 69, 39, 0.12);
  font-size: 0.9rem;
  color: var(--text);
  animation: cw-fade 0.35s ease both;
}

.cw-error[hidden] {
  display: none;
}

/* Nav */
.cw-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.cw-nav .btn[hidden] {
  display: none;
}

.cw-nav[hidden] {
  display: none;
}

.cw-nav [data-next] {
  margin-left: auto;
}

.cw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

/* Budget slider */
.cw-budget-value {
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
  color: var(--text);
}

/* 44px-tall hit area around a 6px track; the part left of the thumb
   fills with the brand gradient (--cw-fill is set by contact.js) */
.cw-range {
  --cw-fill: 20%;
  display: block;
  width: 100%;
  margin: 0;
  height: 44px;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  touch-action: pan-y;
}

.cw-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background:
    var(--gradient) 0 0 / var(--cw-fill) 100% no-repeat,
    var(--line-strong);
}

.cw-range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line-strong);
}

.cw-range::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--gradient);
}

.cw-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--brand-amber);
  border: 3px solid var(--ink);
  box-shadow: 0 0 0 1px rgba(250, 167, 25, 0.5), 0 4px 12px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s ease;
}

.cw-range:active::-webkit-slider-thumb {
  transform: scale(1.12);
}

.cw-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-amber);
  border: 3px solid var(--ink);
  box-shadow: 0 0 0 1px rgba(250, 167, 25, 0.5);
}

.cw-range:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 8px;
}

.cw-range-scale {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Success screen */
.cw-success-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: rgba(229, 125, 35, 0.12);
  border: 1px solid rgba(229, 125, 35, 0.25);
  color: var(--accent-2);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.cw-success-icon {
  animation: cw-pop 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cw-pop {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
  .cw-nav .btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cw-step,
  .cw-reveal,
  .cw-step .cw-option,
  .cw-error,
  .cw-success-icon {
    animation: none;
  }

  .cw-progress i,
  .cw-option,
  .cw-input {
    transition: none;
  }

  .card,
  .project-card,
  .cw-option:hover {
    transition: border-color 0.3s ease, background 0.3s ease;
  }

  .card:hover,
  .project-card:hover,
  .cw-option:hover {
    transform: none;
  }
}

/* ---- Targeting reticle (reticle.js; the home page's cursor) ------ */
.wx-reticle {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  width: 38px;
  height: 38px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  will-change: transform;
}

.has-reticle .wx-reticle { opacity: 1; }
.has-reticle body,
.has-reticle body a,
.has-reticle body button,
.has-reticle body label,
.has-reticle body summary { cursor: none; }

.wx-reticle i {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 0 solid var(--accent-2);
  transition: border-color 0.3s ease;
}

.wx-reticle i:nth-child(1) { left: 0; top: 0; border-width: 1.5px 0 0 1.5px; }
.wx-reticle i:nth-child(2) { right: 0; top: 0; border-width: 1.5px 1.5px 0 0; }
.wx-reticle i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 1.5px 1.5px; }
.wx-reticle i:nth-child(4) { right: 0; bottom: 0; border-width: 0 1.5px 1.5px 0; }

.wx-reticle b {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 8px rgba(250, 167, 25, 0.9);
}

.wx-reticle-read {
  position: absolute;
  left: calc(100% + 8px);
  top: calc(100% + 4px);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  white-space: nowrap;
  color: rgba(254, 238, 207, 0.6);
}

.wx-reticle.is-lock i { border-color: var(--text); }
.wx-reticle.is-lock b { opacity: 0; }
.wx-reticle.is-lock .wx-reticle-read { color: var(--accent-2); }
