/* ==========================================================================
   ALKEBULAN — v2
   Append to alkebulan-wp.css, or load as a third stylesheet after it.
   Contains: font corrections, spacing corrections, text-wrap corrections,
   and the new components used by the rebuilt home page.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FONT CORRECTIONS
   Three real bugs behind the "inconsistent fonts" note.
   -------------------------------------------------------------------------- */

/* (a) --mono was IBM Plex Mono, which is not loaded anywhere on the site.
       Every eyebrow, button and label was falling back to whatever monospace
       the visitor's OS supplies: Courier on Windows, Menlo on Mac. That is
       the single most visible inconsistency. Fira Code ships with the theme
       and is already served locally. */
:root { --mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace; }

/* (b) Twenty Twenty-Five sets every heading to Inter. Our display face is
       Manrope. Same specificity, so the winner depended on load order and
       varied by page. Settle it. */
.band h1, .band h2, .band h3, .band h4,
.band .wp-block-heading,
.hero h1, .hero h2, .hero .wp-block-heading {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.022em;
}
.hero .t-hero, .band .t-hero { font-weight: 800; letter-spacing: -0.032em; }

/* (c) The theme sets body weight to 300. Our design assumes 400. At 300 the
       text looked washed out beside 700 headings. */
.band, .hero, .band p, .hero p, .band li { font-weight: 400; }

/* --------------------------------------------------------------------------
   2. TEXT WRAP
   "Sentences that cut off in odd places" is ragging, not truncation.
   Headings need balanced lines; body copy needs a controlled measure.
   -------------------------------------------------------------------------- */
.band h1, .band h2, .band h3, .hero h1, .hero h2 { text-wrap: balance; }
.band p, .hero p { text-wrap: pretty; }
.hero .lede, .band .lede { max-width: 46ch; }
.band .split > .wp-block-column p { max-width: 54ch; }
.t-hero { max-width: 16ch; }

/* --------------------------------------------------------------------------
   3. SPACING
   --rhythm was 112px and stacked with the theme's own block gap. Reduced,
   and made to scale with the viewport instead of jumping at one breakpoint.
   -------------------------------------------------------------------------- */
:root { --rhythm: clamp(56px, 7vw, 92px); }
.band--tight { padding-block: clamp(36px, 4.5vw, 58px); }
.band .split { gap: clamp(32px, 5vw, 64px); }

/* --------------------------------------------------------------------------
   4. HERO
   Layered: gradient wash, the logo spiral as a large watermark, and a
   baseline rule that ties the type to the section below.
   -------------------------------------------------------------------------- */
.wp-block-cover.hero {
  background-color: var(--ink);
  position: relative;
  overflow: hidden;
}
.wp-block-cover.hero .wp-block-cover__background { opacity: 1; }

.wp-block-cover.hero::after {
  content: "";
  position: absolute;
  right: -8%;
  top: 50%;
  width: min(46vw, 560px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48cGF0aCBkPSJNNTQgNTAgSDYyIFY2MiBINDIgVjQwIEg3MiBWNzQgSDMwIFYyOCBIODQgVjgwIiBmaWxsPSJub25lIiBzdHJva2U9IiNEQUE1MjAiIHN0cm9rZS13aWR0aD0iMS42IiBzdHJva2UtbGluZWNhcD0ic3F1YXJlIi8+PC9zdmc+") center / contain no-repeat;
  opacity: 0.16;
  pointer-events: none;
}
.wp-block-cover.hero .wp-block-cover__inner-container { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 26px;
}
.hero-eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--gold);
  flex: none;
}

/* --------------------------------------------------------------------------
   5. NUMBERED FLOW
   The six transaction stages, as a connected sequence rather than six
   floating words. Right-angle geometry, taken from the logomark.
   -------------------------------------------------------------------------- */
.flow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}
.flow::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 5px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(218,165,32,0.25) 100%);
}
.flow li { position: relative; padding: 28px 16px 0 0; }
.flow li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 11px;
  height: 11px;
  background: var(--ink);
  border: 1px solid var(--gold);
}
.flow li:first-child::before { background: var(--gold); }
.flow .n {
  display: block;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 7px;
}
.flow .s {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: var(--text-light);
}
/* Below the breakpoint the row turns into a vertical timeline. A single
   horizontal rule cannot span a wrapped grid: rows after the first get no
   line at all. Running it vertically keeps the sequence continuous through
   all six stages. */
