/* Theme */
:root {
  --pv-bg: #ffffff;
  --pv-fg: #0f172a;
  --pv-muted: #475569;
  --pv-border: #e5e7eb;
  --pv-primary: #7c3aed; /* violet-600 */
  --pv-primary-hover: #6d28d9; /* violet-700 */
  --pv-surface: #ffffff;
  --pv-surface-alt: #f8fafc;
  --pv-gradient: linear-gradient(135deg, #f8f5ff 0%, #fff5f8 50%, #fffaf0 100%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --pv-bg: #0b1020;
    --pv-fg: #e5e7eb;
    --pv-muted: #a3b2c7;
    --pv-border: #1f2937;
    --pv-primary: #a78bfa; /* violet-400 */
    --pv-primary-hover: #c4b5fd; /* violet-300 */
    --pv-surface: #0f172a;
    --pv-surface-alt: #111827;
    --pv-gradient: linear-gradient(135deg, #0b1020 0%, #101629 60%, #151a2f 100%);
  }
}

/* Base */
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: var(--pv-fg); background: var(--pv-bg); font-size: 18px; }
img { max-width: 100%; height: auto; }
a { color: var(--pv-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
/* Hide legacy Next bundle container */
#__next { display: none; }

/* Hero (visible even bez JS) */
.pv-hero { background: var(--pv-gradient); border-bottom: 1px solid var(--pv-border); position: relative; overflow: hidden; }
.pv-hero .inner { padding: 48px 0; display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .pv-hero .inner { grid-template-columns: 1.1fr .9fr; align-items: center; } }
.pv-hero h1 { font-size: 44px; line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.02em; }
.pv-hero p { font-size: 20px; margin: 0 0 22px; color: var(--pv-muted); max-width: 780px; }
.pv-cta { display: inline-block; background: var(--pv-primary); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 6px 20px rgba(124,58,237,0.25); transition: transform .12s ease, background .12s ease, box-shadow .12s ease; }
.pv-cta:hover { background: var(--pv-primary-hover); text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 26px rgba(124,58,237,0.3); }

.pv-hero-ill { align-self: center; }
.pv-hero-ill svg { width: 100%; height: auto; display: block; }

/* Header */
.pv-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.86); backdrop-filter: saturate(170%) blur(8px); border-bottom: 1px solid var(--pv-border); }
.pv-header:not(:first-of-type){ display: none; }
.pv-header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.pv-brand { font-weight: 800; color: var(--pv-fg); letter-spacing: -0.02em; }
.pv-nav a { margin-left: 18px; color: var(--pv-fg); opacity: 0.92; }
.pv-nav a:hover { opacity: 1; }
/* Larger tap targets */
.pv-nav a { padding: 10px 6px; display: inline-block; }

