/* Raudhah Capital Group — website styles.
   Tokens copied from brand-source/03-Colours-and-Type/tokens.css
   (light = :root, dark = prefers-color-scheme). No inline styles anywhere: the CSP is style-src 'self'. */

@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/montserrat-700.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/montserrat-800.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/plus-jakarta-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/plus-jakarta-sans-500.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/plus-jakarta-sans-600.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/newsreader-400-italic.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --brand-red: #cb211a;
  --brand-red-deep: #9e1711;
  --on-brand-red: #ffffff;
  --brand-graphite: #808080;
  --ink: #1a1919;
  --ink-muted: #5c5c5c;
  --surface-000: #ffffff;
  --surface-100: #f8f8f8;
  --surface-ink: #1a1919;
  --on-surface-ink: #f3f3f3;
  --on-surface-ink-muted: #a3a3a3;
  --border: #d9d9d9;
  --border-strong: #8c8c8c;
  --focus-ring: #cb211a;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --radius-sm: 2px;
  --font-display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-sans: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-red: #ef5a53;
    --brand-red-deep: #cb211a;
    --on-brand-red: #1a1919;
    --brand-graphite: #8a8a8a;
    --ink: #f3f3f3;
    --ink-muted: #a3a3a3;
    --surface-000: #121212;
    --surface-100: #1c1c1c;
    --surface-ink: #000000;
    --on-surface-ink: #f3f3f3;
    --on-surface-ink-muted: #a3a3a3;
    --border: #333333;
    --border-strong: #6f6f6f;
    --focus-ring: #ef5a53;
  }
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface-000);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 24px;
  font-weight: 400;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 700; color: var(--ink); text-wrap: balance; }
p { margin: 0; }
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: currentColor; }
a[href^="tel:"] { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: var(--space-4); padding-right: var(--space-4); }
@media (min-width: 720px) { .wrap { padding-left: var(--space-8); padding-right: var(--space-8); } }

.skip {
  position: absolute; left: var(--space-4); top: -100px; z-index: 50;
  background: var(--surface-000); color: var(--ink);
  padding: var(--space-2) var(--space-3); border: 1px solid var(--border);
}
.skip:focus { top: var(--space-2); }