@media (max-width: 860px) {
  .flow {
    grid-template-columns: 1fr;
    row-gap: 0;
    padding-left: 26px;
  }
  .flow::before {
    left: 5px;
    right: auto;
    top: 6px;
    bottom: 6px;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg, var(--gold) 0%, rgba(218,165,32,0.25) 100%);
  }
  .flow li { padding: 0 0 26px 0; }
  .flow li:last-child { padding-bottom: 0; }
  .flow li::before { left: -26px; top: 3px; }
  .flow .n { margin-bottom: 4px; }
}

/* --------------------------------------------------------------------------
   6. ICONS
   Line icons drawn in the same right-angle language as the logomark.
   -------------------------------------------------------------------------- */
.icon {
  display: block;
  width: 40px;
  height: 40px;
  margin-bottom: 22px;
  color: var(--gold-deep);
}
.band--dark .icon, .band--ink .icon { color: var(--gold); }
.icon svg { width: 100%; height: 100%; display: block; }

/* --------------------------------------------------------------------------
   7. PLATFORM SUPPORTS
   Six items, icon over label, no cell borders. Sits directly on the band.
   -------------------------------------------------------------------------- */
.supports {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 52px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: none;
  border: 0;
}
.supports li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.supports li span {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.08rem, 1.5vw, 1.3rem);
  letter-spacing: -0.014em;
  line-height: 1.25;
  color: var(--text-light);
}
.supports .icon { width: 48px; height: 48px; margin-bottom: 22px; }

@media (max-width: 1020px) { .supports { gap: 40px 30px; } }
@media (max-width: 720px)  { .supports { grid-template-columns: 1fr 1fr; } }

/* --------------------------------------------------------------------------
   8. SOLUTION CARDS
   The two business lines, side by side. Dark cards on the light band so they
   carry weight without needing photography.
   -------------------------------------------------------------------------- */
.wp-block-columns.solution-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 0;
  align-items: stretch;
}
.wp-block-columns.solution-cards > .wp-block-column {
  flex-basis: auto !important;
  flex-grow: 0;
  min-width: 0;
  display: flex;
}

.solution-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--text-light);
  border-left: 2px solid var(--gold);
  padding: clamp(32px, 3.4vw, 52px);
}

.solution-card .icon {
  color: var(--gold);
  width: 46px;
  height: 46px;
  margin-bottom: 26px;
}

.solution-card .t-sub {
  color: var(--text-light);
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  line-height: 1.16;
  margin: 0;
}

.solution-card p {
  color: var(--text-light-muted);
  font-size: 1rem;
  max-width: 46ch;
  margin-top: 18px;
}

/* Pin the button to the foot so both cards align regardless of copy length. */
.solution-card .btn-row { margin-top: auto; padding-top: 34px; }

@media (max-width: 900px) {
  .wp-block-columns.solution-cards { grid-template-columns: 1fr; gap: 18px; }
}

/* --------------------------------------------------------------------------
   9. CLOSING STATEMENT
   -------------------------------------------------------------------------- */
.band .brand-line {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.6vw, 2.7rem);
  letter-spacing: -0.03em;
  line-height: 1.14;
  max-width: none;
  margin: 0;
}
.band .brand-line em { font-style: normal; color: var(--gold); }

/* --------------------------------------------------------------------------
   10. CREDIBILITY FIGURES
   Four figures in a row beneath the supports, sharing the same band. No
   borders, no cells: they sit on the band like the supports above them.
   The document asks for "verified facts or institutional categories"; the
   values are supplied by the client, so nothing here invents a number.
   -------------------------------------------------------------------------- */
.platform-rule {
  margin: 48px 0 44px;
  border: 0;
  height: 1px;
  background: var(--rule-dark);
  opacity: 1;
  max-width: none;
}

.stats,
.stats--row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: none;
  border: 0;
}
.stats li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.stats .icon { width: 26px; height: 26px; margin-bottom: 16px; color: var(--gold); }

.stats .figure {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--text-light);
  margin-bottom: 10px;
}
/* Bracketed values read as unfilled, not as content.
   Delete this whole rule once the client supplies real figures; the figures
   then inherit .stats .figure above and set at the full display size. */
