/* ============================================================
   RISKMANCER — 帳冊與竹節 Ledger & Bamboo theme
   Loads after styles.css / cta.css / polish.css and overrides
   the design-token layer plus a small set of bespoke components
   (chapter marks, the ISO ledger table, the hero signature).
   ============================================================ */

:root {
  /* Signature palette */
  --rm-paper: #ffffff;
  --rm-paper-deep: #ffffff;
  --rm-ink: #16241f;
  --rm-jade: #157b71;
  --rm-jade-deep: #0a4c47;
  --rm-brass: #a9743a;
  --rm-brass-deep: #7d5527;
  --rm-goose: #fbc400;
  --rm-goose-deep: #d9a600;
  --rm-hairline: rgba(22, 36, 31, 0.14);

  /* Remap the template's own token layer onto the new palette so every
     component built on --bs-primary / --color-primary-* / --bs-dark
     inherits it automatically. */
  --color-primary-100: #ffffff;
  --color-primary-200: #c3d7cf;
  --color-primary-300: #9dbdb5;
  --color-primary-400: #2f6b62;
  --color-primary-500: #0a4c47;

  --bs-primary: var(--rm-jade-deep);
  --bs-primary-rgb: 10, 76, 71;
  --bs-secondary: var(--rm-ink);
  --bs-secondary-rgb: 22, 36, 31;
  --bs-dark: var(--rm-ink);
  --bs-dark-rgb: 22, 36, 31;
  --bs-dark-light: rgba(22, 36, 31, 0.72);
  --bs-dark-light-rgb: 22, 36, 31;
  --bs-light: var(--rm-paper-deep);
  --bs-light-rgb: 255, 255, 255;
  --bs-light-gray: var(--rm-paper-deep);
  --bs-light-gray-rgb: 255, 255, 255;
  --bs-muted: rgba(22, 36, 31, 0.62);
  --bs-muted-rgb: 22, 36, 31;

  --bs-body-bg: var(--rm-paper);
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-body-color: rgba(22, 36, 31, 0.8);
  --bs-body-color-rgb: 22, 36, 31;
  --bs-border-color: var(--rm-hairline);
  --bs-heading-color: var(--rm-ink);
  --bs-emphasis-color: var(--rm-ink);
  --bs-link-color: var(--rm-ink);
  --bs-link-hover-color: var(--rm-brass);
  --bs-focus-ring-color: rgba(10, 76, 71, 0.25);
}

::selection {
  background-color: var(--rm-jade-deep);
  color: var(--rm-paper);
}

::-moz-selection {
  background-color: var(--rm-jade-deep);
  color: var(--rm-paper);
}

body {
  background-color: var(--rm-paper);
}

.section-divider {
  background-color: var(--rm-jade-deep);
}

.section-divider-light {
  background-color: rgba(255, 255, 255, 0.7);
}

/* ---------- Header ---------- */

.header {
  background: transparent;
}

.header.fixed-header {
  background-color: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rm-hairline);
}

/* Header floats transparent over the hero video by default (white content,
   matching the video's dark overlay), then swaps to a solid paper bar with
   ink content once scrolled past the hero. */
.header .header-link {
  color: #fff;
}

.header.fixed-header .header-link {
  color: var(--rm-ink);
}

.header .toggle-menu .menu-icon {
  color: var(--rm-jade-deep) !important;
}

/* Eye-catching solid goose-yellow CTA, consistent everywhere (header,
   hero, mobile menu) regardless of what's behind it. */
.btn-cta-outline,
.btn-cta,
.btn-cta-mobile {
  border-radius: 4px;
  background-color: var(--rm-goose);
  border-color: var(--rm-goose);
  color: var(--rm-ink) !important;
}

.btn-cta {
  box-shadow: 0 10px 24px -10px rgba(217, 174, 69, 0.55);
}

.btn-cta-outline:hover,
.btn-cta-outline:focus-visible,
.btn-cta:hover,
.btn-cta:focus-visible,
.btn-cta-mobile:hover,
.btn-cta-mobile:focus-visible {
  background-color: var(--rm-goose-deep);
  border-color: var(--rm-goose-deep);
  color: var(--rm-ink) !important;
}

.btn-cta:hover,
.btn-cta:focus-visible {
  box-shadow: 0 16px 30px -10px rgba(217, 174, 69, 0.6);
}

.services .badge,
.stats-facts .badge,
.get-in-touch .badge {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  padding: 0.4rem 0.9rem;
  border-radius: 3px;
}

/* ---------- Hero: keeps the original skyscraper video + dark overlay ---------- */

.banner-section {
  background-color: var(--rm-ink);
}

.hero-eyebrow {
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  color: var(--rm-goose);
  margin-bottom: 1.25rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

/* ---------- ISO ledger table ---------- */

.lead-note {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--rm-ink);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.iso-ledger {
  border-top: 1px solid var(--rm-hairline);
}

.iso-ledger-row {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 0.5rem 1.5rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--rm-hairline);
  align-items: baseline;
}

@media (max-width: 575.98px) {
  .iso-ledger-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

.iso-code {
  font-weight: 700;
  color: var(--rm-jade-deep);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.iso-desc {
  color: var(--rm-ink);
  opacity: 0.78;
  font-size: 0.95rem;
}

/* ---------- Service icons: small circular badges instead of stock photos ---------- */

/* Fixed-width flex layout instead of Bootstrap's percentage-based grid
   columns: a 12-col split grows the text block (and the blank space
   after it) with the viewport. Capping the body at a flat max-width
   keeps the card compact at any screen size. */
.service-item {
  align-items: flex-start;
  justify-content: center;
  padding-right: 6rem;
  gap: 4rem;
}

.service-item-icon {
  flex: 0 0 auto;
}

.service-item-body {
  flex: 1 1 620px;
  max-width: 620px;
  min-width: 0;
}

/* Below ~700px the fixed 4rem gap + 6rem right padding + icon column leave
   almost no room for the 620px text block, so it gets flex-shrunk down to a
   sliver — every bullet wraps word-by-word and the section balloons to
   several screen-heights tall. Stack icon above text and drop the
   desktop-only spacing instead. */
@media (max-width: 699.98px) {
  .service-item {
    flex-direction: column;
    padding-right: 0;
    gap: 1.5rem;
  }

  .service-item-body {
    flex: 1 1 auto;
    max-width: 100%;
  }
}

.service-img-wrapper {
  max-width: 128px;
}

.service-img-wrapper img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--rm-hairline);
}

/* Pre-existing overflow: Bootstrap's .text-nowrap utility (!important)
   keeps the EN tagline on one line past where it fits on narrow phones,
   even at the reduced font-size already set in polish.css. */
@media (max-width: 480px) {
  .banner-section h3.font-roboto.text-nowrap {
    white-space: normal !important;
  }
}

/* ---------- Footer ---------- */

.footer p {
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}
