/* Clean homepage (src/render/home.mjs): short copy, one idea per section, bright 3D artwork.
 * Brand tokens only (scripts/check-brand.mjs): the bright colours live inside the SVG artwork in /assets/img/home, so
 * this file keeps to var(--q-*) and colour-mix() of them. Motion is decorative and switched off under
 * prefers-reduced-motion. Shared chrome (header, footer, buttons, FAQ, logo marquee) comes from /site.css. */

.site-home {
  --h-ground: var(--q-tile);
  --h-card: var(--q-white);
  --h-radius: 28px;
  --h-space: clamp(4.5rem, 9vw, 8rem);
}

.site-home main { background: var(--h-ground); }

/* Headline pivot word: deep lavender on light grounds, lavender on black. */
.site-home .pivot { color: var(--q-lavender-deep, var(--q-hue-deep)); padding-inline-end: 0.08em; }
.h-agents .pivot, .h-contact-card .pivot, .h-hero.is-dark .pivot { color: var(--q-lavender, var(--q-hue)); }

.h-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--q-radius-pill);
  background: var(--q-black);
  color: var(--q-white);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.h-eyebrow::before {
  content: "";
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: var(--q-lavender, var(--q-hue));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--q-lavender, var(--q-hue)) 35%, transparent);
}

.h-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.site-home .cta { background: var(--q-lavender, var(--q-hue)); border-color: var(--q-lavender, var(--q-hue)); }
.site-home .cta:hover { background: var(--q-black); border-color: var(--q-black); color: var(--q-white); }

.h-note { margin: 1.25rem 0 0; color: var(--q-ink-mid); font-size: 0.9375rem; }
.h-note a { color: inherit; }

/* ------------------------------------------------------------------ hero
 * Copy, then four goal categories as tall soft-colour panels. The open one (the first, or hovered / focused) grows
 * wide and lists its services with a line each; the others show their name and service icons. Each service opens
 * its detail view (home.js). tone: light (A) | dark (E) | glass (F). */
.h-hero {
  position: relative; overflow: clip;
  padding-block: clamp(2rem, 4vw, 3.5rem) clamp(3rem, 6vw, 5rem);
  background: var(--h-ground);
}
.h-hero-layout { display: grid; gap: clamp(1.75rem, 3vw, 2.5rem); }
.h-hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; }
.h-hero h1 { margin: 0; font-size: clamp(2.75rem, 1.4rem + 5vw, 5.75rem); font-weight: 700; letter-spacing: -0.045em; line-height: 0.98; max-width: 15ch; text-wrap: balance; }
.h-lede { margin: 1.25rem auto 0; max-width: 40rem; font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem); line-height: 1.45; color: var(--q-ink-deep); }
.h-hero .h-actions { justify-content: center; }

.h-cats { display: flex; gap: 12px; inline-size: 100%; max-inline-size: 1180px; margin-inline: auto; block-size: clamp(380px, 48vh, 480px); }
.h-cat {
  position: relative; flex: 1 1 0; min-inline-size: 0; overflow: hidden; display: flex; flex-direction: column;
  padding: 1.25rem; border-radius: 32px; color: var(--q-ink);
  background: var(--q-hue-wash);
  transition: flex-grow 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}
