/* restructure.css: overrides for the security and compliance restructure (2026-10-17).
   Load it after styles.css on every page:
   <link rel="stylesheet" href="styles.css">
   <link rel="stylesheet" href="restructure.css">
   Everything else comes from styles.css. Remove this file and the link to undo the new layouts. */

/* Home page: the service heading sits left and the grid right (styles.css), so the four cards go 2 x 2 */
@media (min-width: 1101px) { .home #build .svc-grid.is-four { grid-template-columns: repeat(2, minmax(0, 1fr)) } }

/* Five steps in the "How we work" strip on the home page (was six) */
.steps-line { grid-template-columns: repeat(5, minmax(0, 1fr)) }
@media (max-width: 980px) { .steps-line { grid-template-columns: repeat(3, minmax(0, 1fr)) } }
@media (max-width: 560px) { .steps-line { grid-template-columns: repeat(2, minmax(0, 1fr)) } }

/* Four service lines in one row on wide screens */
.svc-grid.is-four { grid-template-columns: repeat(4, minmax(0, 1fr)) }
@media (max-width: 1100px) { .svc-grid.is-four { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 600px) { .svc-grid.is-four { grid-template-columns: minmax(0, 1fr) } }

/* Five engagement steps on wide screens (the base .eng grid is three columns) */
@media (min-width: 1101px) { .eng.is-five { grid-template-columns: repeat(5, minmax(0, 1fr)) } }
.eng.is-five li { padding: 22px 18px }

/* "See it in action" and "Start a project" buttons under each service line */
.svc-acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px }

/* Standards we work with: a strip of six items */
.std-strip { padding-block: clamp(40px, 6vw, 64px); border-bottom: 1px solid var(--line) }
.std-strip .eyebrow { display: block; margin-bottom: 18px }
.std { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line) }
.std li { padding: 20px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); display: grid; gap: 6px; align-content: start; min-width: 0 }
.std b { font-weight: 650; font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere }
.std span { color: var(--muted); font-size: 14.5px; line-height: 1.45 }
@media (max-width: 900px) { .std { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 560px) { .std { grid-template-columns: minmax(0, 1fr) } }

/* Footer: the NLM Cognitive Solutions line under the footer columns */
.foot-nlm { font-size: 14px; color: var(--muted) }
.foot-nlm a { color: inherit; text-decoration: underline; text-underline-offset: 3px }
.foot-nlm a:hover { color: var(--ink) }

/* Recorded walkthroughs (services page) play in the same demo pop-up as the interactive demos */
.demo-dlg .demo-video { background: #0E1522; object-fit: contain }
.btn .play-ic { flex: none }

/* Home opening screen: the security headline is longer than the old one, so it is set a little smaller
   and wider, with the second line as a subtitle. This keeps both buttons on the first screen of a laptop. */
.home .sh-in { max-width: 1040px; gap: 22px }
.home .sh-logo { width: clamp(240px, 25vw, 330px); margin-bottom: clamp(6px, 2vh, 18px) }
.home .sh-kicker { font-size: 12px; letter-spacing: .12em; margin-bottom: 0 }
.home .stage-hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.5rem) }
.home .stage-hero h1 .soft { font-size: .7em; margin-top: .16em }
.home .sh-lede { font-size: clamp(1rem, 1.3vw, 1.1rem); line-height: 1.6; max-width: 58ch }
.home .sh-ctas { margin-top: 8px }
/* More room between the buttons and the Find, Secure, Prove line at the bottom of the screen */
.home .stage-hero { padding-bottom: clamp(130px, 19vh, 180px) }

