/* Sections after the hero (the 1000px breakpoint is shared with the JS; see hero.css).
   A [data-scene] section is taller than the screen and its [data-pin] child sticks at top: 0 while the globe holds;
   story.js reads section height minus pin height as the hold, so keep top: 0 on every pin, make it the section's first and
   only in-flow child, and give the section no padding or border. Pins let pointer events through; content takes them back. */
[data-pin] { position: sticky; top: 0; z-index: 1; height: 100svh; pointer-events: none; }
html { scroll-padding-top: 104px; } /* anchors and focus clear the fixed nav */
[data-scene]:not([data-scene="final"]) { scroll-margin-top: -104px; } /* pinned scenes start at the top: keep equal to the padding above */
.assessment__slot { width: min(100%, 360px); aspect-ratio: 1; margin-inline: auto; } /* sized before assessment.css lands, never wider than the hero globe, so the story's first measurement holds */

.section-head { max-width: 640px; pointer-events: auto; }
.eyebrow { margin: 0 0 14px; font: 500 .74rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.section-head h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 3.2vw, 3rem); line-height: 1.06; letter-spacing: -.035em; text-wrap: balance; }
.section-head h2 em { color: var(--accent); }
.section-head__lead { margin: 16px 0 0; max-width: 46ch; color: var(--muted); font-size: 1.05rem; }

/* ---------- Services: head and tabs | globe with rings | panel ---------- */
.services { position: relative; height: 140svh; }
.services__pin, .problem__pin { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; padding: 112px 0 32px; }
.services__slot { aspect-ratio: 1; }

.orbit-tabs { display: grid; gap: 6px; pointer-events: auto; }
.orbit-tab { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 8px 18px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--ink-2); font: 600 1rem/1.2 var(--font); text-align: start; cursor: pointer; transition: background-color .25s, color .25s, border-color .25s, box-shadow .25s; }
.orbit-tab:hover { background: var(--line); color: var(--ink); }
.orbit-tab[aria-selected="true"] { background: var(--surface); border-color: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--ink); box-shadow: inset 0 1px 0 var(--edge), 0 10px 30px -18px rgb(var(--shadow) / .45); } /* the accent edge ties the pill to its lit ring */
.orbit-tab__num { font: 500 .72rem/1 var(--mono); color: var(--muted); }
.orbit-tab[aria-selected="true"] .orbit-tab__num { color: var(--accent); }

/* The panels share one grid cell, so the card never jumps between tabs. Hidden panels keep their box but are invisible. */
.services__panels { pointer-events: auto; display: grid; }
.panel { grid-area: 1 / 1; padding: 28px; border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--edge); box-shadow: inset 0 1px 0 var(--edge), 0 24px 60px -30px rgb(var(--shadow) / .4); }
.panel[hidden] { display: block !important; visibility: hidden; }
.panel h3 { margin: 0 0 10px; font: 600 1.35rem/1.15 var(--font-display); letter-spacing: -.02em; text-wrap: balance; }
.panel p { margin: 0; color: var(--muted); }
.ticks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; font-size: .95rem; font-weight: 500; }
.ticks li { display: flex; align-items: flex-start; gap: 10px; }
.ticks .icon { color: var(--ok); margin-top: 3px; } /* first line of a wrapped tick */
@media (prefers-reduced-motion: no-preference) {
  .panel:not([hidden]) { animation: panel-in .5s var(--ease); }
}
@keyframes panel-in { from { opacity: 0; translate: 0 8px; } }
@media (forced-colors: active) {
  .orbit-tab[aria-selected="true"] { border: 2px solid Highlight; }
}

@media (min-width: 1001px) {
  .services__pin { display: grid; grid-template-columns: clamp(260px, 26vw, 340px) minmax(0, 1fr) clamp(260px, 24vw, 320px); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "head slot panel" "tabs slot panel"; column-gap: clamp(24px, 3vw, 40px); row-gap: 28px; }
  .services__body { display: contents; }
  .services .section-head { grid-area: head; }
  .services .section-head h2 { font-size: clamp(2rem, 2.6vw, 2.6rem); }
  .orbit-tabs { grid-area: tabs; align-self: start; }
  .services__slot { grid-area: slot; justify-self: center; align-self: center; width: min(100%, calc(100svh - 170px), 620px); }
  .services__panels { grid-area: panel; align-self: safe center; } /* safe: an over-long panel overflows downward (QA sees it) */
}

