/* ============================================================================
   PULSE SYSTEM — the shared visual layer
   Contract: "Pulse Branding whole-site rebuild — Hermes implementation contract"
   section 2 (Visual system) + section 1 (Preserve / Prohibited).

   This file is the single canonical home of the Pulse token contract and the
   shared component layer every site page consumes. It is linked after
   assets/styles.css on the 22 shell routes and after the collection sheets on
   portfolio-collection/index.html.

   It defines NEW canonical names only. The legacy aliases (--navy, --blue,
   --aqua, --violet, --paper, --ink, --muted …) stay defined in
   assets/styles.css and now point at these, so the collection's own token file
   (portfolio-collection/style.css) is untouched by this sheet.

   Rules that govern this file:
     1. One fact, one home. A colour, face or rhythm value is declared here and
        referenced everywhere else as var(...). No page re-declares a token.
     2. No new neutral palette. Paper stays the existing off-white/stone family.
     3. No second red. The warm action accent is the existing glowing CTA
        (--action-glow). This repository contains no Pulse red; none is added.
     4. The editorial serif is for emotional/conceptual emphasis only, never for
        interface or form controls.
     5. Prohibited on every page: repeated animated heroes, generic SaaS card
        grids as the dominant language, decorative glassmorphism, meaningless
        gradients/blobs, motion with no narrative job, and rotation of the
        photographic background behind a project-matched material scene.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. CONTRACT TOKENS — frozen. Values are exact; do not round or re-tint.
   --------------------------------------------------------------------------- */
:root{
  /* Core palette (contract section 2) */
  --ink-navy:#0a1931;          /* Ink/navy   */
  --deep-navy:#001d2a;         /* Deep navy  */
  --pulse-blue:#2163af;        /* Blue       */
  --pulse-cyan:#2ea8ae;        /* Cyan/teal  */
  --pulse-violet:#291c53;      /* Violet     */
  --violet-bright:#7865f0;     /* Bright violet */

  /* Channel forms of the same six values: translucency must never re-hard-code
     a colour, it reuses the channel triple. */
  --ink-navy-rgb:10,25,49;
  --deep-navy-rgb:0,29,42;
  --pulse-blue-rgb:33,99,175;
  --pulse-cyan-rgb:46,168,174;
  --pulse-violet-rgb:41,28,83;
  --violet-bright-rgb:120,101,240;

  /* Warm action accent: the existing glowing CTA, exactly as it ships.
     There is no red token anywhere in this repository — the "Pulse red used by
     the current glowing CTA" named in the contract does not exist (evidenced in
     SITE-IMPLEMENTATION-REPORT.md). The glow is therefore retained as-is and no
     red is introduced. */
  --action-glow:conic-gradient(from var(--glow-angle),
      transparent 0 18%,
      rgba(var(--pulse-cyan-rgb),.95) 24%,
      rgba(var(--pulse-blue-rgb),.78) 31%,
      rgba(var(--pulse-violet-rgb),.75) 38%,
      transparent 46% 100%);

  /* Type roles (contract section 2) */
  --font-body:Inter,"Helvetica Neue",Arial,system-ui,sans-serif;
  --font-display:Montserrat,Inter,"Helvetica Neue",Arial,sans-serif;
  --font-serif:"Noto Serif Display",Georgia,serif;

  /* Global shell (contract section 2). Expressed against 100% rather than
     100vw so a visible scrollbar can never add horizontal overflow; the
     percentage resolves against the full-bleed parent (nav, header, section). */
  --sys-shell-inset:96px;
  --sys-shell-inset-laptop:64px;
  --sys-shell-inset-mobile:40px;   /* 20px per side at 390px */

  /* Section rhythm (contract section 2) */
  --sys-section-y:clamp(112px,9vw,144px);
  --sys-section-y-tight:clamp(88px,6vw,104px);
  --sys-measure:62ch;
  --sys-measure-max:72ch;

  /* Motion: one authored curve, shared by every transition on the site */
  --sys-ease:cubic-bezier(.16,1,.3,1);
}

/* ---------------------------------------------------------------------------
   2. GLOBAL SHELL — contract widths, applied over the legacy .shell so every
   page gets them without a per-page override.
   --------------------------------------------------------------------------- */
.shell,
.hero-grid,
.service-hero-grid,
.case-hero-grid{
  width:min(var(--shell,1320px), calc(100% - var(--sys-shell-inset)));
  max-width:var(--shell,1320px);
  margin-inline:auto;
}
@media(max-width:1180px){
  .shell,
  .hero-grid,
  .service-hero-grid,
  .case-hero-grid{width:calc(100% - var(--sys-shell-inset-laptop))}
}
@media(max-width:620px){
  .shell,
  .hero-grid,
  .service-hero-grid,
  .case-hero-grid{width:calc(100% - var(--sys-shell-inset-mobile))}
}

