/* URIM — one system across every page (2026-12-02).
   The section packs (What we do, What you receive, About closing, Contact) arrived with their own fluid sizes.
   This layer maps each of their roles onto the agreed scale in tokens.css, so every page and every screen size
   uses the same type, labels, buttons, radii and section rhythm as Home and About.
   Linked last on every page; !important only because the pack rules are scoped and media-queried in many places. */

/* ---------- 1. Page titles: the display role (Home hero / legal page titles).
   About's hero is left on its own 28/40/48px scale: three stacked statements between two portraits, not one headline. ---------- */
:is(.urim-work-hero, .urim-receive-hero, .urim-contact) h1 {
  font-size: var(--fs-display) !important; line-height: var(--lh-display) !important;
  letter-spacing: var(--ls-display) !important; font-weight: var(--fw-display) !important;
}
/* closing statements match Home's closing ("#briefing") */
:is(.urim-work-close, .urim-about-close) h2 {
  font-size: var(--fs-display) !important; line-height: var(--lh-display) !important;
  letter-spacing: var(--ls-display) !important; font-weight: var(--fw-display) !important;
}
/* the paragraph under a hero / closing headline: the lead role */
:is(.urim-work-hero .uw-copy, .ury-intro) p, .uwc-intro, .uac-intro {
  font-size: var(--fs-lead) !important; line-height: var(--lh-lead) !important;
}

/* ---------- 2. Section headlines: the h2 role ---------- */
:is(.urim-markets, .urim-org, .urim-value, .urim-build, .urim-prepare, .urim-together,
    .urim-explore, .urim-define, .urim-validate, .urim-execute, .urim-maintain, .urim-entry) h2,
.ue-demo h3 {
  font-size: var(--fs-h2) !important; line-height: var(--lh-h2) !important;
  letter-spacing: var(--ls-h2) !important; font-weight: var(--fw-h2) !important;
}