/* Phones and tablets: the globe takes the height the tab row and panel leave. */
@media (max-width: 1000px) {
  .services__pin { padding: 104px 0 20px; display: flex; flex-direction: column; gap: 14px; }
  .services__body { display: flex; flex: 1 1 0; min-height: 0; flex-direction: column; align-items: stretch; gap: 14px; } /* the tab row spans the screen */
  .services__slot { order: -1; flex: 1 1 0; min-height: 96px; max-height: min(420px, 100vw - 2 * var(--gutter)); width: auto; max-width: 100%; align-self: center; }
  .orbit-tabs {
    flex: none; display: flex; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter) 48px; /* last tab clears the edge fade */
    padding-block: 10px; margin-block: -10px; /* room for focus ring and shadow */
    scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
    mask-image: linear-gradient(to right, transparent, #000 var(--gutter), #000 calc(100% - 48px), transparent);
  }
  .orbit-tab { flex: none; min-height: 44px; padding: 8px 16px; font-size: .92rem; scroll-snap-align: start; }
  .services__panels { flex: none; width: 100%; max-width: 560px; align-self: flex-start; }
  .panel { padding: 20px; }
}
/* Last resorts on short screens, only while pinned (html.story, taller than 540px): the intro line goes first, then the ticks. */
@media (min-width: 1001px) and (min-height: 541px) and (max-height: 640px) {
  .story .services .section-head__lead { display: none; }
  .story .services .orbit-tab { min-height: 44px; }
}
@media (min-width: 1001px) and (max-width: 1100px) and (min-height: 541px) and (max-height: 600px) {
  .story .services .ticks, .story .services .photo { display: none; } /* narrow columns wrap taller: the ticks go too */
}
@media (max-width: 1000px) and (min-height: 541px) and (max-height: 860px) {
  .story .services .section-head__lead, .story .health .section-head__lead { display: none; }
}
@media (max-width: 1000px) and (min-height: 541px) and (max-height: 760px) {
  .story .services .ticks, .story .services .photo { display: none; }
}

