/* =========================================================
   pprintdim — Premium Dark design system (static build)
   One stylesheet for the whole site.
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@300;400;500;600;700&display=swap");

:root {
  --radius: 0.875rem;

  --background: oklch(0.16 0.018 248);
  --foreground: oklch(0.97 0.005 240);

  --surface: oklch(0.2 0.02 248);
  --surface-2: oklch(0.24 0.022 248);

  --card: oklch(0.2 0.02 248);
  --muted: oklch(0.26 0.02 248);
  --muted-foreground: oklch(0.68 0.018 245);

  --primary: oklch(0.78 0.14 195);
  --primary-foreground: oklch(0.17 0.02 248);
  --accent: oklch(0.62 0.2 280);

  --border: oklch(1 0 0 / 9%);

  --gradient-primary: linear-gradient(135deg, oklch(0.82 0.14 195), oklch(0.62 0.2 280));
  --gradient-text: linear-gradient(120deg, oklch(0.98 0.005 240) 30%, oklch(0.78 0.14 195) 100%);
  --glow-primary: 0 0 0 1px oklch(0.78 0.14 195 / 0.25), 0 18px 60px -18px oklch(0.78 0.14 195 / 0.55);
  --shadow-elegant: 0 30px 80px -30px oklch(0.05 0.02 248 / 0.85);
  --shadow-card: 0 18px 50px -24px oklch(0.05 0.02 248 / 0.7);

  --container: 1180px;

  /* theme-aware effects (dark defaults) */
  --glass-bg: oklch(0.22 0.02 248 / 0.55);
  --glass-strong-bg: oklch(0.2 0.02 248 / 0.8);
  --glass-border: oklch(1 0 0 / 0.08);
  --scrollbar-thumb: oklch(0.3 0.02 248);
  --selection-bg: oklch(0.78 0.14 195 / 0.3);
  --selection-fg: oklch(0.98 0.005 240);
  --grain-opacity: 0.035;
  --tint: oklch(1 0 0 / 0.035);
  --tint-strong: oklch(1 0 0 / 0.07);
  --header-bg: oklch(0.16 0.018 248 / 0.72);
  --overlay-bg: oklch(0.18 0.02 248 / 0.95);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; border-color: var(--border); }

html { scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; }

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
  line-height: 1.6;
}

h1, h2, h3, h4, h5 {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-weight: 600;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--selection-bg); color: var(--selection-fg); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--background); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 10px; }

/* ---------- Helpers ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3.5rem 0; position: relative; }
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.text-grad-primary {
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.muted { color: var(--muted-foreground); }
.center { text-align: center; }

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-border);
}
.glass-strong {
  background: var(--glass-strong-bg);
  backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--glass-border);
}

.tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--primary);
  padding: 0.4rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--selection-bg);
  background: oklch(0.78 0.14 195 / 0.07);
}

.section-head { max-width: 640px; margin: 0 auto 2.2rem; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin: 1rem 0 0.9rem; }
.section-head p { color: var(--muted-foreground); font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; border: 1px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn-primary {
  background: var(--gradient-primary); color: var(--primary-foreground);
  box-shadow: var(--glow-primary);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost {
  background: var(--tint); color: var(--foreground);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--tint-strong); transform: translateY(-2px); }

/* ---------- Background glows ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.35; }
.orb-1 { width: 520px; height: 520px; top: -120px; left: -120px; background: oklch(0.78 0.14 195 / 0.5); }
.orb-2 { width: 480px; height: 480px; bottom: -140px; right: -100px; background: oklch(0.62 0.2 280 / 0.45); }

.grain::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
/* Inline icon sizing — keep all non-logo SVGs to a sane glyph size */
svg:not(.brand-logo) { width: 1.15em; height: 1.15em; flex: 0 0 auto; vertical-align: middle; }
.logo img, .logo svg.brand-logo { height: 30px; width: auto; }
.logo .mark { display: none; }
.nav-desktop { display: none; gap: 2rem; }
.nav-desktop a { color: var(--muted-foreground); font-size: 0.95rem; font-weight: 500; transition: color .2s; position: relative; }
.nav-desktop a:hover, .nav-desktop a.active { color: var(--foreground); }
.nav-desktop a.active::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 100%;
  background: var(--gradient-primary); border-radius: 2px;
}
.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.5rem 0.75rem;
  border-radius: 999px; border: 1px solid var(--border); background: var(--tint);
  color: var(--foreground); font-size: 0.85rem; font-weight: 600;
}
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 150px;
  border-radius: 12px; padding: 0.4rem; display: none; flex-direction: column; gap: 2px;
  background: var(--overlay-bg); backdrop-filter: blur(18px);
  border: 1px solid var(--border); box-shadow: var(--shadow-card);
}
.lang-menu.open { display: flex; }
.lang-menu a { padding: 0.55rem 0.7rem; border-radius: 8px; font-size: 0.9rem; color: var(--muted-foreground); }
.lang-menu a:hover { background: var(--tint-strong); color: var(--foreground); }