:is(.h-cat, .h-detail).is-c1 { background: var(--q-sky); }
:is(.h-cat, .h-detail).is-c2 { background: var(--q-peach); }
:is(.h-cat, .h-detail).is-c3 { background: var(--q-mint); }
:is(.h-cat, .h-detail).is-c4 { background: var(--q-lavender, var(--q-hue)); }
.h-pword { position: absolute; inset-inline-end: -0.06em; bottom: -0.16em; font-size: clamp(4rem, 2rem + 6vw, 8.5rem); font-weight: 800; letter-spacing: -0.06em; line-height: 1; color: var(--q-white); opacity: 0.55; pointer-events: none; white-space: nowrap; transition: opacity 0.4s ease; }
.lang-ar .h-pword { letter-spacing: 0; font-family: var(--q-font-arabic); }
.h-cat-head { position: relative; margin: 0; display: grid; gap: 0.2rem; text-align: start; }
.h-cat-n { font-size: 0.75rem; font-weight: 800; color: var(--q-ink-mid); }
.h-cat-head b { font-size: clamp(1.25rem, 1rem + 0.8vw, 1.75rem); letter-spacing: -0.03em; line-height: 1.1; }
.h-cat-head span:last-child { font-size: 0.9375rem; color: var(--q-ink-deep); opacity: 0; transition: opacity 0.3s ease; }
.h-svcs { position: relative; list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 0.5rem; }
.h-svc {
  display: grid; grid-template-columns: auto 1fr; column-gap: 0.75rem; align-items: center; text-align: start;
  padding: 0.5rem; border-radius: 18px; color: inherit; text-decoration: none; cursor: zoom-in;
  transition: background-color 0.2s ease;
}
.h-svc-icon { grid-row: span 2; inline-size: 52px; block-size: auto; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.h-svc b { font-size: 1rem; letter-spacing: -0.01em; }
.h-svc span { font-size: 0.8125rem; color: var(--q-ink-deep); }
.h-svc:hover, .h-svc:focus-visible { background: color-mix(in srgb, var(--q-white) 60%, transparent); }
.h-svc:hover .h-svc-icon, .h-svc:focus-visible .h-svc-icon { transform: scale(1.08); }
.h-svc:focus-visible { outline: 3px solid var(--q-ink); outline-offset: 2px; }
/* Collapsed categories show only the service icons; the open one shows names and lines too. */
.h-cat .h-svc b, .h-cat .h-svc span { display: none; }
.h-cat .h-svc { grid-template-columns: auto; justify-content: start; padding: 0.35rem; }
:is(.h-cats:not(:hover):not(:focus-within) .is-first, .h-cat:hover, .h-cat:focus-within) { flex-grow: 2.6; }
:is(.h-cats:not(:hover):not(:focus-within) .is-first, .h-cat:hover, .h-cat:focus-within) .h-cat-head span:last-child { opacity: 1; }
:is(.h-cats:not(:hover):not(:focus-within) .is-first, .h-cat:hover, .h-cat:focus-within) .h-svc { grid-template-columns: auto 1fr; padding: 0.5rem; }
:is(.h-cats:not(:hover):not(:focus-within) .is-first, .h-cat:hover, .h-cat:focus-within) .h-svc :is(b, span) { display: block; }
:is(.h-cats:not(:hover):not(:focus-within) .is-first, .h-cat:hover, .h-cat:focus-within) .h-pword { opacity: 1; }

/* Zoomed service detail: fixed full-screen view that grows out of the clicked icon (home.js). */
.h-detail { position: fixed; inset: 0; z-index: 100; overflow-y: auto; overscroll-behavior: contain; display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem); background: var(--q-tile-dark); color: var(--q-ink); }
.h-detail[hidden] { display: none; }
.h-detail-in { position: relative; display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; inline-size: min(100%, 1120px); padding: clamp(1.25rem, 3vw, 2.5rem); border-radius: 36px; background: var(--q-white); }
.h-detail-pic { margin: 0; }
.h-detail-img { inline-size: 100%; border-radius: 28px; }
.h-detail-copy { text-align: start; }
.h-detail-cat { margin: 0; font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--q-ink-mid); }
.h-detail h3 { margin: 0.35rem 0 0; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.5rem); letter-spacing: -0.04em; line-height: 1; }
.h-detail-lead { margin: 1rem 0 0; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); line-height: 1.45; color: var(--q-ink-deep); }
.h-detail-points { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.h-detail-points li { position: relative; padding-inline-start: 1.9rem; font-weight: 600; }
.h-detail-points li::before { content: "\2713"; content: "\2713" / ""; position: absolute; inset-inline-start: 0; top: 0.05rem; display: grid; place-items: center; inline-size: 1.35rem; block-size: 1.35rem; border-radius: 50%; background: var(--q-black); color: var(--q-white); font-size: 0.75rem; }
.h-detail .h-actions { justify-content: flex-start; margin-top: 1.75rem; }
.h-detail-hint { margin: 1rem 0 0; font-size: 0.8125rem; color: var(--q-ink-mid); }
.h-detail-close { position: absolute; top: 1rem; inset-inline-end: 1rem; inline-size: 44px; block-size: 44px; border: 0; border-radius: 14px; background: var(--q-black); color: var(--q-white); font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.h-detail-close:focus-visible { outline: 3px solid var(--q-ink); outline-offset: 2px; }
.h-zoomed body { overflow: hidden; }
@media (min-width: 900px) { .h-detail-in { grid-template-columns: 1.05fr 1fr; } }

/* Tone E: dark stage. */
.h-hero.is-dark { color: var(--q-white); background: var(--q-black); }
.h-hero.is-dark .h-eyebrow { background: var(--q-white); color: var(--q-black); }
.h-hero.is-dark .h-lede, .h-hero.is-dark .h-note { color: color-mix(in srgb, var(--q-white) 76%, transparent); }
.h-hero.is-dark .h-hero-copy .cta-ghost { background: transparent; color: var(--q-white); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--q-white) 40%, transparent); }
/* Tone F: glass. */
.h-hero.is-glass { background: var(--q-tile); isolation: isolate; }
.h-hero.is-glass::before, .h-hero.is-glass::after { content: ""; position: absolute; z-index: -1; inline-size: 46vw; aspect-ratio: 1; border-radius: 50%; background: var(--q-mint); filter: blur(80px); opacity: 0.9; }
.h-hero.is-glass::before { inset-inline-start: -10vw; top: -14vw; }
.h-hero.is-glass::after { inset-inline-end: -12vw; bottom: -18vw; background: var(--q-peach); }
.h-hero.is-glass .h-hero-copy { align-items: flex-start; text-align: start; }
.h-hero.is-glass h1 { font-size: clamp(3rem, 1rem + 7.4vw, 8.5rem); font-weight: 600; letter-spacing: -0.06em; line-height: 0.92; max-width: 12ch; }
.h-hero.is-glass .h-lede { margin-inline: 0; }
.h-hero.is-glass .h-actions { justify-content: flex-start; }
.h-hero.is-glass .h-cats { max-inline-size: none; padding: 12px; border-radius: 44px; background: color-mix(in srgb, var(--q-white) 38%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--q-white) 70%, transparent); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }

/* Phones: categories stack; the open one grows. */
@media (max-width: 760px) {
  .h-cats { flex-direction: column; block-size: auto; }
  .h-cat { flex: none; padding: 1rem; border-radius: 24px; }
  .h-cat-head { grid-template-columns: auto 1fr; column-gap: 0.6rem; align-items: baseline; }
  .h-cat-head span:last-child { display: none; }
  .h-svcs { margin-top: 0.75rem; grid-template-columns: repeat(3, auto); justify-content: start; }
  .h-cat .h-svc :is(b, span) { display: none !important; }
  .h-cat .h-svc { grid-template-columns: auto !important; padding: 0.3rem !important; }
  .h-svc-icon { inline-size: 48px; }
  .h-pword { font-size: 3.5rem; }
  .h-detail { place-items: start center; }
}

@keyframes h-spin { to { rotate: 360deg; } }

/* ------------------------------------------------------------------ statement: words darken as you scroll */

.h-statement { background: var(--h-card); }
.h-statement .wrap { max-width: 64rem; text-align: center; }
.lang-ar .h-statement-text, [dir="rtl"] .h-statement-text { line-height: 1.5 !important; letter-spacing: 0; }
.h-statement .h-eyebrow { margin-inline: auto; font-size: 0.875rem; letter-spacing: 0; }
.h-statement-text {
  margin: 1.5rem auto 0 !important;
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3.25rem) !important;
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.15 !important;
  color: var(--q-ink) !important; text-wrap: balance;
}

/* ------------------------------------------------------------------ shared section frame */

.h-section { padding-block: var(--h-space); overflow-x: clip; }
.h-steps, .h-audit { background: var(--h-card); }
.h-services, .h-areas { background: var(--h-ground); }
.h-head { max-width: 40rem; margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; }
.h-head h2, .h-contact h2 {
  margin: 0;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.h-head .h-eyebrow { margin-bottom: 1rem; }
.h-sub { margin: 1rem 0 0; color: var(--q-ink-mid); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); }
.h-more { margin: 3rem 0 0; text-align: center; }
.h-link { font-weight: 600; text-decoration: underline; text-decoration-color: var(--q-lavender-deep, var(--q-hue-deep)); text-decoration-thickness: 2px; }
.h-section h3 { margin: 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.h-section p { margin: 0.5rem 0 0; color: var(--q-ink-mid); line-height: 1.5; }

/* ------------------------------------------------------------------ how it works: the cycle */

.h-cycle { display: grid; gap: 2rem; justify-items: center; }
.h-diagram { position: relative; inline-size: min(100%, 520px); aspect-ratio: 1 / 1; }
.h-arrows { position: absolute; inset: 0; inline-size: 100%; opacity: 0.75; }
.h-core { position: absolute; inset: 31%; display: grid; place-items: center; }
.h-core-disc { position: absolute; inset: 0; inline-size: 100%; }
.h-core span { position: relative; font-weight: 800; font-size: clamp(0.875rem, 0.6rem + 1vw, 1.25rem); letter-spacing: 0.08em; text-transform: uppercase; color: var(--q-white); }
.h-ring { position: absolute; inline-size: 30%; }
.h-ring-1 { inset-block-start: 0; inset-inline-start: 35%; }
.h-ring-2 { inset-block-start: 35%; inset-inline-end: 0; }
.h-ring-3 { inset-block-end: 0; inset-inline-start: 35%; }
.h-ring-4 { inset-block-start: 35%; inset-inline-start: 0; }
[dir="rtl"] .h-arrows { transform: scaleX(-1); }

.h-step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; inline-size: 100%; max-width: 32rem; counter-reset: none; }
.h-step { padding: 1.25rem 1.5rem; border-radius: 24px; background: var(--h-card); }
.h-steps .h-step { background: var(--h-ground); box-shadow: none; }
.h-step-n {
  display: inline-grid; place-items: center; inline-size: 2rem; block-size: 2rem; margin-inline-end: 0.5rem;
  border-radius: 50%; background: var(--q-black); color: var(--q-white); font-size: 0.8125rem; font-weight: 700; vertical-align: 0.15em;
}

