/* PK Innovatives — AI experience layer (shared by every page) */
:root {
  --ai-blue: #60A5FA;
  --ai-blue-deep: #2563EB;
  --ai-violet: #8b5cf6;
  --ai-indigo: #818CF8;
  --ai-ink: #050608;
  --ai-line: rgba(255, 255, 255, 0.08);
}

html { background: var(--ai-ink); scroll-behavior: smooth; }
body { background-color: var(--ai-ink) !important; }
::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: #2a2f3a transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #232733; border-radius: 10px; border: 2px solid var(--ai-ink); }
::-webkit-scrollbar-thumb:hover { background: #343a48; }

/* Film grain over everything — the "premium print" texture */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9998; pointer-events: none; opacity: 0.035;
  transform: translateZ(0); will-change: transform;   /* its own static GPU layer: never repainted on scroll */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Headings: tighter, more editorial */
h1:not(.ai-eyebrow), h2, .ai-display { letter-spacing: -0.035em; }
h1:not(.ai-eyebrow), .ai-display { text-wrap: balance; }
h2, h3 { text-wrap: balance; }

/* Dark grid used by converted sections */
.ai-grid {
  background-size: 48px 48px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
}
section.ai-converted { position: relative; border-top: 1px solid rgba(255, 255, 255, 0.05); }

/* ---------- Header ---------- */
header.ai-header { background: rgba(5, 6, 8, 0.62) !important; backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); border-bottom-color: transparent !important; }
header.ai-header { overflow-x: clip; }
header.ai-header::after {
  content: ""; position: absolute; left: 0; width: 200%; bottom: -1px; height: 1px; pointer-events: none; opacity: .7;
  background: linear-gradient(90deg, transparent, rgba(96,165,250,.6), rgba(129,140,248,.55), rgba(139,92,246,.55), transparent) 0 0 / 50% 100% repeat-x;
  will-change: transform; animation: ai-line 10s linear infinite;   /* transform-only: no repaint per frame */
}
@keyframes ai-line { to { transform: translateX(-50%); } }
header.ai-header.ai-scrolled { background: rgba(5, 6, 8, 0.85) !important; }

/* ---------- Hero ---------- */
.ai-hero { position: relative; isolation: isolate; }
.ai-hero > .ai-neural { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, #000 35%, transparent 100%);
          mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, #000 35%, transparent 100%); }
.ai-hero > .ai-aurora { position: absolute; inset: -20% -10% auto; height: 120%; z-index: 0; pointer-events: none; opacity: .6; contain: strict; }
.ai-aurora span { position: absolute; border-radius: 50%; will-change: transform; animation: ai-drift 22s ease-in-out infinite alternate; }
.ai-hero.ai-offscreen .ai-aurora span, .ai-paused { animation-play-state: paused !important; }
.ai-aurora span:nth-child(1) { width: 46vw; height: 46vw; max-width: 720px; max-height: 720px; left: 8%; top: -8%; background: radial-gradient(circle, rgba(37,99,235,.42) 0%, rgba(37,99,235,.16) 38%, rgba(37,99,235,0) 70%); }
.ai-aurora span:nth-child(2) { width: 40vw; height: 40vw; max-width: 640px; max-height: 640px; right: 4%; top: 0; background: radial-gradient(circle, rgba(139,92,246,.38) 0%, rgba(139,92,246,.14) 38%, rgba(139,92,246,0) 70%); animation-duration: 28s; animation-delay: -6s; }
.ai-aurora span:nth-child(3) { width: 34vw; height: 34vw; max-width: 520px; max-height: 520px; left: 38%; top: 22%; background: radial-gradient(circle, rgba(99,102,241,.26) 0%, rgba(99,102,241,.1) 38%, rgba(99,102,241,0) 70%); animation-duration: 34s; animation-delay: -12s; }
.ai-hero > *:not(.ai-neural):not(.ai-aurora):not(.absolute):not(.fixed) { position: relative; z-index: 1; }

@keyframes ai-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(6%, 8%, 0) scale(1.12); }
  100% { transform: translate3d(-6%, 3%, 0) scale(0.95); }
}