.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--tint); color: var(--foreground);
}
.header-cta { display: none; }

.mobile-nav {
  position: fixed; inset: 76px 0 0; z-index: 49; padding: 1.5rem 1.25rem;
  /* solid backdrop — page content must not bleed through the open menu */
  background: var(--background);
  overflow-y: auto;
  transform: translateX(100%); display: flex; flex-direction: column; gap: 0.5rem;
  /* visibility hides the off-screen panel so it can't create horizontal scroll */
  visibility: hidden;
  transition: transform .3s ease, visibility 0s linear .3s;
}
.mobile-nav.open { transform: translateX(0); visibility: visible; transition: transform .3s ease, visibility 0s; }
/* while the burger menu is open: lock page scroll + solid header strip above the panel */
html.nav-open, html.nav-open body { overflow: hidden; }
html.nav-open .site-header { background: var(--background); border-bottom: 1px solid var(--border); backdrop-filter: none; }
.mobile-nav a { padding: 1rem 0.5rem; font-size: 1.15rem; font-weight: 600; border-bottom: 1px solid var(--border); }
.mobile-nav .btn { margin-top: 1rem; }

@media (min-width: 960px) {
  .nav-desktop { display: flex; }
  .header-cta { display: inline-flex; }
  .menu-toggle { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 7rem 0 3.5rem; position: relative; }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); margin: 1.4rem 0; }
.hero p.lead { font-size: 1.15rem; color: var(--muted-foreground); max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.hero-checks { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 2rem; color: var(--muted-foreground); font-size: 0.9rem; }
.hero-checks span { display: inline-flex; align-items: center; gap: 0.4rem; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 10px var(--primary); }

.hero-visual { position: relative; }
.browser-mock {
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-elegant);
  border: 1px solid var(--border); background: var(--surface);
}
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 0.7rem 1rem; background: oklch(0.22 0.02 248); border-bottom: 1px solid var(--border); }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.browser-bar i:nth-child(1){background:oklch(0.65 0.2 25);} .browser-bar i:nth-child(2){background:oklch(0.8 0.14 90);} .browser-bar i:nth-child(3){background:oklch(0.7 0.16 160);}
.floating-card {
  position: absolute; padding: 1rem 1.25rem; border-radius: 14px; box-shadow: var(--shadow-card);
}
.floating-card .big { font-size: 1.5rem; font-weight: 700; font-family: "Space Grotesk"; }
.fc-1 { top: -28px; right: -10px; }
.fc-2 { bottom: -28px; left: -10px; }

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; }
}

/* ---------- Stats ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 4rem; }
.stat { padding: 1.6rem 1.25rem; border-radius: var(--radius); text-align: center; }
.stat .num { font-family: "Space Grotesk"; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
.stat .lbl { color: var(--muted-foreground); font-size: 0.85rem; margin-top: 0.35rem; }
@media (min-width: 760px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Trust marquee ---------- */
.trust { padding: 2.5rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust-rating { text-align: center; color: var(--muted-foreground); font-size: 0.9rem; margin-bottom: 1.5rem; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 3rem; width: max-content; animation: marquee 28s linear infinite; }
.marquee-track span { font-family: "Space Grotesk"; font-size: 1.4rem; font-weight: 600; color: oklch(0.55 0.02 248); white-space: nowrap; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Cards grid ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 680px){ .grid-2 { grid-template-columns: repeat(2,1fr); } .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 980px){ .grid-3 { grid-template-columns: repeat(3,1fr); } }

.card {
  padding: 1.8rem; border-radius: var(--radius); position: relative; overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-5px); border-color: oklch(0.78 0.14 195 / 0.4); box-shadow: var(--shadow-card); }