/* ---------- Photo frame: a gradient placeholder ships with the template; a photo covers it ---------- */
.photo { position: relative; margin: 0; overflow: hidden; border-radius: var(--r-input); background: radial-gradient(120% 90% at 15% 10%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 60%), radial-gradient(90% 90% at 95% 100%, color-mix(in srgb, #c39bff 32%, transparent), transparent 60%), var(--bg-glow); }
.photo img { position: absolute; } /* out of flow, so a not-yet-styled photo never sizes its panel (late.css adds the rest) */
.panel:has(.photo--strip) { display: flex; flex-direction: column; }
.photo--strip { flex: 1 0 92px; min-height: 92px; margin-top: 20px; } /* at least the ticks' height (never the tallest panel), then fills the shared cell */
.photo__label { position: absolute; left: 12px; bottom: 10px; font: 500 .7rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }

/* ---------- Health check: questions | globe with shields | live score ---------- */
.health { position: relative; height: 160svh; }
.health__pin { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; padding: 112px 0 32px; }
.health__slot { aspect-ratio: 1; }
.hc-score { display: none; } /* health.css (deferred) shows it; unstyled, its ring is a black disc */

@media (min-width: 1001px) {
  .health__pin { display: grid; grid-template-columns: clamp(340px, 36vw, 540px) minmax(0, 1fr) clamp(240px, 21vw, 290px); grid-template-rows: auto auto auto; align-content: center; grid-template-areas: "head slot score" "list slot score" "list slot result"; column-gap: clamp(24px, 3vw, 40px); row-gap: 20px; }
  .health .section-head { grid-area: head; }
  .health .section-head h2 { font-size: clamp(2rem, 2.6vw, 2.6rem); }
  .health__slot { grid-area: slot; justify-self: center; align-self: center; width: min(100%, calc(100svh - 170px), 560px); }
  .hc-score { grid-area: score; align-self: start; }
  .hc-deck { display: contents; }
  .hc-list { grid-area: list; display: grid; gap: 10px; align-content: start; container-type: inline-size; }
  .hc-result { grid-area: result; align-self: start; }
}

@media (max-width: 1000px) {
  .health__pin { padding: 104px 0 20px; display: flex; flex-direction: column; gap: 12px; }
  .health__slot { order: -1; flex: 1 1 0; min-height: 96px; max-height: min(420px, 100vw - 2 * var(--gutter)); width: auto; max-width: 100%; align-self: center; }
  .services .section-head h2, .health .section-head h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
}
/* Short screens while pinned: the intro line goes first, then (small phones) the eyebrow. */
@media (min-width: 1001px) and (min-height: 541px) and (max-height: 700px) {
  .story .health .section-head__lead { display: none; }
}
@media (max-width: 1000px) and (min-height: 541px) and (max-height: 700px) {
  .story .health .eyebrow { display: none; }
}

/* ---------- Process: globe | four steps, scrubbed by scroll ---------- */
.process { position: relative; height: 320svh; }
.process__pin { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; padding: 104px 0 32px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); align-items: center; gap: 48px; }
.process__slot { justify-self: center; width: min(100%, calc(100svh - 170px), 620px); aspect-ratio: 1; }
.steps { --progress: 0; list-style: none; margin: 32px 0 0; padding: 0 0 0 28px; position: relative; display: grid; gap: 18px; }
.steps::before, .steps::after { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--line); }
.steps::after { background: var(--accent); transform-origin: top; scale: 1 var(--progress); }
.step { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-content: start; color: var(--muted); transition: color .3s; }
.step__num { grid-row: span 2; padding-top: 6px; font: 500 .74rem/1 var(--mono); }
.step h3 { margin: 0; font: 600 1.2rem/1.25 var(--font-display); letter-spacing: -.015em; color: var(--muted); transition: color .3s; }
.step p { margin: 6px 0 0; font-size: .95rem; }
.step.is-active { color: var(--ink-2); }
.step.is-active h3 { color: var(--ink); }
.step.is-active .step__num { color: var(--accent); }

@media (max-width: 1000px) {
  .process__pin { padding: 104px 0 20px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
  .process__slot { flex: 1 1 0; min-height: 96px; max-height: min(420px, 100vw - 2 * var(--gutter)); width: auto; max-width: 100%; align-self: center; }
  .process__copy h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); } /* two lines on phones */
  .steps { margin-top: 16px; padding: 18px 0 0; }
  .steps::before, .steps::after { top: 0; bottom: auto; right: 0; width: auto; height: 3px; }
  .steps::after { transform-origin: left; scale: var(--progress) 1; }
}
/* While pinned (html.story, taller than 540px) only the active step shows its text (the others stay readable by screen readers);
   without the story or when unpinned all four show in full.
   Phones and tablets: the steps share one grid cell, so the globe slot never resizes between beats. */
