/* Auralis scene (GetLayers template "auralis"), scoped to the home page hero. Units: --ar = the template's adaptive rem. */
.asa-scene {
  --scene-backdrop: #8d959e;
  --overlay-ink: #ffffff;
  --overlay-scrim: rgba(0, 0, 0, 0.1);
  --overlay-glass: rgba(255, 255, 255, 0.1);
  --overlay-line: rgba(255, 255, 255, 0.2);
  --overlay-edge: rgba(255, 255, 255, 0.4);
  --overlay-strong: rgba(255, 255, 255, 0.8);
  --overlay-solid: #000000;
  --overlay-accent: #6fff85;
  --overlay-blur-header: 28px;
  --overlay-blur-glass: 6px;
  --overlay-blur-form: 16px;
  --act-seam: rgba(12, 14, 18, 0.9);
  --grain-opacity: 0.13;
  --font-display: "Google Sans Flex", system-ui, sans-serif;
}

.asa-scene { --ar: 16px; position: relative; background: var(--scene-backdrop); font-family: var(--font-display); line-height: 1.5; color: #171717; }
@media (max-width: 1920px) { .asa-scene { --ar: 0.833333vw; } }
@media (max-width: 1440px) { .asa-scene { --ar: 1.111111vw; } }
@media (max-width: 1024px) { .asa-scene { --ar: 1.5625vw; } }
@media (max-width: 640px)  { .asa-scene { --ar: 4.444444vw; } }
.asa-scene *, .asa-scene *::before, .asa-scene *::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; }
.asa-scene button, .asa-scene input { font: inherit; color: inherit; background: none; }
.asa-scene ul { list-style: none; }
.asa-scene a { color: inherit; text-decoration: inherit; }
.asa-scene .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* The pinned stage. `isolation: isolate` scopes the flares'/grain's mix-blend-mode to this
   container. On the phone layout it is the page's column instead (static, overflow visible). */
.stage { position: fixed; inset: 0; isolation: isolate; overflow: hidden; }
.spacer { width: 100%; height: 1180vh; }

/* Each act's section — no box at all on a laptop (`display: contents`), a full-screen section in
   document flow on a phone. The hero's height is set in px by the script (the large viewport). */
.flow { display: contents; }
.still, .seam { display: none; }

/* Its own compositor layer, so the blended DOM layers above never make WebKit flicker the canvas. */
.scene-holder {
  position: absolute; inset: 0;
  transform: translateZ(0); backface-visibility: hidden; will-change: transform;
}
.scene-holder canvas { display: block; }

