/* ============================================================================
   SADER — SECTION: PILLARS  (s-pillars)  ·  "Our Culture"
   A DIAGEO-hero composition reimagined classic, dark and STRICTLY MONOCHROME:
   a white line-art founder floats centre as the hero object under a top-centre
   spotlight, the ground falling to black at the edges (chiaroscuro); an
   editorial serif headline sits upper-start; three quiet glass cards scatter
   asymmetrically around him; a fine hairline "plinth" seats the figure.

   Synthesised from a multi-variant design pass (spotlight base + museum-plate
   plinth/numerals/sub-label + token-discipline grafts). Colour comes ONLY from
   the dark-theme tokens + white-alpha — no warm / gold / brass tint anywhere.
   Logical properties throughout, so the same markup mirrors for the RTL build.
   Reuses tokens + .section / .container / .eyebrow / .section-head.
   ============================================================================ */

.s-pillars {
  position: relative;
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  min-block-size: 100vh;
  min-block-size: 100svh;
  background-color: var(--bg);       /* #0E0E0E via data-theme="dark"; vignette deepens edges to black */
  color: var(--text);
}

/* A single fine white seam at the very top edge — quiet luxury framing. */
.s-pillars::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 1px;
  z-index: 1;
  background-color: var(--line);
  pointer-events: none;
}

/* ---- Spotlight ground ----------------------------------------------------- */
.s-pillars__ground {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* The beam: a soft white low-alpha cone descending from top-centre, seating
   the figure in light. Two stacked radials = a tight core + a wider wash. */
.s-pillars__spotlight {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 70% at 50% 8%,
      rgba(255, 255, 255, 0.10) 0%,
      rgba(255, 255, 255, 0.045) 34%,
      rgba(255, 255, 255, 0) 62%),
    radial-gradient(34% 92% at 50% 30%,
      rgba(255, 255, 255, 0.065) 0%,
      rgba(255, 255, 255, 0) 60%);
}

/* The fall-off: a vignette pulling the corners to pure black. */
.s-pillars__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 120% at 50% 42%,
      rgba(0, 0, 0, 0) 38%,
      rgba(0, 0, 0, 0.55) 78%,
      rgba(0, 0, 0, 1) 100%),
    linear-gradient(to bottom,
      rgba(0, 0, 0, 0.45) 0%,
      rgba(0, 0, 0, 0) 22%);
}

/* ---- Content shell -------------------------------------------------------- */
.s-pillars__inner {
  position: relative;
  z-index: 2;
  inline-size: 100%;
}

/* ---- Headline (upper-start, start-aligned) -------------------------------- */
.s-pillars__head {
  text-align: start;
  align-items: flex-start;
  gap: var(--space-4);
  max-inline-size: 34rem;
  margin-block-end: 0;               /* the stage supplies the gap below */
}
.s-pillars__head .eyebrow { color: var(--text-muted); }
.s-pillars__title {
  font-size: var(--fs-display-3);    /* large, but kept to one predictable line */
  line-height: 1.04;
}
@media (min-width: 1024px) {
  .s-pillars__title { white-space: nowrap; }  /* "Our Culture" stays one line → headline height is predictable */
}
.s-pillars__lead {
  max-inline-size: 30rem;
  color: var(--text-muted);
}

/* ---- The stage ------------------------------------------------------------ */
.s-pillars__stage {
  position: relative;
  margin-block-start: clamp(var(--space-7), 5vw, var(--space-10));
}

/* ---- The hero object: the white founder cutout --------------------------- */
/* No card, no border, no radius, no rectangle shadow — it is a cutout that
   floats directly on the lit ground. Depth = a halo behind + a soft drop
   shadow that follows the silhouette, and a fine plinth beneath. */
.s-pillars__figure {
  position: relative;
  margin: 0 auto;
  inline-size: fit-content;
  z-index: 1;
}
/* Radial halo seating the figure on the ground (white, very low alpha). */
.s-pillars__figure::before {
  content: "";
  position: absolute;
  inset-block: -4% -2%;
  inset-inline: -28%;
  z-index: -1;
  background: radial-gradient(50% 56% at 50% 40%,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.04) 40%,
    rgba(255, 255, 255, 0) 72%);
  filter: blur(10px);
  pointer-events: none;
}
.s-pillars__portrait {
  display: block;
  inline-size: auto;
  /* Tall and prominent like the bottle, but always capped to the viewport so
     it never clips. Intrinsic 544x1596 (ratio ~1:2.93). */
  /* Capped by viewport WIDTH too (55vw) so on narrower screens the figure
     shrinks and always leaves clear margins for the side cards. */
  block-size: min(clamp(40rem, 94vh, 66rem), 68vw);
  aspect-ratio: 1416 / 1596;         /* wide frame: centres the figure, room for cards both sides */
  max-inline-size: 100%;
  object-fit: contain;
  /* Silhouette-following shadow (NOT a rectangle) to lift it off the ground. */
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.7));
}