/* The weak-point counter: smaller, with no instructions under it (2026-10-17) */
.sh-hud { gap: 6px }
.sh-hud-t { font-size: 10.5px; letter-spacing: .12em }
.sh-hud-n { font-size: 13px; font-weight: 500; color: #C6D0DC }
.sh-hud-n b { color: #FAFAF7; font-weight: 650 }
.sh-hud-bar { height: 2px; max-width: 180px }
@media (max-width: 900px), (max-height: 520px) {
  .home .stage-hero { row-gap: 40px; padding-bottom: 256px }  /* 2026-10-17: was 300px; six weak points on phones need less room */
  .sh-hud { padding-top: 26px; max-width: 360px }
  .sh-hud-bar { width: 160px }
}

/* Home page "Demos" (#demos): one card per service line, with a still from the walkthrough.
   The picture and "Try the demo" open the demo pop-up; "Watch a 1-minute video" plays the walkthrough there. */
.dm-sec { border-bottom: 1px solid var(--line) }
.dm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 28px) }
.dm-card { display: grid; grid-template-rows: auto 1fr; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: 0 1px 2px rgba(20, 33, 61, .05), 0 10px 28px -10px rgba(20, 33, 61, .14); transition: border-color .25s, box-shadow .25s }
.dm-card:hover { border-color: var(--line-2); box-shadow: 0 2px 4px rgba(20, 33, 61, .05), 0 18px 40px -8px rgba(20, 33, 61, .2) }
.dm-shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #F4F4EF; border-bottom: 1px solid var(--line); cursor: pointer }
.dm-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .6s }
.dm-card:hover .dm-shot img { transform: scale(1.025) }
.dm-body { display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; align-content: start; padding: clamp(20px, 2.2vw, 26px) }  /* buttons line up across a row */
.dm-route { font: 500 12.5px/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--spark-text) }
.dm-body h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.25 }
.dm-body p { color: var(--ink-2); font-size: 15.5px; max-width: 58ch }
.dm-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px }
.dm-acts .btn { min-height: 44px; padding: 10px 18px; font-size: 15px }
@media (max-width: 760px) { .dm-grid { grid-template-columns: minmax(0, 1fr) } }
@media (max-width: 420px) { .dm-acts .btn { width: 100%; justify-content: center } }
@media (prefers-reduced-motion: reduce) { .dm-shot img { transition: none } .dm-card:hover .dm-shot img { transform: none } }

/* Header: the page names always sit side by side; there is no menu button.
   Wider than 1100px: one row. 941 to 1100px: logo and "Start a project" on the first row, the seven page names on a second row.
   860px and narrower: "Industries", "Services" and "Secure" stand in for the longer names so all seven fit.
   430px and narrower: the names wrap onto two lines (Nilvan, 2026-10-23: every name must show without scrolling or a menu). */
.nav-links { display: flex; align-items: center; gap: inherit }
.nav a.link { white-space: nowrap; flex: none }
.nl-short { display: none }
.nav .btn { white-space: nowrap }
@media (min-width: 1101px) { .nav { gap: clamp(14px, 1.5vw, 22px) } }
@media (max-width: 940px) {
  .brand img { height: 48px }
  .nav { gap: 16px }
  .nav a.link { font-size: 14.5px }
  .nav .btn { padding: 9px 14px; font-size: 14.5px; gap: 8px }
}
@media (max-width: 1100px) {
  .header-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 12px; min-height: 0; padding-top: 6px }
  .nav { display: contents }
  .brand { grid-row: 1; justify-self: start }
  .nav .btn { grid-row: 1; grid-column: 2; justify-self: end; min-height: 40px }
  .nav-links { grid-row: 2; grid-column: 1 / -1; gap: 26px; margin-top: 6px; margin-inline: calc(-1 * var(--gutter)); padding: 6px var(--gutter); border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain }
  .nav-links::-webkit-scrollbar { display: none }
  .nav a.link { display: block; padding-block: 4px 5px }
  html { scroll-padding-top: 124px }
  .page-hero { padding-top: calc(112px + clamp(56px, 9vw, 112px)) }
}
@media (max-width: 860px) { .nl-full { display: none } .nl-short { display: inline } .nav-links { gap: 16px } }
@media (max-width: 540px) {
  .nav-links { justify-content: space-between; gap: 8px }
  .nav a.link { font-size: 14px }
  .nav .btn .long { display: inline }
}
@media (max-width: 480px) { .nav a.link { font-size: 13px } .nav-links { gap: 4px } }
@media (max-width: 330px) { .nav .btn .long { display: none } }

/* Services: the "How we decide" band and the Private AI band are both navy; a thin line keeps them apart */
.band + .band { border-top: 1px solid rgba(250, 250, 247, .12) }
.band.section + .band.section { padding-top: clamp(64px, 8vw, 104px) }

/* Opening screen: the scroll cue only where it clears the Find, Secure, Prove labels */
@media (max-width: 1180px) { .sh-scroll { display: none } }

/* Demo pop-up on phones: "Open" instead of "Open in a new tab", so the title has room */
@media (max-width: 640px), (max-height: 500px) {
  .demo-open .dl-long { display: none }
  .demo-copy h2 { font-size: 1rem; line-height: 1.3 }
}

