/* ==========================================================================
   Global
   File: css/global.css

   Design tokens and site-wide overrides. Kept out of style.css because that
   file is compiled from ../src/scss and would lose anything edited in place.
   Loaded after style.css, before the block styles.
   ========================================================================== */

:root {
  /* --- Palette ----------------------------------------------------------
     Measured against WCAG AA:
       ink on cream      15.9:1     navy on cream   12.4:1
       white on navy     13.6:1     gold on navy     5.6:1
       gold on cream      2.2:1  <- decorative only

     So the rule this design follows: GOLD CARRIES TEXT ONLY ON NAVY. On the
     cream ground gold appears as hairlines, rules and marks - never as type.
     ---------------------------------------------------------------------- */
  --vir-navy: #0b2c5f;
  --vir-navy-deep: #071e42;
  --vir-gold: #c9a227;
  --vir-gold-soft: #d9bc5f;
  --vir-cream: #f7f4ef;
  --vir-ink: #1a1a1a;
  --vir-white: #ffffff;
  --vir-page: var(--vir-navy);

  /* Hairline used to tie sections together. */
  --vir-rule: 1px solid rgba(201, 162, 39, 0.55);

  /* Type roles on the dark ground */
  --vir-heading: var(--vir-gold);
  --vir-body: rgba(255, 255, 255, 0.88);
  --vir-surface: #0e3670;   /* one step up from the page, for cards */

  /* --- Type -------------------------------------------------------------- */
  --vir-font-display: "Jost", "Futura", "Century Gothic", sans-serif;
  --vir-font-body: "K2D", "Roboto", sans-serif;

  /* --- Layout ------------------------------------------------------------ */
  --vir-gutter: 35px;
  --vir-measure: 1200px;
  --vir-radius: 10px;
  --vir-section-gap: 50px;
  --vir-header-height: 80px;
  --vir-image-opacity: 0.15;
}

/* style.css:88 sets `html, body { background-color: #101820 }` */
html,
body {
  background-color: var(--vir-page);
}

/* style.css adds spacers for the old fixed nav - 63px on `body:before` and
   70px on `.all:before` under 991px. The header now sits in normal flow, so
   both just leave a gap above it. */
body::before,
body .all::before {
  display: none;
  height: 0;
}

/* The first block sits directly under the header, with no leading gap. */
.all > section:first-of-type {
  margin-top: 0;
}

/* ==========================================================================
   Shared section furniture
   ========================================================================== */

/* Short gold rule that sits ABOVE a heading and introduces it. */
.vir-eyebrow-rule::before {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin: 0 0 22px;
  background-color: var(--vir-gold);
}

.vir-center .vir-eyebrow-rule::before {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1249px) {
  :root {
    --vir-section-gap: 50px;
  }
}

@media (max-width: 991px) {
  :root {
    --vir-gutter: 25px;
    --vir-section-gap: 50px;
    --vir-header-height: 70px;
  }
}

@media (max-width: 767px) {
  :root {
    --vir-gutter: 20px;
    --vir-section-gap: 50px;
  }
}

@media (max-width: 575px) {
  :root {
    --vir-gutter: 15px;
    --vir-section-gap: 50px;
    --vir-header-height: 64px;
  }
}

/* ==========================================================================
   Band adjacency
   ==========================================================================
   Full-bleed bands run edge to edge and carry their own internal padding.
   When two sit next to each other, the second one's section margin only
   leaves a strip of page colour showing between them, so collapse it.
   Higher specificity than the blocks' own margin rules, so load order
   does not matter. */

:is(.hero, .logo-strip, .panel-text, .feature-panel,
     .text-section--bg-gold, .text-section--bg-navy, .text-section--bg-statement)
  + :is(.hero, .logo-strip, .panel-text, .feature-panel,
        .text-section--bg-gold, .text-section--bg-navy, .text-section--bg-statement,
        .site-footer) {
  margin-top: 0;
}

/* ==========================================================================
   Home page section spacing
   ==========================================================================
   On the home page every section carries 50px of padding top and bottom
   instead of being separated by a 50px margin, so a section with its own
   background (Meet Dr. Rajeev Deva on white) fills its full height rather
   than sitting as a tight strip between navy gaps. The hero and the logo
   marquee keep their own sizing. */

.is-home .all > section:not(.hero):not(.logo-strip) {
  margin-top: 0;
  padding-top: 50px;
  padding-bottom: 50px;
}

.is-home .site-footer {
  margin-top: 0;
}