/* ---------- 3. Section labels (eyebrow + line): 12px Medium, +.16em, 96px line (64px on phones) ---------- */
:is(.um-label, .uo-label, .uv-label, .bf-label, .pc-label, .tc-label,
    .ue-label, .ud-label, .ux-label, .uent-kicker, .uwt-kicker) {
  font-size: var(--fs-label) !important; font-weight: var(--fw-ui) !important; letter-spacing: var(--ls-label) !important;
  line-height: 1.5 !important; color: #254A68 !important; gap: 18px !important;
}
:is(.um-label, .uo-label, .uv-label, .bf-label, .pc-label, .tc-label,
    .ue-label, .ud-label, .ux-label, .uent-kicker, .uwt-kicker)::after {
  width: 96px !important; margin-left: 0 !important; flex: none;
  background: linear-gradient(90deg, #82B9B2, #245D83) !important; /* the same line as Home and About */
}
.uwc-kicker, .uac-kicker { font-size: var(--fs-label) !important; font-weight: var(--fw-ui) !important; letter-spacing: var(--ls-label) !important; }
@media (max-width: 640px) {
  :is(.um-label, .uo-label, .uv-label, .bf-label, .pc-label, .tc-label,
      .ue-label, .ud-label, .ux-label, .uent-kicker, .uwt-kicker)::after { width: 64px !important; }
}

/* card and panel headers ("What you receive", "How we help", diagram captions): the same label, no line */
:is(.ud-deliverables, .ue-deliverables, .um-deliverables, .uv-deliverables, .ux-deliverables,
    .ud-flow-head, .uv-flow-head, .ux-flow-head, .um-flow-head,
    .bf-help, .pc-help, .um-help, .uo-help, .uv-help,
    .bf-outcome, .pc-outcome, .um-outcome, .uo-outcome, .uv-outcome) h3,
:is(.bf-story, .pc-story, .um-story, .uo-story, .uv-story) > h3,
:is(.bf-figcap, .pc-figcap, .um-figcap, .uo-figcap, .uv-figcap),
.ud-kicker, .ue-kicker, .uv-decision-label, .ud-step h4, .ux-caption h4 {
  font-size: var(--fs-label) !important; font-weight: var(--fw-ui) !important; letter-spacing: var(--ls-label) !important;
}

/* ---------- 4. Reading copy: the body role (16 / 18 from 1081px, 1.6) ---------- */
:where(.ud-copy, .ue-copy, .um-copy, .uv-copy, .ux-copy,
    .um-story, .uo-story, .uv-story, .bf-story, .pc-story, .ud-stays, .uent-row, .uwt-principles) p,
:where(.ud-deliverables, .ue-deliverables, .um-deliverables, .uv-deliverables, .ux-deliverables,
    .bf-help, .pc-help, .um-help, .uo-help, .uv-help) li,
.ue-desc, .tc-card p {
  font-size: var(--fs-body) !important; line-height: var(--lh-body) !important;
}

/* ---------- 5. Statements and card titles: the h3 / h4 roles (Regular, as on Home and About) ---------- */
:is(.bf-outcome, .pc-outcome, .um-outcome, .uo-outcome, .uv-outcome) p, .tc-conclusion,
.tc-card h3, .uwt-principles h3, .uwt-outcomes h3, .uent-row h3, .ud-stays h3 {
  font-size: var(--fs-h3) !important; line-height: var(--lh-h3) !important;
  letter-spacing: var(--ls-h3) !important; font-weight: var(--fw-heading) !important;
}
.uv-card h4, .pc-steps h4 { font-size: var(--fs-h4) !important; line-height: var(--lh-h4) !important; letter-spacing: var(--ls-h4) !important; font-weight: 400 !important; }

/* ---------- 6. Buttons: 48px pill, 16px ---------- */
.ue-cta, .uwc-button, .uac-button, .uct-submit {
  min-height: var(--btn-h) !important; padding-top: 0 !important; padding-bottom: 0 !important;
  font-size: var(--fs-button) !important; font-weight: 400 !important; line-height: 1 !important;
}

/* ---------- 7. Radii: cards 8px, feature panels / diagram frames 16px ---------- */
:is(.ud-deliverables, .ue-deliverables, .um-deliverables, .uv-deliverables, .ux-deliverables, .ud-stays,
    .bf-help, .pc-help, .um-help, .uo-help, .uv-help,
    .um-photo, .uo-photo, .uv-photo, .bf-photo, .pc-photo, .uv-card, .tc-card, .ux-art, .def-card) { border-radius: var(--radius-md) !important; }
:is(.ud-flow, .uv-flow, .ux-flow, .um-flow, .ue-demo, .uent-panel, .uwt-panel,
    .bf-diagram, .pc-diagram, .um-diagram, .uo-diagram, .uv-diagram, .tc-panel) { border-radius: var(--radius-lg) !important; }

/* ---------- 8. Section rhythm: What we do's stages run on one continuous rail, like What you receive ---------- */
@media (min-width: 901px) {
  :is(.urim-org, .urim-value, .urim-build, .urim-prepare, #how-it-comes-together) { padding-top: 0 !important; }
  :is(.urim-markets .um-shell, .urim-org .uo-shell, .urim-value .uv-shell, .urim-build .bf-shell, .urim-prepare .pc-shell) {
    padding-bottom: clamp(60px, 6.6vw, 124px);
  }
}
@media (max-width: 900px) {
  /* phones and tablets: the same 32 / 64 stage spacing as What you receive (was 52 / 0) */
  :is(.urim-markets, .urim-org, .urim-value, .urim-build, .urim-prepare, #how-it-comes-together) { padding: 32px 0 64px !important; }
}

/* phones: a long stage label wraps, so the line follows its last word instead of being pushed to the far edge */
@media (max-width: 640px) {
  :is(.um-label, .uo-label, .uv-label, .bf-label, .pc-label, .tc-label) { display: block !important; }
  :is(.um-label, .uo-label, .uv-label, .bf-label, .pc-label, .tc-label) > span:first-child { display: inline-block; vertical-align: middle; margin: -2px 12px 0 0; }
  :is(.um-label, .uo-label, .uv-label, .bf-label, .pc-label, .tc-label)::after { display: inline-block; vertical-align: middle; margin: -2px 0 0 14px !important; }
}

/* ---------- 9. One container: every pack shell uses the exact .wrap geometry (1280 max, 40px gutter; phones clamp(20px,6.67vw,34px)),
   so headlines, cards and forms start on the same line as the logo and end on the same line as the navigation ---------- */
.uct-shell, .urim-work-close .uwc-shell, .urim-about-close .uac-shell {
  width: auto !important; max-width: 1280px !important; margin-inline: auto !important; padding-inline: 40px !important;
}
.uct-content { max-width: 1280px !important; }   /* the contact card spans the container, like every other card */
@media (max-width: 640px) {
  .uct-shell, .urim-work-close .uwc-shell, .urim-about-close .uac-shell { padding-inline: clamp(20px, 6.67vw, 34px) !important; }
}

/* ---------- 10. Timeline rail sits in the gutter, so stage content starts exactly on the container line (was +34px, +24px at ≤1100,
   and the last two What-you-receive sections were 1px off because they had padding but no rail border) ---------- */
@media (min-width: 901px) {
  :root { --rail-hang: clamp(20px, calc(50vw - 620px), 34px); }  /* 20px in a 40px gutter, 34px once the gutter is wide */
  :is(.um-shell, .uo-shell, .uv-shell, .bf-shell, .pc-shell, .tc-shell, .ue-shell, .ud-shell, .ux-shell) {
    margin-left: calc(-1 * var(--rail-hang)) !important; padding-left: calc(var(--rail-hang) - 1px) !important;
  }
  :is(.um-dot, .uo-dot, .uv-dot, .bf-dot, .pc-dot, .tc-dot, .ue-rail-dot, .ud-rail-dot, .uv-rail-dot, .ux-rail-dot, .um-rail-dot) {
    left: calc(-1 * var(--rail-hang) - 4px) !important;
  }
  .uent-shell, .uwt-shell { padding-left: 0 !important; }
}

/* ---------- 11. Stacked layouts drop the desktop line breaks inside section headlines ---------- */
@media (max-width: 900px) {
  :is(.urim-markets, .urim-org, .urim-value, .urim-build, .urim-prepare, .urim-together,
      .urim-explore, .urim-define, .urim-validate, .urim-execute, .urim-maintain, .urim-entry) h2 br { display: none; }
  :is(.urim-markets, .urim-org, .urim-value, .urim-build, .urim-prepare, .urim-together,
      .urim-explore, .urim-define, .urim-validate, .urim-execute, .urim-maintain, .urim-entry) h2 { text-wrap: balance; }
}

/* ---------- 12. Closing buttons keep their natural width on phones, like Home's closing ---------- */
.urim-work-close .uwc-actions, .urim-about-close .uac-actions { align-items: flex-start !important; }

/* ---------- 13. One pale surface: the contact card uses the same fill and border as the process cards ---------- */
.uct-form { background: var(--pearl) !important; border-color: #CCCFCB !important; }

/* ---------- 14. Legal notice and Privacy: the subtitle always reserves two lines, so both heroes end at the same height ---------- */
.page-head .stand { min-height: 2lh; }

/* ==================== HERO FRAME (2026-12-03): one wave, one headline rule, on every page ==================== */
/* 15. One wave: every hero draws the shared ribbon at Home's height (130–194px; 74–124px on phones) */
:root { --hero-wave: clamp(130px, 10.1vw, 194px); }
@media (max-width: 640px) { :root { --hero-wave: clamp(74px, 24vw, 124px); } }
.ahero, .urim-work-hero { --ribbon-h: var(--hero-wave) !important; }
.urim-receive-hero, .uct-hero { --ribbon-height: var(--hero-wave) !important; }

/* 16. Legal notice and Privacy get the same wave; the page stays compact and image-free */
.page-head { padding-bottom: calc(var(--hero-wave) + 24px); }
.page-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: var(--hero-wave); pointer-events: none;
  background: url(img/hero-ribbon.svg) center / 100% 100% no-repeat; }

/* 17. Headlines start on the logo line (About stays centred between its two portraits) */
.ury-body { align-items: stretch !important; text-align: left !important; }
.ury-intro p { margin-left: 0 !important; margin-right: 0 !important; }
.uct-intro { text-align: left !important; }

/* 18. One hero height for the four inner pages (Home keeps its own, which sits within a few px of this at 1440).
   Floors are set by the tallest content: What you receive on desktop, About's stacked portraits on tablet */
:root { --hero-h: clamp(740px, calc(30vw + 400px), 900px); }
@media (max-width: 900px) { :root { --hero-h: 970px; } }   /* tablets: About's stacked portraits set the floor */
@media (max-width: 640px) { :root { --hero-h: clamp(760px, calc(50vw + 600px), 940px); } }
.ahero { --scene-h: var(--hero-h) !important; }
.uw-dark, .ury-field { min-height: var(--hero-h) !important; }
.uct-hero { min-height: var(--hero-h) !important; display: flex; flex-direction: column; }
/* contact: the earth strip takes the extra height and stays anchored to the wave, so the extra room is sky above the planet */
.uct-horizon { flex: 1 0 auto; }
.uct-horizon img { top: auto !important; bottom: 0; transform: translate(-68%, 46%) !important; }
@media (max-width: 900px) {
  .ahero { min-height: var(--hero-h); display: flex; flex-direction: column; }
  .ahero-faces { margin-top: auto; }
  .uct-horizon img { transform: translate(-70%, 46%) !important; }
}
@media (max-width: 600px) { .uct-horizon img { transform: translate(-74%, 26.5%) !important; } }
.uct-hero > .uct-shell { width: 100% !important; }               /* flex column must not shrink the container to the headline */
.ury-body { justify-content: flex-start !important; }            /* headline starts at the same height as on the other pages; extra room goes below */
@media (min-width: 601px) and (max-width: 900px) { .uct-horizon img { transform: translate(-70%, 34%) !important; } }  /* tablet: lift the earth clear of the wave */

/* 19. Every left-aligned hero headline starts where Home's does: 64px below the header (32px on phones) */
.uw-copy, .ury-body, .uct-intro { padding-top: 64px !important; }
@media (max-width: 640px) { .uw-copy, .ury-body, .uct-intro { padding-top: 32px !important; } }
