/* ============================================================
   JESANOVA INNOVATIONS — Individual service pages
   Load AFTER style.css and case-study.css. Per-service accent via body class.
   ============================================================ */
body.svc-ai       { --cs-accent: #34d399; --cs-accent-2: #047857; }
body.svc-quantum  { --cs-accent: #7dd3fc; --cs-accent-2: #0369a1; }
body.svc-mobile   { --cs-accent: #5eead4; --cs-accent-2: #0f766e; }
body.svc-research { --cs-accent: #f472b6; --cs-accent-2: #be185d; }
body.svc-web      { --cs-accent: #6ee7b7; --cs-accent-2: #065f46; }

/* ── Hero: text + artwork ── */
.sv-hero { padding: 72px 0 0; }
.sv-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.sv-hero .cs-hero h1, .sv-hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.5rem); max-width: 720px; }
.sv-hero .cs-lead { max-width: 600px; }
.sv-hero-art {
  position: relative;
  border: 1px solid var(--ji-gray-90);
  background: #0b0b0b;
  box-shadow: 0 40px 80px rgba(0,0,0,.45), 0 0 0 1px color-mix(in srgb, var(--cs-accent) 14%, transparent), 0 0 120px color-mix(in srgb, var(--cs-accent) 18%, transparent);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  animation: heroFadeUp .9s ease .2s both;
}
.sv-hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sv-hero-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .6s ease; }
.sv-hero-art canvas.on { opacity: 1; }
.sv-hero-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 70%, rgba(0,0,0,.35)); pointer-events: none; }
.sv-hero .cs-meta { margin-top: 64px; }
.sv-hero .cs-meta > div { padding-bottom: 28px; }

/* ── Links ── */
.sv-link { color: var(--cs-accent-2); font-weight: 500; border-bottom: 1px solid color-mix(in srgb, var(--cs-accent-2) 40%, transparent); transition: border-color .2s ease, color .2s ease; }
.sv-link:hover { border-color: var(--cs-accent-2); }
.cs-section.dark .sv-link { color: var(--cs-accent); border-color: color-mix(in srgb, var(--cs-accent) 45%, transparent); }