@media (min-width: 1000px) {
  .h-cycle { grid-template-columns: 1fr minmax(0, 480px) 1fr; align-items: center; gap: 2.5rem; }
  .h-diagram { grid-column: 2; grid-row: 1; }
  .h-step-list { display: contents; }
  .h-step { max-width: 19rem; background: transparent; padding: 0; }
  .h-steps .h-step { background: transparent; }
  .h-step-1 { grid-column: 3; grid-row: 1; align-self: start; margin-block-start: 12%; }
  .h-step-2 { grid-column: 3; grid-row: 1; align-self: end; margin-block-end: 12%; }
  .h-step-3 { grid-column: 1; grid-row: 1; align-self: end; margin-block-end: 12%; justify-self: end; text-align: end; }
  .h-step-4 { grid-column: 1; grid-row: 1; align-self: start; margin-block-start: 12%; justify-self: end; text-align: end; }
}

/* ------------------------------------------------------------------ services: flat panels */

.h-tiles { list-style: none; margin: 0; padding: 0 0 12px; display: grid; gap: 1.75rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.h-tile {
  position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 1.25rem; align-items: center;
  block-size: 100%; padding: 1.5rem; border-radius: var(--h-radius); background: var(--h-card);
  color: inherit; text-decoration: none;
  transition: background-color 0.3s ease;
}
.h-tile-art { grid-row: span 2; inline-size: 64px; block-size: auto; transition: transform 0.3s var(--ease, ease); }
.h-tile h3, .h-tile p { grid-column: 2; }
.h-tile p { margin-top: 0.25rem; font-size: 0.9875rem; }
.h-tile-go { position: absolute; inset-block-start: 1.25rem; inset-inline-end: 1.4rem; font-weight: 600; opacity: 0; transition: opacity 0.3s ease, translate 0.3s ease; }
a.h-tile:hover .h-tile-art, a.h-tile:focus-visible .h-tile-art { transform: scale(1.08); }
a.h-tile:hover .h-tile-go { opacity: 1; translate: 4px 0; }
[dir="rtl"] a.h-tile:hover .h-tile-go { translate: -4px 0; }

/* ------------------------------------------------------------------ audit plans */

.h-plans { list-style: none; margin: 0 auto; padding: 0 0 12px; display: grid; gap: 1.5rem; max-width: 64rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.h-plan { display: flex; flex-direction: column; gap: 0.25rem; padding: 2rem; border-radius: var(--h-radius); background: var(--h-ground); }
.h-plan.is-main { background: var(--q-lavender, var(--q-hue)); }
.h-price { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; color: var(--q-ink) !important; }
.h-plan > p:not(.h-price) { flex: 1; }
.h-section .h-audit-note { max-width: 40rem; margin: 2rem auto 0; text-align: center; font-size: 0.875rem; }
.h-plan .cta, .h-plan .cta-ghost { margin-top: 1.5rem; align-self: flex-start; }

/* ------------------------------------------------------------------ where we work */

.h-areas-grid { display: grid; gap: 2.5rem; align-items: center; }
.h-areas .h-head { text-align: start; margin-inline: 0; margin-bottom: 2rem; }
.h-geo { position: relative; inline-size: min(70%, 320px); aspect-ratio: 1 / 1; margin-inline: auto; display: grid; place-items: center; }
.h-pin { position: relative; z-index: 1; inline-size: 70%; }
.h-pulse { position: absolute; inset-inline: 12%; inset-block-end: 12%; block-size: 18%; border-radius: 50%; border: 2px solid var(--q-black); opacity: 0; animation: h-ping 3.2s ease-out infinite; }
.h-pulse-2 { animation-delay: 1.6s; }
.h-area-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.h-area-list li { padding: 1.25rem 1.5rem; border-radius: 24px; background: var(--h-card); }
.h-area-list h3 { font-size: 1.0625rem; }
.h-address { margin-top: 1.25rem; font-style: normal; font-weight: 600; }
.h-address::before { content: "\25CF"; content: "\25CF" / ""; margin-inline-end: 0.5rem; color: var(--q-lavender-deep, var(--q-hue-deep)); }

@keyframes h-ping { 0% { opacity: 0.7; scale: 0.6; } 100% { opacity: 0; scale: 1.5; } }

@media (min-width: 900px) {
  .h-areas-grid { grid-template-columns: 0.9fr 1.1fr; gap: 4rem; }
  .h-geo { inline-size: 100%; max-width: 380px; }
}

/* ------------------------------------------------------------------ shared sections on home (customers, FAQ) */

.site-home .section { padding-block: var(--h-space); background: var(--h-card); border: 0; }
.site-home .section#faq { background: var(--h-ground); }
.site-home .section[data-section="clients"] { padding-block: var(--h-space); background: var(--h-ground); }
.site-home .section > .wrap { display: block !important; }
.site-home .section > .wrap > h2 {
  position: static !important; margin: 0 auto 2rem !important; text-align: center;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem) !important; font-weight: 700; letter-spacing: -0.04em;
}
.site-home .section[data-section="clients"] > .wrap > h2 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.5rem) !important; font-weight: 700; letter-spacing: -0.04em; color: var(--q-ink); max-width: 16ch; text-wrap: balance; }
.site-home .logo-marquee { overflow: hidden; max-inline-size: 100%; }
.site-home .faq { margin-inline: auto; max-width: 48rem; border: 0; gap: 1.1rem; padding-bottom: 10px; }
.site-home .faq details { border: 0; padding-inline: 1.5rem; border-radius: 24px; background: var(--h-card); }
.site-home .faq details p { margin-bottom: 1.25rem; }

