/* ───────── PravniAI · custom CSS ───────── */

:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  font-feature-settings: "ss01", "cv11";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: theme('colors.gold.500'); color: theme('colors.ink.950'); }

.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* ───────── Eyebrow label ───────── */
.eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; color: theme('colors.gold.500'); font-weight: 700; margin-bottom: 1rem; }

/* ───────── Country switcher ───────── */
.country-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; transition: all 200ms var(--ease-out); padding: 4px; }
.country-btn img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.country-btn:hover { background: rgb(0 0 0 / 0.06); transform: scale(1.08); }
.dark .country-btn:hover { background: rgb(255 255 255 / 0.08); }
.country-btn[aria-pressed="true"] { background: theme('colors.gold.500' / 0.18); box-shadow: 0 0 0 1.5px theme('colors.gold.500'); }

.country-pill { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.875rem; background: rgb(0 0 0 / 0.04); border: 1px solid rgb(0 0 0 / 0.08); border-radius: 9999px; font-size: 0.875rem; font-weight: 500; color: theme('colors.ink.700'); transition: all 200ms var(--ease-out); }
.dark .country-pill { background: rgb(255 255 255 / 0.04); border-color: rgb(255 255 255 / 0.08); color: theme('colors.ink.300'); }
.country-pill img { width: 20px; height: 20px; border-radius: 50%; }
.country-pill:hover { background: theme('colors.gold.500' / 0.10); border-color: theme('colors.gold.500' / 0.5); }

/* ───────── Step cards ───────── */
.step-card { padding: 1.75rem; border-radius: 1.25rem; background: white; border: 1px solid theme('colors.ink.200'); transition: all 300ms var(--ease-out); }
.dark .step-card { background: theme('colors.ink.900'); border-color: theme('colors.ink.800'); }
.step-card:hover { border-color: theme('colors.gold.500' / 0.5); transform: translateY(-4px); box-shadow: 0 20px 40px -20px theme('colors.gold.500' / 0.3); }
.step-num { font-size: 2.5rem; line-height: 1; color: theme('colors.gold.500' / 0.3); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 1rem; }
.step-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.015em; }
.step-body { color: theme('colors.ink.600'); line-height: 1.6; font-size: 0.9375rem; }
.dark .step-body { color: theme('colors.ink.400'); }