/* ── Diagram panel ── */
.sv-diagram {
  margin-top: 56px;
  border: 1px solid var(--ji-gray-90);
  background:
    radial-gradient(700px circle at 85% 0%, color-mix(in srgb, var(--cs-accent) 12%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
  padding: 40px 32px 32px;
}
.sv-diagram svg { width: 100%; height: auto; display: block; overflow: visible; }
.sv-diagram .nd { fill: #1b1b1b; stroke: #3d3d3d; stroke-width: 1.5; }
.sv-diagram .nd.hl { stroke: var(--cs-accent); }
.sv-diagram .t1 { font: 500 20px var(--font-sans); fill: #fff; }
.sv-diagram .t2 { font: 400 14.5px var(--font-sans); fill: #a8a8a8; }
.sv-diagram .tm { font: 500 12px var(--font-mono); fill: var(--cs-accent); letter-spacing: .1em; }
.sv-diagram .ln { stroke: #707070; stroke-width: 1.5; fill: none; }
.sv-diagram .ac { stroke: var(--cs-accent); stroke-width: 2; fill: none; }
.sv-diagram .dash { stroke-dasharray: 6 6; }
.sv-diagram marker path { fill: var(--cs-accent); }
.sv-diagram .gt { fill: #101010; stroke: var(--cs-accent); stroke-width: 1.5; }
.sv-diagram .gl { font: 500 16px var(--font-mono); fill: #fff; }
.sv-diagram .ket { font: 400 15px var(--font-mono); fill: #a8a8a8; }
.sv-diagram .dot { fill: var(--cs-accent); }
.sv-diagram .tg { fill: #101010; stroke: var(--cs-accent); stroke-width: 2; }
.sv-diagram .ms { stroke: #fff; stroke-width: 1.5; fill: none; }
.sv-diagram .rl { stroke: #262626; stroke-width: 1; }
.sv-diagram .sp { stroke: var(--cs-accent); stroke-width: 2; stroke-linecap: round; }
.sv-notes { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ji-gray-90); border-top: none; }
.sv-notes > div { padding: 24px 28px; border-right: 1px solid var(--ji-gray-90); }
.sv-notes > div:last-child { border-right: none; }
.sv-notes b { display: block; font-weight: 500; color: var(--ji-white); margin-bottom: 6px; }
.sv-notes span { font-size: .85rem; color: var(--ji-gray-30); line-height: 1.5; display: block; }

/* ── Work cards ── */
.sv-work { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); border: 1px solid var(--ji-gray-20); border-right: none; border-bottom: none; }
.sv-work .portfolio-card { background: var(--ji-white); }
.sv-work .portfolio-overlay { background: color-mix(in srgb, var(--cs-accent-2) 88%, transparent); }
.sv-work .portfolio-cat { color: var(--cs-accent-2); }
.sv-work .portfolio-body { padding: 24px 28px 28px; }
.sv-work .portfolio-card h3 a { color: inherit; }
.sv-work .portfolio-card p { font-size: .85rem; line-height: 1.55; }
.sv-also { margin-top: 0; border: 1px solid var(--ji-gray-20); border-top: none; }
.sv-also-row { display: grid; grid-template-columns: 160px 1fr auto; gap: 28px; align-items: center; padding: 24px 28px; border-bottom: 1px solid var(--ji-gray-20); }
.sv-also-row:last-child { border-bottom: none; }
.sv-also-cat { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cs-accent-2); }
.sv-also-row h4 { font-size: 1rem; margin-bottom: 4px; }
.sv-also-row p { font-size: .85rem; margin: 0; max-width: 640px; }
.sv-also-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.sv-work:empty { display: none; }

/* ── Mobile service: layers + phones ── */
.sv-mobile-show { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.sv-layers { display: flex; flex-direction: column; gap: 1px; background: var(--ji-gray-90); border: 1px solid var(--ji-gray-90); list-style: none; padding: 0; margin: 0; }
.sv-layers li { display: flex; gap: 20px; align-items: flex-start; padding: 22px 26px; background: #151515; position: relative; transition: background .25s ease, transform .25s ease; }
.sv-layers li:hover { background: #1c1c1c; transform: translateX(6px); }
.sv-layers li::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--cs-accent); opacity: .35; }
.sv-layers li:hover::before { opacity: 1; }
.sv-layers li span { font-family: var(--font-mono); font-size: .75rem; color: var(--cs-accent); padding-top: 4px; }
.sv-layers b { display: block; font-weight: 500; color: var(--ji-white); font-size: 1.05rem; margin-bottom: 4px; }
.sv-layers small { color: var(--ji-gray-30); font-size: .85rem; line-height: 1.5; display: block; }
.sv-phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: end; }
.sv-phone { margin: 0; padding: 7px; background: #14141e; border-radius: 30px; box-shadow: 0 30px 60px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.1); transition: transform .35s ease; }
.sv-phone:nth-child(2) { transform: translateY(-22px); }
.sv-phone:hover { transform: translateY(-10px); }
.sv-phone img { width: 100%; height: auto; border-radius: 24px; display: block; }
.sv-phones-cap { grid-column: 1 / -1; margin-top: 12px; font-size: .85rem; color: var(--ji-gray-30); max-width: none; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .sv-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .sv-hero-art { aspect-ratio: 16 / 10; max-width: 720px; }
  .sv-mobile-show { grid-template-columns: 1fr; gap: 40px; }
  .sv-phones { max-width: 560px; }
}
@media (max-width: 768px) {
  .sv-hero { padding: 56px 0 0; }
  .sv-hero .cs-meta { margin-top: 40px; }
  .sv-diagram { padding: 24px 12px 16px; overflow-x: auto; }
  .sv-diagram svg { min-width: 760px; }
  .sv-notes { grid-template-columns: 1fr; }
  .sv-notes > div { border-right: none; border-bottom: 1px solid var(--ji-gray-90); }
  .sv-notes > div:last-child { border-bottom: none; }
  .sv-also-row { grid-template-columns: 1fr; gap: 10px; padding: 22px 20px; }
  .sv-also-tags { justify-content: flex-start; }
  .sv-phone:nth-child(2) { transform: none; }
  .sv-phones { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .sv-hero-art { animation: none; } .sv-layers li, .sv-phone { transition: none; } }

/* single / few-card layouts */
.sv-work .portfolio-thumb { aspect-ratio: 16 / 10; }
.sv-work:has(> .portfolio-card:only-child) { grid-template-columns: 1fr; }
.sv-work:has(> .portfolio-card:only-child) .portfolio-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: stretch; }
.sv-work:has(> .portfolio-card:only-child) .portfolio-thumb { aspect-ratio: auto; min-height: 340px; height: 100%; }
.sv-work:has(> .portfolio-card:only-child) .portfolio-body { padding: 48px; align-self: center; }
.sv-work:has(> .portfolio-card:only-child) .portfolio-card h3 { font-size: 1.5rem; font-weight: 400; margin-bottom: 14px; }
.sv-work:has(> .portfolio-card:only-child) .portfolio-card p { font-size: .95rem; }
@media (max-width: 900px) {
  .sv-work:has(> .portfolio-card:only-child) .portfolio-card { grid-template-columns: 1fr; }
  .sv-work:has(> .portfolio-card:only-child) .portfolio-thumb { min-height: 0; aspect-ratio: 16 / 10; }
  .sv-work:has(> .portfolio-card:only-child) .portfolio-body { padding: 28px; }
}
@media (max-width: 600px) {
  .cta-band-actions { flex-wrap: wrap; width: 100%; }
  .cta-band-actions .btn { white-space: normal; text-align: center; flex: 1 1 100%; justify-content: center; }
}

/* ── Enquiry form block on service pages ── */
.svc-contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 56px; align-items: start; }
@media (max-width: 980px) { .svc-contact { grid-template-columns: minmax(0, 1fr); gap: 36px; } }
#enquire { scroll-margin-top: 72px; }
@media (max-width: 980px) { .svc-contact .contact-form-panel { padding: 0; } }
/* wide (21:9) project covers */
.sv-work.sv-wide .portfolio-thumb { aspect-ratio: 21 / 9; }
@media (min-width: 760px) { .sv-work.sv-wide:has(> .portfolio-card:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Animated mobile hero ── */
.sv-hero-art.mh { background: radial-gradient(70% 60% at 50% 55%, #14532d 0%, #0a1f14 62%, #050d09 100%); }
.mh::before { content: ''; position: absolute; inset: 0; background: radial-gradient(45% 40% at 86% 92%, rgba(245,165,36,.28), transparent), radial-gradient(45% 40% at 10% 8%, rgba(94,234,212,.2), transparent); animation: mhGlow 7s ease-in-out infinite alternate; }
.mh-stage { position: absolute; left: 50%; top: 50%; width: 100%; aspect-ratio: 1; transform: translate(-50%, -50%); container-type: inline-size; }
.mh-orbit { position: absolute; inset: 6%; width: 88%; height: 88%; overflow: visible; }
.mh-orbit circle { fill: none; stroke: rgba(94,234,212,.28); stroke-width: .4; stroke-dasharray: 1.2 2.2; transform-origin: 50% 50%; }
.mh-orbit .o1 { animation: mhSpin 46s linear infinite; }
.mh-orbit .o2 { stroke: rgba(245,165,36,.25); animation: mhSpin 70s linear infinite reverse; }
.mh-orbit .dot { fill: #5eead4; transform-origin: 50% 50%; animation: mhSpin 14s linear infinite; }
.mh-orbit .dot2 { fill: #f5a524; animation-duration: 22s; animation-direction: reverse; }
.mh-p { position: absolute; width: 30cqw; transform: translate3d(calc(var(--px, 0) * var(--k, 1) * 1cqw), calc(var(--py, 0) * var(--k, 1) * 1cqw), 0); transition: transform .35s ease-out; }
.mh-ph { border: .75cqw solid #050b08; border-radius: 5cqw; overflow: hidden; background: #050b08; box-shadow: 0 3.6cqw 7cqw rgba(0,0,0,.65), 0 0 0 .18cqw #2f4a3b; animation: mhFloat 6s ease-in-out infinite; }
.mh-ph img { display: block; width: 100%; height: auto; }
.mh-p1 { left: 5cqw; top: 22cqw; --k: -1.2; --r: -6deg; }
.mh-p2 { left: 35cqw; top: 9cqw; --k: 1.8; --r: 0deg; z-index: 3; width: 31cqw; }
.mh-p3 { left: 65cqw; top: 25cqw; --k: -0.8; --r: 6deg; }
.mh-p1 .mh-ph { transform: rotate(-6deg); animation-delay: -1.2s; }
.mh-p2 .mh-ph { animation-delay: -3.4s; animation-duration: 7s; }
.mh-p3 .mh-ph { transform: rotate(6deg); animation-delay: -2.2s; animation-duration: 6.5s; }
.mh-p2 .mh-ph::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.22) 50%, transparent 62%); transform: translateX(-120%); animation: mhSheen 5.5s ease-in-out 1.2s infinite; pointer-events: none; }
.mh-chip { position: absolute; z-index: 5; display: inline-flex; align-items: center; gap: 1.2cqw; font: 600 1.7cqw/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; color: #bff5e8; border: .12cqw solid rgba(94,234,212,.4); background: rgba(8,32,24,.96); padding: 1.3cqw 1.9cqw; border-radius: 99cqw; backdrop-filter: blur(4px); white-space: nowrap; animation: mhBob 5s ease-in-out infinite; }
.mh-chip i { width: 1.3cqw; height: 1.3cqw; border-radius: 50%; background: #5eead4; box-shadow: 0 0 0 0 rgba(94,234,212,.6); animation: mhPulse 1.8s ease-out infinite; }
.mh-chip span { display: inline-block; transition: opacity .3s ease, transform .3s ease; }
.mh-chip span.out { opacity: 0; transform: translateY(.8cqw); }
.mh-c1 { left: 4cqw; top: 3cqw; }
.mh-c2 { right: 3cqw; top: 3cqw; animation-delay: -1.6s; }
.mh-c2 i { background: #f5a524; }
.mh-c3 { left: 6cqw; bottom: 6cqw; animation-delay: -3s; }
.mh-c4 { right: 5cqw; bottom: 7cqw; animation-delay: -2.2s; }
.mh-c4 i { background: #f5a524; }
@keyframes mhFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -1.6cqw; } }
@keyframes mhBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-.9cqw); } }
@keyframes mhSpin { to { transform: rotate(360deg); } }
@keyframes mhSheen { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes mhPulse { 0% { box-shadow: 0 0 0 0 rgba(94,234,212,.55); } 80%, 100% { box-shadow: 0 0 0 1.4cqw rgba(94,234,212,0); } }
@keyframes mhGlow { from { opacity: .7; } to { opacity: 1; } }
@media (max-width: 980px) { .sv-hero-art.mh { aspect-ratio: 1 / 1; max-width: 520px; width: 100%; margin-inline: auto; } }
@media (prefers-reduced-motion: reduce) { .mh::before, .mh-orbit circle, .mh-ph, .mh-chip, .mh-chip i, .mh-p2 .mh-ph::after { animation: none !important; } .mh-p { transition: none; } }


/* ── Hero lead form (AI page) ── */
.sv-hero-lead { position: relative; overflow: hidden; }
.sv-hero-lead > .container { position: relative; z-index: 2; }
.sv-hero-art.is-bg {
  position: absolute; z-index: 0; top: -4%; right: -10%; height: 112%; width: auto; aspect-ratio: 1 / 1;
  border: 0; box-shadow: none; opacity: .5; animation: none; pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 38%); mask-image: linear-gradient(to right, transparent 0, #000 38%);
}
.sv-hero-art.is-bg::after { background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.55)); }
.hero-lead {
  background: rgba(22,22,22,.92); color: #f4f4f4;
  border: 1px solid #393939; border-top: 3px solid var(--ji-green-60, #10b981);
  padding: 28px 28px 22px; box-shadow: 0 30px 70px rgba(0,0,0,.5);
  animation: heroFadeUp .9s ease .2s both;
}
.hero-lead-eyebrow { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono, ui-monospace, monospace); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ji-green-60, #10b981); font-weight: 500; margin-bottom: 10px; }
.hero-lead-eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ji-green-60, #10b981); box-shadow: 0 0 0 4px rgba(16,185,129,.2); }
.hero-lead h2 { font-size: 1.3rem; line-height: 1.3; margin: 0 0 6px; color: #fff; font-weight: 500; letter-spacing: 0; }
.hero-lead-sub { font-size: .85rem; line-height: 1.5; color: #a8a8a8; margin: 0 0 20px; max-width: none; }
.hero-lead .form-group { margin-bottom: 14px; }
.hero-lead .form-group label { color: #8d8d8d; font-family: var(--font-mono, ui-monospace, monospace); font-size: .68rem; font-weight: 500; letter-spacing: .08em; margin-bottom: 6px; }
.hero-lead .form-group input,
.hero-lead .form-group textarea {
  background: #262626; color: #f4f4f4; border: 0; border-bottom: 1px solid #6f6f6f;
  padding: 12px 14px; font-size: .9rem; transition: border-color .15s, background .15s;
}
.hero-lead .form-group input::placeholder,
.hero-lead .form-group textarea::placeholder { color: #6f6f6f; }
.hero-lead .form-group input:focus,
.hero-lead .form-group textarea:focus { background: #2e2e2e; border-bottom-color: var(--ji-green-60, #10b981); box-shadow: 0 1px 0 var(--ji-green-60, #10b981); }
.hero-lead .form-group input:-webkit-autofill { -webkit-text-fill-color: #f4f4f4; -webkit-box-shadow: 0 0 0 100px #262626 inset; }
.hero-lead .form-group textarea { min-height: 76px; }
.hero-lead-btn { width: 100%; justify-content: center; margin-top: 4px; }
.hero-lead .form-status { margin-top: 12px !important; }
.hero-lead-trust { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid #393939; list-style: none; font-size: .76rem; color: #a8a8a8; }
.hero-lead-trust li::before { content: '✓'; color: var(--ji-green-60, #10b981); margin-right: 6px; font-weight: 700; }
.hero-lead-note { margin: 10px 0 0; font-size: .72rem; color: #6f6f6f; max-width: none; }
.hero-lead-note a { text-decoration: underline; color: #a8a8a8; }
@media (max-width: 980px) {
  .sv-hero-art.is-bg { display: none; }
  .hero-lead { max-width: 560px; }
  .sv-hero-lead .cs-actions { display: none; }
  .sv-hero-lead .sv-hero-grid { gap: 28px; }
}
@media (max-width: 520px) { .hero-lead { padding: 22px 18px 18px; } .sv-hero-lead .cs-lead { display: none; } .sv-hero-lead .breadcrumb { margin-bottom: 8px; } }

.hero-lead .phone-row { display: grid; grid-template-columns: 104px 1fr; gap: 8px; }
.hero-lead .phone-row select { background: #262626; color: #f4f4f4; border: 0; border-bottom: 1px solid #6f6f6f; border-radius: 0; padding: 12px 8px; font: inherit; font-size: .95rem; width: 100%; }
.hero-lead .phone-row select:focus { outline: 0; background: #2e2e2e; border-bottom-color: var(--ji-green-60, #10b981); box-shadow: 0 1px 0 var(--ji-green-60, #10b981); }