/* ------------------------------------------------------------------ contact card */

.h-contact { background: var(--h-card); }
.h-contact-card {
  position: relative; overflow: clip; isolation: isolate;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 5vw, 4rem);
  border-radius: calc(var(--h-radius) + 8px);
  background: var(--q-black); color: var(--q-white); text-align: center;
}
.h-contact-card h2 { color: var(--q-white); }
.h-contact-card .h-sub, .h-contact-card .h-note { color: color-mix(in srgb, var(--q-white) 72%, transparent); }
.h-contact-card .h-actions { justify-content: center; }

/* ------------------------------------------------------------------ motion preference */

@media (prefers-reduced-motion: reduce) {
  .h-pulse { animation: none !important; }
  .h-pulse { display: none; }
  .h-tile, .h-tile-art { transition: none; }
}

/* ------------------------------------------------------------------ scroll parallax (CSS scroll-driven animations)
 * Browsers without animation-timeline simply show everything at rest. Off under reduced motion. */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {

    .h-head, .h-diagram, .h-geo { animation: h-par-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
    .h-tiles > li, .h-plans > li, .h-area-list > li { animation: h-par-card linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
    .h-tiles > li:nth-child(3n + 2), .h-plans > li:nth-child(2) { animation-range: entry 8% entry 100%; }
    .h-tiles > li:nth-child(3n), .h-plans > li:nth-child(3) { animation-range: entry 16% entry 100%; }



    /* Statement: a two-tone fill slides across the text, so words turn from grey to ink in reading order. */
    .h-reveal {
      background: linear-gradient(to right, var(--q-ink) 50%, var(--q-hairline) 50%) 100% 0 / 200% 100% no-repeat;
      -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
      animation: h-reveal linear both; animation-timeline: view(); animation-range: cover 15% cover 55%;
    }
    [dir="rtl"] .h-reveal { background-image: linear-gradient(to left, var(--q-ink) 50%, var(--q-hairline) 50%); background-position: 0 0; animation-name: h-reveal-rtl; }
    @keyframes h-reveal { to { background-position: 0 0; } }
    @keyframes h-reveal-rtl { to { background-position: 100% 0; } }

    @keyframes h-par-rise  { from { translate: 0 60px; } to { translate: 0 0; } }
    @keyframes h-par-card  { from { opacity: 0; translate: 0 48px; } to { opacity: 1; translate: 0 0; } }
  }
}

/* ------------------------------------------------------------------ flat panels with cropped numbers
 * Owner direction (October 2026): no 3D. Every card is a flat soft-colour panel; a giant white number sits in its
 * corner, cropped by the panel edge, the same way the hero panels carry their big words. Colours cycle through the
 * palette: sky, peach, mint, butter, lavender. */

:is(.h-tiles, .h-power-grid, .h-power-list) { counter-reset: h-panel; }
:is(.h-tiles, .h-power-grid, .h-power-list) > li { counter-increment: h-panel; }
:is(.h-tile, .h-power) { position: relative; overflow: hidden; isolation: isolate; align-content: start; padding-block-end: 4.25rem !important; }
:is(.h-tile, .h-power)::after {
  content: counter(h-panel, decimal-leading-zero); content: counter(h-panel, decimal-leading-zero) / "";
  position: absolute; z-index: -1; inset-inline-end: -0.04em; bottom: -0.34em;
  font-size: 6.5rem; font-weight: 800; letter-spacing: -0.06em; line-height: 1;
  color: var(--q-white); opacity: 0.85; pointer-events: none;
}
.h-tiles > li:nth-child(5n + 1) > .h-tile, :is(.h-power-grid, .h-power-list) > li:nth-child(5n + 1) { background: var(--q-sky); }
.h-tiles > li:nth-child(5n + 2) > .h-tile, :is(.h-power-grid, .h-power-list) > li:nth-child(5n + 2) { background: var(--q-peach); }
.h-tiles > li:nth-child(5n + 3) > .h-tile, :is(.h-power-grid, .h-power-list) > li:nth-child(5n + 3) { background: var(--q-mint); }
.h-tiles > li:nth-child(5n + 4) > .h-tile, :is(.h-power-grid, .h-power-list) > li:nth-child(5n + 4) { background: var(--q-butter); }
.h-tiles > li:nth-child(5n) > .h-tile, :is(.h-power-grid, .h-power-list) > li:nth-child(5n) { background: var(--q-lavender, var(--q-hue)); }
.h-section .h-eyebrow { color: var(--q-white); }
.h-agents .h-eyebrow { color: var(--q-black); }
.h-section :is(.h-tile, .h-power) p { color: var(--q-ink-deep); }
a.h-tile:hover, a.h-tile:focus-visible { background: var(--q-black) !important; color: var(--q-white); }
a.h-tile:hover p, a.h-tile:focus-visible p { color: color-mix(in srgb, var(--q-white) 78%, transparent); }
a.h-tile:hover::after, a.h-tile:focus-visible::after { opacity: 0.16; }
.h-plan { background: var(--q-tile); }
.h-areas .h-area-list li { background: var(--q-white); }

/* ------------------------------------------------------------------ AI agents (owner request, October 2026)
 * Every service is done by a named AI agent: a black pill on each hero service, an agent line in each detail view, a
 * black "engine" section where the agents circle a small-language-model chip, capability panels and agency tools. */

.h-live { display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1.1rem; padding: 0.45rem 0.95rem; border-radius: var(--q-radius-pill, 999px); background: var(--q-black); color: var(--q-white); font-size: 0.875rem; font-weight: 600; }
.h-live-dot { position: relative; display: inline-block; inline-size: 0.55rem; block-size: 0.55rem; flex: none; border-radius: 50%; background: var(--q-lavender, var(--q-hue)); }
.h-live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--q-lavender, var(--q-hue)); opacity: 0; animation: h-ping 2.4s ease-out infinite; }
.h-agent { grid-column: 2; display: inline-flex; align-items: center; gap: 0.4rem; justify-self: start; margin-top: 0.3rem; padding: 0.2rem 0.6rem; border-radius: var(--q-radius-pill, 999px); background: var(--q-black); color: var(--q-white); font-size: 0.6875rem; font-style: normal; font-weight: 700; letter-spacing: 0.02em; }
.h-agent .h-live-dot { inline-size: 0.4rem; block-size: 0.4rem; }
.h-cat .h-svc .h-agent { display: none; }
:is(.h-cats:not(:hover):not(:focus-within) .is-first, .h-cat:hover, .h-cat:focus-within) .h-svc .h-agent { display: inline-flex; }
.h-agent-line { display: inline-flex; align-items: center; gap: 0.55rem; margin: 0.5rem 0 0.75rem; padding: 0.35rem 0.85rem; border-radius: var(--q-radius-pill, 999px); background: var(--q-black); color: var(--q-white); font-size: 0.875rem; font-weight: 600; }