/* Phones held upright: the walkthrough videos are recorded at laptop size and too small to read here,
   so only "Try the demo" shows (the demos work on phones) */
@media (max-width: 560px) and (orientation: portrait) {
  .dm-acts [data-video], .svc-acts [data-video], .svc-dlg .pane-nav [data-video] { display: none }
}

/* Phones turned sideways: one header row (logo, short page names, button) instead of two */
@media (max-height: 500px) and (min-width: 761px) and (max-width: 940px) and (orientation: landscape) {
  .header-in { display: flex; padding-top: 0; min-height: 56px; gap: 12px }
  .nav { display: flex; gap: 12px; align-items: center }
  .brand img { height: 40px }
  .nav-links { margin: 0; padding: 0; border-top: 0; gap: 12px; overflow: visible }
  .nl-full { display: none }
  .nl-short { display: inline }
  .nav a.link { font-size: 14px; padding-block: 6px }
  .nav .btn { min-height: 38px; padding: 8px 12px; font-size: 14px }
  html { scroll-padding-top: 72px }
  .page-hero { padding-top: calc(60px + clamp(40px, 7vw, 80px)) }
}

/* Phones 430px and narrower: the seven names wrap onto two lines so all show */
@media (max-width: 430px) {
  .nav-links { flex-wrap: wrap; justify-content: center; gap: 0 16px }
  .nav a.link { font-size: 14px }
  html { scroll-padding-top: 150px }
  .page-hero { padding-top: calc(136px + clamp(56px, 9vw, 112px)) }
}

/* Opening screen, compact tracker (Nilvan, 2026-10-17: the Find, Secure, Prove flow took too much space):
   the track is a short strip near the bottom (narrower, smaller rings, one label line, drawn in main.js),
   "Start again" is a small pill beside the end of the track, and the headline block gets the room back.
   Phones and small tablets keep their own layout (the track under the text, see the flow rules above). */
@media (min-width: 901px) and (min-height: 521px) {
  .home .stage-hero { padding-bottom: clamp(104px, 13vh, 128px) }
  .sh-again { left: calc(66% + 44px); right: auto; bottom: 64px; transform: translateY(50%) }
}
/* Laptop screens (820px tall and less): a little less above and a smaller logo, so the buttons keep clear space above the track */
@media (min-width: 901px) and (min-height: 521px) and (max-height: 820px) {
  .home .stage-hero { padding-top: 56px; padding-bottom: 136px }
  .home .sh-logo { width: clamp(220px, 21vw, 280px) }
  .home .sh-in { gap: 18px }
}
@media (min-width: 901px) and (min-height: 521px) and (max-height: 690px) {
  .home .stage-hero { padding-top: 40px; padding-bottom: 124px }
  .home .sh-logo { width: clamp(190px, 17vw, 230px); margin-bottom: 0 }
  .home .sh-in { gap: 14px }
  .home .stage-hero h1 { font-size: clamp(2rem, 3.6vw, 3rem) }
}
/* Very short laptop windows (600px tall and less): the opening screen fits the window, track included */
@media (min-width: 901px) and (min-height: 521px) and (max-height: 600px) {
  .home .stage-hero { min-height: 100svh; padding-top: 28px; padding-bottom: 112px }
  .home .sh-logo { width: clamp(160px, 15vw, 190px) }
  .home .sh-in { gap: 12px }
  .home .stage-hero h1 { font-size: clamp(1.9rem, 3.3vw, 2.6rem) }
}
.sh-again { padding: 7px 14px; font-size: 13px; box-shadow: 0 0 0 4px rgba(238, 168, 47, .16), 0 6px 18px rgba(0, 0, 0, .3) }
@keyframes sh-again-in { from { opacity: 0 } }

/* Service-line pop-ups on the home page (Nilvan, 2026-10-17: "each service line detail should pop up once the user
   clicked on the card"). Same size as the other pop-ups; the text comes from the services page rows. */