/* The "plinth": a fine hairline dropping from beneath the figure to a feathered
   baseline rule — the pedestal the exhibit stands on (gallery gravitas). */
.s-pillars__plinth {
  position: absolute;
  inset-block-end: -1.6rem;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  inline-size: 1px;
  block-size: 1.6rem;
  background: linear-gradient(to bottom,
    rgba(255, 255, 255, 0) 0%, var(--line-strong) 100%);
  pointer-events: none;
}
.s-pillars__plinth::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  inline-size: clamp(8rem, 24vw, 13rem);
  block-size: 1px;
  background: linear-gradient(to right,
    rgba(255, 255, 255, 0) 0%,
    var(--line-strong) 24%,
    var(--line-strong) 76%,
    rgba(255, 255, 255, 0) 100%);
}

/* ---- The pillar cards (Diageo-clean: title + paragraph, soft panel) ------ */
/* No numeral, no sub-label, no bright top rule — just a quiet translucent
   panel with a restrained serif title and a grey paragraph, like Diageo. */
.s-pillars__card {
  position: relative;
  padding-block: clamp(var(--space-6), 2.6vw, var(--space-7));
  padding-inline: clamp(var(--space-6), 2.6vw, var(--space-7));
  background-color: color-mix(in srgb, var(--surface) 78%, transparent);
  border-radius: var(--radius-xs);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
@supports (backdrop-filter: blur(1px)) {
  .s-pillars__card {
    background-color: color-mix(in srgb, var(--surface) 58%, transparent);
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
  }
}

/* Restrained serif title — regular weight, moderate scale (Diageo-quiet). */
.s-pillars__card-title {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);
  font-weight: var(--fw-regular, 400);
  line-height: var(--lh-snug, 1.2);
  letter-spacing: var(--tracking-tight);
  color: var(--text);
}
.s-pillars__card-text {
  margin-block-start: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-muted);
}

@media (prefers-reduced-motion: no-preference) {
  .s-pillars__card {
    transition:
      transform var(--dur-base) var(--ease),
      background-color var(--dur-base) var(--ease),
      box-shadow var(--dur-base) var(--ease);
  }
  .s-pillars__card:hover,
  .s-pillars__card:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 30px 72px rgba(0, 0, 0, 0.6);
  }
}

/* ============================================================================
   WIDE (>=901px): the scattered still-life composition.
   Cards float absolutely AROUND the centred figure (Diageo move). Positions
   use logical inset-inline-* so the whole scatter mirrors automatically in RTL.
   ============================================================================ */
@media (min-width: 1024px) {
  /* Tighter vertical padding on this composed section (less blank height). */
  .s-pillars { padding-block: clamp(3rem, 2rem + 2.4vw, 5rem); }

  .s-pillars__inner { position: relative; }

  /* Headline OVERLAYS the stage's top-start (Diageo). It no longer adds a
     separate band on top, so the figure rises beside it and fills the
     top-end void — removing the big empty band and shortening the section. */
  .s-pillars__head {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    /* shrinks on narrower screens so it always clears the centred figure */
    max-inline-size: clamp(22rem, 30vw, 30rem);
    margin: 0;
    z-index: 3;
  }
  .s-pillars__stage {
    margin-block-start: 0;
    /* The END side stacks TWO cards (--b top, --c bottom); on short windows the
       stage pins to its floor, so the floor must clear BOTH stacked cards plus a
       gap — not just one corner card. A 44rem floor keeps a comfortable space
       between --b and --c even in the 1024–1280 band where the cards are
       narrowest and their copy wraps tallest (a 38rem floor let them touch).
       No width-cap here — that would shorten the stage on small windows and
       re-introduce the headline/card collision. */
    min-block-size: clamp(48rem, 92vh, 64rem);
  }

  /* The figure is the hero object — centre-RIGHT like the Diageo bottle, NOT
     dead-centre — bottom-aligned so the plinth sits on the ground. The wide
     1416/1596 frame keeps the visible man centred with clear margins either
     side, so a card can sit left AND right without ever covering him. */
  /* Anchored by BOTH insets (no transform — a positioning transform would be
     clobbered by the .reveal animation). start:30% / end:14% centres the
     visible man at ~58% — centre-right like the bottle — with clear margins
     either side for the cards. object-fit:contain keeps him the same size. */
  .s-pillars__figure {
    position: absolute;
    inset-block-end: 0;
    inset-inline-start: 30%;
    inset-inline-end: 14%;
    margin: 0;
    z-index: 1;
  }

  .s-pillars__card {
    position: absolute;
    inline-size: clamp(16rem, 18vw, 18rem);
    z-index: 2;
  }
  /* Cards sit in the three free corners around the centred figure — the
     headline holds the fourth (top-start). Nothing shares a vertical band, so
     there is never a collision with the headline, the figure, or each other. */
  /* Knowledge — bottom, START side (left). */
  .s-pillars__card--a {
    inset-block-end: 4%;
    inset-inline-start: 0;
  }
  /* Accessibility — top, END side (right). */
  .s-pillars__card--b {
    inset-block-start: 4%;
    inset-inline-end: 0;
  }
  /* Community — bottom, END side (right). */
  .s-pillars__card--c {
    inset-block-end: 4%;
    inset-inline-end: 0;
  }

  /* The spotlight beam follows the figure to centre-right (mirrors for RTL). */
  .s-pillars__spotlight {
    background:
      radial-gradient(46% 72% at 57% 8%,
        rgba(255, 255, 255, 0.11) 0%,
        rgba(255, 255, 255, 0.05) 34%,
        rgba(255, 255, 255, 0) 62%),
      radial-gradient(30% 92% at 57% 32%,
        rgba(255, 255, 255, 0.07) 0%,
        rgba(255, 255, 255, 0) 60%);
  }
  [dir="rtl"] .s-pillars__spotlight {
    background:
      radial-gradient(46% 72% at 43% 8%,
        rgba(255, 255, 255, 0.11) 0%,
        rgba(255, 255, 255, 0.05) 34%,
        rgba(255, 255, 255, 0) 62%),
      radial-gradient(30% 92% at 43% 32%,
        rgba(255, 255, 255, 0.07) 0%,
        rgba(255, 255, 255, 0) 60%);
  }
}