.card .icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 1.1rem;
  background: oklch(0.78 0.14 195 / 0.12); color: var(--primary);
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.card p { color: var(--muted-foreground); font-size: 0.95rem; }
.card .chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.chip { font-size: 0.72rem; padding: 0.25rem 0.6rem; border-radius: 999px; background: var(--tint-strong); color: var(--muted-foreground); border: 1px solid var(--border); }

/* ---------- Page hero ---------- */
.page-hero { padding: 6.5rem 0 2.5rem; text-align: center; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin: 1.1rem 0; }
.page-hero p { max-width: 620px; margin: 0 auto; color: var(--muted-foreground); font-size: 1.1rem; }
.crumbs { display: flex; justify-content: center; gap: 0.5rem; font-size: 0.85rem; color: var(--muted-foreground); }
.crumbs a:hover { color: var(--primary); }
/* reviews & design pages: no page-hero, crumbs sit directly in section under fixed header */
.ppr-scope .crumbs,
.ppd-scope .crumbs { justify-content: flex-start; margin: 3.5rem 0 1.6rem; }

/* ---------- Portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-bottom: 2.5rem; }
.filter-btn {
  padding: 0.5rem 1.1rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  border: 1px solid var(--border); background: var(--tint); color: var(--muted-foreground); transition: all .2s;
}
.filter-btn:hover { color: var(--foreground); }
.filter-btn.active { background: var(--gradient-primary); color: var(--primary-foreground); border-color: transparent; }

.portfolio-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 760px){ .portfolio-grid { grid-template-columns: repeat(2,1fr); } }
.case {
  border-radius: 18px; overflow: hidden; cursor: pointer; position: relative;
  border: 1px solid var(--border); background: var(--surface); transition: transform .35s ease, box-shadow .35s ease;
}
.case:hover { transform: translateY(-6px); box-shadow: var(--shadow-elegant); }
.case-media { position: relative; overflow: hidden; aspect-ratio: 16/10; }
.case-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.case:hover .case-media img { transform: scale(1.06); }
.case-body { padding: 1.4rem 1.6rem; }
.case-body .platform { color: var(--primary); font-size: 0.8rem; font-weight: 600; }
.case-body h3 { font-size: 1.35rem; margin: 0.4rem 0 0.5rem; }
.case-body p { color: var(--muted-foreground); font-size: 0.92rem; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center;
  padding: 1.25rem; background: oklch(0.05 0.02 248 / 0.7); backdrop-filter: blur(8px);
}
.modal-overlay.open { display: flex; }
.modal {
  width: 100%; max-width: 720px; max-height: 88vh; overflow-y: auto; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-elegant);
}
.modal img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.modal-body { padding: 1.8rem; }
.modal-close {
  position: absolute; top: 1.5rem; right: 1.5rem; width: 40px; height: 40px; border-radius: 50%;
  background: var(--overlay-bg); border: 1px solid var(--border); color: var(--foreground); font-size: 1.2rem;
}
.modal-body h3 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.modal-body .works { display: grid; gap: 0.6rem; margin: 1.2rem 0; }
.modal-body .works li { display: flex; gap: 0.6rem; color: var(--muted-foreground); }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 900px){ .about-grid { grid-template-columns: 0.85fr 1fr; } }
.portrait-wrap { position: relative; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-elegant); border: 1px solid var(--border); }
.portrait-wrap img { width: 100%; }
.years-badge {
  position: absolute; bottom: 1.25rem; left: 1.25rem; padding: 1rem 1.25rem; border-radius: 14px;
}
.years-badge .big { font-size: 2rem; font-weight: 700; font-family: "Space Grotesk"; }
.principles { display: grid; gap: 0.8rem; margin: 1.5rem 0; }
.principles li { display: flex; gap: 0.7rem; }
.check-ic { color: var(--primary); flex-shrink: 0; }

/* ---------- Process ---------- */
.process-list { display: grid; gap: 1rem; }
.process-step { display: flex; gap: 1.25rem; padding: 1.5rem; border-radius: var(--radius); }
.process-step .step-n { font-family: "Space Grotesk"; font-size: 1.6rem; font-weight: 700; color: var(--primary); min-width: 48px; }