.svc[data-open] { cursor: pointer; grid-template-rows: auto auto 1fr auto }  /* "See details" lines up across a row */
.svc-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 14px; font-weight: 600; color: var(--ink) }
.svc-go::after { content: ""; width: 6px; height: 6px; border-top: 1.5px solid var(--spark-text); border-right: 1.5px solid var(--spark-text); transform: rotate(45deg); transition: transform .25s }
a.svc:hover .svc-go::after, a.svc:focus-visible .svc-go::after { transform: translateX(3px) rotate(45deg) }
.svc-dlg .pane-copy p { max-width: 66ch }
@media (min-width: 761px) { .svc-dlg .pane-copy p { font-size: 16px } }
.svc-dlg-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; padding-top: 4px }
.svc-dlg .svc-cols { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 0 }
.svc-dlg .svc-cols ul { font-size: 15px }
.svc-dlg-side { display: grid; gap: 24px; align-content: start }
.svc-dlg-side > .svc-cols { order: -1 }  /* "What you get" first, beside "Typical engagements"; the picture below it */
.svc-dlg-shot { margin: 0; display: grid; gap: 8px }
.svc-dlg-pic { display: block; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #F4F4EF; cursor: pointer; aspect-ratio: 16 / 10 }
.svc-dlg-pic img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .6s }
.svc-dlg-pic:hover img { transform: scale(1.025) }
.svc-dlg-shot figcaption { font-size: 13px; color: var(--muted) }
.svc-dlg-more { font-size: 14.5px; font-weight: 600 }
@media (max-width: 760px) {
  .svc-dlg-grid { grid-template-columns: minmax(0, 1fr); gap: 24px }
  .svc-dlg-more { order: 2; width: 100%; text-align: center }
  .svc-dlg .pane-nav .btn, .svc-dlg .pane-nav .btn-ghost { flex: 1 1 0; padding-inline: 12px; font-size: 14.5px }
}
/* Short screens (phones held sideways, 320px phones): the whole pop-up scrolls, so the lists are not squeezed into a strip */
@media (max-height: 500px), (max-width: 359px) {
  .svc-dlg .pane-shell { display: block; overflow: auto; overscroll-behavior: contain }
  .svc-dlg .pane-body { overflow: visible; margin-top: 12px }
  .svc-dlg .pane-foot { margin-top: 12px }
}
@media (prefers-reduced-motion: reduce) { .svc-go::after, .svc-dlg-pic img { transition: none } .svc-dlg-pic:hover img { transform: none } }

/* Demo cards: no tag over the picture, and a lighter second action, so the picture and the text carry equal weight */
.dm-acts { align-items: center; gap: 8px 18px }
.dm-acts .btn-ghost[data-video] { border-color: transparent; background: none; box-shadow: none; padding-inline: 4px; min-height: 44px; color: var(--ink) }
.dm-acts .btn-ghost[data-video]:hover { color: var(--spark-text); background: none }
@media (max-width: 420px) { .dm-acts .btn-ghost[data-video] { width: auto } }

/* Contact form: sends from the site (no mail app). The email address is plain text with a Copy button.
   .cf-hp is a hidden spam trap that people never see. */
span.email { user-select: all; cursor: text }
span.email:hover { text-decoration: none }
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden }
.cf-ok { color: #8FD6A8; font-size: 14.5px }
.contact-form button[disabled] { opacity: .65; cursor: progress }

/* About: the six values sit in three columns, each under its own thin line */
.beliefs.beliefs-six { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 0 }
.beliefs.beliefs-six li, .beliefs.beliefs-six li + li { padding: 26px 26px 14px 0; border-left: 0; border-top: 1px solid var(--band-line) }
@media (max-width: 900px) { .beliefs.beliefs-six { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 600px) { .beliefs.beliefs-six { grid-template-columns: minmax(0, 1fr) } .beliefs.beliefs-six li, .beliefs.beliefs-six li + li { padding: 20px 0 } }
/* About: the service lines as one sentence, and the vision's three aims as a plain list */
.about-lines { font-size: 1rem; color: var(--ink-2); padding-top: 6px; border-top: 1px solid var(--line) }
.about-lines span { font-weight: 600; color: var(--ink) }
.about-list { margin: 0; padding: 0 0 0 20px; display: grid; gap: 10px; font-size: 1.05rem; color: var(--ink-2) }
.about-list b { color: var(--ink); font-weight: 600 }

/* Header names: all the same colour, weight and size (Nilvan, 2026-10-23). Only the thin orange
   line under the current page or section differs. */
.nav a.link, .nav a.link.is-current, .nav a.link:hover { color: var(--ink); font-weight: 500 }