/* ---- Light flares -------------------------------------------------------- */
.lights { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.flare-rays {
  position: absolute; left: 50%; top: 50%;
  width: 130vmax; height: 130vmax;
  margin-left: calc(130vmax / -2); margin-top: calc(130vmax / -2);
  background: url("light_1.png") center / cover;
  mix-blend-mode: overlay;
  opacity: 0;
}
.flare-glint {
  position: absolute; left: -16vw; bottom: -18vh; width: 78vw; height: 88vh;
  background: url("light_2.png") left bottom / cover no-repeat;
  mix-blend-mode: plus-lighter;
  transform-origin: 84.6% 22.7%;
  opacity: 0;
}
.flare-bokeh {
  position: absolute; inset: -10vmax;
  background: url("light_3.jpg") center / cover;
  mix-blend-mode: overlay;
  opacity: 0;
}

/* ---- Film grain (over scenes + flares, below the UI) --------------------- */
.grain {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  mix-blend-mode: overlay; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* ---- Header -------------------------------------------------------------- */
.site-header {
  pointer-events: auto;
  position: fixed; left: 0; right: 0; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  height: calc(3.25*var(--ar)); padding: 0 calc(1.25*var(--ar));
  border-bottom: 1px solid var(--overlay-line);
  background: var(--overlay-scrim);
  -webkit-backdrop-filter: blur(var(--overlay-blur-header)); backdrop-filter: blur(var(--overlay-blur-header));
  font-family: var(--font-display); font-size: calc(1*var(--ar)); line-height: 1.1; color: var(--overlay-ink);
}
.site-header nav { display: none; align-items: center; gap: calc(2.5*var(--ar)); }
.site-header nav a { white-space: nowrap; transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1); }
.site-header nav a:hover { opacity: 0.7; }
.site-header .cta { text-decoration: underline; text-decoration-thickness: from-font; text-underline-offset: 2px; }
.hdr-brand { display: flex; align-items: center; gap: calc(0.5*var(--ar)); white-space: nowrap; }
.hdr-brand .rule { display: none; height: 1px; width: calc(5*var(--ar)); }
.hdr-brand .rule.l { background: linear-gradient(to right, transparent, var(--overlay-edge)); }
.hdr-brand .rule.r { background: linear-gradient(to left, transparent, var(--overlay-edge)); }

/* The burger — a 44px target whose glyph sits flush with the header's right padding. Two rules at
   the wordmark's stroke weight, the lower one shorter; open, they cross into an X about the centre. */
.burger-wrap { display: block; }
.burger-btn {
  display: flex; width: calc(2.75*var(--ar)); height: calc(2.75*var(--ar)); align-items: center; justify-content: flex-end;
  padding-right: calc(0.6875*var(--ar)); cursor: pointer;
}
.burger { position: relative; z-index: 60; margin-right: -0.6875rem; }
.burger-lines { position: relative; display: block; height: calc(0.625*var(--ar)); width: calc(1.375*var(--ar)); }
.burger-lines span {
  position: absolute; right: 0; display: block; height: calc(0.09375*var(--ar)); border-radius: 9999px;
  background: var(--overlay-ink);
}
.burger-lines .top { top: 0; width: 100%; }
.burger-lines .bot { bottom: 0; width: calc(0.875*var(--ar)); }

@media (min-width: 768px) {
  .site-header { height: calc(2.625*var(--ar)); padding: 0 calc(1.875*var(--ar)); }
  .site-header nav { display: flex; }
  .hdr-brand { position: absolute; left: 50%; translate: -50% 0; }
  .hdr-brand .rule { display: block; }
  .burger-wrap { display: none; }
}

/* Mobile menu — portalled to <body> in the project (the header's backdrop-filter would otherwise
   be the containing block of the fixed panel). */
.menu-panel {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(1.75*var(--ar));
  background: var(--overlay-solid); color: var(--overlay-ink); font-family: var(--font-display);
  visibility: hidden; opacity: 0;
}
.menu-panel a {
  font-size: calc(1.5*var(--ar)); font-weight: 200; text-transform: uppercase; letter-spacing: 0.2em;
  opacity: 0;
}
.menu-panel a.cta { font-weight: 300; text-decoration: underline; text-decoration-thickness: from-font; text-underline-offset: 4px; }
.menu-close {
  position: fixed; right: calc(0.5625*var(--ar)); top: calc(0.25*var(--ar)); z-index: 60;
  opacity: 0; pointer-events: none;
}
@media (min-width: 768px) { .menu-panel, .menu-close { display: none; } }

/* ---- Act overlays -------------------------------------------------------- */
.act { position: absolute; inset: 0; z-index: 10; pointer-events: none; opacity: 0; visibility: hidden; }
.overlay-body {
  position: absolute; inset: 0; color: var(--overlay-ink); font-family: var(--font-display);
  user-select: none; -webkit-user-select: none;
}

/* Reveal engine (spring-text-engine's DOM): the tag is a wrapping flex row with a 0.3em column gap;
   each word is an inline-block (letters inside are inline-blocks for the heading variant). */
.rv { position: relative; display: flex; flex-wrap: wrap; column-gap: 0.3em; }
.rv-words { display: contents; }
.rv-word, .rv-unit { display: inline-block; }

.heading { font-weight: 200; text-transform: uppercase; line-height: 1.1; }

/* Hero (X act) */
.hero-words {
  position: absolute; left: calc(1.25*var(--ar)); right: calc(1.25*var(--ar)); top: 22%;
  display: flex; flex-direction: column; align-items: center; gap: calc(0.25*var(--ar));
}
.hero-word { font-size: calc(2.5*var(--ar)); white-space: nowrap; }
.hero-word-right { display: none; position: absolute; right: calc(1.875*var(--ar)); top: 50%; translate: 0 -50%; }
.hero-word-right .hero-word { font-size: calc(4*var(--ar)); }
.hero-footer { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 calc(1.25*var(--ar)) calc(1.25*var(--ar)); }
.pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(0.5*var(--ar)); }
.pill {
  display: flex; align-items: center; justify-content: center; white-space: nowrap;
  background: var(--overlay-glass); padding: calc(0.5*var(--ar));
  font-size: calc(0.8125*var(--ar)); font-weight: 300; line-height: 1.1;
  -webkit-backdrop-filter: blur(var(--overlay-blur-glass)); backdrop-filter: blur(var(--overlay-blur-glass));
}
.hero-rule { height: 1px; background: var(--overlay-line); margin: calc(1.25*var(--ar)) 0; }
.hero-bottom { display: flex; flex-direction: column; gap: calc(1*var(--ar)); }
.hero-tagline { font-size: calc(0.8125*var(--ar)); font-weight: 400; text-transform: uppercase; line-height: 1.2; }
.hero-ctas { pointer-events: auto; display: flex; flex-shrink: 0; align-items: center; gap: calc(0.5*var(--ar)); }
.hero-ctas > * { flex: 1 1 0%; }
.btn {
  display: flex; width: 100%; align-items: center; justify-content: center; white-space: nowrap;
  padding: calc(0.75*var(--ar)) calc(1*var(--ar)); font-size: calc(0.8125*var(--ar)); font-weight: 400; line-height: 1.1;
  color: var(--overlay-ink); cursor: pointer;
  transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1), background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-solid { background: var(--overlay-solid); }