/* ---------- Tech ---------- */
.tech-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.tech-pill { padding: 0.7rem 1.3rem; border-radius: 999px; font-weight: 600; font-size: 0.95rem; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 680px){ .pricing-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1000px){ .pricing-grid { grid-template-columns: repeat(3,1fr); } }
.price-card { padding: 2rem 1.8rem; border-radius: var(--radius); position: relative; }
.price-card.popular { border-color: oklch(0.78 0.14 195 / 0.5); box-shadow: var(--glow-primary); }
.popular-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 0.25rem 0.9rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; background: var(--gradient-primary); color: var(--primary-foreground); }
.price-card .price { font-family: "Space Grotesk"; font-size: 2rem; font-weight: 700; margin: 0.6rem 0; }

/* ---------- Calculator ---------- */
.calc { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 900px){ .calc { grid-template-columns: 1.2fr 0.8fr; } }
.calc-panel { padding: 2rem; border-radius: 18px; }
.field { margin-bottom: 1.4rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.6rem; font-size: 0.95rem; }
.options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.opt {
  padding: 0.6rem 1rem; border-radius: 10px; font-size: 0.88rem; font-weight: 500;
  border: 1px solid var(--border); background: var(--tint); color: var(--muted-foreground);
}
.opt.active { background: oklch(0.78 0.14 195 / 0.15); border-color: oklch(0.78 0.14 195 / 0.5); color: var(--foreground); }
.migration-route { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: .75rem; align-items: end; }
.migration-route > div { min-width: 0; }
.migration-label { display: block; margin-bottom: .45rem; color: var(--muted-foreground); font-size: .82rem; }
.migration-route select {
  width: 100%; padding: .7rem .85rem; border: 1px solid var(--border); border-radius: 10px;
  background: var(--tint); color: var(--foreground); font: inherit;
}
.migration-route select:focus { outline: none; border-color: oklch(0.78 0.14 195 / 0.6); }
.migration-route select option { background: oklch(0.2 0.018 248); color: var(--foreground); }
.migration-arrow { padding-bottom: .7rem; color: var(--primary); font-size: 1.2rem; }
@media (max-width: 560px) {
  .migration-route { grid-template-columns: 1fr; }
  .migration-arrow { padding: 0; text-align: center; transform: rotate(90deg); }
}
.range-row { display: flex; align-items: center; gap: 1rem; }
input[type="range"] { flex: 1; accent-color: var(--primary); }
.range-val { font-family: "Space Grotesk"; font-weight: 700; min-width: 40px; text-align: right; }

.calc-result { padding: 2rem; border-radius: 18px; position: sticky; top: 100px; }
.calc-result .currencies { display: flex; gap: 0.4rem; margin-bottom: 1.2rem; }
.pricing-cur { display: flex; justify-content: center; gap: 0.4rem; margin: 0 auto 1.8rem; max-width: 300px; }
.cur-btn { flex: 1; padding: 0.5rem; border-radius: 8px; font-weight: 600; font-size: 0.85rem; border: 1px solid var(--border); background: var(--tint); color: var(--muted-foreground); }
.cur-btn.active { background: var(--gradient-primary); color: var(--primary-foreground); border-color: transparent; }
.calc-result .amount { font-family: "Space Grotesk"; font-size: clamp(2rem, 6vw, 3rem); font-weight: 700; margin: 0.5rem 0; }
.calc-result .note { font-size: 0.8rem; color: var(--muted-foreground); margin-top: 1rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 0.75rem; }
.faq-item { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: oklch(1 0 0 / 0.02); }
.faq-q { width: 100%; text-align: left; padding: 1.3rem 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-weight: 600; font-size: 1.02rem; color: var(--foreground); background: none; border: none; }
.faq-q .ic { transition: transform .3s ease; color: var(--primary); flex-shrink: 0; }
.faq-item.open .faq-q .ic { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a p { padding: 0 1.5rem 1.3rem; color: var(--muted-foreground); }

/* ---------- CTA / contact ---------- */
.cta-box { max-width: 720px; margin: 0 auto; padding: 3rem; border-radius: 22px; text-align: center; }
.cta-box h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.contact-form { display: grid; gap: 1rem; max-width: 520px; margin: 2rem auto 0; text-align: left; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 0.9rem 1.1rem; border-radius: 12px; font-family: inherit; font-size: 0.95rem;
  background: var(--tint); border: 1px solid var(--border); color: var(--foreground);
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form select {
  padding: 0.9rem 2.1rem 0.9rem 0.9rem; border-radius: 12px; font-family: inherit; font-size: 0.95rem;
  background-color: var(--tint); border: 1px solid var(--border); color: var(--foreground);
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa3b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.7rem center; background-size: 14px;
}
.contact-form select option { background: oklch(0.2 0.018 248); color: var(--foreground); }
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { outline: none; border-color: oklch(0.78 0.14 195 / 0.6); }
.contact-methods { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2rem; }
.contact-method { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1.3rem; border-radius: 999px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 3.5rem 0 2rem; margin-top: 2rem; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 760px){ .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-grid img, .footer-grid svg.brand-logo { height: 28px; width: auto; margin-bottom: 1rem; }
.footer-grid h4 { font-size: 0.95rem; margin-bottom: 1rem; }
.footer-grid ul { display: grid; gap: 0.6rem; }
.footer-grid a { color: var(--muted-foreground); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--primary); }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); text-align: center; color: var(--muted-foreground); font-size: 0.85rem; }