/* Gradient headline text */
.ai-gradient-text {
  background: linear-gradient(100deg, #BFDBFE 0%, #60A5FA 25%, #818CF8 50%, #A78BFA 75%, #C4B5FD 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: ai-flow 9s ease-in-out infinite alternate;
}
@keyframes ai-flow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* Eyebrow chip: glass + glowing edge */
.ai-chip { background: rgba(255,255,255,.035) !important; border-color: rgba(255,255,255,.1) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 1px rgba(139,92,246,.08), 0 8px 30px -10px rgba(139,92,246,.45); }

/* ---------- Primary CTA: glow + light sweep ---------- */
.ai-cta { position: relative; overflow: hidden; isolation: isolate;
  box-shadow: 0 0 0 1px rgba(191,219,254,.3) inset, 0 10px 40px -10px rgba(37,99,235,.7), 0 0 60px -20px rgba(139,92,246,.6) !important; }
.ai-cta::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 48%, transparent 66%);
  transform: translateX(-120%); animation: ai-sweep 4.5s ease-in-out infinite; }
@keyframes ai-sweep { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.ai-cta:hover { transform: translateY(-1px); }

/* ---------- Cards: cursor spotlight + luminous edge ---------- */
.ai-card { transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease, background-color .25s ease; }
.ai-card.ai-lit {
  background-image: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(167,139,250,.10), rgba(96,165,250,.06) 30%, transparent 55%);
  border-color: rgba(167,139,250,.28) !important;
  box-shadow: 0 0 0 1px rgba(167,139,250,.06), 0 24px 60px -24px rgba(139,92,246,.35);
}

/* Images get a cinematic finish */
section img.ai-media { /* kept for hooks; no filter (filters on images cost GPU memory) */ }

/* ---------- Scroll reveal ---------- */
html.ai-js .ai-reveal { opacity: 0; transform: translate3d(0, 24px, 0);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--ai-delay, 0ms); }
html.ai-js .ai-reveal.ai-in { opacity: 1; transform: none; }

/* Section heading accent line */
.ai-kicker-line { display: block; width: 56px; height: 2px; margin-bottom: 18px; border-radius: 2px;
  background: linear-gradient(90deg, var(--ai-blue), var(--ai-indigo), var(--ai-violet)); }

/* ---------- Command palette (⌘K) ---------- */
.ai-k-trigger { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 14px 10px 12px; border-radius: 999px; color: #e2e8f0; font: 500 13px Inter, sans-serif; cursor: pointer;
  background: rgba(13,16,22,.72); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px -12px rgba(139,92,246,.55); transition: transform .2s ease, border-color .2s ease; }