/* ---------------------------------------------------------------------------
   3. SECTION + TYPE ROLES
   --------------------------------------------------------------------------- */
.sys-section{padding:var(--sys-section-y) 0}
.sys-section--tight{padding:var(--sys-section-y-tight) 0}
.sys-section--quiet{padding:clamp(64px,5vw,88px) 0}

.sys-head{max-width:var(--sys-measure-max)}
.sys-eyebrow{
  font-family:var(--font-body);font-size:11px;letter-spacing:.14em;
  text-transform:uppercase;color:var(--muted);margin-bottom:var(--sp-3)
}
.sys-h2{font-family:var(--font-display);font-size:clamp(32px,3.6vw,52px);line-height:1.12;margin:0}
.sys-lead{
  font-family:var(--font-body);font-size:clamp(16px,1.35vw,19px);line-height:1.6;
  max-width:var(--sys-measure);color:var(--muted);margin-top:var(--sp-3)
}
/* Body copy never exceeds the contract's 72-character line at 1440px. */
.sys-copy,
.sys-section p{max-width:var(--sys-measure-max)}
.sys-measure{max-width:var(--sys-measure)}

/* Editorial emphasis only. Never for controls. */
.sys-emphasis{font-family:var(--font-serif);font-style:italic;font-weight:400}
input,select,textarea,
.sys-actions :is(button,.btn),
.sys-controls :is(button,input,select,textarea,label){font-family:var(--font-body)}

/* ---------------------------------------------------------------------------
   4. EDITORIAL ROWS — the system's replacement for the generic SaaS card grid.
   Use .sys-rows > .sys-row for every list of cases, capabilities, sectors,
   insights or process items. Cards are a subordinate device, capped below.
   --------------------------------------------------------------------------- */
.sys-rows{display:block;border-top:1px solid var(--line)}
.sys-row{
  display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);
  gap:clamp(20px,4vw,72px);align-items:start;
  padding:var(--sp-5) 0;border-bottom:1px solid var(--line)
}
.sys-row__index{
  font-family:var(--font-body);font-size:11px;letter-spacing:.12em;color:var(--muted)
}
.sys-row__title{
  font-family:var(--font-display);font-weight:500;font-size:clamp(20px,2vw,28px);
  line-height:1.2;margin:var(--sp-1) 0 0
}
.sys-row__body{
  font-family:var(--font-body);font-size:15px;line-height:1.7;
  color:var(--muted);max-width:var(--sys-measure)
}
.sys-row__meta{
  font-family:var(--font-body);font-size:11px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--muted);margin-top:var(--sp-2)
}
.sys-row__link{
  display:inline-flex;align-items:center;min-height:44px;
  font-family:var(--font-body);font-size:13px;border-bottom:1px solid currentColor
}
.sys-row--media{grid-template-columns:minmax(0,5fr) minmax(0,7fr)}
.sys-row--media .sys-row__figure{aspect-ratio:16/10;overflow:hidden;background:var(--paper-2)}
.sys-row--media .sys-row__figure img{width:100%;height:100%;object-fit:cover}
@media(max-width:900px){
  .sys-row,.sys-row--media{grid-template-columns:minmax(0,1fr);gap:var(--sp-3)}
}

/* Subordinate grid: supporting imagery only, never the page's main language,
   never more than two columns, never glowing or glassed. */
.sys-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--sp-4)}
.sys-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
.sys-grid>*{
  border:0;background:none;box-shadow:none;backdrop-filter:none;
  padding:var(--sp-3) 0;border-top:1px solid var(--line)
}
@media(max-width:900px){
  .sys-grid,.sys-grid--3{grid-template-columns:minmax(0,1fr)}
}

/* ---------------------------------------------------------------------------
   5. EVIDENCE, PROOF AND PROOF RAIL
   --------------------------------------------------------------------------- */