/* Engine: black section, agents circling the SLM chip. */
.h-agents { background: var(--q-black); color: var(--q-white); overflow-x: clip; }
.h-agents .h-head h2, .h-agents h3 { color: var(--q-white); }
.h-agents .h-sub, .h-agents p { color: color-mix(in srgb, var(--q-white) 74%, transparent); }
.h-agents .h-eyebrow { background: var(--q-white); color: var(--q-black); }
.h-engine { display: grid; gap: 3rem; align-items: center; }
.h-orbit-wrap { --r: min(36vw, 220px); position: relative; inline-size: calc(var(--r) * 2 + 130px); max-inline-size: 100%; aspect-ratio: 1 / 1; margin-inline: auto; display: grid; place-items: center; }
.h-orbit-core { inline-size: 56%; block-size: auto; }
.h-orbit { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; animation: h-spin 70s linear infinite; }
.h-orbit li { --a: calc(var(--i, 0) * 360deg / var(--n, 1)); position: absolute; inset-block-start: 50%; left: 50%; transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(var(--r) * -1)) rotate(calc(var(--a) * -1)); }
.h-orbit span { display: block; padding: 0.45rem 0.85rem; border-radius: var(--q-radius-pill, 999px); background: var(--q-white); color: var(--q-black); font-size: 0.75rem; font-weight: 700; white-space: nowrap; animation: h-spin 70s linear infinite reverse; }
.h-orbit li:nth-child(5n + 1) span { background: var(--q-lavender, var(--q-hue)); }
.h-orbit li:nth-child(5n + 2) span { background: var(--q-sky); }
.h-orbit li:nth-child(5n + 3) span { background: var(--q-peach); }
.h-orbit li:nth-child(5n + 4) span { background: var(--q-mint); }
.h-orbit li:nth-child(5n) span { background: var(--q-butter); }
.h-orbit.n-1 { --n: 1; } .h-orbit.n-2 { --n: 2; } .h-orbit.n-3 { --n: 3; } .h-orbit.n-4 { --n: 4; } .h-orbit.n-5 { --n: 5; } .h-orbit.n-6 { --n: 6; } .h-orbit.n-7 { --n: 7; } .h-orbit.n-8 { --n: 8; } .h-orbit.n-9 { --n: 9; } .h-orbit.n-10 { --n: 10; } .h-orbit.n-11 { --n: 11; } .h-orbit.n-12 { --n: 12; }
.h-orbit li:nth-child(1) { --i: 0; } .h-orbit li:nth-child(2) { --i: 1; } .h-orbit li:nth-child(3) { --i: 2; } .h-orbit li:nth-child(4) { --i: 3; } .h-orbit li:nth-child(5) { --i: 4; } .h-orbit li:nth-child(6) { --i: 5; } .h-orbit li:nth-child(7) { --i: 6; } .h-orbit li:nth-child(8) { --i: 7; } .h-orbit li:nth-child(9) { --i: 8; } .h-orbit li:nth-child(10) { --i: 9; } .h-orbit li:nth-child(11) { --i: 10; } .h-orbit li:nth-child(12) { --i: 11; }
.h-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.h-facts li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; padding: 1.1rem 1.25rem; border-radius: 24px; background: color-mix(in srgb, var(--q-white) 9%, transparent); }
.h-fact-icon { inline-size: 56px; block-size: auto; }
.h-facts h3 { font-size: 1.0625rem; }
.h-facts p { margin-top: 0.2rem; font-size: 0.9375rem; }