.btn-solid:hover { opacity: 0.9; }
.btn-ghost {
  background: var(--overlay-glass); border: 1px solid var(--overlay-edge);
  -webkit-backdrop-filter: blur(var(--overlay-blur-glass)); backdrop-filter: blur(var(--overlay-blur-glass));
}
.btn-ghost:hover { background: var(--overlay-line); }
@media (min-width: 768px) {
  .hero-words { left: calc(1.875*var(--ar)); right: auto; top: 50%; translate: 0 -50%; display: block; }
  .hero-word { font-size: calc(4*var(--ar)); }
  .hero-word-mobile2 { display: none; }
  .hero-word-right { display: block; }
  .hero-footer { padding: 0 calc(1.875*var(--ar)) calc(1.875*var(--ar)); }
  .pills { width: fit-content; }
  .pill { width: calc(9.5*var(--ar)); padding: calc(0.5*var(--ar)) calc(1*var(--ar)); font-size: calc(1*var(--ar)); }
  .hero-rule { margin: calc(1.875*var(--ar)) 0; }
  .hero-bottom { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: calc(1.5*var(--ar)); }
  .hero-tagline-wrap { width: calc(34*var(--ar)); max-width: 45vw; }
  .hero-tagline { font-size: calc(1*var(--ar)); }
  .hero-ctas { gap: calc(0.75*var(--ar)); }
  .hero-ctas > * { flex: none; }
  .btn { width: calc(11.1875*var(--ar)); padding: calc(0.75*var(--ar)) calc(2.9375*var(--ar)); font-size: calc(1*var(--ar)); }
}