/* ---------- Floating telegram ---------- */
.tg-float {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 60; display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.2rem; border-radius: 999px; font-weight: 600; font-size: 0.9rem;
  background: var(--gradient-primary); color: var(--primary-foreground); box-shadow: var(--glow-primary);
  transition: transform .25s ease;
}
.tg-float:hover { transform: translateY(-3px) scale(1.03); }

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; border-radius: 50%; mix-blend-mode: difference; }
.cursor-dot { width: 7px; height: 7px; background: #fff; transform: translate(-50%, -50%); }
.cursor-ring { width: 34px; height: 34px; border: 1px solid oklch(0.78 0.14 195 / 0.8); transform: translate(-50%, -50%); transition: transform .18s ease, width .2s, height .2s; }
.cursor-ring.hover { width: 54px; height: 54px; background: oklch(0.78 0.14 195 / 0.1); }
@media (max-width: 900px), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center;
  background: var(--background); transition: opacity .6s ease, visibility .6s ease;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader img, .preloader svg.brand-logo { height: 48px; width: auto; animation: pulse-glow 1.6s ease-in-out infinite; }
@keyframes pulse-glow { 0%,100% { opacity: .5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== Light theme ===== */
:root.light {
  --background: oklch(0.985 0.004 240);
  --foreground: oklch(0.2 0.02 248);
  --surface: oklch(0.96 0.006 240);
  --surface-2: oklch(0.93 0.008 240);
  --card: oklch(0.99 0.003 240);
  --muted: oklch(0.93 0.008 240);
  --muted-foreground: oklch(0.46 0.02 245);
  --primary: oklch(0.6 0.13 200);
  --primary-foreground: oklch(0.99 0.003 240);
  --accent: oklch(0.55 0.2 280);
  --border: oklch(0.2 0.02 248 / 12%);
  --gradient-primary: linear-gradient(135deg, oklch(0.66 0.14 200), oklch(0.55 0.2 280));
  --gradient-text: linear-gradient(120deg, oklch(0.22 0.02 248) 30%, oklch(0.55 0.14 200) 100%);
  --glow-primary: 0 0 0 1px oklch(0.6 0.13 200 / 0.2), 0 18px 60px -18px oklch(0.6 0.13 200 / 0.4);
  --shadow-elegant: 0 30px 80px -30px oklch(0.5 0.02 248 / 0.25);
  --shadow-card: 0 18px 50px -24px oklch(0.5 0.02 248 / 0.18);
  --glass-bg: oklch(1 0 0 / 0.62);
  --glass-strong-bg: oklch(1 0 0 / 0.82);
  --glass-border: oklch(0.2 0.02 248 / 0.09);
  --scrollbar-thumb: oklch(0.78 0.01 248);
  --selection-bg: oklch(0.6 0.13 200 / 0.25);
  --selection-fg: oklch(0.2 0.02 248);
  --grain-opacity: 0.02;
  --tint: oklch(0.2 0.02 248 / 0.04);
  --tint-strong: oklch(0.2 0.02 248 / 0.07);
  --header-bg: oklch(0.985 0.004 240 / 0.8);
  --overlay-bg: oklch(1 0 0 / 0.97);
}
@media (prefers-color-scheme: light) {
  :root:not(.dark):not(.light) {
    --background: oklch(0.985 0.004 240);
    --foreground: oklch(0.2 0.02 248);
    --surface: oklch(0.96 0.006 240);
    --surface-2: oklch(0.93 0.008 240);
    --card: oklch(0.99 0.003 240);
    --muted: oklch(0.93 0.008 240);
    --muted-foreground: oklch(0.46 0.02 245);
    --primary: oklch(0.6 0.13 200);
    --primary-foreground: oklch(0.99 0.003 240);
    --accent: oklch(0.55 0.2 280);
    --border: oklch(0.2 0.02 248 / 12%);
    --gradient-primary: linear-gradient(135deg, oklch(0.66 0.14 200), oklch(0.55 0.2 280));
    --gradient-text: linear-gradient(120deg, oklch(0.22 0.02 248) 30%, oklch(0.55 0.14 200) 100%);
    --glow-primary: 0 0 0 1px oklch(0.6 0.13 200 / 0.2), 0 18px 60px -18px oklch(0.6 0.13 200 / 0.4);
    --shadow-elegant: 0 30px 80px -30px oklch(0.5 0.02 248 / 0.25);
    --shadow-card: 0 18px 50px -24px oklch(0.5 0.02 248 / 0.18);
    --glass-bg: oklch(1 0 0 / 0.62);
    --glass-strong-bg: oklch(1 0 0 / 0.82);
    --glass-border: oklch(0.2 0.02 248 / 0.09);
    --scrollbar-thumb: oklch(0.78 0.01 248);
    --selection-bg: oklch(0.6 0.13 200 / 0.25);
    --selection-fg: oklch(0.2 0.02 248);
    --grain-opacity: 0.02;
    --tint: oklch(0.2 0.02 248 / 0.04);
    --tint-strong: oklch(0.2 0.02 248 / 0.07);
    --header-bg: oklch(0.985 0.004 240 / 0.8);
    --overlay-bg: oklch(1 0 0 / 0.97);
  }
}

/* theme toggle button */
.theme-btn { display:inline-flex; align-items:center; justify-content:center; width:42px; height:42px; border-radius:999px; border:1px solid var(--border); background:var(--tint); color:var(--foreground); }
.theme-btn svg { width:18px; height:18px; }
body { transition: background-color .4s ease, color .4s ease; }

/* Logo stays legible on light theme (white lockup -> dark) */
:root.light img[alt="pprintdim"] {
  filter: invert(1) hue-rotate(180deg) brightness(1.05);
}
@media (prefers-color-scheme: light) {
  :root:not(.dark):not(.light) img[alt="pprintdim"] {
    filter: invert(1) hue-rotate(180deg) brightness(1.05);
  }
}

/* ============================================================
   Animated brand logo (inline SVG)
   ============================================================ */
.brand-logo { overflow: visible; color: var(--foreground); }
.brand-logo__edge {
  fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: logoDraw 1.15s cubic-bezier(0.6,0.05,0.2,1) forwards;
}
.brand-logo__edge--inner { animation-delay: 0.4s; }
.brand-logo__edge--accent { animation-delay: 0.75s; stroke-width: 2.2; }
@keyframes logoDraw { to { stroke-dashoffset: 0; } }
.brand-logo__word {
  fill: currentColor; font-family: var(--font-display); font-weight: 500;
  letter-spacing: 0.5px; opacity: 0; transform: translateX(10px);
  transform-box: fill-box; animation: logoWord 0.7s cubic-bezier(0.6,0.05,0.2,1) 0.7s forwards;
  transition: fill 0.3s ease;
}
@keyframes logoWord { to { opacity: 1; transform: translateX(0); } }
.brand-logo__cube {
  transform-box: fill-box; transform-origin: center;
  transition: transform 0.5s cubic-bezier(0.6,0.05,0.2,1);
}
.logo:hover .brand-logo__cube, .site-footer a:hover .brand-logo__cube {
  animation: logoSpin 0.9s cubic-bezier(0.65,0,0.35,1);
}
@keyframes logoSpin {
  0% { transform: rotate(0deg) scale(1); }
  35% { transform: rotate(-10deg) scale(1.09); }
  70% { transform: rotate(6deg) scale(1.04); }
  100% { transform: rotate(0deg) scale(1); }
}
.logo:hover .brand-logo__word, .site-footer a:hover .brand-logo__word { fill: var(--accent); }
.logo:hover .brand-logo__edge--accent, .site-footer a:hover .brand-logo__edge--accent { animation: logoPulse 0.9s ease; }
@keyframes logoPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  .brand-logo__edge, .brand-logo__word { animation: none; opacity: 1; stroke-dashoffset: 0; transform: none; }
  .logo:hover .brand-logo__cube, .site-footer a:hover .brand-logo__cube, .logo:hover .brand-logo__edge--accent { animation: none; }
}

/* =========================================================
   Heading typewriter ("writing") reveal on scroll
   ========================================================= */
.th-split .th-char { opacity: 0; transition: opacity 0.12s ease; will-change: opacity; }
.th-split .th-char.th-on { opacity: 1; }
/* Re-apply gradient clip per character so highlighted heading words stay visible */
.th-split .th-char--grad-primary {
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.th-split .th-char--grad-text {
  background: var(--gradient-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.th-split .th-char.th-cur { position: relative; }
.th-split .th-char.th-cur::after {
  content: ""; position: absolute; right: -0.07em; top: 0.08em; bottom: 0.08em;
  width: 0.07em; border-radius: 1px; background: var(--primary);
  animation: th-blink 0.85s steps(1) infinite;
}
@keyframes th-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .th-split .th-char { opacity: 1 !important; transition: none; }
  .th-split .th-char.th-cur::after { display: none; }
}

/* ---------- Mobile fixes (small screens) ---------- */
@media (max-width: 680px){
  .section { padding: 2.2rem 0; }
  .section-head { margin-bottom: 1.6rem; }
  .hero { padding: 6rem 0 2.5rem; }
  .trust { padding: 1.8rem 0; }
  .site-footer { padding: 2.5rem 0 1.6rem; margin-top: 1.2rem; }
  .hero-grid { gap: 2rem; }
  .hero-visual { margin: 0 6px; }
  .fc-1 { top: -14px; right: 6px; }
  .fc-2 { bottom: -14px; left: 6px; }
  .floating-card { padding: 0.6rem 0.85rem; }
  .floating-card .big { font-size: 1.15rem; }
  .cta-box { padding: 2rem 1.25rem; }
  .page-hero { padding: 5.5rem 0 2rem; }
  .tg-float { bottom: 1rem; right: 1rem; padding: 0.65rem 1rem; font-size: 0.85rem; }
  .ppd-scope .ppd-cta { padding: 2rem 1.25rem; }
}
@media (max-width: 480px){
  .ppd-scope .ppd-steps { grid-template-columns: 1fr; }
  .ppd-scope .ppd-wrap { padding: 40px 16px; }
  .stat { padding: 1.15rem 0.75rem; }
  .price-card, .card { padding: 1.4rem 1.1rem; }
  .calc-panel, .calc-result { padding: 1.25rem 1rem; }
  .ppr-scope .ppr-score { padding: 12px 14px; }
}
@media (max-width: 400px){
  .container { padding: 0 1rem; }
  .logo img, .logo svg.brand-logo { height: 24px; }
  .theme-btn { width: 36px; height: 36px; }
  .header-actions { gap: 0.45rem; }
  .lang-btn { padding: 0.4rem 0.55rem; font-size: 0.8rem; }
  .header-inner { height: 64px; }
  .mobile-nav { inset: 64px 0 0; }
  .footer-bottom { font-size: 0.78rem; line-height: 1.7; }
}

/* ---------- Case modal (portfolio popup) ---------- */
.case-modal { position: fixed; inset: 0; z-index: 100; display: none; }
.case-modal.open { display: block; }
.case-modal__backdrop { position: absolute; inset: 0; background: oklch(0.05 0.02 248 / 0.7); backdrop-filter: blur(6px); }
.case-modal__panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  overflow-y: auto; border-radius: 20px; display: grid; grid-template-columns: 1.1fr 1fr;
}
.case-modal__media img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 240px; }
.case-modal__body { padding: 1.8rem; display: flex; flex-direction: column; gap: 0.7rem; }
.case-modal__body h3 { font-size: 1.4rem; }
.case-modal__body #cmText { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.case-modal__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: auto; padding-top: 1rem; }
.case-modal__close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--overlay-bg); color: var(--foreground); font-size: 1rem;
}
@media (max-width: 760px){
  .case-modal__panel { grid-template-columns: 1fr; }
  .case-modal__media img { max-height: 240px; }
}