/* ---- Logo mark (colours via classes, never var() inside SVG attributes) ---- */
.mark-red { stroke: var(--brand-red); }
.mark-grey { stroke: var(--brand-graphite); }
.hero .mark-red { stroke: #ef5a53; }
.hero .mark-grey { stroke: #8a8a8a; }

/* ---- Header ---- */
.site-header { background: var(--surface-000); border-bottom: 1px solid var(--border); }
.header-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-3) var(--space-6); min-height: 64px; padding-top: var(--space-3); padding-bottom: var(--space-3);
}
.brand { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; }
.brand .mark { width: 22px; height: 32px; flex: none; }
.wordmark {
  font-family: var(--font-display); font-weight: 800; font-size: 14px; line-height: 18px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink);
}
.site-nav { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.site-nav a { font-size: 14px; font-weight: 500; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.lang { font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: 0.14em; }

/* ---- Labels ---- */
.eyebrow, .label, .card-label {
  font-family: var(--font-display); font-weight: 700; font-size: 12px; line-height: 16px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted);
}

/* ---- Buttons ---- */
.btn {
  display: inline-block; font-family: var(--font-sans); font-weight: 600; font-size: 15px; line-height: 24px;
  padding: var(--space-3) var(--space-6); border-radius: var(--radius-sm); text-decoration: none;
}
.btn-primary { background: var(--brand-red); color: var(--on-brand-red); }
.btn-primary:hover { background: var(--brand-red-deep); }
/* Dark theme: brand-red-deep under dark text is only 3.15:1, so keep the fill and underline instead. */
@media (prefers-color-scheme: dark) {
  .btn-primary:hover { background: var(--brand-red); text-decoration: underline; }
}

/* ---- Hero: the one dark panel per page ---- */
.hero { position: relative; overflow: hidden; background: var(--surface-ink); color: var(--on-surface-ink); }
.hero-inner { position: relative; z-index: 2; padding-top: var(--space-16); padding-bottom: 240px; }
.hero-text { max-width: 640px; }
.hero .eyebrow { color: var(--on-surface-ink-muted); }
.hero h1 {
  margin: var(--space-4) 0 var(--space-6); color: var(--on-surface-ink);
  font-weight: 800; font-size: 40px; line-height: 44px; letter-spacing: -0.02em;
}
.hero h1 span { display: block; } /* each sentence balances on its own lines */
.hero .lead { font-size: 18px; line-height: 28px; max-width: 34em; }
.tagline {
  margin-top: var(--space-4); font-family: var(--font-serif); font-style: italic;
  font-size: 17px; line-height: 24px; color: var(--on-surface-ink-muted);
}
.hero .btn { margin-top: var(--space-8); }
.hero-mark { position: absolute; z-index: 1; right: -40px; bottom: -70px; width: 170px; height: auto; }
@media (min-width: 720px) { .hero h1 { font-size: 56px; line-height: 60px; } }
@media (min-width: 1100px) {
  .hero-inner { padding-bottom: var(--space-16); }
  .hero h1 { font-size: 72px; line-height: 76px; }
  .hero-mark { width: 300px; right: 40px; bottom: -90px; }
}

/* ---- Sections ---- */
.section { padding: var(--space-12) 0; border-top: 1px solid var(--border); }
.section-title { margin: var(--space-3) 0 var(--space-8); font-size: 28px; line-height: 34px; letter-spacing: -0.01em; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { display: flex; flex-direction: column; background: var(--surface-000); border: 1px solid var(--border); padding: var(--space-6); }
.card-key { border-top: 3px solid var(--brand-red); }
.card h3 { margin: var(--space-3) 0 var(--space-2); font-size: 20px; line-height: 26px; }
.card-text { color: var(--ink-muted); }
.card-more { margin-top: auto; padding-top: var(--space-4); font-weight: 600; }

.rows { margin-top: var(--space-6); border-top: 1px solid var(--border); }
.row { display: grid; gap: var(--space-2); padding: var(--space-6) 0; border-bottom: 1px solid var(--border); }
.row h3 { font-size: 20px; line-height: 26px; }
.muted { color: var(--ink-muted); }
.links { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.out { font-weight: 600; }

/* ---- Contact ---- */
.contact { background: var(--surface-100); }
.contact-grid { display: grid; gap: var(--space-8); align-items: center; }
@media (min-width: 720px) { .contact-grid { grid-template-columns: 1fr auto; } }
.company { display: grid; gap: var(--space-2); margin-top: var(--space-6); font-style: normal; }
.company-name { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.04em; }
.contact-logo { display: block; }
.contact-logo img { width: 160px; height: auto; mix-blend-mode: multiply; filter: brightness(1.04); }
@media (prefers-color-scheme: dark) { .contact-logo img { mix-blend-mode: normal; filter: none; } }

/* ---- Document pages (privacy, support, 404) ---- */
.doc { padding: var(--space-12) 0 var(--space-16); }
.doc-wrap { max-width: 760px; }
.doc h1 { margin: var(--space-3) 0; font-size: 36px; line-height: 42px; letter-spacing: -0.015em; }
@media (min-width: 720px) { .doc h1 { font-size: 48px; line-height: 52px; } }
.doc .meta { color: var(--ink-muted); font-size: 13px; line-height: 18px; font-weight: 500; }
.doc .lead {
  margin-top: var(--space-6); padding-bottom: var(--space-8); border-bottom: 1px solid var(--border);
  font-size: 18px; line-height: 28px;
}
.doc h2 { margin: var(--space-12) 0 var(--space-4); font-size: 20px; line-height: 26px; scroll-margin-top: var(--space-6); }
.doc h3 { margin: var(--space-8) 0 var(--space-2); font-size: 16px; line-height: 22px; }
.doc p + p { margin-top: var(--space-4); }
.doc ul { margin: 0; padding-left: 1.25em; display: grid; gap: var(--space-3); }
.doc ul + p { margin-top: var(--space-4); }
.doc .btn { margin-top: var(--space-8); }
.doc .alt-lang { margin-top: var(--space-8); color: var(--ink-muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); }
.table-wrap + p { margin-top: var(--space-6); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: var(--space-3) var(--space-4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
thead th {
  background: var(--surface-100); color: var(--ink-muted);
  font-family: var(--font-display); font-size: 12px; line-height: 16px; letter-spacing: 0.14em; text-transform: uppercase;
}
tbody th { width: 34%; font-weight: 600; }

/* ---- What we do page ---- */
.page-head { padding-top: var(--space-12); padding-bottom: var(--space-8); }
.page-head h1 { margin: var(--space-3) 0; font-size: 36px; line-height: 42px; letter-spacing: -0.015em; }
@media (min-width: 720px) { .page-head h1 { font-size: 48px; line-height: 52px; } }
.page-head .lead { max-width: 46em; margin-top: var(--space-4); font-size: 18px; line-height: 28px; }
.area { padding: var(--space-12) 0; border-top: 1px solid var(--border); scroll-margin-top: var(--space-4); }
.area-key { border-top: 3px solid var(--brand-red); }
.area h2 { margin: var(--space-3) 0 var(--space-4); font-size: 28px; line-height: 34px; letter-spacing: -0.01em; }
.area-text { max-width: 46em; }
.area-text > p { font-size: 17px; line-height: 27px; }
.area ul { margin: var(--space-6) 0 0; padding-left: 1.25em; display: grid; gap: var(--space-3); }
.area figure { margin: var(--space-8) 0 0; max-width: 960px; }
.area figure img { width: 100%; height: auto; border: 1px solid var(--border); }
.area figcaption { margin-top: var(--space-2); color: var(--ink-muted); font-size: 13px; line-height: 18px; font-weight: 500; }
.page-end { padding-top: var(--space-12); padding-bottom: var(--space-16); border-top: 1px solid var(--border); }

/* ---- Footer ---- */
.site-footer { background: var(--surface-000); border-top: 1px solid var(--border); color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.footer-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4);
  padding-top: var(--space-6); padding-bottom: var(--space-6);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); }

/* ---- Fasa 3 (spec 2026-10-09-website-rcg-motion-design.md): static parts of the new markup ---- */
/* Hero headline: each sentence sits in a mask so it can rise into view (see Motion). */
.hero h1 .line { overflow: hidden; overflow: clip; padding-bottom: .12em; margin-bottom: -.12em; }

/* Diagram "From one back office to every branch" (§3). Wide on desktop, tall on phones. */
.hub-fig { margin: 0; }
.hub-svg { width: 100%; height: auto; margin-inline: auto; }
.hub-wide { display: none; max-width: 980px; }
.hub-tall { max-width: 400px; }
@media (min-width: 860px) { .hub-wide { display: block; } .hub-tall { display: none; } }
.hub-svg .lbl { font-family: var(--font-sans); font-size: 14px; font-weight: 500; fill: var(--ink); }
.hub-svg .hub-head { font-family: var(--font-display); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; fill: var(--ink-muted); }
.hub-svg .core-lbl { font-family: var(--font-display); font-size: 10.5px; font-weight: 800; letter-spacing: .1em; fill: var(--ink); }
.hub-svg .node { fill: var(--surface-000); stroke: var(--ink); stroke-width: 1.5; }
.hub-svg .wire { fill: none; stroke: var(--border-strong); stroke-width: 1.25; }
.hub-svg .pulse { fill: none; stroke: var(--brand-red); stroke-width: 3; opacity: 0; }
.hub-svg .core-bg { fill: var(--surface-000); }

/* What we do: a large outlined number behind each area (decoration, aria-hidden). */
.area { position: relative; isolation: isolate; }
.area .wrap { position: relative; }
@media (forced-colors: active) { .area-num { display: none; } }
.area-num {
  position: absolute; z-index: -1; top: -8px; right: var(--space-4); pointer-events: none;
  font-family: var(--font-display); font-weight: 800; font-size: 96px; line-height: 1; letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1px var(--border);
}
@media (min-width: 720px) { .area-num { right: var(--space-8); font-size: 160px; } }
@media (min-width: 1100px) { .area-num { top: -24px; font-size: 220px; } }

/* =====================================================================
   Motion (spec fasa 3: docs/superpowers/specs/2026-10-09-website-rcg-motion-design.md)
   M5: every movement sits inside prefers-reduced-motion: no-preference.
   M6: scroll-linked movement also sits inside @supports (animation-timeline: view()) (+ animation-range).
   M7: every reveal ends by "entry 100%", so nothing at the foot of a page stays faded.
   M9: pointer effects need html.js (added by site.js) and a mouse.
   Page-load and reveals animate translate/scale/opacity/filter; hover and pointer use transform,
   so the two never fight over one property.
   ===================================================================== */
@property --hero-r { syntax: "<length>"; inherits: false; initial-value: 1400px; }
@property --hub-i { syntax: "<integer>"; inherits: false; initial-value: 0; }
@property --hub-d { syntax: "<time>"; inherits: false; initial-value: 0s; }

/* ---- The look: static, also with reduced motion ---- */
@media (min-width: 720px) {
  html { scroll-padding-top: 80px; }
  .site-header { position: sticky; top: 0; z-index: 30; }
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .065) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .065) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(circle at 84% 92%, #000 0, #000 calc(var(--hero-r) * .35), transparent var(--hero-r));
  mask-image: radial-gradient(circle at 84% 92%, #000 0, #000 calc(var(--hero-r) * .35), transparent var(--hero-r));
}
.hero::after {
  content: ""; position: absolute; z-index: 0; right: -18%; bottom: -55%; width: 75%; aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(239, 90, 83, .2), rgba(239, 90, 83, .06) 55%, transparent);
}
.hero .eyebrow { display: flex; align-items: center; gap: var(--space-3); }
.hero .eyebrow::before { content: ""; flex: none; width: 28px; height: 2px; background: #ef5a53; transform-origin: left; }
.card { position: relative; isolation: isolate; }
.card::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px;
  background: var(--brand-red); transform: scaleX(0); transform-origin: left;
}
.card-key::before { top: -3px; }
.card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background: radial-gradient(120% 90% at var(--gx, 0%) var(--gy, 0%), color-mix(in srgb, var(--brand-red) 9%, transparent), transparent 60%);
}
.card:is(:hover, :focus-within)::before { transform: scaleX(1); }
.card:hover::after { opacity: 1; }
.card:is(:hover, :focus-within) .card-label { color: var(--brand-red); }
.card-more a { display: inline-block; }
.row { position: relative; }

@media screen and (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* ---- Hover and focus ---- */
  .card { transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out); }
  .card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .45); }
  .card::before { transition: transform .7s var(--ease-out); }
  .card::after { transition: opacity .6s var(--ease-out); }
  .card-label { transition: color .4s ease; }
  .card-more a { transition: transform .45s var(--ease-out); }
  .card:is(:hover, :focus-within) .card-more a { transform: translateX(6px); }
  .btn { position: relative; overflow: hidden; isolation: isolate; transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out); }
  .btn::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, .38) 50%, transparent 75%);
    translate: -130% 0; transition: translate .9s var(--ease-out);
  }
  .btn:hover::after { translate: 130% 0; }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(203, 33, 26, .5); }

  /* ---- Home hero: about 2.5 s once, then it holds still ---- */
  .hero::before { animation: rcg-grid-open 2.6s var(--ease-out) .05s both; }
  .hero::after { animation: rcg-glow-in 2.2s var(--ease-out) 1.1s both; }
  .hero .eyebrow { animation: rcg-eyebrow-in 1s var(--ease-out) .15s both; }
  .hero .eyebrow::before { animation: rcg-grow-x .9s var(--ease-out) .35s both; }
  .hero h1 .line > span { animation: rcg-line-up 1.1s var(--ease-out) .3s both; }
  .hero h1 .line + .line > span { animation-delay: .45s; }
  .hero .lead { animation: rcg-blur-up 1s var(--ease-out) .75s both; }
  .hero .tagline { animation: rcg-blur-up 1s var(--ease-out) .9s both; }
  .hero .btn { animation: rcg-blur-up 1s var(--ease-out) 1.05s both; }
  .hero-mark rect { stroke-linecap: square; }
  .hero-mark rect:nth-child(1), .hero-mark rect:nth-child(3) { stroke-dasharray: 632; }
  .hero-mark rect:nth-child(1) { animation: rcg-draw-632 1.2s var(--ease-io) .2s both; }
  .hero-mark rect:nth-child(3) { animation: rcg-draw-632 1.2s var(--ease-io) .4s both; }
  .hero-mark rect:nth-child(2) { stroke-dasharray: 684; animation: rcg-draw-684 1.2s var(--ease-io) .75s both, rcg-slide-in 1.5s var(--ease-out) .75s both; }
  .hero-mark { animation: rcg-mark-glow 2s ease-out 1.8s both; }

  /* ---- Page heads (What we do, privacy, support, 404) ---- */
  :is(.doc, .page-head) .eyebrow { animation: rcg-fade .8s ease-out both; }
  :is(.doc, .page-head) h1 { animation: rcg-rise-sm .9s var(--ease-out) .05s both; }
  :is(.doc, .page-head) .lead { animation: rcg-blur-up 1s var(--ease-out) .2s both; }
  .area-key { border-top-color: var(--border); }
  .area-key::before {
    content: ""; position: absolute; left: 0; right: 0; top: -3px; height: 3px; background: var(--brand-red);
    transform-origin: left; animation: rcg-grow-x 1.2s var(--ease-io) .4s both;
  }

  /* ---- Diagram dots: they move only while site.js marks the diagram as flowing (M8) ---- */
  .js .hub-svg .pulse { stroke-dasharray: .07 2; }
  .js .hub-fig.is-flowing .pulse { animation: rcg-flow 2.4s linear infinite; }
  .js .hub-svg .pulse:nth-child(2) { animation-delay: .2s; }
  .js .hub-svg .pulse:nth-child(3) { animation-delay: .4s; }
  .js .hub-svg .pulse:nth-child(4) { animation-delay: .6s; }
  .js .hub-svg .pulse:nth-child(5) { animation-delay: .8s; }
  .js .hub-svg .pulse:nth-child(6) { animation-delay: 1s; }
  .js .hub-svg .r .pulse { animation-delay: 1.2s; }
  .js .hub-svg .r .pulse:nth-child(2) { animation-delay: 1.4s; }
  .js .hub-svg .r .pulse:nth-child(3) { animation-delay: 1.6s; }
  .js .hub-svg .r .pulse:nth-child(4) { animation-delay: 1.8s; }
  .js .hub-svg .r .pulse:nth-child(5) { animation-delay: 2s; }
  .js .hub-svg .r .pulse:nth-child(6) { animation-delay: 2.2s; }
  .js .hub-tall .pulse:nth-child(2) { animation-delay: .8s; }
  .js .hub-tall .pulse:nth-child(3) { animation-delay: 1.6s; }
  .js .hub-fig.is-flowing .core .mark-red { animation: rcg-beat 2.4s ease-in-out 1s infinite; }

  /* ---- Diagram build (spec §3, amended in task 6): site.js adds .is-drawn the first time the diagram is a
     quarter on screen, and it assembles itself in about 2.6 s: areas, wires in, the mark, wires out, places.
     With site.js the parts wait hidden until then; without it the diagram is simply whole. ---- */
  .js .hub-svg .wire { stroke-dasharray: 1; }
  .js .hub-fig:not(.is-drawn) :is(.lbl, .hub-head, .core-lbl, .node, .core) { opacity: 0; }
  .js .hub-fig:not(.is-drawn) .wire { stroke-dashoffset: 1; }
  .js .hub-fig.is-drawn :is(.lbl, .hub-head, .core-lbl) { animation: rcg-fade .6s ease-out backwards; }
  .js .hub-fig.is-drawn :is(.node, .core) { transform-box: fill-box; transform-origin: center; animation: rcg-pop .55s var(--ease-out) backwards; }
  .js .hub-fig.is-drawn .wire { --hub-d: .25s; animation: rcg-dash .7s var(--ease-io) backwards; }
  .js .hub-fig.is-drawn .trunk { --hub-d: .2s; animation-duration: 1.6s; }
  .js .hub-fig.is-drawn .core { --hub-d: .8s; }
  .js .hub-fig.is-drawn .core-lbl { --hub-d: 1s; }
  .js .hub-fig.is-drawn .r .wire { --hub-d: 1.25s; }
  .js .hub-fig.is-drawn .r :is(.lbl, .hub-head, .node) { --hub-d: 1.6s; }
  .js .hub-fig.is-drawn g > :nth-child(2) { --hub-i: 1; }
  .js .hub-fig.is-drawn g > :nth-child(3) { --hub-i: 2; }
  .js .hub-fig.is-drawn g > :nth-child(4) { --hub-i: 3; }
  .js .hub-fig.is-drawn g > :nth-child(5) { --hub-i: 4; }
  .js .hub-fig.is-drawn g > :nth-child(6) { --hub-i: 5; }
  .js .hub-fig.is-drawn :is(.lbl, .hub-head, .core-lbl, .node, .core, .wire) { animation-delay: calc(var(--hub-d) + var(--hub-i) * 70ms); }

  /* ---- Page transitions (M11) ---- */
  @view-transition { navigation: auto; }
  @media (min-width: 720px) { .site-header { view-transition-name: site-header; } }
  ::view-transition-old(root) { animation: rcg-vt-out .25s ease-in both; }
  ::view-transition-new(root) { animation: rcg-vt-in .45s var(--ease-out) both; }

  /* ---- Scroll-linked (M6). Every reveal range ends by entry 100% (M7). ---- */
  @supports (animation-timeline: view()) and (animation-range: entry 0% entry 100%) {
    body::before {
      content: ""; position: fixed; z-index: 40; top: 0; left: 0; right: 0; height: 2px; pointer-events: none;
      background: var(--brand-red); transform-origin: 0 50%; scale: 0 1;
      animation: rcg-progress linear both; animation-timeline: scroll(root);
    }
    .site-header { animation: rcg-glass linear both; animation-timeline: scroll(root); animation-range: 0px 160px; }

    .hero { view-timeline: --rcg-hero block 0px; }
    .hero-text { animation: rcg-hero-out linear both; animation-timeline: --rcg-hero; animation-range: exit 0% exit 90%; }
    .hero-mark {
      animation: rcg-mark-glow 2s ease-out 1.8s both, rcg-drift linear both;
      animation-timeline: auto, --rcg-hero; animation-range: normal, exit 0% exit 100%;
    }

    :is(.section .eyebrow, .section-title, .section .label, .contact .company, .contact-logo img, .area .card-label, .area h2, .area-text > p, .area li) {
      animation: rcg-rise var(--ease-out) both; animation-timeline: view(); animation-range: entry 0% entry 100%;
    }
    .card { animation: rcg-card-in var(--ease-out) both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
    .card:nth-child(3n+2) { animation-range: entry 10% entry 90%; }
    .card:nth-child(3n) { animation-range: entry 20% entry 100%; }
    .row { view-timeline: --rcg-row block; animation: rcg-rise var(--ease-out) both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
    .row::after {
      content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--border-strong);
      transform-origin: left; animation: rcg-grow-x var(--ease-io) both; animation-timeline: --rcg-row; animation-range: entry 40% entry 100%;
    }

    .area figure { animation: rcg-unveil var(--ease-io) backwards; animation-timeline: view(); animation-range: entry 0% entry 100%; }
    .area figure img { animation: rcg-settle var(--ease-out) both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
    .area-num { animation: rcg-parallax linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }

  }
}

/* ---- Pointer effects (M9): need site.js and a mouse ---- */
@media screen and (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .js .hero { background-image: radial-gradient(520px circle at var(--mx, 82%) var(--my, 88%), rgba(239, 90, 83, .17), transparent 62%); }
  .js .card { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out, box-shadow .6s var(--ease-out); }
  .js .card:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5); }
  .js .hero .btn { transform: translate(var(--bx, 0px), var(--by, 0px)); transition: transform .3s var(--ease-out), box-shadow .45s var(--ease-out); }
  .js .area figure img, .js .contact-logo img { transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .4s var(--ease-out); }
}