/* ───────── Comparison table icons ───────── */
.cmp-yes, .cmp-no, .cmp-warn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9999px; }
.cmp-yes { background: theme('colors.gold.500' / 0.18); color: theme('colors.gold.500'); }
.cmp-yes::before { content: ""; width: 16px; height: 16px; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat; background: currentColor; }
.cmp-no { background: rgb(150 150 150 / 0.12); color: theme('colors.ink.500'); }
.cmp-no::before { content: ""; width: 14px; height: 14px; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") center/contain no-repeat; background: currentColor; }
.cmp-warn { background: rgb(217 165 75 / 0.18); color: #d4a64a; font-weight: 700; }
.cmp-warn::before { content: "!"; font-size: 14px; }
.cmp-na { color: theme('colors.ink.400'); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; }

/* ───────── Feature cards ───────── */
.ft-card { padding: 1.5rem; border-radius: 1rem; background: white; border: 1px solid theme('colors.ink.200'); transition: all 300ms var(--ease-out); }
.dark .ft-card { background: theme('colors.ink.900' / 0.6); border-color: theme('colors.ink.800'); backdrop-filter: blur(10px); }
.ft-card:hover { border-color: theme('colors.gold.500' / 0.5); background: theme('colors.gold.500' / 0.04); transform: translateY(-2px); }
.ft-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: theme('colors.gold.500' / 0.12); color: theme('colors.gold.500'); margin-bottom: 1rem; }
.ft-title { font-size: 1.0625rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.015em; }
.ft-body { color: theme('colors.ink.600'); line-height: 1.55; font-size: 0.9rem; }
.dark .ft-body { color: theme('colors.ink.400'); }

/* ───────── Form fields ───────── */
.form-field { display: block; }
.form-label { display: block; font-size: 0.8125rem; font-weight: 600; color: theme('colors.ink.700'); margin-bottom: 0.5rem; letter-spacing: -0.005em; }
.dark .form-label { color: theme('colors.ink.300'); }
.form-input { width: 100%; padding: 0.75rem 1rem; background: white; border: 1.5px solid theme('colors.ink.200'); border-radius: 0.625rem; font-size: 1rem; color: theme('colors.ink.900'); transition: all 150ms var(--ease-out); font-family: inherit; }
.dark .form-input { background: theme('colors.ink.950'); border-color: theme('colors.ink.800'); color: theme('colors.ink.50'); }
.form-input::placeholder { color: theme('colors.ink.400'); }
.dark .form-input::placeholder { color: theme('colors.ink.600'); }
.form-input:focus { outline: none; border-color: theme('colors.gold.500'); box-shadow: 0 0 0 4px theme('colors.gold.500' / 0.15); }

/* ───────── FAQ ───────── */
.faq-item { border: 1px solid theme('colors.ink.200'); border-radius: 1rem; background: white; overflow: hidden; transition: all 200ms var(--ease-out); }
.dark .faq-item { border-color: theme('colors.ink.800'); background: theme('colors.ink.900'); }
.faq-item[open] { border-color: theme('colors.gold.500' / 0.4); box-shadow: 0 4px 20px -8px theme('colors.gold.500' / 0.2); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.125rem 1.25rem; cursor: pointer; font-weight: 600; font-size: 1rem; letter-spacing: -0.005em; list-style: none; user-select: none; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat; transition: transform 200ms var(--ease-out); color: theme('colors.gold.500'); flex-shrink: 0; }
.faq-item[open] .faq-q::after { transform: rotate(180deg); }
.faq-a { padding: 0 1.25rem 1.125rem; color: theme('colors.ink.600'); line-height: 1.6; font-size: 0.9375rem; }
.dark .faq-a { color: theme('colors.ink.400'); }
.faq-a strong { color: theme('colors.ink.900'); }
.dark .faq-a strong { color: theme('colors.ink.50'); }

/* ───────── Stat counter ───────── */
.stat .counter { display: inline-block; font-variant-numeric: tabular-nums; }

/* ─────────────────────────────────────────────────────
   REVEAL ANIMATIONS — clean, no GSAP, no conflict
   ───────────────────────────────────────────────────── */

/* Hero items: CSS-only sequential fade-in (runs immediately) */
.hero-fade {
  opacity: 0; transform: translateY(20px);
  animation: heroFadeIn 0.7s var(--ease-out) forwards;
  animation-delay: calc(0.05s + var(--i, 0) * 0.1s);
}
.hero-fade:nth-of-type(1) { --i: 0; }
.hero-fade:nth-of-type(2) { --i: 1; }
.hero-fade:nth-of-type(3) { --i: 2; }
.hero-fade:nth-of-type(4) { --i: 3; }
.hero-fade:nth-of-type(5) { --i: 4; }
@keyframes heroFadeIn { to { opacity: 1; transform: translateY(0); } }

/* Section reveals: hidden, JS adds .in-view via IntersectionObserver */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.in-view { opacity: 1; transform: none; }

/* Hard fallback — if JS fails entirely (no IntersectionObserver), show after 1s */
.no-js-reveal .reveal { opacity: 1 !important; transform: none !important; }

/* Modern CSS scroll-driven (Chrome 115+, Safari 26+) — works WITHOUT JS */
@supports (animation-timeline: view()) {
  .reveal:not(.in-view) {
    animation: revealUp linear forwards;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }
  @keyframes revealUp {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-fade { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* ───────── Hero canvas ───────── */
#heroCanvas { display: block; outline: none; touch-action: pan-y; }

#year { font-variant-numeric: tabular-nums; }

/* sticky CTA spacing on mobile */
@media (max-width: 639px) { body { padding-bottom: 6rem; } }

@media print {
  header, #demo, footer, [aria-label*="3D"] { display: none !important; }
  body { background: white; color: black; }
}

/* Text balance for headings (modern browsers) */
.text-balance { text-wrap: balance; }

/* ───────── Animated demo chat ───────── */
.demo-cursor {
  display: inline-block;
  width: 2px; height: 1.1em;
  vertical-align: text-bottom;
  background: theme('colors.gold.500');
  animation: blink 1s steps(1) infinite;
  margin-left: 1px;
}
@keyframes blink { 50% { opacity: 0; } }

.thinking-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  animation: thinkBounce 1.4s ease-in-out infinite;
}
.thinking-dot:nth-child(2) { animation-delay: 0.16s; }
.thinking-dot:nth-child(3) { animation-delay: 0.32s; }
@keyframes thinkBounce {
  0%, 80%, 100% { transform: scale(0.4); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

#demoAnswer { white-space: pre-wrap; }

/* ───────── Value stats ───────── */
.val-stat {
  padding: 1.5rem;
  border-radius: 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  text-align: left;
}
.val-num {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: white;
  line-height: 1;
}
.val-suffix { color: theme('colors.gold.400'); }
.val-lbl { font-size: 0.8125rem; color: theme('colors.ink.400'); margin-top: 0.5rem; line-height: 1.3; }

/* ───────── Uncensored card ───────── */
.unc-card {
  padding: 1.5rem;
  border-radius: 1rem;
  background: white;
  border: 1px solid theme('colors.ink.200');
}
.dark .unc-card { background: theme('colors.ink.900'); border-color: theme('colors.ink.800'); }
.unc-card-good { border-color: theme('colors.gold.500' / 0.5); background: linear-gradient(135deg, theme('colors.gold.500' / 0.06), transparent); }
.dark .unc-card-good { background: linear-gradient(135deg, theme('colors.gold.500' / 0.08), theme('colors.ink.900')); }
.unc-q, .unc-q-good { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 1rem; }
.unc-q { background: rgb(220 220 220 / 0.4); color: theme('colors.ink.500'); }
.dark .unc-q { background: theme('colors.ink.800'); }
.unc-q-good { background: theme('colors.gold.500' / 0.18); color: theme('colors.gold.600'); }
.dark .unc-q-good { color: theme('colors.gold.400'); }
.unc-body { color: theme('colors.ink.600'); line-height: 1.6; font-size: 0.95rem; }
.dark .unc-body { color: theme('colors.ink.300'); }

/* ───────── Hardware option cards ───────── */
.hw-card {
  padding: 2rem;
  border-radius: 1.25rem;
  background: white;
  border: 1px solid theme('colors.ink.200');
  transition: all 300ms var(--ease-out);
}
.dark .hw-card { background: theme('colors.ink.900'); border-color: theme('colors.ink.800'); }
.hw-card:hover {
  border-color: theme('colors.gold.500' / 0.5);
  transform: translateY(-3px);
  box-shadow: 0 25px 50px -20px theme('colors.gold.500' / 0.25);
}
.hw-card-accent {
  background: linear-gradient(135deg, theme('colors.gold.500' / 0.06), transparent);
  border-color: theme('colors.gold.500' / 0.4);
}
.dark .hw-card-accent {
  background: linear-gradient(135deg, theme('colors.gold.500' / 0.10), theme('colors.ink.900'));
}
.hw-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: theme('colors.gold.500' / 0.12);
  color: theme('colors.gold.500');
  margin-bottom: 1rem;
}
.hw-tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: theme('colors.ink.100');
  color: theme('colors.ink.600');
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.dark .hw-tag { background: theme('colors.ink.800'); color: theme('colors.ink.300'); }
.hw-tag-accent { background: theme('colors.gold.500' / 0.18); color: theme('colors.gold.600'); }
.dark .hw-tag-accent { color: theme('colors.gold.400'); }
.hw-title { font-size: 1.375rem; font-weight: 700; margin-bottom: 0.625rem; letter-spacing: -0.015em; }
.hw-body { color: theme('colors.ink.600'); line-height: 1.6; font-size: 0.95rem; margin-bottom: 1.25rem; }
.dark .hw-body { color: theme('colors.ink.400'); }
.hw-list { list-style: none; padding: 0; margin: 0; }
.hw-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9rem;
  color: theme('colors.ink.700');
  line-height: 1.5;
  margin-bottom: 0.5rem;
}
.dark .hw-list li { color: theme('colors.ink.300'); }
.hw-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.35em;
  width: 14px; height: 14px;
  background: theme('colors.gold.500');
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* model-viewer transparent background fix */
model-viewer { background-color: transparent !important; --poster-color: transparent; }

/* ───────── Source tiles ───────── */
.src-tile {
  padding: 1.25rem;
  border-radius: 0.875rem;
  background: white;
  border: 1px solid theme('colors.ink.200');
  transition: all 250ms var(--ease-out);
}
.dark .src-tile { background: theme('colors.ink.900'); border-color: theme('colors.ink.800'); }
.src-tile:hover { border-color: theme('colors.gold.500' / 0.5); transform: translateY(-2px); }
.src-tile-accent { background: linear-gradient(135deg, theme('colors.gold.500' / 0.08), transparent); border-color: theme('colors.gold.500' / 0.4); }
.src-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 9px; background: theme('colors.gold.500' / 0.12); color: theme('colors.gold.500'); margin-bottom: 0.75rem; }
.src-t { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.25rem; letter-spacing: -0.01em; }
.src-b { font-size: 0.825rem; line-height: 1.5; color: theme('colors.ink.600'); }
.dark .src-b { color: theme('colors.ink.400'); }