@keyframes h-spin { to { rotate: 360deg; } }

@media (min-width: 960px) { .h-engine { grid-template-columns: 1.1fr 0.9fr; gap: 4rem; } }
@media (max-width: 640px) {
  .h-orbit-wrap { --r: 0px; inline-size: 100%; aspect-ratio: auto; gap: 1.5rem; }
  .h-orbit-core { inline-size: min(60%, 220px); }
  .h-orbit { position: static; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; animation: none; }
  .h-orbit li { position: static; transform: none; }
  .h-orbit span { animation: none; }
}

/* Capability panels and agency tools. */
.h-power-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.h-power { display: grid; grid-template-columns: auto 1fr; column-gap: 1.1rem; align-items: center; block-size: 100%; min-block-size: 8.5rem; padding: 1.4rem; border-radius: var(--p3-radius-card, 28px); background: var(--q-tile); }
.h-power-icon { grid-row: span 2; inline-size: 56px; block-size: auto; }
.h-power h3 { font-size: 1.0625rem; }
.h-power p { margin-top: 0.2rem; font-size: 0.9375rem; }
.h-power-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.h-power-list .h-power { min-block-size: 0; }
.h-powers { background: var(--h-card); }
.h-agencies { background: var(--h-ground); }
.h-agencies .h-head { text-align: start; margin-inline: 0; margin-bottom: 2rem; }
.h-agencies-grid { display: grid; gap: 3rem; align-items: center; }
.h-cal { position: relative; margin: 0; }
.h-cal-img { inline-size: 100%; block-size: auto; }
.h-cal-chip { position: absolute; display: grid; place-items: center; inline-size: 64px; block-size: 64px; border-radius: 50%; background: var(--q-black); color: var(--q-white); font-style: normal; font-weight: 800; }
.h-cal-chip.is-1 { inset-block-start: -12px; inset-inline-end: 8%; }
.h-cal-chip.is-2 { inset-block-end: 4%; inset-inline-start: -8px; font-size: 1.75rem; background: var(--q-lavender, var(--q-hue)); color: var(--q-black); }
@media (min-width: 960px) { .h-agencies-grid { grid-template-columns: 1.05fr 0.95fr; gap: 4rem; } }

