/* Home page content (2026-11-19, revised 2026-11-23). Layout help for the sections whose item counts
   changed (five services, five steps, three figures). Colours, type and motion come from home.css. */

/* Hero: the second sentence of the heading starts its own line (three lines at desktop width). */
.home-page .hero h1 span { display: block; }
/* On a short laptop screen the hero gives up its fixed height so the first button stays on screen. */
@media (min-width: 1081px) and (max-height: 860px) {
  .home-page .hero-inner { min-height: 0; padding-top: 36px; padding-bottom: 36px; align-items: start; }
  .home-page .hero-inner > div:first-child { padding-top: 28px; }
}

/* Who we are: three statements under the lead, and a photograph in the right column. */
.about-lines { list-style: none; margin: 26px 0 0; padding: 0; max-width: 620px; display: grid; gap: 14px; }
.about-lines li { position: relative; padding-left: 24px; color: var(--ink); font-size: 16px; line-height: 1.6; }
.about-lines li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.about-photo { min-height: 460px; border-radius: 30px; box-shadow: var(--shadow); }

.about-home .section-lead { color: var(--ink); }

/* Until a real team photograph is set in index.php the section is one column. */
.global-proof-grid.about-solo { grid-template-columns: minmax(0, 1fr); }
.about-solo > div { max-width: 780px; }

/* Five services: two wide cards over three. Five cards, five cells. */
.bento.bento-five { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: minmax(270px, auto); }
.bento.bento-five .bento-card { grid-column: span 2; display: flex; flex-direction: column; }
.bento.bento-five .bento-card:nth-child(-n+2) { grid-column: span 3; }
.bento.bento-five .bento-card h3 { margin-top: 0; }

