/* ============================================
   THYNKIA 2026: homepage + solutions page sections
   Needs site.css first.
   ============================================ */

/* Sections below the first screen are laid out only when they get near it (big win on slow phones). */
main > section:not(.hero):not(.page-head) { content-visibility: auto; contain-intrinsic-size: auto 900px; }

/* ---------- Hero ---------- */
.hero { height: calc(100svh - 28px); min-height: 640px; max-height: 1000px; background: var(--sky); isolation: isolate; display: flex; align-items: center; justify-content: center; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(255,255,255,.12); }
.hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 96px var(--gutter) 40px; }
.hero .h-display { font-size: clamp(38px, 5vw, 78px); }
.badge { display: inline-flex; align-items: center; gap: 9px; padding: 7px 16px; border-radius: 999px; background: #fff; font-size: 14px; color: var(--ink-2); }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero h1 { margin-top: 22px; max-width: 23ch; }
.hero .lead { margin-top: 18px; text-align: center; max-width: 44ch; color: #1d2230; }
.hero-ctas { margin-top: 30px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (max-width: 760px) { .hero { height: auto; min-height: 88svh; } .hero .h-display { font-size: 34px; } .integrations .note { display: block; } }

/* ---------- Logo marquee ---------- */
.marquee-band { padding: 42px 0 34px; }
.marquee-row { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 32px; align-items: center; }
.marquee-row p { font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; }
.marquee-list { display: flex; align-items: center; gap: 56px; padding-right: 56px; list-style: none; }
.marquee-list li { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: #3a3f4d; opacity: .78; transition: opacity .25s; }
.marquee-list li:hover { opacity: 1; }
.marquee-list img { width: 24px; height: 24px; opacity: .85; }
.marquee-track { animation: marquee 48s linear infinite; }
  .marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }

@keyframes marquee { to { transform: translateX(-50%); } }
@media (max-width: 760px) { .marquee-row { grid-template-columns: 1fr; gap: 18px; } }

/* ---------- Integrations: animated beams into one hub ---------- */
.integrations { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px 72px; align-items: center; }
.integrations .lead { margin-top: 22px; }
.integrations .note { margin-top: 28px; display: flex; gap: 12px; align-items: center; font-size: 15.5px; color: var(--ink-2); }
.integrations .note b { color: var(--ink); font-weight: 600; }
.beam-box { position: relative; height: 470px; border-radius: var(--r-l); background: var(--ground); }
.beam-box svg.beams { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.beams .base { fill: none; stroke: #d7d5cf; stroke-width: 1.6; }
.beams .flow { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 34 640; stroke-dashoffset: 674; }
.beams .flow { animation: beam 3.6s cubic-bezier(.5,0,.3,1) infinite; animation-delay: var(--d, 0s); }

@keyframes beam { to { stroke-dashoffset: 0; } }
.beam-col { position: absolute; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-around; padding: 26px 0; }
.beam-col.l { left: 8%; } .beam-col.r { right: 8%; }
.node { position: relative; width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px -10px rgba(11,15,26,.35); }
.node img { width: 26px; height: 26px; }
.node span { position: absolute; top: 100%; margin-top: 7px; left: 50%; transform: translateX(-50%); font-size: 13px; color: var(--muted); white-space: nowrap; }
.hub { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 104px; height: 104px; border-radius: 30px; background: var(--ink); display: grid; place-items: center; box-shadow: 0 24px 50px -20px rgba(11,15,26,.6); }
.hub svg { width: 52px; height: 52px; }
.hub::before { content: ""; position: absolute; inset: -10px; border-radius: 38px; border: 2px solid var(--accent); opacity: 0; animation: hub-pulse 3.6s ease-out infinite; }

@keyframes hub-pulse { 0% { opacity: .55; transform: scale(.9); } 70%, 100% { opacity: 0; transform: scale(1.18); } }
@media (max-width: 900px) { .integrations { grid-template-columns: 1fr; } .beam-box { height: 420px; } .beam-col.l { left: 5%; } .beam-col.r { right: 5%; } .node { width: 50px; height: 50px; } }

.hub.ai { border-radius: 50%; width: 112px; height: 112px; background: radial-gradient(circle at 50% 45%, #2a1a14, var(--ink) 70%); }
.hub.ai svg { width: 46px; height: 46px; animation: ai-breathe 3.6s ease-in-out infinite; }
.hub.ai .ai-label { position: absolute; bottom: 18px; font-size: 11px; font-weight: 600; letter-spacing: .14em; color: #c4bdfd; }
.hub.ai::before { border-radius: 50%; }
.orbit { position: absolute; inset: -14px; border-radius: 50%; border: 1.5px dashed rgba(91,69,224,.35); animation: spin 14s linear infinite; }
.orbit.o2 { inset: -30px; border-color: rgba(11,15,26,.12); animation-duration: 22s; animation-direction: reverse; }
.orbit i { position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--accent); }
.orbit.o2 i { background: var(--ink-2); }
@keyframes ai-breathe { 50% { transform: scale(1.08) rotate(8deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- What we build: bento of live interface fragments ---------- */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tile { position: relative; display: flex; flex-direction: column; border-radius: var(--r-l); background: var(--surface); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.tile:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -36px rgba(11,15,26,.45); }
.tile-art { position: relative; height: 330px; background: var(--ground); margin: 10px 10px 0; border-radius: 14px; overflow: hidden; }
.t-infra .tile-art { background: var(--ink); }
.t-infra .stack { transform: scale(.62) translateY(70px); }
.tile-text { padding: 22px 24px 24px; display: grid; gap: 8px; }
.tile-text p { color: var(--ink-2); font-size: 15.5px; line-height: 1.5; max-width: 48ch; }
.tile-btn { justify-self: start; margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14.5px; font-weight: 500; transition: background-color .25s, gap .25s; }
.tile:hover .tile-btn { background: var(--accent); gap: 12px; }
@media (max-width: 760px) { .bento { grid-template-columns: 1fr; } .tile-art { height: 300px; } }

/* Fragments: shared by the bento and the solutions page. Animations run only while visible (.live). */
.frag { position: absolute; inset: 0; display: grid; place-items: center; padding: 22px; font-size: 13px; }
.card-ui { width: 100%; max-width: 380px; background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 14px 30px -18px rgba(11,15,26,.35); }
.card-ui .hd { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 13px; margin-bottom: 10px; }
.card-ui .hd span { font-weight: 500; color: var(--muted); font-size: 13px; }
.anim, .anim * { animation-play-state: paused !important; }
.live .anim, .live .anim * { animation-play-state: running !important; }

/* 3D infrastructure stack */
.stack { position: absolute; inset: 0; display: grid; place-items: center; perspective: 1200px; }
.stack-3d { position: relative; width: 300px; height: 300px; transform: rotateX(58deg) rotateZ(-38deg); transform-style: preserve-3d; }
.plane { position: absolute; inset: 0; border-radius: 26px; transform-style: preserve-3d; display: flex; align-items: flex-end; padding: 18px; font-size: 13px; font-weight: 500; color: #fff; }
.plane:nth-child(1) { background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); transform: translateZ(0); }
.plane:nth-child(2) { background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); transform: translateZ(70px); }
.plane:nth-child(3) { background: rgba(255,255,255,.13); box-shadow: inset 0 0 0 1px rgba(255,255,255,.26); transform: translateZ(140px); }
.plane:nth-child(4) { background: var(--accent); transform: translateZ(210px); box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
.plane .grid-dots { position: absolute; inset: 22px; background-image: radial-gradient(rgba(255,255,255,.35) 1.4px, transparent 1.5px); background-size: 26px 26px; border-radius: 16px; }
.plane:nth-child(4) .grid-dots { background-image: radial-gradient(rgba(255,255,255,.55) 1.6px, transparent 1.7px); }
.plane b { position: relative; font-weight: 500; }
.stack-label { position: absolute; color: #c9ccd4; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.stack-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.stack-3d.anim { animation: stack-spin 22s linear infinite; }
  .plane.anim { animation: stack-breathe 6s ease-in-out infinite; }
  .plane:nth-child(2).anim { animation-delay: -.4s; } .plane:nth-child(3).anim { animation-delay: -.8s; } .plane:nth-child(4).anim { animation-delay: -1.2s; }

@keyframes stack-spin { from { transform: rotateX(58deg) rotateZ(-38deg); } to { transform: rotateX(58deg) rotateZ(322deg); } }
@keyframes stack-breathe { 50% { translate: 0 0 26px; } }

/* Lead scoring */
.leads-ui li { list-style: none; display: grid; grid-template-columns: 30px 1fr 64px; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 10px; }
.leads-ui li + li { margin-top: 2px; }
.co { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 600; font-size: 12px; background: var(--ground); }
.leads-ui small { display: block; color: var(--muted); font-size: 13px; }
.score { height: 7px; border-radius: 9px; background: var(--ground); overflow: hidden; }
.score i { display: block; height: 100%; width: var(--s); border-radius: 9px; background: var(--ok); transform-origin: left; }
.leads-ui .score i.anim { animation: score 4.8s var(--ease) infinite; animation-delay: var(--d); }
  .leads-ui li.anim { animation: row-hl 4.8s ease infinite; animation-delay: var(--d); }

@keyframes score { 0% { transform: scaleX(0); } 22%, 88% { transform: scaleX(1); } 100% { transform: scaleX(1); } }
@keyframes row-hl { 0%, 4% { background: transparent; } 12%, 26% { background: var(--accent-soft); } 40%, 100% { background: transparent; } }

/* Chat */
.chat-ui { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 82%; padding: 9px 12px; border-radius: 14px; line-height: 1.4; font-size: 13px; }
.msg.in { align-self: flex-start; background: var(--ground); border-bottom-left-radius: 4px; }
.msg.out { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.typing { align-self: flex-end; display: flex; gap: 4px; padding: 11px 14px; border-radius: 14px; background: var(--ink); }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: #fff; opacity: .5; }
.chat-ui .anim { animation: chat 9s ease infinite; animation-delay: var(--d); opacity: 0; }
  .typing i.anim { animation: blink 1s ease infinite; } .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
  .chat-ui .typing.anim { animation: typing 9s ease infinite; }

@keyframes chat { 0%, 6% { opacity: 0; transform: translateY(8px); } 12%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes typing { 0%, 30% { opacity: 0; } 34%, 44% { opacity: 1; } 48%, 100% { opacity: 0; height: 0; padding: 0; margin: -4px 0; } }
@keyframes blink { 50% { opacity: 1; } }

/* Collections */
.inv li { list-style: none; display: grid; grid-template-columns: 1fr auto 78px; gap: 10px; align-items: center; padding: 8px 2px; }
.inv li + li { box-shadow: 0 -1px 0 var(--ground); }
.inv small { color: var(--muted); display: block; font-size: 13px; }
.inv b { font-weight: 600; font-variant-numeric: tabular-nums; }
.state { position: relative; height: 24px; }
.state span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 999px; font-size: 13px; font-weight: 600; }
.state .due { background: #fbe4dc; color: #a2310d; }
.state .paid { background: var(--ok-soft); color: var(--ok); opacity: 0; }
.state .paid.anim { animation: paid 6s ease infinite; animation-delay: var(--d); }

@media (prefers-reduced-motion: reduce) { .state .paid { opacity: 1; } }
@keyframes paid { 0%, 18% { opacity: 0; transform: scale(.9); } 24%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.collect-total { margin-top: 10px; display: flex; justify-content: space-between; align-items: baseline; padding: 10px 4px 0; }
.collect-total b { font-size: 22px; letter-spacing: -.03em; font-weight: 600; }

/* Forecast */
.fc svg { width: 100%; height: 150px; overflow: visible; }
.fc .actual { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.fc .pred { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-dasharray: 6 6; stroke-linecap: round; }
.fc .band { fill: var(--accent-soft); }
.fc .today { stroke: #cfcdc6; stroke-width: 1.2; stroke-dasharray: 3 4; }
.fc-legend { display: flex; gap: 16px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.fc-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--ink); margin-right: 6px; vertical-align: middle; }
.fc-legend .p i { background: var(--accent); }
.fc .actual.anim { stroke-dasharray: 520; animation: draw 6s var(--ease) infinite; }
  .fc .pred.anim, .fc .band.anim { animation: fade-pred 6s ease infinite; }

@keyframes draw { 0% { stroke-dashoffset: 520; } 45%, 100% { stroke-dashoffset: 0; } }
@keyframes fade-pred { 0%, 42% { opacity: 0; } 55%, 92% { opacity: 1; } 100% { opacity: 0; } }

/* Knowledge base */
.kb-q { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; background: var(--ground); font-size: 13px; }
.kb-q svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.kb-q .typed { display: inline-block; overflow: hidden; white-space: nowrap; max-width: 100%; }
.kb-a { margin-top: 10px; padding: 12px; border-radius: 11px; background: #fff; box-shadow: inset 0 0 0 1px #ecebe6; line-height: 1.5; font-size: 13px; color: var(--ink-2); }
.src { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.src span { padding: 3px 9px; border-radius: 999px; background: var(--ground); font-size: 13px; color: var(--ink-2); }
.kb-q .typed.anim { animation: type 7s steps(30) infinite; }
  .kb-a.anim { animation: kb-ans 7s ease infinite; }

@keyframes type { 0% { max-width: 0; } 34%, 100% { max-width: 100%; } }
@keyframes kb-ans { 0%, 38% { opacity: 0; transform: translateY(8px); } 46%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ---------- How we work: the KPI model (ink window) ---------- */
.how-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 72px; align-items: end; }
.how-head .lead { color: #c9ccd4; justify-self: end; }
.how-head h2 { color: #fff; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.half { position: relative; border-radius: 16px; padding: 18px 18px 16px; background: var(--ground); overflow: hidden; }
.half b { display: block; font-size: clamp(34px, 3.4vw, 52px); font-weight: 600; letter-spacing: -.04em; line-height: 1; position: relative; }
.half span { display: block; margin-top: 8px; font-size: 14px; color: var(--ink-2); position: relative; }
.half.first { background: var(--ink); color: #fff; }
.half.first span { color: #c9ccd4; }
.half .fill { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 2.6s var(--ease) .3s; }
.half.second.done { color: #fff; background: var(--accent); } .half.second.done span { color: #fff; }
.half.second, .half.second span { transition: color .3s; }
@media (prefers-reduced-motion: reduce) { .half .fill, .half.second, .half.second span { transition: none; } }
.kpi-dots { margin-top: 14px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.kpi-dots i { width: 22px; height: 22px; border-radius: 7px; background: #e7e6e1; display: grid; place-items: center; transition: background-color .3s; }
.kpi-dots i.on { background: var(--ok); }
.kpi-dots i.on::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
@media (max-width: 640px) { .how-head { grid-template-columns: 1fr; } .how-head .lead { justify-self: start; } }

/* ---------- How we work: same window as the hero, forest instead of sky ---------- */
.how { background: #c9dccb; isolation: isolate; padding: clamp(80px, 9vw, 140px) 0; }
.how-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.how::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,.35) 40%, rgba(255,255,255,.12) 100%); }
.how-inner > .lead { margin-top: 18px; color: #1d2230; }
.tl { position: relative; margin-top: clamp(40px, 5vw, 64px); padding: 34px 30px 30px; border-radius: 24px; background: rgba(255,255,255,.93); }
.tl-track { position: absolute; left: 56px; right: 56px; top: 49px; height: 3px; border-radius: 3px; background: #dcdbd5; }
.tl-fill { position: absolute; inset: 0; border-radius: 3px; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 5.5s cubic-bezier(.4,0,.2,1); }
.tl.in .tl-fill, .tl.run .tl-fill { transform: scaleX(1); }
.tl-dot { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgba(91,69,224,.18); animation: tl-travel 9s cubic-bezier(.6,0,.4,1) infinite; }
@keyframes tl-travel { 0% { left: 0; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.tl-steps { position: relative; list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.tl-steps li { display: grid; gap: 6px; justify-items: start; }
.tl-node { width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px #dcdbd5; margin-bottom: 14px; display: grid; place-items: center; font-size: 14px; font-weight: 600; color: var(--muted); transition: box-shadow .6s, background-color .6s, color .6s; }
.tl-steps li.on .tl-node { background: var(--accent); color: #fff; box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 6px rgba(91,69,224,.15); }
.tl-steps b { font-size: 19px; font-weight: 600; letter-spacing: -.015em; }
.tl-steps span { font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.how-card { margin-top: 14px; padding: 26px 30px; border-radius: 24px; background: #fff; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 24px 48px; align-items: center; }
.kpi-num { display: block; font-size: clamp(48px, 5vw, 72px); font-weight: 600; letter-spacing: -.05em; line-height: 1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi-num small { font-size: .45em; color: var(--muted); font-weight: 500; letter-spacing: -.02em; }
@media (max-width: 900px) {
  .tl { padding: 26px 22px; }
  .tl-track { left: 37px; right: auto; top: 40px; bottom: 40px; width: 3px; height: auto; }
  .tl-fill { transform-origin: top; transform: scaleY(0); } .tl.in .tl-fill, .tl.run .tl-fill { transform: scaleY(1); }
  .tl-dot { left: 50% !important; animation: tl-travel-y 9s cubic-bezier(.6,0,.4,1) infinite; }
  .tl-steps { grid-template-columns: 1fr; gap: 22px; }
  .tl-steps li { grid-template-columns: 32px 1fr; column-gap: 16px; align-items: start; }
  .tl-node { grid-row: span 2; margin: 0; }
  .how-card { grid-template-columns: 1fr; }
}
@keyframes tl-travel-y { 0% { top: 0; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

.how-inner > .lead b { font-weight: 600; color: var(--ink); }
.kpi-note { margin-top: 12px; font-size: 15px; color: var(--ink-2); }
.pay-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.guarantee { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); font-size: 15px; line-height: 1.5; color: #2e2470; }
.guarantee b { color: var(--accent); }

/* ---------- Results: dark window, live network, one moving figure per number ---------- */
.results { isolation: isolate; }
.results h2 { color: #fff; }
.results-inner > .lead { margin-top: 18px; color: #c9ccd4; }
.metrics { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric { padding: 24px 24px 26px; border-radius: var(--r-l); background: rgba(22,27,40,.9); display: flex; flex-direction: column; }
.metric b { font-size: clamp(42px, 4vw, 60px); font-weight: 500; letter-spacing: -.045em; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.metric:first-child b { color: #8f84f5; }
.metric span { margin-top: 10px; font-size: 15px; line-height: 1.45; color: #b9bdc7; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1000px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .metrics { grid-template-columns: 1fr; } }

/* ---------- Case studies (cards are written by the blog publisher; styled here, enhanced by JS) ---------- */
.cases-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.case-card { position: relative; display: flex; flex-direction: column; border-radius: var(--r-l); background: var(--surface); padding: 10px 10px 24px; cursor: pointer; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.case-card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -36px rgba(11,15,26,.45); }
.case-card .poster, .js .case-card:not(.has-poster)::before { content: ""; display: block; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--tint); margin-bottom: 18px; }
.case-card .poster.empty, .blog-list-card .poster.empty { background: var(--tint) url('/img/brand/thynkia-logo-96.png') center / 44px no-repeat; }
.case-card .poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.case-card:hover .poster img { transform: scale(1.04); }
.case-card .case-tag { align-self: flex-start; margin: 0 14px; padding: 5px 11px !important; border-radius: 999px; background: var(--ground) !important; color: var(--ink-2) !important; font-size: 13px; font-weight: 500; text-transform: lowercase; }
.case-card .case-tag::first-letter { text-transform: uppercase; }
.case-card h3 { margin: 14px 14px 0; font-size: 20px; line-height: 1.22; font-weight: 500; letter-spacing: -.02em; }
.case-card h3 a { text-decoration: none; color: inherit; }
.case-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.case-card p { margin: 10px 14px 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.case-card .case-date { margin: auto 14px 0; padding-top: 16px; font-size: 13px; color: var(--muted); }
@media (max-width: 1000px) { .cases-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cases-grid { grid-template-columns: 1fr; } }
.cases-foot { margin-top: 36px; display: flex; justify-content: center; }

/* ---------- Testimonials scene: turntable in the meadow, heading in the open sky above it ---------- */
.q-section { padding-bottom: clamp(72px, 8.5vw, 140px); }
.q-scene { position: relative; isolation: isolate; min-height: clamp(560px, 80vh, 840px); background: #dbe6ee; overflow: hidden; }
.q-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 72%; z-index: -2; display: block; }
/* a light wash keeps the dark type crisp on the sky; the bottom melts into the white window */
.q-scene::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(226,236,243,.6) 0%, rgba(226,236,243,.2) 32%, rgba(226,236,243,0) 52%, rgba(255,255,255,0) 66%, rgba(255,255,255,.7) 86%, var(--surface) 100%),
              radial-gradient(120% 70% at 50% 0%, rgba(255,255,255,.35), rgba(255,255,255,0) 60%); }
.q-scene::before { content: ""; display: none; position: absolute; inset: -8%; z-index: -3; background: url('/media/turntable-poster.webp') center 22% / cover no-repeat; filter: blur(30px) saturate(104%); transform: scale(1.05); }
.q-scene-copy { position: relative; display: grid; justify-items: center; gap: 22px; padding-top: clamp(64px, 8vw, 120px); text-align: center; }
.q-scene-copy .h-section { max-width: 16ch; }
.q-scene-copy .proof { padding: 10px 22px; gap: 10px 28px; justify-content: center; border-radius: 999px; background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
/* the quote wall slides up over the bottom of the meadow, so scene and quotes read as one picture */
.q-body { position: relative; z-index: 2; margin-top: clamp(-230px, -15vw, -130px); }
.q-section .qrow .quote { background: rgba(255,255,255,.9); box-shadow: 0 22px 44px -30px rgba(18,52,86,.45); }
@media (max-width: 760px) and (orientation: portrait) {
  /* a 16:9 clip on a tall phone would crop away the sky: the footage sits at the bottom, a blurred copy fills the top */
  .q-scene { min-height: 700px; }
  .q-body { margin-top: -130px; }
  .q-scene::before { display: block; }
  .q-video { top: auto; bottom: 0; height: 64%; -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.6) 9%, #000 20%); mask-image: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.6) 9%, #000 20%); }
  .q-scene-copy .proof { border-radius: 22px; }
}

/* ---------- Social proof + testimonials ---------- */
.proof { display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; justify-content: space-between; padding-bottom: clamp(40px, 5vw, 64px); }
.proof .faces { display: flex; align-items: center; gap: 14px; font-size: 17px; }
.faces .stackf { display: flex; }
.faces .stackf span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; color: #fff; box-shadow: 0 0 0 3px #fff; }
.faces .stackf span + span { margin-left: -10px; }
.rating { display: flex; align-items: center; gap: 12px; font-size: 15.5px; color: var(--ink-2); }
.stars { display: flex; gap: 2px; color: var(--accent); }
.stars svg { width: 16px; height: 16px; }
.quotes { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.quote { border-radius: var(--r-l); background: var(--ground); padding: 26px; display: flex; flex-direction: column; gap: 22px; }
.quote blockquote { font-size: 17px; line-height: 1.5; color: var(--ink); }
.quote.big { grid-row: span 2; background: var(--ink); color: #fff; justify-content: space-between; padding: clamp(28px, 3vw, 44px); }
.quote.big blockquote { font-size: clamp(22px, 1.8vw, 27px); line-height: 1.25; letter-spacing: -.02em; color: #fff; }
.who { display: flex; align-items: center; gap: 12px; }
.who .ini { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; background: var(--ink-2); flex: none; }
.who b { display: block; font-size: 15px; font-weight: 600; }
.who small { display: block; font-size: 13.5px; color: var(--muted); }
.quote.big .who small { color: #b9bdc7; }
.quote.big .ini { background: var(--accent); }
@media (max-width: 1000px) { .quotes { grid-template-columns: 1fr 1fr; } .quote.big { grid-column: span 2; grid-row: auto; } }
@media (max-width: 640px) { .quotes { grid-template-columns: 1fr; } .quote.big { grid-column: auto; } }

/* ---------- Industries ---------- */
.ind-head { margin-bottom: clamp(36px, 4.5vw, 64px); }
.ind-head-r { justify-self: start; display: grid; gap: 24px; justify-items: start; max-width: 60ch; }
.ind-head-r .lead { margin: 0; }
/* 8 cards: 4 x 2 on desktop, 2 columns on tablets, 1 on phones */
.ind-grid { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ind-grid li { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px 22px 26px; border-radius: var(--r-l); background: var(--surface); box-shadow: 0 1px 0 rgba(11,15,26,.04); transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.ind-grid li:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -36px rgba(11,15,26,.45); }
.ind-grid h3 { margin-top: 8px; font-size: clamp(20px, 1.6vw, 24px); line-height: 1.15; font-weight: 500; letter-spacing: -.02em; }
.ind-grid .res { padding: 5px 11px; border-radius: 999px; background: var(--accent-soft); color: #3f2db5; font-size: 13.5px; font-weight: 500; font-variant-numeric: tabular-nums; transition: background-color .3s, color .3s; }
.ind-grid p { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.ind-grid li.custom { background: var(--ink); color: #fff; }
.ind-grid li.custom p { color: #c9ccd4; }
.ind-grid li.custom .res { background: rgba(255,255,255,.12); color: #fff; }
@media (max-width: 1100px) { .ind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .ind-head-r { justify-self: start; } }
/* phones: one swipeable row instead of eight stacked cards */
@media (max-width: 560px) {
  .ind-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 14px; scrollbar-width: none; }
  .ind-grid::-webkit-scrollbar { display: none; }
  .ind-grid li { flex: 0 0 80%; scroll-snap-align: center; }
}

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px 72px; align-items: start; }
.faq-side .lead { margin-top: 22px; }
.faq-side .link-arrow { margin-top: 26px; }
.faq-list details { border-radius: var(--r-m); background: var(--ground); }
.faq-list details + details { margin-top: 8px; }
.faq-list summary { list-style: none; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 20px 22px; font-size: 18px; font-weight: 500; letter-spacing: -.015em; cursor: pointer; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0f1a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 14px no-repeat; transition: transform .3s var(--ease); }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 22px 22px; color: var(--ink-2); max-width: 64ch; }
@media (max-width: 900px) { .faq { grid-template-columns: 1fr; } }

/* ---------- Contact window ---------- */
.contact { background: var(--sky) url('/media/hero-sky-poster.webp') center / cover; }
.contact::before { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.2); }
.contact .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 40px 64px; align-items: center; }
.contact h2 { max-width: 13ch; }
.contact .lead { margin-top: 22px; color: #1d2230; }
.spots { margin-top: 26px; display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 999px; background: #fff; font-size: 14.5px; }
.spots i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.form-card { background: #fff; border-radius: 24px; padding: clamp(24px, 3vw, 36px); box-shadow: 0 40px 80px -40px rgba(18,52,86,.5); }
.form-card h3 { font-size: 22px; font-weight: 500; letter-spacing: -.02em; margin-bottom: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--ground); border: 0; border-radius: 12px; padding: 13px 14px; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .2s, background-color .2s; }
.field textarea { min-height: 96px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6070' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 1.5px var(--ink); }
.field-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-card .btn { width: 100%; justify-content: center; padding: 16px 24px; font-size: 16px; }
.form-card .fine { margin-top: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.form-card .fine a { color: var(--ink-2); }
.form-card .alt { margin-top: 16px; text-align: center; font-size: 14.5px; }
.form-status { margin-top: 12px; font-size: 14.5px; }
.form-status.ok { color: var(--ok); } .form-status.err { color: #a2310d; }
.form-done { text-align: center; padding: 30px 6px; }
.form-done .tick { width: 54px; height: 54px; margin: 0 auto 18px; }
.form-done .tick svg { width: 24px; height: 24px; }
@media (max-width: 900px) { .contact .wrap { grid-template-columns: 1fr; } .field-2 { grid-template-columns: 1fr; } }

/* ---------- Solutions page ---------- */
.sol-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.sol-nav a { padding: 10px 16px; border-radius: 999px; background: #fff; text-decoration: none; font-size: 14.5px; transition: background-color .2s, color .2s; }
.sol-nav a:hover { background: var(--ink); color: #fff; }
.sol { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px 80px; align-items: center; }
.sol.flip .sol-art { order: -1; }
.sol + .sol { margin-top: clamp(96px, 10vw, 170px); }
.sol .lead { margin-top: 22px; }
.sol-art { position: relative; min-height: 460px; border-radius: var(--r-l); background: var(--surface); overflow: hidden; }
.sol-art .card-ui { max-width: 420px; background: var(--surface); box-shadow: 0 24px 50px -24px rgba(11,15,26,.3), 0 0 0 1px rgba(11,15,26,.04); font-size: 14px; padding: 18px; }
.sol-art .frag { font-size: 14px; }
.sol-art.dark { background: var(--ink); }
.sol ul.does { list-style: none; margin-top: 26px; display: grid; gap: 12px; }
.sol ul.does li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; font-size: 16px; color: var(--ink-2); }
.sol ul.does li::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b45e0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat; margin-top: 2px; }
.kpis { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.kpis span { padding: 8px 13px; border-radius: 999px; background: var(--surface); font-size: 14px; color: var(--ink-2); }
.kpis span b { color: var(--ink); font-weight: 600; }
.sol-links { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.sol .connects { margin-top: 26px; display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }
.sol .connects img { width: 22px; height: 22px; opacity: .8; }
@media (max-width: 900px) { .sol { grid-template-columns: 1fr; } .sol.flip .sol-art { order: 0; } .sol-art { min-height: 380px; } }