/* Tree act */
.tree-heading-wrap { position: absolute; left: 50%; top: calc(4.75*var(--ar)); translate: -50% 0; }
.tree-heading { font-size: calc(2.5*var(--ar)); white-space: nowrap; }
.tree-tag-left { position: absolute; left: calc(1.25*var(--ar)); right: calc(1.25*var(--ar)); top: calc(8.5*var(--ar)); text-align: center; }
.tree-tag-right { display: none; position: absolute; right: calc(1.875*var(--ar)); top: calc(50% - calc(1.125*var(--ar))); width: calc(20*var(--ar)); max-width: 24vw; text-align: right; }
.tree-tag { font-size: calc(0.8125*var(--ar)); font-weight: 300; line-height: 1.15; }
.tree-tag-left .tree-tag { justify-content: center; }
.tree-tag-right .tree-tag { justify-content: flex-end; font-size: calc(1*var(--ar)); line-height: 1.1; }
.contact-bar {
  pointer-events: auto;
  position: absolute; left: calc(1.25*var(--ar)); right: calc(1.25*var(--ar)); bottom: calc(1.25*var(--ar));
  display: flex; flex-direction: column; gap: calc(0.5*var(--ar));
  border: 1px solid var(--overlay-edge); background: var(--overlay-glass); padding: calc(0.75*var(--ar));
  -webkit-backdrop-filter: blur(var(--overlay-blur-form)); backdrop-filter: blur(var(--overlay-blur-form));
}
.contact-bar input {
  width: 100%; background: transparent; outline: none;
  font-size: calc(0.875*var(--ar)); font-weight: 300; line-height: 1.1; color: var(--overlay-ink);
}
.contact-bar input::placeholder { color: var(--overlay-strong); }
.contact-cta {
  display: flex; width: 100%; align-items: center; justify-content: center; gap: calc(0.625*var(--ar));
  white-space: nowrap; background: var(--overlay-solid); color: var(--overlay-ink);
  cursor: pointer; padding: calc(0.75*var(--ar)) calc(1*var(--ar)); font-size: calc(0.875*var(--ar)); line-height: 1.2;
  transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.contact-cta:hover { opacity: 0.9; }
.live-dot { width: calc(0.375*var(--ar)); height: calc(0.375*var(--ar)); flex-shrink: 0; background: var(--overlay-accent); }
@media (min-width: 768px) {
  .tree-heading-wrap { top: calc(6.0625*var(--ar)); }
  .tree-heading { font-size: calc(4*var(--ar)); }
  .tree-tag-left { left: calc(1.875*var(--ar)); right: auto; top: calc(50% - calc(1.125*var(--ar))); width: calc(20*var(--ar)); max-width: 24vw; text-align: left; }
  .tree-tag-left .tree-tag { justify-content: flex-start; }
  .tree-tag-right { display: block; }
  .tree-tag { font-size: calc(1*var(--ar)); line-height: 1.1; }
  /* Centring lives in `translate`, never in `transform` — the reveal spring owns `transform`. */
  .contact-bar {
    left: 50%; right: auto; bottom: calc(2.5*var(--ar)); translate: -50% 0;
    width: auto; flex-direction: row; align-items: center; gap: calc(2.6875*var(--ar));
    padding: calc(0.25*var(--ar)) calc(0.25*var(--ar)) calc(0.25*var(--ar)) calc(2*var(--ar));
  }
  .contact-bar input { width: calc(11.25*var(--ar)); font-size: calc(1*var(--ar)); }
  .contact-cta { width: auto; padding: calc(0.75*var(--ar)) calc(2.9375*var(--ar)); font-size: calc(1*var(--ar)); }
}

/* ---- The phone layout (below md): sections in document flow ------------- */

/* ===== Accounting Software Asia particle story (replaces the template's hand / wave / tree acts) =====
   One pinned stage on every screen: the canvas morphs X -> AutoCount -> Smart -> SQL -> UBS -> DEMO -> INSTALL ->
   TRAINING -> SUPPORT -> Agile logo + BEGIN, driven by scroll over a 1000vh spacer. */
.asa-scene .spacer { height: 1000vh; }
.asa-scene .stage { background: radial-gradient(55% 60% at 50% 42%, #d3d7dc 0%, #a3aab2 38%, #8d959e 62%, #6c747c 100%); }
.asa-scene .scene-holder canvas { width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
html.asa-live .asa-scene .scene-holder canvas { opacity: 1; }
.asa-scene .act { transition: opacity .6s ease, visibility 0s linear .6s; }
.asa-scene .act.is-on { opacity: 1; visibility: visible; transition: opacity .6s ease, visibility 0s; }
html:not(.asa-live) .asa-scene #act-hero { opacity: 1; visibility: visible; }
html:not(.asa-live) .asa-scene .flare-rays, html:not(.asa-live) .asa-scene .flare-glint, html:not(.asa-live) .asa-scene .flare-bokeh { background-image: none; }
html.asa-live .asa-scene .flare-rays { opacity: .55; }
html.asa-live .asa-scene .flare-bokeh { opacity: .5; }
/* hero: the particle X sits in the middle, the words stay left / right */
@media (max-width: 767px) { .asa-scene .hero-words { top: 13%; } }
/* step captions */
.asa-cap { position: absolute; left: calc(1.875*var(--ar)); right: calc(1.875*var(--ar)); bottom: calc(2.2*var(--ar)); z-index: 10; pointer-events: none;
	display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; color: #fff; font-family: var(--font-display); }
.asa-cap__step { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; position: absolute; left: 0; bottom: 0; max-width: min(36rem, 80vw); }
.asa-cap__step.is-on { opacity: 1; transform: none; position: relative; }
.asa-cap__num { display: block; font-size: max(12px, calc(.9*var(--ar))); letter-spacing: .24em; text-transform: uppercase; opacity: .8; margin-bottom: 8px; }
.asa-cap__h { display: block; font-size: max(30px, calc(3.4*var(--ar))); font-weight: 200; text-transform: uppercase; line-height: 1.02; margin-bottom: 8px; }
.asa-cap__t { display: block; font-size: max(15px, calc(1.1*var(--ar))); font-weight: 300; max-width: 30rem; }
.asa-cap__step a { pointer-events: auto; color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.asa-cap__bar { position: absolute; right: 0; bottom: 0; display: flex; gap: 6px; }
.asa-cap__bar i { width: 18px; height: 2px; background: rgba(255,255,255,.35); transition: background .3s; }
.asa-cap__bar i.is-on { background: #fff; }
/* finale: particles spell BEGIN with the Agile logo, so the template's heading text is hidden */
.asa-scene #act-tree .tree-heading-wrap { visibility: hidden; }
@media (max-width: 767px) {
	.asa-cap__h { font-size: 28px; }
	.asa-cap__bar { display: none; }
	.asa-scene .tree-tag-left { top: auto; bottom: calc(10.5*var(--ar)); }
}
@media (prefers-reduced-motion: reduce) { .asa-cap__step { transition: none; } }
.asa-cap:not(:has(.asa-cap__step.is-on)) .asa-cap__bar { opacity: 0; }
