/* ============================================================
   DanaExperts — Refine layer (2026-09 redesign)
   Loaded after site.css + theme.css on every page.
   Direction (ui-ux-pro-max: "Trust & Authority" + bento grid):
   - no WebGL corridor / particles / globe, no infinite decorative motion
   - solid brand blue instead of blue→violet gradients, no glows
   - real product imagery in service cards, icons + varied layouts in card grids
   ============================================================ */

:root {
  --grid-line: rgba(140, 160, 220, .055);
  --surface: var(--ink-800);
  --surface-2: var(--ink-700);
  --line: var(--ink-600);
  --tint: rgba(59, 110, 246, .10);
  --tint-strong: rgba(59, 110, 246, .16);
  --sh-sm: 0 1px 0 rgba(255,255,255,.03) inset;
  --sh-md: 0 18px 40px -24px rgba(0,0,0,.7);
  --vis-bg: #0B0F1E;
  --grad-accent: var(--accent);
  --glow-accent: 0 10px 24px -12px rgba(59,110,246,.55);
}
html[data-theme="light"] {
  --void: #F5F7FB;
  --ink-600: #E2E7F0;
  --paper: #0F172A;
  --paper-dim: #3C4760;
  --paper-mute: #5E6883;
  --accent: #2152E0;
  --accent-2: #2152E0;
  --cyan: #0A7F7A;
  --grid-line: rgba(15, 23, 42, .045);
  --surface: #FFFFFF;
  --surface-2: #F1F4F9;
  --line: #E2E7F0;
  --tint: #EAF0FD;
  --tint-strong: #DCE6FC;
  --sh-sm: 0 1px 2px rgba(15,23,42,.05);
  --sh-md: 0 1px 2px rgba(15,23,42,.05), 0 14px 32px -18px rgba(15,23,42,.22);
  --vis-bg: #EEF2F8;
  --grad-text: linear-gradient(180deg, #0F172A 0%, #0F172A 100%);
  --glow-accent: 0 10px 22px -12px rgba(33,82,224,.5);
}

/* ---------- page background: static blueprint grid at the top, nothing moving ---------- */
body { position: relative; }
body::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 120vh; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 0%, #000 25%, transparent 72%);
          mask-image: radial-gradient(ellipse 75% 65% at 50% 0%, #000 25%, transparent 72%);
}
.fx-canvas, .dx-cursor { display: none !important; }

/* ---------- buttons: solid, calm ---------- */
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep, #1B37B5); box-shadow: var(--glow-accent); }
html[data-theme="light"] .btn-primary:hover { background: #1A43BD; }
html[data-theme="light"] .btn-ghost { border-color: #CBD3E1; color: var(--paper); }
html[data-theme="light"] .btn-ghost:hover { background: #fff; border-color: var(--accent); color: var(--accent); }

/* ---------- headings: solid colour instead of gradient text ---------- */
.section-head h2.grad-text, .page-hero h1.grad-text, .cta-scene h2, .svc-cta h2 {
  background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--paper); -webkit-text-fill-color: currentColor;
}

/* ---------- cards: surface + hairline + soft elevation, no glow, no 3D tilt ---------- */
.dx-card { background: var(--surface); border-color: var(--line); box-shadow: var(--sh-sm); }
.dx-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
html[data-theme="light"] .dx-card { box-shadow: var(--sh-sm); }
html[data-theme="light"] .dx-card:hover { box-shadow: var(--sh-md); }
.tag { border-color: var(--line); background: var(--surface-2); color: var(--paper-dim); }
.proc-step .n, .svc-panel .num { box-shadow: none; }

/* client logos: colour on light, mono on dark */
html[data-theme="light"] .marquee img { filter: grayscale(1) contrast(1.1); opacity: .7; }
html[data-theme="light"] .marquee img:hover { filter: none; opacity: 1; }

/* ---------- icon chip (injected by site.js) ---------- */
.ic {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--tint); color: var(--accent);
}
.ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 36px; height: 36px; border-radius: 10px; }
.ic.sm svg { width: 18px; height: 18px; }
.ic.danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.ic.teal { background: color-mix(in srgb, var(--cyan) 14%, transparent); color: var(--cyan); }
html[data-theme="light"] .ic.danger { color: #C2410C; background: #FFF1E8; }

/* problem → solution → value: icons, a flow arrow and an emphasised result card */
.psv-grid > .dx-card > .ic { margin-bottom: 18px; }
.psv-grid .k { display: block; }
.psv-grid:not(.steps-4) > .dx-card:has(> .k.value) {
  background: linear-gradient(180deg, var(--tint) 0%, var(--surface) 100%);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}
.psv-grid:not(.steps-4) > .dx-card:has(> .k.value) .ic { background: var(--accent); color: #fff; }
@media (min-width: 961px) {
  .psv-flow > .dx-card:not(:last-child)::after {
    content: ""; position: absolute; top: 50%; right: -19px; width: 14px; height: 14px; z-index: 3;
    border-top: 2px solid var(--paper-mute); border-right: 2px solid var(--paper-mute);
    transform: translateY(-50%) rotate(45deg); opacity: .55;
  }
}
/* FAQ-style cards (question + answer) read as a list, not as more boxes */
.psv-grid.faq-grid { grid-template-columns: 1fr 1fr; gap: 0 var(--sp-7); }
.faq-grid > .dx-card { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: var(--sp-5) 0; box-shadow: none; display: grid; grid-template-columns: 36px 1fr; gap: 4px 14px; }
.faq-grid > .dx-card:hover { transform: none; box-shadow: none; }
.faq-grid > .dx-card > .ic { grid-row: span 2; }
.faq-grid > .dx-card h3 { margin-top: 6px !important; }
@media (max-width: 760px) { .psv-grid.faq-grid { grid-template-columns: 1fr; } }

/* about: 8 qualities as a compact icon list, value props with icons */
.quality-grid .quality { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.quality-grid .quality .n { order: 3; margin-left: auto; }
.quality-grid .quality h3 { margin-top: 0 !important; }
.vp > .ic { margin-bottom: 14px; }
.vp { border-top: 1px solid var(--line); padding-top: var(--sp-5); }

/* services page: build → verify → scale */
.life-grid > .dx-card > .ic { margin-bottom: 16px; }

/* ---------- HOME: hero ---------- */
html[data-theme="light"] .hero-shade { display: none; }
html[data-theme="light"] .hero-copy h1 { font-size: clamp(2.8rem, 6.2vw, 5.8rem); }
html[data-theme="light"] .hero-copy > * { max-width: min(600px, 50vw); }
html[data-theme="light"] .hero-film {
  inset: auto; top: clamp(104px, 15vh, 150px); bottom: clamp(56px, 10vh, 110px);
  right: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
  width: min(44vw, 600px); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(15,23,42,.45); border: 1px solid var(--line);
  transform: none !important;
}
@media (max-width: 860px) {
  html[data-theme="light"] .hero-film { display: none; }
  html[data-theme="light"] .hero-copy > * { max-width: 100%; }
}

/* ---------- HOME: services bento ---------- */
.bento-sec { position: relative; z-index: var(--z-content); padding-block: var(--section-y); }
.bento {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
}
.bcard {
  position: relative; display: flex; flex-direction: column; gap: 22px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; color: inherit; text-decoration: none; box-shadow: var(--sh-sm);
  transition: transform var(--d-fast) var(--e-out), box-shadow var(--d-fast) var(--e-out), border-color var(--d-fast) var(--e-out);
}
.bcard:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.bcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.bcard .bc-head { display: flex; align-items: center; gap: 12px; }
.bcard .bc-head .eyebrow { color: var(--paper-mute); }
.bcard h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.3rem, 1.9vw, 1.6rem); letter-spacing: -0.02em; margin: 0; }
.bcard p { color: var(--paper-dim); font-size: var(--fs-sm); margin: 8px 0 0; text-wrap: pretty; max-width: 46ch; }
.bcard .more { margin-top: auto; font-weight: 700; font-size: var(--fs-sm); color: var(--accent); display: inline-flex; gap: 8px; align-items: center; }
.bcard .more .arr { font-family: var(--font-mono); transition: transform var(--d-fast) var(--e-out); }
.bcard:hover .more .arr { transform: translateX(4px); }
.bcard .bc-text { display: flex; flex-direction: column; gap: 14px; }
.b-ai   { grid-column: 1 / 3; grid-row: 1; flex-direction: row; align-items: stretch; }
.b-ai .bc-text { flex: 1 1 50%; }
.b-ai .sv-vis { flex: 1 1 50%; padding-bottom: 30px; }
.b-mob  { grid-column: 3; grid-row: 1; }
.b-web  { grid-column: 1; grid-row: 2; }
.b-emb  { grid-column: 2; grid-row: 2; }
.b-odoo { grid-column: 3; grid-row: 2; }
.b-web .sv-vis, .b-emb .sv-vis, .b-odoo .sv-vis { height: 200px; margin-top: auto; }
.b-odoo .vis-modules { grid-template-columns: 1fr; gap: 10px; }
.b-odoo .vis-modules .logo { justify-self: start; padding: 8px 12px; }
.b-odoo .vis-modules .logo img { width: 64px; }
.b-odoo .vis-modules ul { grid-template-columns: 1fr 1fr; }
.b-mob .sv-vis { flex: 1; min-height: 260px; align-items: end; padding-bottom: 0; }
.b-mob .vis-phones .phone { width: min(44%, 150px); border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }
.vis-mob .vis-cap { top: 10px; bottom: auto; }
@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .b-ai { grid-column: 1 / 3; }
  .b-odoo { grid-column: auto; }
  .b-web, .b-emb { grid-row: auto; grid-column: auto; }
  .b-ai, .b-mob, .b-web, .b-emb, .b-odoo { grid-row: auto; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .b-ai, .b-odoo, .b-mob, .b-web, .b-emb { grid-column: 1; flex-direction: column; align-items: stretch; }
  .bcard { padding: 22px; }
}

/* ---------- shared product visuals (home bento + services page) ---------- */
.sv-vis {
  position: relative; border-radius: calc(var(--r-lg) - 10px); overflow: hidden;
  background-color: var(--vis-bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
  border: 1px solid var(--line);
  display: grid; place-items: center; padding: 18px;
}
/* AI: the BeeStaff roster — real product, not a neural-network cliché */
.vis-roster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 330px; }
.vis-roster figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px 8px; }
.vis-roster img { width: 100%; max-width: 64px; aspect-ratio: 1; border-radius: 12px; object-fit: cover; display: block; }
.vis-roster figcaption { font-family: var(--font-mono); font-size: 11px; color: var(--paper-mute); letter-spacing: .04em; }
.vis-cap { position: absolute; left: 12px; bottom: 10px; font-family: var(--font-mono); font-size: 11px; color: var(--paper-mute); letter-spacing: .06em; }
/* Web: browser window */
.vis-browser { width: 100%; max-width: 520px; border-radius: 12px; overflow: hidden; background: #fff;
  border: 1px solid var(--line); box-shadow: 0 16px 36px -22px rgba(0,0,0,.55); }
.vis-browser .bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: #F1F4F9; border-bottom: 1px solid #E2E7F0; }
.vis-browser .bar i { width: 8px; height: 8px; border-radius: 50%; background: #CBD3E1; }
.vis-browser .bar span { margin-left: 8px; flex: 1; max-width: 220px; font: 500 10px/1 var(--font-mono); color: #5E6883; background: #fff; border: 1px solid #E2E7F0; border-radius: 999px; padding: 4px 10px; }
.vis-browser img { display: block; width: 100%; height: auto; }
.b-web .vis-browser { position: absolute; top: 18px; left: 18px; right: -40px; width: auto; max-width: none; }
/* Mobile: two phone frames */
.vis-phones { display: flex; justify-content: center; align-items: flex-end; gap: 14px; width: 100%; height: 100%; }
.vis-phones .phone { width: min(42%, 150px); aspect-ratio: 273 / 560; border-radius: 22px; overflow: hidden;
  border: 5px solid #0F172A; background: #0F172A; box-shadow: 0 18px 36px -20px rgba(0,0,0,.6); }
.vis-phones .phone:nth-child(2) { transform: translateY(-22px); }
.vis-phones .phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
/* Embedded: product photo */
.sv-vis.vis-photo { padding: 0; }
.sv-vis.vis-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Odoo: the modules we actually implement */
.vis-modules { width: 100%; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.vis-modules .logo { background: #fff; border: 1px solid #E2E7F0; border-radius: 14px; padding: 14px 16px; display: grid; place-items: center; }
.vis-modules .logo img { width: 92px; height: auto; display: block; }
.vis-modules ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.vis-modules li { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 10px; font-size: 12.5px; font-weight: 600; color: var(--paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vis-modules li svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: #875A7B; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
html:not([data-theme="light"]) .vis-modules li svg { stroke: #D29BC4; }
@media (max-width: 640px) { .vis-modules { grid-template-columns: 1fr; } .vis-modules ul { grid-template-columns: 1fr 1fr; } }

/* ---------- SERVICES PAGE: alternating showcase rows ---------- */
.sv-list { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 32px); }
.sv-row {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(18px, 2.4vw, 28px);
  box-shadow: var(--sh-sm); scroll-margin-top: 110px;
}
.sv-row:nth-child(even) .sv-vis { order: 2; }
.sv-row .sv-vis { min-height: 340px; height: 100%; }
.sv-row .sv-body { padding: clamp(4px, 1.5vw, 20px); }
.sv-row .sv-meta { display: flex; align-items: center; gap: 12px; }
.sv-row h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -0.025em; margin-top: 16px; color: var(--paper); }
.sv-row p { color: var(--paper-dim); margin: 12px 0 0; max-width: 54ch; text-wrap: pretty; }
.sv-row .btn { margin-top: var(--sp-5); }
.sv-row .vis-browser { max-width: 560px; }
.sv-row .vis-phones .phone { width: min(38%, 170px); }
.sv-row.sv-flag { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: linear-gradient(135deg, var(--tint) 0%, var(--surface) 55%); }
@media (max-width: 900px) {
  .sv-row { grid-template-columns: 1fr; }
  .sv-row:nth-child(even) .sv-vis { order: 0; }
  .sv-row .sv-vis { min-height: 260px; }
}
.sv-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sp-6); }
.sv-jump a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--paper-dim); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.sv-jump a:hover { border-color: var(--accent); color: var(--accent); }
.sv-jump a b { font-family: var(--font-mono); font-size: 11px; color: var(--paper-mute); font-weight: 500; }

/* ---------- HOME: process as a 3×2 timeline (not a narrow list) ---------- */
.proc-grid { display: block; max-width: none; }
.proc-line { display: none; }
.proc-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 40px); }
.proc-step { position: relative; flex-direction: column; gap: 10px; padding: 26px 0 34px; border-top: 1px solid var(--line); }
.proc-step::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.proc-step .n { width: auto; height: auto; border: 0; border-radius: 0; background: none; box-shadow: none; display: block;
  font-size: 13px; color: var(--accent); letter-spacing: .08em; }
.proc-step h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); }
.proc-step p { font-size: var(--fs-sm); max-width: 38ch; }
@media (max-width: 860px) { .proc-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .proc-steps { grid-template-columns: 1fr; } }