@media (max-width: 1000px) and (min-height: 541px) {
  .story .step { grid-area: 1 / 1; }
  .story .step:not(.is-active) { opacity: 0; pointer-events: none; }
}
@media (max-width: 1000px) and (min-height: 541px) and (prefers-reduced-motion: no-preference) {
  .story .step.is-active { animation: panel-in .5s var(--ease); }
}
@media (min-width: 700px) and (max-width: 1000px) {
  .problem__slot, .services__slot, .health__slot, .process__slot { max-height: min(520px, 100vw - 2 * var(--gutter)); }
}
/* Desktop up to 800px tall: inactive steps keep only their title; top aligned so the heading never moves. */
@media (min-width: 1001px) and (min-height: 541px) and (max-height: 800px) {
  .story .process__copy { align-self: start; margin-top: clamp(0px, 100svh - 640px, 48px); } /* room under the nav as the screen gets taller */
  .story .step:not(.is-active) p { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (forced-colors: active) {
  .steps::before, .steps::after { forced-color-adjust: none; background: GrayText; }
  .steps::after { background: Highlight; }
  .step.is-active h3 { text-decoration: underline; text-underline-offset: 4px; }
}

/* ---------- Tool strip: platforms we support (Simple Icons, img/logos.svg), names beside the marks ---------- */
/* Above the gliding globe frame; a soft mist in the page colour keeps the names clear of its dots. */
.tools { position: relative; z-index: 1; width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; padding: clamp(40px, 8vh, 80px) 0; text-align: center; }
.tools::before { content: ""; position: absolute; inset: -48px calc(50% - 50vw); z-index: -1; pointer-events: none; background: linear-gradient(transparent, var(--bg) 40% 60%, transparent), linear-gradient(transparent, var(--bg) 50%, transparent); opacity: .85; }
.tools__title { margin: 0 auto 24px; max-width: 46ch; font: 500 .74rem/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-wrap: balance; }
.tools__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px clamp(24px, 4vw, 48px); }
.tools__list li { display: flex; align-items: center; gap: 10px; font: 600 1rem/1 var(--font); letter-spacing: -.01em; color: var(--muted); white-space: nowrap; }
.logo { width: var(--w, 24px); height: 24px; fill: currentColor; flex: none; }
.logo--cisco { --w: 46px; } /* wordmarks: viewBox cropped in tools/build-logos.mjs, sized to match the square marks */
.logo--zoom { --w: 52px; height: 12px; }
@media (min-width: 561px) and (max-width: 1239px) {
  .tools__list { display: grid; grid-template-columns: repeat(4, max-content); justify-content: center; } /* 4 + 4 */
}
@media (max-width: 560px) {
  /* Two hugging columns; every mark centred in a 44px slot so the names align. */
  .tools__list { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); justify-content: center; gap: 18px 20px; }
  .tools__list li { gap: 8px; }
  .logo { margin-inline: calc((44px - var(--w, 24px)) / 2); }
}
@media (max-width: 359px) { .tools__list li { white-space: normal; text-align: left; } } /* 320px: a long name wraps */

/* ---------- Problem: a statement that fills with the scroll, then three outcomes ---------- */
/* --fill and --list (0 to 1): 0 with the story until main.js scrubs them, 1 without it. Two backgrounds clipped to one
   inline span's text fill the words in reading order; --rest (tokens.css) meets AA as large text (QA). */