.stats .figure.is-empty {
  color: var(--gold);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}

.stats .label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light-muted);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 30px 24px; }
  .platform-rule { margin: 38px 0 34px; }
}
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; gap: 26px; } }

/* --------------------------------------------------------------------------
   11. SECTOR CARDS
   Group > Image + Heading. Plain core blocks, so nothing fails validation in
   the editor. The overlay is done here: the image fills the card, a gradient
   scrim sits over its lower half, and the heading is positioned on top.
   Select the image in the editor and use Replace to swap in a photograph;
   no markup or CSS change is needed when the real images arrive.
   -------------------------------------------------------------------------- */
.wp-block-columns.sector-grid { gap: 24px; margin-bottom: 0; }
.wp-block-columns.sector-grid > .wp-block-column { min-width: 0; }

.sector-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.sector-card .sector-media { margin: 0; }
.sector-card .sector-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0;
  transition: transform .55s cubic-bezier(.22,.61,.36,1);
}
.sector-card:hover .sector-media img { transform: scale(1.04); }

/* Bottom-weighted scrim rather than a flat dim, so the top of the photograph
   stays clean and the title still holds contrast. */
.sector-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(27,27,30,0) 34%,
    rgba(27,27,30,0.55) 68%,
    rgba(27,27,30,0.90) 100%);
}

.sector-card .sector-name {
  position: absolute;
  z-index: 2;
  left: 26px;
  right: 26px;
  bottom: 24px;
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  letter-spacing: -0.022em;
  line-height: 1.12;
  color: #fff;
  text-wrap: balance;
}

/* Gold rule that extends on hover, tying the cards to the rest of the site. */
.sector-card .sector-name::after {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  background: var(--gold);
  margin-top: 14px;
  transition: width .35s cubic-bezier(.22,.61,.36,1);
}
.sector-card:hover .sector-name::after { width: 68px; }

@media (max-width: 782px) {
  .wp-block-columns.sector-grid { gap: 18px; }
  .sector-card .sector-name { left: 20px; right: 20px; bottom: 20px; }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .band .sector-grid { animation: rise-in linear both; animation-timeline: view(); animation-range: entry 0% cover 22%; }
  }
}

/* --------------------------------------------------------------------------
   12. MOTION
   CSS only, no JavaScript. Every rule sits inside a reduced-motion guard, so
   anyone who has asked their system for less motion gets a static page.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {

  /* Scroll reveal. Transform only, never opacity: if the scroll timeline
     never advances for any reason, the content is still fully visible and
     merely un-offset. Content that defaults to invisible is not a risk worth
     taking on a client site. */
  @supports (animation-timeline: view()) {
    .band .wp-block-columns,
    .band .flow li,
    .band .supports li,
    .band .stats li,
    .band .sector-grid {
      animation: rise-in linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }
    /* Stagger the flow so the sequence reads left to right. */
    .band .flow li:nth-child(2) { animation-range: entry 2% cover 24%; }
    .band .flow li:nth-child(3) { animation-range: entry 4% cover 26%; }
    .band .flow li:nth-child(4) { animation-range: entry 6% cover 28%; }
    .band .flow li:nth-child(5) { animation-range: entry 8% cover 30%; }
    .band .flow li:nth-child(6) { animation-range: entry 10% cover 32%; }
  }

  /* Hero settles once on load. Opacity is safe here: a one-shot animation
     with no timeline that can fail to advance. */
  .hero .t-hero,
  .hero .lede,
  .hero .btn-row { animation: hero-in .7s cubic-bezier(.22,.61,.36,1) both; }
  .hero .lede    { animation-delay: .1s; }
  .hero .btn-row { animation-delay: .18s; }

  /* Buttons and cards get a small, cheap affordance. */
  .band .wp-block-button__link,
  .hero .wp-block-button__link {
    transition: background-color .22s ease, color .22s ease, border-color .22s ease, transform .22s ease;
  }
  .band .wp-block-button__link:hover,
  .hero .wp-block-button__link:hover { transform: translateY(-2px); }
}

@keyframes rise-in {
  from { transform: translateY(14px); }
  to   { transform: none; }
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}