/* stats: calmer numerals */
.stats-scene .stat b { color: var(--paper); }
.stat { border-top-color: var(--line); }

/* service detail pages: light veil over hero media is lighter-weight */
html[data-theme="light"] .svc-hero-media img, html[data-theme="light"] .svc-hero-media video { opacity: .9; }
.proc2 .step::before { background: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .bcard, .dx-card { transition: none; }
  .bcard:hover, .dx-card:hover { transform: none; }
}

/* ---------- light hero: no pinned film sequence (it left an empty frame on white) ---------- */
.hero-scroll { display: none; }
html[data-theme="light"] .hero { height: 100vh; min-height: 640px; }
html[data-theme="light"] .hero-pin { position: relative; }
html[data-theme="light"] .hero-veil { display: none; }
html[data-theme="light"] .hero-copy { opacity: 1 !important; transform: none !important; }
html[data-theme="light"] .hero-copy .lead { max-width: min(46ch, 44vw); }
@media (max-width: 860px) { html[data-theme="light"] .hero-copy .lead { max-width: 100%; } }

/* ---------- service detail heroes: headline never runs over the collage ---------- */
.svc-hero h1 { font-size: clamp(2.6rem, 5.4vw, 5rem); max-width: 12ch; }
.svc-hero .lead { max-width: min(54ch, 46vw); }
html[data-theme="light"] .svc-hero-media {
  inset: auto; top: clamp(110px, 16vh, 150px); bottom: var(--sp-7);
  right: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
  width: min(42vw, 560px); border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(15,23,42,.45);
}
html[data-theme="light"] .svc-hero-media img, html[data-theme="light"] .svc-hero-media video { opacity: 1; object-position: 88% center; }
html[data-theme="light"] .svc-hero-media::after { display: none; }
@media (max-width: 900px) {
  .svc-hero .lead { max-width: 100%; }
  html[data-theme="light"] .svc-hero-media { display: none; }
}
@media (max-width: 640px) {
  .bcard .sv-vis, .b-ai .sv-vis, .b-mob .sv-vis { flex: none; }
  .b-mob .sv-vis { height: 300px; min-height: 0; }
  .bcard .more { margin-top: 4px; }
}