@media (prefers-color-scheme: dark) {
  .pv-header { background: rgba(15,23,42,0.75); border-bottom-color: #0b1324; }
  .pv-brand { color: #f8fafc; }
  .pv-nav a { color: #eef2ff; opacity: 0.95; }
}

/* Mobile header optimization */
@media (max-width: 640px) {
  .pv-header { background: var(--pv-bg); backdrop-filter: none; }
}

/* Sections */
.pv-sec { padding: 36px 0; border-bottom: 1px solid #f1f5f9; background: var(--pv-surface-alt); }
.pv-sec-title { font-size: 30px; margin: 0 0 16px; letter-spacing: -0.01em; }
.pv-sec-desc { margin: 6px 0 16px; color: var(--pv-muted); }
/* Anchor offset for sticky header */
:target { scroll-margin-top: 76px; }

/* Sections rendered from JSON */
.pv-grid { display: grid; grid-template-columns: repeat(1, minmax(0,1fr)); gap: 16px; align-items: stretch; }
@media (min-width: 480px) { .pv-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 768px) { .pv-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (min-width: 1200px) { .pv-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.pv-card { border: 1px solid var(--pv-border); border-radius: 12px; padding: 16px; background: var(--pv-surface); box-shadow: 0 1px 0 rgba(15,23,42,0.03); transition: box-shadow .12s ease, transform .12s ease; height: 100%; display: flex; flex-direction: column; }
.pv-card { background: var(--pv-surface-alt); box-shadow: 0 1px 2px rgba(2,6,23,0.04); }
.pv-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(2,6,23,0.08); }
.pv-card-title { font-size: 18px; margin: 0 0 8px; display: flex; align-items: center; gap: 10px; }
.pv-card-icon { width: 28px; height: 28px; color: var(--pv-primary); flex: 0 0 auto; }
.pv-card-desc { margin: 0 0 12px; color: var(--pv-muted); }
.pv-card-cta { display: inline-block; padding: 8px 12px; border-radius: 8px; background: #f1f5f9; color: #0f172a; }
.pv-card-cta:hover { background: #e2e8f0; text-decoration: none; }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
/* Allow stagger via data-delay */
.reveal { transition-delay: var(--pv-delay, 0ms); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { transition: none; transform: none; opacity: 1; }
}

/* Portfolio image placeholder */
.pv-thumb { width: 100%; border-radius: 10px; border: 1px solid var(--pv-border); background: var(--pv-surface-alt); margin: 0 0 12px; overflow: hidden; }
.pv-thumb svg { display: block; width: 100%; height: auto; transition: transform .35s ease; }
.pv-card:hover .pv-thumb svg { transform: scale(1.02); }

/* Contact form */
.pv-form { max-width: 720px; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pv-form .full { grid-column: 1 / -1; }
.pv-field { display: flex; flex-direction: column; gap: 6px; }
.pv-field label { font-weight: 600; font-size: 14px; }
.pv-input, .pv-textarea, .pv-select { padding: 12px 14px; border: 1px solid var(--pv-border); border-radius: 10px; background: var(--pv-surface); color: var(--pv-fg); outline: none; -webkit-appearance: none; appearance: none; }
.pv-textarea { min-height: 120px; resize: vertical; }
.pv-hidden { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.pv-btn { background: var(--pv-primary); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; border: none; cursor: pointer; -webkit-appearance: none; appearance: none; box-shadow: 0 6px 20px rgba(124,58,237,0.25); }
.pv-btn:hover { background: var(--pv-primary-hover); }
.pv-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Noscript fallback */
.pv-noscript { max-width: 960px; margin: 2rem auto; padding: 1.25rem; }
.pv-noscript h1 { font-size: 28px; margin: 0 0 .5rem; }
.pv-noscript p { margin: .5rem 0 1rem; line-height: 1.6; }
.pv-noscript ul { margin: 0 0 1rem 1.25rem; }
.pv-noscript a { display: inline-block; background: var(--pv-primary); color: #fff; text-decoration: none; padding: .6rem 1rem; border-radius: .5rem; }

/* Content section */
.pv-content { padding: 28px 0; }
.pv-content h2 { font-size: 32px; line-height: 1.2; margin: 0 0 14px; letter-spacing: -0.01em; }
.pv-content h3 { font-size: 20px; margin: 10px 0 6px; }
/* Underline accent for key headings */
.pv-underline { position: relative; display: inline-block; }
.pv-underline::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 6px; width: 100%; border-radius: 6px; background: linear-gradient(90deg, rgba(124,58,237,.4), rgba(196,181,253,.4)); }
.pv-columns { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 900px) { .pv-columns { grid-template-columns: 1.1fr .9fr; align-items: start; } }
.pv-callout { background: var(--pv-surface); border: 1px solid var(--pv-border); border-radius: 12px; padding: 16px; box-shadow: 0 1px 0 rgba(15,23,42,0.03); }
.pv-feature-grid { display: grid; grid-template-columns: repeat(1, minmax(0,1fr)); gap: 16px; }
@media (min-width: 768px) { .pv-feature-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.pv-feature-grid.pv-cols-3 { grid-template-columns: repeat(1, minmax(0,1fr)); }
@media (min-width: 1024px) { .pv-feature-grid.pv-cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.pv-feature { border: 1px solid var(--pv-border); border-radius: 12px; padding: 16px; background: var(--pv-surface-alt); box-shadow: 0 1px 2px rgba(2,6,23,0.04); }
.pv-list-2 { list-style: disc; padding-left: 20px; }
@media (min-width: 900px) { .pv-list-2 { columns: 2; column-gap: 28px; } }
.pv-content blockquote { margin: 14px 0; padding: 12px 16px; border-left: 4px solid var(--pv-primary); background: rgba(124,58,237,0.06); border-radius: 8px; }
.pv-divider { height: 1px; background: linear-gradient(90deg, rgba(124,58,237,.25), rgba(196,181,253,.1) 60%, transparent); border: 0; margin: 20px 0; }

/* KPI band */
.pv-kpis { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; background: var(--pv-surface); border: 1px solid var(--pv-border); border-radius: 14px; padding: 16px; box-shadow: 0 1px 0 rgba(15,23,42,0.03); }
@media (min-width: 768px) { .pv-kpis { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.pv-kpi { text-align: center; padding: 8px; }
.pv-kpi .num { font-weight: 800; font-size: 28px; color: var(--pv-primary); letter-spacing: -0.02em; }
.pv-kpi .label { color: var(--pv-muted); font-size: 13px; margin-top: 4px; }

/* Timeline */
.pv-timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.pv-timeline::before { content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 2px; background: rgba(124,58,237,0.25); }
.pv-step { position: relative; padding-left: 44px; margin: 14px 0; }
.pv-step::before { content: ""; position: absolute; left: 7px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--pv-primary); box-shadow: 0 0 0 4px rgba(124,58,237,0.15); }
.pv-step h4 { margin: 0 0 6px; font-size: 16px; }
.pv-step p { margin: 0; color: var(--pv-muted); }
.pv-content h3 { font-size: 22px; margin: 22px 0 8px; }
.pv-content h4 { font-size: 18px; margin: 16px 0 6px; }
.pv-content p { margin: 10px 0; line-height: 1.75; color: var(--pv-fg); }
.pv-content ul { margin: 8px 0 12px 1.25rem; }
.pv-content li { margin: 6px 0; }
.pv-content strong { font-weight: 700; }

/* Badges */
.pv-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.pv-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--pv-border); background: var(--pv-surface); font-size: 13px; color: var(--pv-fg); }
.pv-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pv-primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.15); }

/* Icon cards */
.pv-icard { border: 1px solid var(--pv-border); border-radius: 14px; padding: 16px; background: var(--pv-surface-alt); box-shadow: 0 1px 2px rgba(2,6,23,0.04); display: flex; gap: 12px; align-items: flex-start; }
.pv-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(124,58,237,0.1); color: var(--pv-primary); display: grid; place-items: center; flex: 0 0 auto; }
.pv-icon svg { width: 20px; height: 20px; display: block; }
.pv-icard h3 { margin: 2px 0 4px; font-size: 18px; }
.pv-icard h4 { margin: 2px 0 4px; font-size: 16px; }
.pv-icard p { margin: 0; color: var(--pv-muted); }

/* Checklist */
.pv-checklist { list-style: none; padding: 0; margin: 8px 0 12px; }
.pv-checklist li { position: relative; padding-left: 28px; margin: 8px 0; }
.pv-checklist li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 999px; background: var(--pv-primary); color: white; font-weight: 800; font-size: 13px; line-height: 20px; text-align: center; box-shadow: 0 4px 14px rgba(124,58,237,0.25); }

/* CTA band */
.pv-cta-band { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: center; border: 1px solid var(--pv-border); background: linear-gradient(135deg, rgba(124,58,237,0.06), rgba(196,181,253,0.08)); padding: 16px; border-radius: 14px; box-shadow: 0 1px 0 rgba(15,23,42,0.03); }
@media (min-width: 700px) { .pv-cta-band { grid-template-columns: 1fr auto; } }
.pv-cta-band .text { font-weight: 600; }
.pv-cta-band .actions { display: flex; gap: 10px; }
.pv-cta-outline { background: transparent; color: var(--pv-primary); padding: 10px 14px; border-radius: 12px; border: 1px solid var(--pv-primary); font-weight: 600; cursor: pointer; }
.pv-cta-outline:hover { background: rgba(124,58,237,0.06); text-decoration: none; }

/* Accordions */
details.pv-acc { border: 1px solid var(--pv-border); border-radius: 12px; background: var(--pv-surface); padding: 10px 12px; margin: 12px 0; box-shadow: 0 1px 0 rgba(15,23,42,0.03); }
details.pv-acc[open] { background: var(--pv-surface); }
details.pv-acc summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; font-weight: 700; }
details.pv-acc summary::-webkit-details-marker { display: none; }
.pv-acc .chev { width: 18px; height: 18px; border-radius: 50%; background: rgba(124,58,237,0.12); color: var(--pv-primary); display: grid; place-items: center; transition: transform .25s ease; }
details.pv-acc[open] .chev { transform: rotate(90deg); }
.pv-acc .acc-body { margin-top: 10px; }

/* Link badges */
.pv-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--pv-border); background: var(--pv-surface); color: var(--pv-fg); text-decoration: none; font-weight: 600; }
.pv-link:hover { border-color: var(--pv-primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.12); }
.pv-link svg { width: 16px; height: 16px; display: block; }

/* Footer */
.pv-footer { background: var(--pv-surface-alt); border-top: 1px solid var(--pv-border); margin-top: 20px; }
.pv-footer-inner { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 18px 0; }
@media (min-width: 640px) { .pv-footer-inner { grid-template-columns: 1fr auto auto; align-items: center; }}
.pv-footer-brand { font-weight: 700; }
.pv-footer-links a { margin-right: 14px; color: var(--pv-fg); opacity: .85; }
.pv-footer-links a:hover { opacity: 1; }
.pv-footer-copy { font-size: 14px; color: var(--pv-muted); }

/* Utility */
.hidden { display: none !important; }