.sys-evidence{display:block;border-top:1px solid var(--line)}
.sys-evidence__row{
  display:grid;grid-template-columns:minmax(0,4fr) minmax(0,8fr);
  gap:clamp(16px,3vw,48px);padding:var(--sp-4) 0;border-bottom:1px solid var(--line)
}
.sys-evidence__label{font-family:var(--font-body);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.sys-evidence__value{font-family:var(--font-body);font-size:15px;line-height:1.7;max-width:var(--sys-measure)}
.sys-stat{border-top:1px solid var(--line-dark);padding-top:var(--sp-2);margin:0}
.sys-stat dt{font-family:var(--font-body);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:rgba(var(--ice-rgb,225,238,240),.66)}
.sys-stat dd{margin:var(--sp-0) 0 0;font-family:var(--font-display);font-size:15px;color:var(--ice)}

/* ---------------------------------------------------------------------------
   6. CONVERSION BAND — dark navy ground, exactly one glowing action.
   --------------------------------------------------------------------------- */
.sys-band{background:var(--navy,var(--ink-navy));color:var(--ice);padding:var(--sys-section-y-tight) 0}
.sys-band .sys-eyebrow{color:rgba(var(--ice-rgb,225,238,240),.66)}
.sys-band .sys-h2{color:var(--ice)}
.sys-band .sys-lead{color:rgba(var(--ice-rgb,225,238,240),.78)}
/* .glow is the BorderGlow treatment. One per page: the primary conversion
   action, the active audit step, or active voice capture — never a card, never
   a decorative panel, never every button. */
.sys-band .glow{display:inline-flex}

/* ---------------------------------------------------------------------------
   7. READINGS, DISCLOSURES, FILTERS, ACTIONS
   --------------------------------------------------------------------------- */
.sys-reading{max-width:760px;margin-inline:auto}
.sys-reading :is(h2,h3){font-family:var(--font-display)}
.sys-reading p,.sys-reading li{font-family:var(--font-body);font-size:16px;line-height:1.75;max-width:var(--sys-measure-max)}

.sys-disclosure{border-top:1px solid var(--line)}
.sys-disclosure details,.sys-disclosure .disclosure{border-bottom:1px solid var(--line)}
.sys-disclosure summary{
  display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);
  min-height:56px;font-family:var(--font-display);font-size:16px;cursor:pointer
}
.sys-disclosure summary::-webkit-details-marker{display:none}
.sys-disclosure p{font-family:var(--font-body);font-size:15px;line-height:1.7;color:var(--muted);max-width:var(--sys-measure);padding-bottom:var(--sp-3)}

.sys-filter{display:flex;flex-wrap:wrap;gap:var(--sp-1)}
.sys-filter button{
  min-height:44px;padding:0 16px;background:none;border:1px solid var(--line);
  font-family:var(--font-body);font-size:13px;color:var(--muted)
}
.sys-filter button[aria-pressed="true"]{border-color:currentColor;color:var(--ink)}

.sys-actions{display:flex;flex-wrap:wrap;gap:var(--sp-2);align-items:center}
.sys-actions :is(a,button),.sys-actions .btn{min-height:46px;padding:0 18px}
.sys-actions :is(a,button):focus-visible,.sys-filter button:focus-visible,
.sys-disclosure summary:focus-visible{outline:2px solid currentColor;outline-offset:3px}

/* ---------------------------------------------------------------------------
   8. PROJECT-MATCHED MATERIAL SCENES
   A device layer may move subtly (pitch <= 1.25deg, yaw <= 2.5deg, lift <= 6px,
   ease cubic-bezier(.16,1,.3,1)). The photographic background inside
   .sys-scene never transforms: no rotation, no scale, no translate.
   --------------------------------------------------------------------------- */
.sys-scene{position:relative;overflow:hidden;isolation:isolate}
.sys-scene__ground{
  position:absolute;inset:0;transform:none!important;
  transition:none!important;animation:none!important
}
.sys-scene__ground img,.sys-scene__ground picture,.sys-scene__ground video,
.sys-scene__ground canvas{transform:none!important;transition:none!important}
.sys-device{transform-origin:50% 60%;transition:transform 650ms var(--sys-ease)}
.sys-scene.is-tilting .sys-device{
  transform:translateY(-6px)
            rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg))
}
@media(prefers-reduced-motion:reduce){
  .sys-device,.sys-scene.is-tilting .sys-device{transform:none!important}
}

/* ---------------------------------------------------------------------------
   9. PRESERVED AUTHENTIC MARKS
   Real client marks keep their own geometry and colour; never recolour, invert
   or blur a project mark to fit the shell.
   --------------------------------------------------------------------------- */
.sys-marks{display:flex;flex-wrap:wrap;align-items:center;gap:clamp(20px,4vw,56px)}
.sys-marks img,.sys-marks svg{max-height:34px;width:auto;filter:none}

/* ---------------------------------------------------------------------------
   10. MOTION POLICY (contract sections 1 and 2)
   Motion earns its place by carrying a narrative job. Everything decorative is
   off for reduced-motion visitors; all content stays visible.
   --------------------------------------------------------------------------- */
@media(prefers-reduced-motion:reduce){
  .sys-scene,.sys-device,.sys-row,.sys-grid>*{animation:none!important;transition:none!important}
}