@media (prefers-reduced-motion: reduce) {
  .h-orbit, .h-orbit span, .h-live-dot::after { animation: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .h-power-grid > li, .h-power-list > li, .h-facts > li { animation: h-par-card linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
    .h-power-grid > li:nth-child(3n + 2) { animation-range: entry 8% entry 100%; }
    .h-power-grid > li:nth-child(3n) { animation-range: entry 16% entry 100%; }
    .h-cal { animation: h-par-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
  }
}

/* ------------------------------------------------------------------ scroll tour (home-world)
 * Default (no script, reduced motion): a plain list, one island and one short line per stop. With home.js the section
 * gets .is-live: the stage pins to the viewport, the islands move into one world that a camera glides across as the
 * visitor scrolls, and only the current stop's words show. */

.h-world { background: var(--h-ground); }
.hw-scenes { list-style: none; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); max-width: 1100px; display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); }
.hw-scene { display: grid; gap: 1.5rem; align-items: center; }
.hw-isle { position: relative; margin: 0; inline-size: min(100%, 420px); aspect-ratio: 1 / 1; justify-self: center; }
.hw-isle img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; }
.hw-copy h3 { margin: 0; font-size: clamp(2.25rem, 1.5rem + 3vw, 4rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1; text-wrap: balance; }
.hw-copy .h-eyebrow { margin-bottom: 1rem; }
.h-section .hw-body { margin: 1rem 0 0; max-inline-size: 32ch; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); }
.hw-copy .h-actions { margin-top: 1.75rem; }
.hw-dots { display: none; }
@media (min-width: 900px) { .hw-scene { grid-template-columns: 1fr 1fr; } }

.h-world.is-live { padding-block-end: 0; overflow: visible; }
.h-world.is-live .h-head { margin-bottom: 0; }
.is-live .hw-stage { position: relative; }
.is-live .hw-vp { position: sticky; top: 0; block-size: 100vh; block-size: 100dvh; overflow: hidden; }
.is-live .hw-scenes { position: absolute; inset: 0; display: block; padding: 0; max-width: none; }
.is-live .hw-scene { position: absolute; inset: 0; display: block; pointer-events: none; }
.is-live .hw-copy {
  position: absolute; z-index: 2; inset-inline-start: clamp(24px, 5vw, 80px); top: 50%; translate: 0 calc(-50% + 14px);
  inline-size: min(440px, 40%); opacity: 0; visibility: hidden;
  transition: opacity 0.18s ease, translate 0.18s ease, visibility 0s linear 0.18s;
}
.is-live .hw-scene.is-on .hw-copy { opacity: 1; visibility: visible; translate: 0 -50%; pointer-events: auto; transition: opacity 0.4s ease 0.18s, translate 0.4s ease 0.18s, visibility 0s linear 0s; }
.hw-world { position: absolute; z-index: 1; left: 0; top: 0; inline-size: 1px; block-size: 1px; transform-origin: 0 0; will-change: transform; }
.hw-world .hw-isle { position: absolute; inline-size: 800px; block-size: 800px; aspect-ratio: auto; }
.hw-world .hw-mark { will-change: transform; transform-origin: 50% 50%; }
.is-live .hw-dots { position: absolute; z-index: 2; inset-inline-start: clamp(24px, 5vw, 80px); bottom: calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px; }
.hw-dots i { inline-size: 22px; block-size: 4px; border-radius: 2px; background: var(--q-hairline); transition: inline-size 0.3s ease, background-color 0.3s ease; }
.hw-dots i.is-on { inline-size: 44px; background: var(--q-ink); }

@media (max-width: 899px) {
  .is-live .hw-copy { inset-inline: 16px; top: calc(76px + env(safe-area-inset-top, 0px)); translate: 0 14px; inline-size: auto; }
  .is-live .hw-scene.is-on .hw-copy { translate: 0 0; }
  .is-live .hw-copy h3 { font-size: 2.25rem; }
  .h-section.is-live .hw-body { margin-top: 0.6rem; font-size: 1rem; }
  .is-live .hw-dots { inset-inline-start: 16px; }
}
@media (prefers-reduced-motion: reduce) { .is-live .hw-copy, .hw-dots i { transition: none; } }