.story .problem__fill { --fill: 0; }
.story .problem .outcomes { --list: 0; }
.problem { position: relative; height: 220svh; }
.problem__pin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 48px; }
.problem__copy { max-width: 620px; pointer-events: auto; }
.problem__slot { justify-self: center; width: min(100%, calc(100svh - 170px), 560px); aspect-ratio: 1; }
.problem__statement { margin: 0; font: 600 clamp(1.9rem, 3.4vw, 3.1rem)/1.12 var(--font-display); letter-spacing: -.035em; text-wrap: pretty; }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .problem__fill {
    --rest: color-mix(in srgb, var(--ink) var(--rest-mix), transparent);
    color: transparent; -webkit-background-clip: text; background-clip: text;
    background-image: linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--rest), var(--rest));
    background-size: calc(var(--fill, 1) * 100%) 100%, 100% 100%; background-repeat: no-repeat;
  }
}
@media (forced-colors: active) { .problem__fill { background: none; color: CanvasText; } }
/* Outcomes: each indented further, its words arriving a third of --list later. */
.outcomes { list-style: none; margin: clamp(24px, 5vh, 48px) 0 0; padding: 0; display: grid; gap: 18px; }
.outcomes li { --k: 0; --in: clamp(0, var(--list, 1) * 3 - var(--k), 1); display: grid; grid-template-columns: 40px minmax(0, 1fr); max-width: 440px; margin-left: calc(var(--k) * clamp(16px, 6%, 56px)); padding-top: 14px; border-top: 1px solid var(--line); }
.outcomes h3, .outcomes p { opacity: var(--in); translate: 0 calc((1 - var(--in)) * 16px); }
.outcomes li:nth-child(2) { --k: 1; }
.outcomes li:nth-child(3) { --k: 2; }
.outcomes__num { grid-row: span 2; padding-top: 5px; font: 500 .74rem/1 var(--mono); color: var(--accent); }
.outcomes h3 { margin: 0; font: 600 1.2rem/1.25 var(--font-display); letter-spacing: -.015em; }
.outcomes p { margin: 4px 0 0; color: var(--muted); }
@media (min-width: 1001px) and (min-height: 541px) and (max-height: 760px) {
  .story .problem__statement { font-size: clamp(1.7rem, 2.7vw, 2.5rem); }
  .outcomes { margin-top: 20px; gap: 12px; }
}
/* Phones and tablets: the statement stays 24px or larger. */
@media (max-width: 1000px) {
  .problem__pin { padding: 104px 0 20px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
  .problem__slot { order: -1; flex: 1 1 0; min-height: 96px; max-height: min(360px, 100vw - 2 * var(--gutter)); width: auto; max-width: 100%; align-self: center; }
  .problem__statement { font-size: clamp(1.5rem, 5.6vw, 2rem); }
  .outcomes { margin-top: 18px; gap: 12px; }
  .outcomes li { grid-template-columns: 32px minmax(0, 1fr); margin-left: calc(var(--k) * 16px); padding-top: 12px; }
  .outcomes h3 { font-size: 1.05rem; }
  .outcomes p { font-size: .92rem; }
}
/* Small phones while pinned: outcome lines hide visually (screen readers keep them) so the globe stays usable. */
@media (max-width: 1000px) and (min-height: 541px) and (max-height: 700px) {
  .story .outcomes p { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* No story (no JS, a failed init or the head watchdog): nothing pins and every panel shows, stacked, with an eyebrow naming its service. */
html:not(.story) [data-scene] { height: auto; }
html:not(.story) [data-pin] { position: relative; height: auto; }
html:not(.story) .services__pin { display: block; }
html:not(.story) .services__body { display: block; }
html:not(.story) .problem__slot, html:not(.story) .services__slot, html:not(.story) .health__slot, html:not(.story) .process__slot, html:not(.story) .orbit-tabs { display: none; }
html:not(.story) .problem__pin { display: block; }
html:not(.story) .services__panels { display: grid; gap: 16px; margin-top: 28px; max-width: 720px; }
html:not(.story) .panel { grid-area: auto; visibility: visible; }
html:not(.story) .panel::before { content: attr(data-service); display: block; margin-bottom: 10px; font: 500 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
html:not(.story) .process__pin { display: block; }
html:not(.story) .step { color: var(--ink-2); } /* equals: nothing is "current" without the story */
html:not(.story) .step h3 { color: var(--ink); }
html:not(.story) .step__num { color: var(--accent); }
html:not(.story) .health__pin { display: block; }

/* One-time reveals (ui.js adds .reveal-on when motion is allowed). Screen only. */
@media screen and (prefers-reduced-motion: no-preference) {
  .reveal-on [data-reveal] { transition: opacity .9s var(--ease), translate .9s var(--ease); }
  .reveal-on [data-reveal]:not(.is-in) { opacity: 0; translate: 0 28px; }
}

/* Short landscape screens: pinned content cannot fit; scenes scroll normally. */
@media (max-height: 540px) {
  [data-scene] { height: auto !important; }
  [data-pin] { position: relative; height: auto; }
  .services__body { flex: none; }
  .problem__slot, .services__slot, .health__slot, .process__slot { flex: none; max-height: none; width: min(100%, 420px, 75svh); } /* a definite size: the slot no longer follows the pin */
  .step { color: var(--ink-2); } /* unpinned: equals, as without the story */
  .step h3 { color: var(--ink); }
  .step__num { color: var(--accent); }
}