/* Why choose Q360: three figures on the navy panel the page already uses. */
.choose-home { background: #fff; }
.choose-figures { display: grid; grid-template-columns: 1.3fr 1fr 1fr; margin-top: 46px; border-radius: 30px; background: var(--navy); box-shadow: var(--shadow); overflow: hidden; }
.choose-figure { display: flex; flex-direction: column; padding: 38px 34px 36px; color: #fff; border-right: 1px solid rgba(255,255,255,.1); transition: background .25s ease; }
.choose-figure:last-child { border-right: 0; }
a.choose-figure:hover, a.choose-figure:focus-visible { background: rgba(255,255,255,.05); }
.choose-figure strong { color: var(--orange); font-size: clamp(46px, 5.2vw, 76px); line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.choose-figure b { margin-top: 14px; font-size: 18px; line-height: 1.25; letter-spacing: -.01em; }
.choose-figure span { margin-top: 10px; color: rgba(255,255,255,.66); font-size: 13px; line-height: 1.55; max-width: 380px; }
a.choose-figure b::after { content: " \2192"; color: var(--orange); }
.choose-home .client-proof { margin-top: 40px; background: none; }
.choose-next { margin-top: 40px; max-width: 820px; color: var(--ink); }

/* How we do it: five steps on the six-step track. */
.model-track.model-track-five { grid-template-columns: repeat(5, 1fr); }
.model-track-five .model-step strong { max-width: 210px; margin: 0 auto; font-size: 14px; line-height: 1.5; font-weight: 600; letter-spacing: 0; }
.model .control-note { margin: 54px 0 0; font-size: 20px; text-align: left; }
.model .section-actions { margin-top: 22px; }

/* Q360 AI Core: the programs it holds, and three things a person asks it. */
.ai-core-home .flow-lead { margin: 0 0 16px; font-size: 16px; font-weight: 700; color: var(--ink); }
.ai-core-home .manual-flow.visible .flow-stage:nth-child(5) { transition-delay: .48s; }
.ai-core-home .manual-flow.visible .flow-stage:nth-child(6) { transition-delay: .6s; }
.ai-core-home .flow-stage:last-child { margin-bottom: 0; }
.ai-core-home .problem-list { display: grid; gap: 30px; }
.ai-core-home .problem-item { align-items: center; }
.ai-core-home .ask-line { font-size: 19px; line-height: 1.5; color: var(--ink); font-weight: 600; letter-spacing: -.01em; }
.controls-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 52px 0 0; }
.controls-row strong { margin-right: 6px; font-size: 16px; }
.controls-row span { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 700; color: var(--ink); }

/* The two profession versions sit inside the AI Core section: the profession is the heading, the product name the label. */
.core-versions { margin-top: 72px; padding-top: 56px; border-top: 1px solid var(--line); }
.core-versions .section-lead { margin-top: 0; color: var(--ink); }
.bento.bento-two { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: auto; margin-top: 34px; }
.bento.bento-two .bento-card { min-height: 0; padding-bottom: 40px; }
.bento.bento-two .bento-card h3 { font-size: 36px; }
.bento.bento-two .bento-card.dark .eyebrow { color: #ffb15e; }

/* One client quote under the figures. Printed only when index.php holds an approved quote. */
.client-quote { margin: 44px 0 0; max-width: 900px; }
.client-quote blockquote { margin: 0; }
.client-quote blockquote p { margin: 0; color: var(--navy); font-size: clamp(22px, 2.4vw, 32px); line-height: 1.3; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
.client-quote figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 18px; font-size: 15px; color: var(--muted); }
.client-quote figcaption strong { color: var(--ink); }

/* QFlow demonstration. */
.usecases .inline-link { color: var(--navy); font-weight: 700; text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
.demo-sample { margin: 14px 0 0; font-size: 12px; color: #48566b; }

/* A new name, not a new company: three dated facts, then the line that sums them up. */
.history-facts { list-style: none; margin: 34px 0 0; padding: 0; max-width: 920px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 22px; background: #fff; overflow: hidden; }
.history-facts li { display: flex; flex-direction: column; gap: 8px; padding: 24px 26px; border-right: 1px solid var(--line); }
.history-facts li:last-child { border-right: 0; }
.history-facts strong { color: var(--navy); font-size: 26px; letter-spacing: -.03em; line-height: 1; }
.history-facts span { color: var(--muted); font-size: 14px; line-height: 1.55; }
.continuity-home .continuity-note.continuity-pull { grid-template-columns: 1fr; margin-top: 18px; }

/* History: the 1990s computer is part of the timeline, never a picture left over under the text.
   Wide screens: text, dates and button in one column, the photograph upright beside all of it.
   Tablets: heading across the top, then one joined card - the photograph on the left, the three dates stacked on
   the right at the same height - then the summing-up line and the button.
   Phones: the same card turned upright - the photograph is its head, the dates follow under it. */
.history-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, .8fr); grid-template-areas: "head photo" "facts photo" "foot photo"; column-gap: clamp(36px, 5vw, 72px); align-items: start; }
.history-head { grid-area: head; }
.history-facts { grid-area: facts; }
.history-foot { grid-area: foot; }
.history-photo { grid-area: photo; align-self: center; position: relative; margin: 0; aspect-ratio: 4 / 5; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow); }
.history-photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
@media (max-width: 1080px) {
  .history-grid { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); grid-template-areas: "head head" "photo facts" "foot foot"; column-gap: 0; }
  .history-photo { align-self: stretch; aspect-ratio: auto; margin-top: 34px; border-radius: 22px 0 0 22px; box-shadow: none; }
  .history-photo img { object-position: 60% 46%; }
  .history-facts { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; max-width: none; min-height: 380px; border-left: 0; border-radius: 0 22px 22px 0; }
  .history-facts li { justify-content: center; padding: 22px 30px; border-right: 0; border-bottom: 1px solid var(--line); }
  .history-facts li:last-child { border-bottom: 0; }
  .history-facts strong { font-size: 30px; }
  .history-facts span { font-size: 15px; }
  .continuity-home .history-foot .continuity-note { max-width: none; }
}
@media (max-width: 600px) {
  .history-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "photo" "facts" "foot"; }
  .history-photo { aspect-ratio: 3 / 2; border-radius: 22px 22px 0 0; }
  .history-photo img { object-position: 50% 54%; }
  .history-facts { min-height: 0; grid-auto-rows: auto; margin-top: 0; border-left: 1px solid var(--line); border-top: 0; border-radius: 0 0 22px 22px; }
  .history-facts li { padding: 20px 22px; }
}

/* A focus ring that shows on the orange surfaces. */
.home-page .cta .btn:focus-visible, .home-page .bento-card.orange a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.home-page .cta .btn-light:focus-visible { outline-color: var(--navy); }

@media (max-width: 1080px) {
  .bento.bento-five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento.bento-five .bento-card, .bento.bento-five .bento-card:nth-child(-n+2) { grid-column: auto; }
  .bento.bento-five .bento-card:last-child { grid-column: 1 / -1; }
  .model-track.model-track-five { grid-template-columns: repeat(3, 1fr); }
  .choose-figures { grid-template-columns: 1fr; }
  .choose-figure { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .choose-figure:last-child { border-bottom: 0; }
  .about-photo { min-height: 380px; }
}
@media (max-width: 720px) {
  .bento.bento-five, .bento.bento-two { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento.bento-five .bento-card:last-child { grid-column: auto; }
  .bento.bento-five .bento-card, .bento.bento-two .bento-card { min-height: 0; }
  .model-track.model-track-five { grid-template-columns: 1fr 1fr; }
  .model-track-five .model-step:last-child { grid-column: 1 / -1; }
  .history-facts { grid-template-columns: 1fr; }
  .history-facts li { border-right: 0; border-bottom: 1px solid var(--line); }
  .history-facts li:last-child { border-bottom: 0; }
  .choose-figure { padding: 28px 24px; }
  .about-photo { min-height: 300px; }
  .ai-core-home .ask-line { font-size: 17px; }
  .bento.bento-two .bento-card h3 { font-size: 30px; }
  .core-versions { margin-top: 52px; padding-top: 40px; }
}

/* ---- Hero ------------------------------------------------------------------------------------------------------
   One flat royal blue field, cream Archivo display type, a large photograph that dissolves into the field along its
   top and left edges with the headline lying across that corner, orange only on the main button. No gradients,
   shadows, glass or labels on the picture. Everything is on screen at first paint. Reactions (home-hero.js): headline words, the type and the picture drifting apart under the pointer,
   the picture leaning toward a hovered word, the button fill. */
@font-face { font-family: 'Archivo Q'; src: url('../fonts/Archivo-hero.woff2') format('woff2-variations'), url('../fonts/Archivo-hero.woff2') format('woff2'); font-weight: 500 700; font-stretch: 90% 100%; font-display: swap; }
.home-page .hero.qx { --field: #0e2a6e; --cream: #f3ecdf; --cream-dim: rgba(243,236,223,.76); --on-orange: #081b4b; --qx-out: cubic-bezier(.23,1,.32,1); --qx-io: cubic-bezier(.77,0,.175,1); --g: clamp(16px, 2.2vw, 40px);
  --h: clamp(2.6rem, calc(min(100vw, 1440px) / 17.6), 5.4rem); --drop: clamp(70px, 11vh, 118px);
  position: relative; min-height: 0; overflow: clip; isolation: isolate; color: var(--cream); background: var(--field); }
.home-page .hero.qx::before, .home-page .hero.qx::after, .home-page .qx .hero-spotlight { display: none; }
.home-page .qx .qx-wrap { position: relative; z-index: 2; width: min(1440px, 100% - 2 * var(--g)); margin-inline: auto; min-height: clamp(600px, calc(100svh - 107px), 900px);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr; column-gap: var(--g); align-items: start; align-content: stretch; gap: 0 var(--g); padding: clamp(26px, 4.4vh, 52px) 0 clamp(24px, 4vh, 44px); }

/* Type block: headline over the picture's corner, then the subtext and the actions. */
.qx-type { grid-column: 1 / 9; grid-row: 1; position: relative; z-index: 3; display: grid; gap: clamp(22px, 3.6vh, 38px); align-content: start; justify-items: start; pointer-events: none; transition: translate 380ms var(--qx-out); }
.qx-type > * { pointer-events: auto; }
.home-page .qx .qx-title { margin: 0; max-width: none; font-family: 'Archivo Q', Inter, sans-serif; font-size: var(--h); font-weight: 600; font-stretch: 96%; line-height: .9; letter-spacing: -.035em; color: var(--cream); transition: color 260ms var(--qx-out); animation: none; }
.home-page .qx .qx-line { display: block; white-space: nowrap; color: inherit; }
.home-page .qx .qx-line-2 { font-size: .64em; letter-spacing: -.025em; }
.home-page .qx .split-word { position: relative; display: inline-block; white-space: nowrap; color: inherit; transition: opacity 240ms var(--qx-out); }
.home-page .qx .qx-title.is-hot { color: #fff; }
.home-page .qx .qx-title.is-word-hot .split-word:not(.is-hot) { opacity: .62; transition-duration: 380ms; }
.home-page .qx .split-word::after { content: ""; position: absolute; left: .02em; right: .04em; bottom: .02em; height: .07em; background: var(--orange); transform: scaleX(0); transform-origin: 100% 50%; transition: transform 240ms var(--qx-out); }
.home-page .qx .split-word.is-hot::after { transform: scaleX(1); transform-origin: 0 50%; transition-duration: 360ms; }
.qx-side { display: grid; gap: 22px; max-width: 32ch; transition: translate 380ms var(--qx-out); }
.home-page .qx .qx-sub { margin: 0; max-width: 32ch; font-size: 17px; line-height: 1.55; color: var(--cream-dim); text-wrap: balance; transition: color 280ms var(--qx-out), translate 420ms var(--qx-out); animation: none; }
/* animation: none switches off the old hero's fade-in on .hero-actions, so the button is there at first paint. */
.home-page .qx .qx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; animation: none; opacity: 1; transform: none; }

/* Main button: orange, the cream fill grows from where the pointer came in and leaves toward where it went. */
.home-page .qx .qx-btn { position: relative; isolation: isolate; overflow: hidden; min-height: 50px; padding: 0 26px; border-radius: 999px; background: var(--orange); color: var(--on-orange); box-shadow: none; font-weight: 700; font-size: 16px; letter-spacing: -.005em; width: auto; transition: color 220ms var(--qx-out), scale 140ms var(--qx-out); }
.qx-fill { position: absolute; z-index: -1; left: var(--fx, 50%); top: var(--fy, 50%); width: 0; height: 0; border-radius: 50%; background: var(--cream); translate: -50% -50%; pointer-events: none; transition: width 520ms var(--qx-out), height 520ms var(--qx-out); }
.qx-label { position: relative; }
.home-page .qx .qx-btn:active { scale: .96; }
.qx-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--cream); font-weight: 600; font-size: 16px; text-decoration: none; }
.qx-link .qx-label { background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; transition: background-size 360ms var(--qx-out); }
.qx-arrow { display: inline-block; transition: translate 220ms var(--qx-out); }
.qx-link:focus-visible, .home-page .qx .qx-btn:focus-visible { outline: 2px solid var(--cream); outline-offset: 4px; }

/* The picture: from the column under the headline's second line to the right edge of the wrap, down to the foot. */
.qx-media { grid-column: 4 / 13; grid-row: 1 / 3; position: relative; z-index: 1; align-self: stretch; margin: var(--drop) 0 0; display: grid; transition: none; }
.qx-frame { position: relative; min-height: 380px; border-radius: 14px; overflow: clip; transition: scale 380ms var(--qx-out); }
.qx-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, rgba(0,0,0,.08) 6px, rgba(0,0,0,.4) 9%, rgba(0,0,0,.85) 18%, #000 26%), linear-gradient(90deg, transparent 0, rgba(0,0,0,.5) 7%, #000 20%);
  mask-image: linear-gradient(180deg, transparent 0, rgba(0,0,0,.08) 6px, rgba(0,0,0,.4) 9%, rgba(0,0,0,.85) 18%, #000 26%), linear-gradient(90deg, transparent 0, rgba(0,0,0,.5) 7%, #000 20%);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.qx.is-media-hot .qx-frame { scale: 1.02; transition-duration: 560ms; }
.qx.is-media-hot .qx-type { translate: 0 -8px; transition-duration: 560ms; }

@media (hover: hover) and (pointer: fine) {
  .home-page .qx .qx-sub:hover { color: var(--cream); translate: 6px 0; transition-duration: 360ms, 520ms; }
  .home-page .qx .qx-btn:hover .qx-fill { width: calc(var(--fd, 300px) * 2); height: calc(var(--fd, 300px) * 2); }
  .home-page .qx .qx-btn:hover { color: var(--on-orange); }
  .qx-link:hover .qx-label { background-size: 0 1px; background-position: 100% 100%; }
  .qx-link:hover .qx-arrow { translate: 6px 0; }
}

/* First paint (2026-11-23): the headline, the text and both actions are simply there. The one touch on arrival is
   the picture easing from 1.04 to rest; it is visible from its first frame. */
@media (prefers-reduced-motion: no-preference) {
  .qx-photo { animation: qxSettle 1.4s var(--qx-out) both; }
}
@keyframes qxSettle { from { transform: scale(1.04); } to { transform: none; } }

/* Below 1100: one column. Headline, text, the picture (no dissolve), then the story. */
@media (max-width: 1099px) {
  .home-page .hero.qx { --h: clamp(2.5rem, 9vw, 4.4rem); }
  .home-page .qx .qx-wrap { min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; row-gap: 30px; padding: 36px 0 44px; }
  .qx-type, .qx-media { grid-column: 1; }
  .qx-type { grid-row: 1; }
  .qx-media { grid-row: 2; margin: 0; }
  .qx-frame { min-height: 0; aspect-ratio: 16 / 10; border-radius: 12px; }
  .qx-photo { -webkit-mask-image: none; mask-image: none; }
  .qx-side, .home-page .qx .qx-sub { max-width: 46ch; }
}
@media (max-width: 600px) {
  .home-page .hero.qx { --h: clamp(2.3rem, 11.4vw, 3.2rem); }
  .home-page .qx .qx-wrap { width: calc(100% - 32px); padding: 30px 0 40px; row-gap: 26px; }
  .home-page .qx .qx-line { white-space: normal; }
  .home-page .qx .qx-line-2 { font-size: .7em; }
  .qx-frame { aspect-ratio: 4 / 3; }
  .home-page .qx .qx-sub { font-size: 16px; }
  .home-page .qx .qx-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .qx-type, .qx-side, .qx-frame, .home-page .qx .qx-sub, .home-page .qx .split-word::after, .qx-fill { transition: none; }
}