@keyframes rcg-fade { from { opacity: 0; } }
@keyframes rcg-rise { from { opacity: 0; translate: 0 44px; } }
@keyframes rcg-rise-sm { from { opacity: 0; translate: 0 18px; } }
@keyframes rcg-line-up { from { translate: 0 110%; } }
@keyframes rcg-blur-up { from { opacity: 0; translate: 0 18px; filter: blur(8px); } }
@keyframes rcg-eyebrow-in { from { opacity: 0; translate: -14px 0; } }
@keyframes rcg-grow-x { from { scale: 0 1; } }
@keyframes rcg-draw-632 { from { stroke-dashoffset: 632; } to { stroke-dashoffset: 0; } }
@keyframes rcg-draw-684 { from { stroke-dashoffset: 684; } to { stroke-dashoffset: 0; } }
@keyframes rcg-slide-in { from { transform: translateX(-46px); } }
@keyframes rcg-mark-glow {
  0% { filter: drop-shadow(0 0 0 rgba(239, 90, 83, 0)); }
  40% { filter: drop-shadow(0 0 30px rgba(239, 90, 83, .65)); }
  100% { filter: drop-shadow(0 0 10px rgba(239, 90, 83, .2)); }
}
@keyframes rcg-grid-open { from { --hero-r: 0px; } to { --hero-r: 1400px; } }
@keyframes rcg-glow-in { from { opacity: 0; scale: .5; } }
@keyframes rcg-drift { to { translate: 0 -110px; rotate: -7deg; } }
@keyframes rcg-hero-out { to { opacity: .1; transform: translateY(-56px) scale(.97); } }
@keyframes rcg-card-in { from { opacity: 0; translate: 0 72px; scale: .94; } }
@keyframes rcg-unveil { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rcg-settle { from { scale: 1.06; } }
@keyframes rcg-parallax { from { translate: 0 60px; } to { translate: 0 -60px; } }
@keyframes rcg-dash { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes rcg-pop { from { opacity: 0; transform: scale(.15); } }
@keyframes rcg-flow { 0% { stroke-dashoffset: .07; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { stroke-dashoffset: -1; opacity: 0; } }
@keyframes rcg-beat { 50% { stroke-width: 40; } }
@keyframes rcg-progress { from { scale: 0 1; } to { scale: 1 1; } }
@keyframes rcg-glass {
  to {
    background-color: color-mix(in srgb, var(--surface-000) 76%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
    box-shadow: 0 16px 36px -28px rgba(0, 0, 0, .45);
  }
}
@keyframes rcg-vt-out { to { opacity: 0; translate: 0 -8px; } }
@keyframes rcg-vt-in { from { opacity: 0; translate: 0 12px; } }