.ai-k-trigger:hover { transform: translateY(-2px); border-color: rgba(167,139,250,.45); }
.ai-k-orb { width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: conic-gradient(from 0deg, var(--ai-blue), var(--ai-indigo), var(--ai-violet), #C4B5FD, var(--ai-blue));
  animation: ai-spin 6s linear infinite; box-shadow: 0 0 14px rgba(167,139,250,.8); }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-k-trigger kbd, .ai-k-panel kbd { font: 500 11px "JetBrains Mono", monospace; color: #94a3b8; padding: 2px 6px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); }
.ai-k-overlay { position: fixed; inset: 0; z-index: 9999; display: none; align-items: flex-start; justify-content: center; padding: 14vh 16px 16px;
  background: rgba(3,4,6,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ai-k-overlay.open { display: flex; }
.ai-k-panel { width: 100%; max-width: 580px; border-radius: 16px; overflow: hidden; color: #e2e8f0;
  background: rgba(12,14,19,.94); border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(139,92,246,.12), 0 0 80px -30px rgba(139,92,246,.6);
  animation: ai-pop .18s ease-out; }
@keyframes ai-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.ai-k-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--ai-line); }
.ai-k-head input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; box-shadow: none; padding: 0; color: #f8fafc; font: 400 16px Inter, sans-serif; }
.ai-k-head input::placeholder { color: #64748b; }
.ai-k-list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.ai-k-group { padding: 10px 10px 6px; font: 500 11px "JetBrains Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: #64748b; }
.ai-k-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #cbd5e1; text-decoration: none; font: 400 14px Inter, sans-serif; }
.ai-k-item .material-symbols-outlined { font-size: 18px; color: #94a3b8; }
.ai-k-item span.ai-k-sub { margin-left: auto; color: #64748b; font-size: 12px; }
.ai-k-item.sel { background: linear-gradient(90deg, rgba(37,99,235,.22), rgba(139,92,246,.12)); color: #fff; }
.ai-k-item.sel .material-symbols-outlined { color: var(--ai-blue); }
.ai-k-empty { padding: 24px; text-align: center; color: #64748b; font: 400 14px Inter, sans-serif; }
.ai-k-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--ai-line); color: #64748b; font: 400 12px Inter, sans-serif; }
@media (max-width: 640px) { .ai-k-trigger .ai-k-label, .ai-k-trigger kbd { display: none; } .ai-k-trigger { padding: 12px; } }

/* ---------- Floating WhatsApp button (bottom right; the ⌘K button sits above it) ---------- */
.ai-whatsapp { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%; color: #fff; background: #25D366;
  box-shadow: 0 10px 28px -8px rgba(37,211,102,.7), 0 4px 12px rgba(0,0,0,.25); transition: transform .2s ease, box-shadow .2s ease; }
.ai-whatsapp:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 34px -8px rgba(37,211,102,.85), 0 4px 12px rgba(0,0,0,.25); }
.ai-whatsapp:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px #128C7E; }
.ai-k-trigger { bottom: 88px; }
@media (max-width: 640px) { .ai-k-trigger { right: 24px; bottom: 84px; } .ai-whatsapp { width: 52px; height: 52px; } }

/* Typing caret */
.ai-caret::after { content: "▍"; margin-left: 2px; color: var(--ai-blue); animation: ai-blink 1s steps(1) infinite; }
@keyframes ai-blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html.ai-js .ai-reveal { opacity: 1; transform: none; filter: none; }
}
.ai-k-head input:focus { outline: none !important; box-shadow: none !important; border: 0 !important; }

/* =========================================================
   Premium light sections — warm paper, fine ink, soft depth
   ========================================================= */
section.ai-light { position: relative; isolation: isolate; color: #2B2F38; }
/* dot-grid texture, fading out as it descends */
section.ai-light::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(10, 11, 15, 0.075) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.35) 45%, transparent 85%);
          mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.35) 45%, transparent 85%);
}
/* spectral seam on the top edge + a faint intelligence glow beneath it */
section.ai-light::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, transparent 5%, rgba(37,99,235,.45) 30%, rgba(79,70,229,.4) 55%, rgba(124,58,237,.4) 75%, transparent 95%) top / 100% 1px no-repeat,
    radial-gradient(60% 320px at 50% 0%, rgba(124,58,237,.07), transparent 70%),
    radial-gradient(40% 260px at 15% 0%, rgba(37,99,235,.07), transparent 70%);
}
.ai-grid-light {
  background-size: 48px 48px;
  background-image:
    linear-gradient(to right, rgba(10,11,15,.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10,11,15,.035) 1px, transparent 1px);
}
section.ai-light h2 { color: #0A0B0F; }
section.ai-light ::selection { background: rgba(124, 58, 237, 0.2); color: #0A0B0F; }

/* cards: layered, physical shadows instead of flat outlines */
section.ai-light .ai-card {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 2px rgba(16,17,20,.04), 0 14px 34px -18px rgba(16,17,20,.16);
}
section.ai-light .ai-card:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 4px rgba(16,17,20,.04), 0 28px 60px -24px rgba(76,29,149,.25);
}
section.ai-light .ai-card.ai-lit {
  background-image: radial-gradient(480px circle at var(--mx, 50%) var(--my, 50%), rgba(124,58,237,.07), rgba(37,99,235,.05) 35%, transparent 60%);
  border-color: rgba(124,58,237,.28) !important;
}
/* gradient accent words, deepened for paper */
section.ai-light .ai-gradient-text {
  background-image: linear-gradient(100deg, #1D4ED8 0%, #2563EB 25%, #4F46E5 50%, #6D28D9 75%, #7C3AED 100%);
}
/* images sit on paper like prints */
section.ai-light img.ai-media { filter: saturate(.95) contrast(1.03); }
/* cards lift off the paper as crisp white sheets */
section.ai-light .ai-card.bg-\[\#F7F5F0\], section.ai-light .ai-card.bg-\[\#F1EEE7\] { background-color: #FFFFFF; }
summary::-webkit-details-marker { display: none; }

/* Icons: fixed 1em box, so the ligature text shown before the icon font loads can't shift the layout */
.material-symbols-outlined { display: inline-block; width: 1em; height: 1em; line-height: 1; overflow: hidden; white-space: nowrap; flex-shrink: 0; }

/* Form submission status (assets/forms.js) */
.pk-form-status { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font: 500 14px/1.5 Inter, sans-serif; border: 1px solid; }
.pk-form-status[hidden] { display: none; }
.pk-form-status.pending { color: #CBD5E1; border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.04); }
.pk-form-status.ok { color: #6EE7B7; border-color: rgba(16,185,129,.35); background: rgba(16,185,129,.1); }
.pk-form-status.err { color: #FCA5A5; border-color: rgba(248,113,113,.35); background: rgba(248,113,113,.1); }
section.ai-light .pk-form-status.pending { color: #374151; border-color: #D1D5DB; background: #F9FAFB; }
section.ai-light .pk-form-status.ok { color: #047857; border-color: #6EE7B7; background: #ECFDF5; }
section.ai-light .pk-form-status.err { color: #B91C1C; border-color: #FCA5A5; background: #FEF2F2; }
.pk-file-name { display: block; margin-top: 6px; font: 500 12.5px Inter, sans-serif; color: #93C5FD; }
section.ai-light .pk-file-name { color: #1D4ED8; }

/* =========================================================
   Smooth: page transitions, image fade-in
   ========================================================= */
html { scroll-padding-top: 88px; }                       /* native anchor jumps clear the sticky header */

/* Cross-page fade (browsers with View Transitions; others simply navigate normally) */
@view-transition { navigation: auto; }
header { view-transition-name: site-header; }            /* the header stays still while the page fades */
::view-transition-old(root) { animation: ai-vt-out .22s cubic-bezier(.4,0,1,1) both; }
::view-transition-new(root) { animation: ai-vt-in .38s cubic-bezier(.2,.7,.2,1) both; }
@keyframes ai-vt-out { to { opacity: 0; } }
@keyframes ai-vt-in { from { opacity: 0; transform: translate3d(0, 10px, 0); } }

img.ai-img-fade { opacity: 0; transition: opacity .6s ease; }
img.ai-img-fade.is-loaded { opacity: 1; }

/* Consistent, gentle easing on interactive elements */
a, button { transition-timing-function: cubic-bezier(.2,.7,.2,1); }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
}

/* Legal pages */
.pk-legal { color: #3A3F4B; font-size: 16px; line-height: 1.75; }
.pk-legal h2 { margin: 36px 0 10px; font: 700 21px/1.3 "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif; letter-spacing: -.01em; color: #0A0B0F; }
.pk-legal h2:first-child { margin-top: 0; }
.pk-legal p { margin: 0 0 14px; }
.pk-legal ul { margin: 0 0 14px; padding-left: 22px; list-style: disc; }
.pk-legal li { margin: 6px 0; }
.pk-legal a { color: #1D4ED8; text-decoration: underline; text-underline-offset: 2px; }
.pk-legal strong { color: #0A0B0F; }
