/* ============================================================
   NAAS HOLDING â€” "Dynamic" option
   Additive layer on top of styles.css: WebGL hero, glass cards,
   gradient-mesh ambience, tilt interactions. Same palette, same
   content â€” just a more kinetic, high-performance presentation
   in the spirit of a modern flagship digital-studio site.
   ============================================================ */

/* ---------------------------------------------------------
   Homepage hero: gradient-mesh wash + WebGL canvas
   --------------------------------------------------------- */

.hero-mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1000px 640px at 82% 18%, rgba(126, 165, 155, 0.28), transparent 62%),
    radial-gradient(900px 720px at 68% 82%, rgba(7, 68, 50, 0.55), transparent 68%),
    radial-gradient(1400px 900px at 10% 50%, rgba(0, 35, 27, 0.4), transparent 70%);
  filter: saturate(1.15);
}
@keyframes meshDrift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-1.5%, 1.5%, 0) scale(1.04); }
}

#hero3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s var(--ease) 0.2s;
  /* The map runs the full width and the headline sits on it, so the
     canvas is pulled back under the type — far enough that the
     headline reads, not so far that the Americas disappear. */
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.6) 18%, rgba(0,0,0,0.82) 38%, #000 54%);
  mask-image: linear-gradient(to right, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.6) 18%, rgba(0,0,0,0.82) 38%, #000 54%);
}
/* In Arabic the headline sits on the right, so the fade turns round. */
[dir="rtl"] #hero3d {
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.6) 18%, rgba(0,0,0,0.82) 38%, #000 54%);
  mask-image: linear-gradient(to left, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.6) 18%, rgba(0,0,0,0.82) 38%, #000 54%);
}
/* On a phone the text fills the width, so the map simply sits behind
   it at low strength rather than being masked out sideways. */
@media (max-width: 720px) {
  #hero3d, [dir="rtl"] #hero3d {
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,0.5) 55%, rgba(0,0,0,0.25) 100%);
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,0.5) 55%, rgba(0,0,0,0.25) 100%);
  }
}
#hero3d.ready { opacity: 1; }

.hero.no-webgl .hero-mesh { opacity: 1; }
.hero.no-webgl::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(560px 560px at 76% 46%, rgba(126,165,155,0.22), transparent 70%);
}

@media (prefers-reduced-motion: reduce) {
  .hero-mesh { animation: none; }
  #hero3d { display: none; }
}

@media (max-width: 860px) {
  #hero3d { opacity: 0; transition: opacity 1.2s var(--ease) 0.2s; }
  #hero3d.ready { opacity: 0.72; }
}

/* The base stylesheet pools a wide radial of --void over the hero to
   keep the headline readable against the girih lattice. Here it is
   pulled in tight against the text column: wide enough to seat the
   headline, narrow enough that North and South America are not
   painted out along with the glare. */
body[data-page="home"] .hero::after {
  background:
    radial-gradient(600px 540px at 1% 46%, rgba(0, 35, 27, 0.9) 6%, rgba(0, 35, 27, 0.4) 42%, transparent 68%),
    linear-gradient(to top, var(--void) 1%, transparent 26%);
}
[dir="rtl"] body[data-page="home"] .hero::after {
  background:
    radial-gradient(600px 540px at 99% 46%, rgba(0, 35, 27, 0.9) 6%, rgba(0, 35, 27, 0.4) 42%, transparent 68%),
    linear-gradient(to top, var(--void) 1%, transparent 26%);
}

/* ---------------------------------------------------------
   Headline â€” a mask wipe rather than a plain fade. Insets end
   negative so the italic descenders of "Enduring value." are
   never clipped by the mask itself.
   --------------------------------------------------------- */

body[data-page="home"] .hero h1.rv {
  clip-path: inset(0 0 100% 0);
  transition: opacity 1.1s var(--ease), transform 1.2s var(--ease),
              clip-path 1.5s var(--ease);
  transition-delay: var(--rv-delay, 0ms);
}
body[data-page="home"] .hero h1.rv.in { clip-path: inset(-22% -12% -22% -12%); }

@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .hero h1.rv,
  body[data-page="home"] .hero h1.rv.in { clip-path: none; transition: none; }
}

/* ---------------------------------------------------------
   Ruled tables and lists.

   This file used to turn the sector cells, the governance pillars
   and the governance rows into rounded glass cards: a gradient
   fill, a bloom in one corner, a light under the pointer, a glow
   around the edge and icons that pulsed. All of that is gone. What
   is left is what a printed report would use — hairline rules,
   square corners, and one thin rule that draws in on hover.
   --------------------------------------------------------- */

/* Sectors: the ruled four-column table from styles.css, without the
   bloom behind each cell or the spinning glyph. */
.sector::before { content: none; }
.sector::after {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 2px;
  background: var(--accent-live);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--ease);
}
[dir="rtl"] .sector::after { transform-origin: right center; }
.sector:hover::after,
.sector:focus-within::after { transform: scaleX(1); }
.sector:hover { background: #0a4a37; }

/* Governance pillars: a definition list — term on one side, meaning
   on the other — instead of floating cards. */
.pillar:hover { transform: none; }
.gov-pillars { display: block; }
.gov-pillars .pillar {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
  gap: 1.6rem;
  padding: 1.9rem 0;
}
.gov-pillars .pillar:last-child { border-bottom: 1px solid var(--line-light); }
.s-dark .gov-pillars .pillar:last-child,
.s-void .gov-pillars .pillar:last-child { border-bottom-color: var(--line-dark); }
.gov-pillars .pillar h3 { margin: 0; }
.gov-pillars .pillar p { max-width: 56ch; }
@media (max-width: 720px) {
  .gov-pillars .pillar { grid-template-columns: 1fr; gap: 0.5rem; padding: 1.6rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sector::after { transition: none; }
}

/* On a phone each sector cell ran to nearly half a screen of padding
   and icon. Tightened so two cells fit in a view. */
@media (max-width: 640px) {
  .sector { padding: 1.9rem 1.5rem 2rem; }
  .sector-idx { margin-bottom: 1.3rem; }
}

/* Without the pictogram the number sits directly over the heading; it
   is given a short rule and a little more air so the cell still has a
   top and a body. */
.sector-idx { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 2.4rem; }
.sector-idx::after { content: ""; flex: 0 0 28px; height: 1px; background: rgba(143, 181, 171, 0.55); }
@media (max-width: 640px) { .sector-idx { margin-bottom: 1.3rem; } }