/* Slightly larger cards on very wide screens. */
@media (min-width: 1280px) {
  .s-pillars__card { inline-size: clamp(17rem, 18vw, 19rem); }
}

/* ============================================================================
   NARROW (<=900px): graceful single-column reflow — headline, figure, then the
   three cards in reading order. No absolute positioning, no overlap, no clip.
   ============================================================================ */
@media (max-width: 1023px) {
  .s-pillars__head { max-inline-size: 40rem; }

  .s-pillars__stage {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-6);
  }

  .s-pillars__figure {
    align-self: center;
    margin-block-end: var(--space-4);
  }
  .s-pillars__portrait {
    block-size: clamp(22rem, 56vh, 34rem);
  }

  .s-pillars__card { inline-size: 100%; }

  /* Keep the spotlight centred on the smaller figure. */
  .s-pillars__spotlight {
    background:
      radial-gradient(80% 48% at 50% 6%,
        rgba(255, 255, 255, 0.10) 0%,
        rgba(255, 255, 255, 0.04) 36%,
        rgba(255, 255, 255, 0) 64%);
  }
}

@media (max-width: 560px) {
  .s-pillars__portrait { block-size: clamp(18rem, 52vh, 26rem); }
}

/* ============================================================================
   PILLAR HOVER · s-pillars__trace
   On hover, a single small red dot travels around that card's own border — a
   quiet "this pillar is live" tell. No wire, no bloom: just the dot tracing the
   edge, with the tightest possible glow so it never washes the card in red.

   Colour stays disciplined — the dot is the one micro-spark of SADER red, the
   same licence the design grants its pills. Built + driven by pillars-circuit.js
   (progressive enhancement); without JS the cards behave exactly as before.
   ============================================================================ */
.s-pillars {
  --trace-dot: #e5484d;    /* a refined ruby — visible on the dark card edge */
}

/* SVG overlay sized exactly to its card; the dot rides the border path. Sits
   above the card surface but ignores pointer events so hovering is unaffected. */
.s-pillars__trace {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

/* The travelling comet: a tapering tail, a soft glow, and a bright head — all
   riding the border line so the red never spreads across the card. The whole
   group fades in/out with the hover. */
.s-pillars__trace-comet {
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.s-pillars__card.is-tracing .s-pillars__trace-comet { opacity: 1; }

/* tail — dense ruby samples, sized + faded per-frame by JS; the group blur
   fuses them into one smooth meteor streak rather than a row of dots */
.s-pillars__trace-tail { filter: blur(2px); }
.s-pillars__trace-trail { fill: var(--trace-dot); }

/* soft glow that travels under the head; gently breathes for a sense of life */
.s-pillars__trace-halo {
  fill: var(--trace-dot);
  filter: blur(4px);
  opacity: 0.4;
  transform-box: fill-box;
  transform-origin: center;
}
.s-pillars__card.is-tracing .s-pillars__trace-halo {
  animation: s-pillars-pulse 1.6s var(--ease) infinite;
}

/* head — a bright hot core with the tightest of glows (no broad wash) */
.s-pillars__trace-head {
  fill: #ff5a6a;
  filter: drop-shadow(0 0 3px rgba(229, 72, 77, 0.65));
}

@keyframes s-pillars-pulse {
  0%, 100% { opacity: 0.32; transform: scale(0.92); }
  50%      { opacity: 0.5;  transform: scale(1.12); }
}

/* No motion preference → the comet doesn't appear (it is a pure-motion
   flourish, so there is nothing meaningful to show statically). */
@media (prefers-reduced-motion: reduce) {
  .s-pillars__card.is-tracing .s-pillars__trace-comet { opacity: 0; }
  .s-pillars__card.is-tracing .s-pillars__trace-halo { animation: none; }
}
