/* ============================================================
   Pixveil — style.css
   Design system, themes, layout, components, animations.
   Mobile-first. Breakpoints: 480 / 768 / 1024 / 1280.
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Light theme (default) */
  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --text: #0F1B2D;
  --text-muted: #52627A;
  --primary: #2563EB;
  --primary-2: #7C3AED;
  --accent: #F59E0B;
  --accent-text: #241A02;
  --border: #E3E9F2;
  --shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 8px 24px rgba(15, 27, 45, .07);
  --shadow-lift: 0 4px 8px rgba(15, 27, 45, .08), 0 16px 40px rgba(37, 99, 235, .16);
  --grad: linear-gradient(135deg, var(--primary), var(--primary-2));
  --radius: 14px;
  --radius-sm: 9px;
  --header-h: 68px;
  --font-head: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0B1220;
  --surface: #121B2E;
  --text: #EDF2FA;
  --text-muted: #9AA8BF;
  --primary: #3B82F6;
  --primary-2: #8B5CF6;
  --accent: #FBBF24;
  --accent-text: #241A02;
  --border: #22304A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lift: 0 4px 8px rgba(0, 0, 0, .4), 0 16px 40px rgba(59, 130, 246, .22);
  color-scheme: dark;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  transition: background-color .3s ease, color .3s ease;
}
img, svg, canvas, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 .6em;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.35rem); font-weight: 600; }
p  { margin: 0 0 1em; }

.container { width: min(1200px, 92%); margin-inline: auto; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 2.5rem; }
.section-head p { color: var(--text-muted); }
.muted { color: var(--text-muted); }

/* Visible focus rings (accessibility) */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: #fff; padding: .6rem 1rem; z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 600;
  font-family: var(--font-head);
  font-size: .97rem;
  transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease, color .3s ease, border-color .3s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); text-decoration: none; }
.btn:active { transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: var(--accent-text); }
.btn-accent:hover { filter: brightness(1.05); }
.btn-primary { background: var(--grad); color: #fff; }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: .5rem 1.05rem; font-size: .88rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s ease, background-color .3s ease;
}
.site-header.scrolled { box-shadow: var(--shadow); }
.header-inner {
  display: flex; align-items: center; gap: 1.25rem;
  height: var(--header-h);
}
.logo {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-head); font-size: 1.3rem; color: var(--text);
  text-decoration: none; flex-shrink: 0;
}
.logo:hover { text-decoration: none; }
.logo .logo-pix { font-weight: 800; }
.logo .logo-veil { font-weight: 400; }
.logo svg { width: 34px; height: 34px; }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.main-nav > ul { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-link {
  display: inline-block; padding: .55rem .9rem; border-radius: var(--radius-sm);
  color: var(--text); font-weight: 500; font-size: .95rem;
  transition: background-color .25s ease, color .25s ease;
}
.nav-link:hover, .nav-link[aria-current="page"] { background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); text-decoration: none; }

/* Tools dropdown */
.nav-drop { position: relative; }
.nav-drop-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 250px; padding: .5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lift);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  list-style: none; margin: 0; z-index: 110;
}
.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-drop-menu a {
  display: block; padding: .5rem .8rem; border-radius: var(--radius-sm);
  color: var(--text); font-size: .92rem; transition: background-color .2s ease, color .2s ease;
}
.nav-drop-menu a:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); text-decoration: none; }
.nav-drop-menu a strong { color: var(--primary); }

/* Theme toggle (sun/moon morph) */
.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); transition: background-color .3s ease, transform .3s ease, border-color .3s ease;
  flex-shrink: 0;
}
.theme-toggle:hover { transform: rotate(15deg) scale(1.06); border-color: var(--primary); }
.theme-toggle svg { width: 21px; height: 21px; }
.theme-toggle .sun-core, .theme-toggle .rays line, .theme-toggle .moon-mask {
  transition: all .3s ease;
  transform-origin: center;
}
[data-theme="dark"] .theme-toggle .rays { opacity: 0; }
[data-theme="dark"] .theme-toggle .rays line { transform: scale(.2); }
[data-theme="dark"] .theme-toggle .sun-core { r: 8.2; }
[data-theme="dark"] .theme-toggle .moon-mask { transform: translate(0, 0); }
.theme-toggle .moon-mask { transform: translate(12px, -12px); }

/* Hamburger */
.hamburger {
  display: none;
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.hamburger span {
  display: block; width: 20px; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform .3s ease, opacity .3s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(4, 10, 22, .5);
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s; z-index: 118;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 85vw);
  background: var(--surface); z-index: 120; padding: 1.25rem;
  transform: translateX(100%); transition: transform .35s cubic-bezier(.22, .8, .3, 1);
  overflow-y: auto; border-left: 1px solid var(--border);
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer ul { list-style: none; margin: 1rem 0 0; padding: 0; }
.mobile-drawer a {
  display: block; padding: .8rem .6rem; color: var(--text); font-weight: 500;
  border-bottom: 1px solid var(--border); transition: color .2s ease, padding-left .2s ease;
}
.mobile-drawer a:hover { color: var(--primary); padding-left: 1rem; text-decoration: none; }
.mobile-drawer .drawer-close {
  margin-left: auto; display: flex; width: 38px; height: 38px; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 1.1rem;
}
.mobile-drawer .drawer-sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin: 1.2rem 0 0; }

@media (max-width: 768px) {
  .main-nav { display: none; }
  .hamburger { display: flex; margin-left: auto; }
  .theme-toggle { margin-left: .25rem; }
}
@media (min-width: 769px) { .theme-toggle { margin-left: .5rem; } }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
}
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto;
  height: 140%; pointer-events: none;
  background:
    radial-gradient(600px 420px at 78% 30%, color-mix(in srgb, var(--primary-2) 16%, transparent), transparent 70%),
    radial-gradient(520px 380px at 15% 10%, color-mix(in srgb, var(--primary) 13%, transparent), transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero .eyebrow {
  display: inline-block; padding: .3rem .9rem; border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary); font-weight: 600; font-size: .85rem; margin-bottom: 1rem;
}
.hero h1 .grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { font-size: clamp(1.02rem, 2vw, 1.18rem); color: var(--text-muted); max-width: 560px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .9rem; margin: 1.6rem 0 1.4rem; }
.trust-badges { display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; padding: 0; margin: 0; list-style: none; color: var(--text-muted); font-size: .9rem; }
.trust-badges li { display: flex; align-items: center; gap: .4rem; }
.trust-badges svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }

/* Hero visual: floating before/after cards */
.hero-visual { position: relative; min-height: 340px; }
.hero-visual .glow {
  position: absolute; inset: 10% 5%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 26%, transparent), transparent);
  filter: blur(10px);
}
.float-card {
  position: absolute; width: 62%; padding: 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lift);
  animation: floaty 6s ease-in-out infinite;
}
.float-card .fc-img {
  height: 110px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #60A5FA, #A78BFA 55%, #F472B6);
}
.float-card .fc-img.compressed { filter: saturate(1.15); }
.float-card .fc-meta { display: flex; justify-content: space-between; align-items: center; margin-top: .7rem; font-size: .82rem; }
.float-card .fc-size { font-weight: 700; font-family: var(--font-head); }
.float-card .fc-badge { padding: .15rem .6rem; border-radius: 999px; font-weight: 600; font-size: .72rem; }
.fc-before { top: 4%; left: 0; animation-delay: 0s; }
.fc-before .fc-badge { background: color-mix(in srgb, var(--text-muted) 15%, transparent); color: var(--text-muted); }
.fc-after { bottom: 4%; right: 0; animation-delay: 1.2s; z-index: 2; }
.fc-after .fc-badge { background: color-mix(in srgb, #16A34A 16%, transparent); color: #16A34A; }
.fc-arrow {
  position: absolute; top: 46%; left: 46%; z-index: 3;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lift); animation: floaty 6s ease-in-out infinite .6s;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* Staggered entrance */
.fade-up { opacity: 0; transform: translateY(22px); animation: fadeUp .7s ease forwards; }
.fade-up.d1 { animation-delay: .08s; } .fade-up.d2 { animation-delay: .18s; }
.fade-up.d3 { animation-delay: .28s; } .fade-up.d4 { animation-delay: .38s; }
.fade-up.d5 { animation-delay: .5s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- 6. Search + filters ---------- */
.toolbar { position: relative; z-index: 2; margin-top: -1rem; }
.search-wrap { position: relative; max-width: 640px; margin: 0 auto 1.4rem; }
.search-wrap svg { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--text-muted); }
#tool-search {
  width: 100%; padding: 1rem 1.2rem 1rem 3rem;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow); font-size: 1rem; color: var(--text);
  transition: border-color .25s ease, box-shadow .25s ease;
}
#tool-search:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.chip {
  padding: .45rem 1.05rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); font-weight: 500; font-size: .88rem;
  transition: all .25s ease;
}
.chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; }

/* ---------- 7. Tools grid ---------- */
.tools-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem;
  margin-top: 2rem;
}
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: .55rem;
  padding: 1.35rem 1.25rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  color: var(--text);
}
.tool-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: var(--radius);
  padding: 1px; background: var(--grad); opacity: 0;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  transition: opacity .3s ease; pointer-events: none;
}
.tool-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); text-decoration: none; }
.tool-card:hover::before { opacity: 1; }
.tool-card .tc-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary); transition: transform .3s ease;
}
.tool-card:hover .tc-icon { transform: scale(1.12); }
.tool-card .tc-icon svg { width: 24px; height: 24px; }
.tool-card h3 { font-size: 1.02rem; margin: 0; }
.tool-card p { font-size: .86rem; color: var(--text-muted); margin: 0; flex-grow: 1; }
.tool-card .tc-link { font-size: .88rem; font-weight: 600; color: var(--primary); }
.tool-card.hidden { display: none; }
.no-results { text-align: center; color: var(--text-muted); padding: 2.5rem 0; display: none; }

@media (max-width: 1024px) { .tools-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .tools-grid { grid-template-columns: 1fr; } }

/* ---------- 8. How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; position: relative; counter-reset: step; }
.step {
  position: relative; text-align: center; padding: 2rem 1.4rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.step .step-icon {
  width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%;
  background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.step .step-icon svg { width: 28px; height: 28px; }
.step .step-num {
  position: absolute; top: 12px; left: 14px; font-family: var(--font-head);
  font-weight: 800; font-size: .85rem; color: var(--text-muted); opacity: .7;
}
.steps::before {
  content: ""; position: absolute; top: 50%; left: 8%; right: 8%; height: 2px; z-index: -1;
  background: repeating-linear-gradient(90deg, var(--primary) 0 12px, transparent 12px 24px);
  background-size: 200% 100%;
  animation: dashMove 18s linear infinite;
  opacity: .45;
}
@keyframes dashMove { to { background-position: -200% 0; } }
@media (max-width: 768px) { .steps { grid-template-columns: 1fr; } .steps::before { display: none; } }

/* ---------- 9. Feature cards ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature {
  padding: 1.6rem 1.4rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .3s ease, box-shadow .3s ease;
}
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.feature .f-icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: .9rem;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
}
.feature .f-icon svg { width: 22px; height: 22px; }
.feature p { color: var(--text-muted); font-size: .93rem; margin: 0; }
@media (max-width: 1024px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .features { grid-template-columns: 1fr; } }

/* ---------- 10. SEO content sections ---------- */
.prose { max-width: 800px; margin-inline: auto; }
.prose p { color: var(--text-muted); }
.prose h2, .prose h3 { color: var(--text); }
.prose a { font-weight: 600; }
.prose a:hover { text-decoration: underline; }
.cat-block { padding: 1.6rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 1.2rem; }
.cat-block h3 { margin-bottom: .4rem; }
.cat-block p { margin: 0; color: var(--text-muted); font-size: .95rem; }

/* ---------- 11. FAQ accordion ---------- */
.faq { max-width: 800px; margin-inline: auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: .8rem; overflow: hidden; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 1.3rem; background: none; border: none; text-align: left;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem; color: var(--text);
  transition: color .25s ease;
}
.faq-q:hover { color: var(--primary); }
.faq-q .faq-icon { flex-shrink: 0; width: 22px; height: 22px; color: var(--primary); transition: transform .3s ease; }
.faq-item.open .faq-q .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a-inner { padding: 0 1.3rem 1.2rem; color: var(--text-muted); font-size: .95rem; }

/* ---------- 12. CTA band ---------- */
.cta-band {
  background: var(--grad); color: #fff; text-align: center;
  padding: clamp(3rem, 6vw, 4.5rem) 0; position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(500px 300px at 80% 20%, rgba(255,255,255,.15), transparent 70%);
}
.cta-band h2 { color: #fff; position: relative; }
.cta-band p { color: rgba(255,255,255,.85); position: relative; }
.cta-band .btn-accent { position: relative; }

/* ---------- 13. Footer ---------- */
.site-footer {
  position: relative; background: var(--surface);
  border-top: 1px solid var(--border); margin-top: auto;
}
.site-footer::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--accent), var(--primary));
  background-size: 300% 100%;
  animation: shimmer 8s linear infinite;
}
@keyframes shimmer { to { background-position: -300% 0; } }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.2rem;
  padding: 3.2rem 0 2.2rem;
}
.footer-col h4 {
  position: relative; font-size: .95rem; margin-bottom: 1.1rem; padding-bottom: .5rem;
}
.footer-col h4::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 26px;
  background: var(--grad); border-radius: 2px; transition: width .35s ease;
}
.footer-col:hover h4::after { width: 58px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .55rem; }
.footer-link {
  position: relative; color: var(--text-muted); font-size: .92rem;
  transition: color .3s ease; padding-bottom: 2px;
}
.footer-link::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: var(--primary); transition: width .3s ease;
}
.footer-link:hover { color: var(--primary); text-decoration: none; }
.footer-link:hover::after { width: 100%; }
.footer-brand p { font-size: .9rem; color: var(--text-muted); margin: .9rem 0 1.1rem; }

/* Social icons */
.socials { display: flex; gap: .7rem; }
.social-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--text-muted) 12%, transparent);
  color: var(--text-muted);
  transition: all .3s ease;
}
.social-btn svg { width: 18px; height: 18px; fill: currentColor; }
.social-btn:hover { transform: translateY(-4px) scale(1.1); color: #fff; text-decoration: none; }
.social-btn.facebook:hover { background: #1877F2; box-shadow: 0 8px 20px rgba(24, 119, 242, .45); }
.social-btn.twitter:hover { background: #000000; color: #FFFFFF; box-shadow: 0 8px 20px rgba(0, 0, 0, .45); }
[data-theme="dark"] .social-btn.twitter:hover { background: #FFFFFF; color: #000000; box-shadow: 0 8px 20px rgba(255, 255, 255, .25); }
.social-btn.instagram:hover { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4); box-shadow: 0 8px 20px rgba(221, 42, 123, .45); }
.social-btn.youtube:hover { background: #FF0000; box-shadow: 0 8px 20px rgba(255, 0, 0, .45); }

/* Newsletter */
.newsletter-form { display: flex; gap: .5rem; margin-top: .8rem; }
.newsletter-form input {
  flex: 1; min-width: 0; padding: .65rem .9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  transition: border-color .25s ease;
}
.newsletter-form input:focus { border-color: var(--primary); outline: none; }
.newsletter-form button {
  padding: .65rem 1.1rem; border: none; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-text); font-weight: 700;
  transition: transform .25s ease, filter .25s ease;
}
.newsletter-form button:hover { transform: translateY(-2px); filter: brightness(1.06); }
.newsletter-msg { font-size: .85rem; margin-top: .5rem; color: #16A34A; display: none; }
.footer-support { font-size: .88rem; color: var(--text-muted); margin-top: 1rem; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.2rem 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
  font-size: .85rem; color: var(--text-muted);
}
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; } .footer-bottom { justify-content: center; text-align: center; } }

/* ---------- 14. Page hero (inner pages) ---------- */
.page-hero { padding: clamp(2.5rem, 6vw, 4rem) 0 1rem; text-align: center; }
.page-hero p { color: var(--text-muted); max-width: 640px; margin-inline: auto; }
.breadcrumbs { font-size: .85rem; color: var(--text-muted); margin-bottom: 1rem; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }

/* Stats strip (About) */
.stats-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin: 2rem 0; }
.stat {
  text-align: center; padding: 1.6rem 1rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
}
.stat .stat-num {
  font-family: var(--font-head); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem);
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .stat-label { color: var(--text-muted); font-size: .9rem; }
@media (max-width: 600px) { .stats-strip { grid-template-columns: 1fr; } }

/* ---------- 15. Forms (Contact) ---------- */
.form-card {
  max-width: 640px; margin-inline: auto; padding: 2rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form-row { margin-bottom: 1.1rem; }
.form-row label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: .75rem .95rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--primary); outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
}
.form-row textarea { min-height: 140px; resize: vertical; }
.form-error { color: #DC2626; font-size: .82rem; margin-top: .3rem; display: none; }
.form-row.invalid input, .form-row.invalid select, .form-row.invalid textarea { border-color: #DC2626; }
.form-row.invalid .form-error { display: block; }
.form-success {
  display: none; text-align: center; padding: 2rem 1rem;
}
.form-success.show { display: block; }
.form-success .check-icon {
  width: 60px; height: 60px; margin: 0 auto 1rem; border-radius: 50%;
  background: color-mix(in srgb, #16A34A 15%, transparent); color: #16A34A;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- 16. Legal pages ---------- */
.legal { max-width: 780px; margin-inline: auto; }
.legal h2 { font-size: 1.35rem; margin-top: 2.2rem; }
.legal h3 { font-size: 1.1rem; margin-top: 1.6rem; }
.legal p, .legal li { color: var(--text-muted); font-size: .97rem; }
.legal .effective { font-size: .88rem; padding: .6rem 1rem; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ---------- 17. Tool pages ---------- */
.tool-page-head { text-align: center; padding: clamp(2rem, 5vw, 3.2rem) 0 1.4rem; }
.tool-page-head .tool-badge {
  display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .85rem;
  border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary);
  margin-bottom: .9rem;
}
.tool-shell {
  max-width: 860px; margin: 0 auto 1.5rem; padding: 1.6rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.2rem) 1.4rem; text-align: center; cursor: pointer;
  transition: border-color .25s ease, background-color .25s ease, transform .25s ease;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}
.dropzone.dragover { transform: scale(1.01); }
.dropzone .dz-icon {
  width: 62px; height: 62px; margin: 0 auto 1rem; border-radius: 50%;
  background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center;
}
.dropzone .dz-icon svg { width: 28px; height: 28px; }
.dropzone h2 { font-size: 1.15rem; margin-bottom: .3rem; }
.dropzone p { color: var(--text-muted); font-size: .9rem; margin: 0; }
.dropzone .dz-formats { font-size: .78rem; margin-top: .6rem; opacity: .8; }
.dropzone input[type="file"] { display: none; }

.tool-work { display: none; }
.tool-work.active { display: block; }
.preview-wrap {
  position: relative; background:
    repeating-conic-gradient(color-mix(in srgb, var(--text-muted) 12%, transparent) 0% 25%, transparent 0% 50%) 50% / 22px 22px;
  border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  min-height: 240px; max-height: 460px; overflow: hidden; margin-bottom: 1.2rem;
}
.preview-wrap img, .preview-wrap canvas { max-height: 440px; width: auto; max-width: 100%; object-fit: contain; }
.tool-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.tool-options .opt { display: flex; flex-direction: column; gap: .35rem; }
.tool-options .opt.full { grid-column: 1 / -1; }
.tool-options label { font-weight: 600; font-size: .88rem; }
.tool-options .opt-val { color: var(--primary); font-weight: 700; }
.tool-options input[type="range"] { accent-color: var(--primary); width: 100%; }
.tool-options input[type="number"], .tool-options input[type="text"], .tool-options select {
  padding: .6rem .8rem; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg); color: var(--text); width: 100%;
}
.tool-options input[type="color"] { width: 100%; height: 42px; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); }
.tool-options .checkbox-opt { flex-direction: row; align-items: center; gap: .5rem; }
.tool-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.tool-status { font-size: .88rem; color: var(--text-muted); }
.tool-status.ok { color: #16A34A; font-weight: 600; }
.tool-status.err { color: #DC2626; font-weight: 600; }
.file-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .85rem; color: var(--text-muted); margin-bottom: 1rem; }
.file-meta strong { color: var(--text); }
.tool-about { max-width: 860px; margin: 2.5rem auto 0; }
.tool-about h2 { font-size: 1.3rem; }
.tool-about p { color: var(--text-muted); font-size: .96rem; }
.related-tools { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.related-tools a {
  padding: .45rem 1rem; border-radius: 999px; font-size: .86rem; font-weight: 500;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  transition: all .25s ease;
}
.related-tools a:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); text-decoration: none; }
.result-box { display: none; padding: 1rem 1.2rem; border-radius: var(--radius-sm); background: color-mix(in srgb, #16A34A 8%, transparent); border: 1px solid color-mix(in srgb, #16A34A 30%, transparent); margin-bottom: 1rem; font-size: .92rem; }
.result-box.show { display: block; }
.output-textarea { width: 100%; min-height: 130px; font-family: monospace; font-size: .8rem; padding: .8rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.palette-out, .picker-out { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.swatch { width: 84px; text-align: center; font-size: .72rem; color: var(--text-muted); cursor: pointer; }
.swatch .sw-color { height: 56px; border-radius: var(--radius-sm); border: 1px solid var(--border); margin-bottom: .3rem; }
.exif-table { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 1rem; }
.exif-table th, .exif-table td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--border); }
.exif-table th { color: var(--text); font-weight: 600; width: 40%; }
.exif-table td { color: var(--text-muted); word-break: break-word; }
.thumbs { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.thumbs .thumb { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; width: 110px; }
.thumbs .thumb img, .thumbs .thumb canvas { width: 100%; height: 80px; object-fit: cover; }
.thumbs .thumb a { display: block; text-align: center; font-size: .74rem; padding: .3rem; }

@media (max-width: 600px) {
  .tool-options { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 300px; }
}
@media (max-width: 1024px) and (min-width: 601px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; margin-inline: auto; width: 100%; }
}

/* ---------- 18. Utility & motion preferences ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-up, .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .hero-visual { display: none; }
}

/* ---------- 19. Calculators ---------- */
.calc-results { display: none; margin-top: 1.4rem; border-top: 2px dashed var(--border); padding-top: 1.2rem; }
.calc-results.show { display: block; }
.stat-rows { display: grid; gap: .55rem; }
.stat-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .75rem 1rem; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--primary) 6%, transparent);
  border: 1px solid var(--border);
}
.stat-row .sr-label { font-weight: 600; font-size: .92rem; }
.stat-row .sr-label small { display: block; font-weight: 400; color: var(--text-muted); font-size: .78rem; }
.stat-row .sr-value {
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--primary);
  text-align: right; white-space: nowrap;
}
.stat-row.hero-stat { background: var(--grad); border: none; }
.stat-row.hero-stat .sr-label, .stat-row.hero-stat .sr-value { color: #fff; }
.stat-row.hero-stat .sr-label small { color: rgba(255,255,255,.8); }
.calc-note { font-size: .82rem; color: var(--text-muted); margin-top: .9rem; }

/* Keypad calculator */
.keypad-wrap { max-width: 420px; margin-inline: auto; }
.keypad-display {
  width: 100%; text-align: right; font-family: var(--font-head); font-size: 1.6rem; font-weight: 700;
  padding: 1rem 1.1rem; margin-bottom: .35rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.keypad-prev { min-height: 1.3em; text-align: right; color: var(--text-muted); font-size: .85rem; margin-bottom: .6rem; padding-right: .3rem; }
.keypad { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.keypad.sci { grid-template-columns: repeat(5, 1fr); }
.keypad button {
  padding: .85rem 0; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: var(--font-head);
  font-weight: 600; font-size: 1.02rem; transition: all .15s ease;
}
.keypad button:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.keypad button.op { background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); }
.keypad button.eq { background: var(--grad); color: #fff; border: none; grid-column: 1 / -1; }
.keypad button.danger { color: #DC2626; }
.keypad button.fn { font-size: .85rem; }
@media (max-width: 480px) { .keypad button { padding: .75rem 0; } }

/* ---------- 20. Blog ---------- */
.blog-hero { padding: clamp(2rem, 5vw, 3.5rem) 0 1rem; }
.blog-hero .eyebrow-cat {
  display: inline-block; padding: .3rem .9rem; border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary); font-weight: 600; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 1rem;
}
.blog-hero h1 { max-width: 900px; }
.blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.1rem; color: var(--text-muted); font-size: .9rem; margin-top: 1rem; }
.blog-meta .author { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--text); }
.blog-meta .author .avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: .85rem;
}
.blog-meta .dot { opacity: .5; }
.article-cover {
  width: 100%; aspect-ratio: 1200/500; border-radius: var(--radius);
  overflow: hidden; margin: 1.5rem 0 2rem; box-shadow: var(--shadow);
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; max-width: 820px; margin-inline: auto; }
.toc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem 1.4rem; margin: 0 0 2rem;
}
.toc h2 { font-size: 1rem; margin: 0 0 .6rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin-bottom: .4rem; }
.toc a { color: var(--text); font-size: .95rem; }
.toc a:hover { color: var(--primary); text-decoration: underline; }
.article-body { font-size: 1.06rem; line-height: 1.8; }
.article-body h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 2.2rem 0 .8rem; scroll-margin-top: 90px; }
.article-body h3 { font-size: 1.2rem; margin: 1.6rem 0 .6rem; scroll-margin-top: 90px; }
.article-body p { color: var(--text); margin-bottom: 1.1rem; }
.article-body ul, .article-body ol { margin: 0 0 1.2rem; padding-left: 1.4rem; }
.article-body li { margin-bottom: .5rem; }
.article-body a { color: var(--primary); font-weight: 600; }
.article-body a:hover { text-decoration: underline; }
.article-body strong { color: var(--text); }
.article-body blockquote {
  margin: 1.4rem 0; padding: .8rem 1.3rem; border-left: 3px solid var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, transparent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted); font-style: italic;
}
.article-body .callout {
  margin: 1.6rem 0; padding: 1.1rem 1.3rem; border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); font-style: normal;
}
.article-body .callout strong { color: var(--text); }
.tool-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 1.8rem 0; padding: 1.3rem 1.5rem; border-radius: var(--radius);
  background: var(--grad); color: #fff;
}
.tool-cta .cta-text { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; }
.tool-cta .btn-accent { flex-shrink: 0; }
.article-table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .95rem; }
.article-table th, .article-table td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--border); }
.article-table th { background: color-mix(in srgb, var(--primary) 8%, transparent); font-weight: 700; }
.article-table tr:hover td { background: color-mix(in srgb, var(--primary) 4%, transparent); }
.author-box {
  display: flex; gap: 1rem; align-items: flex-start; margin: 2.5rem 0 0;
  padding: 1.4rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.author-box .avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--grad); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem;
}
.author-box h3 { margin: 0 0 .2rem; font-size: 1.05rem; }
.author-box p { margin: 0; color: var(--text-muted); font-size: .92rem; }

/* Blog index grid */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.blog-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); text-decoration: none; }
.blog-card .bc-cover { aspect-ratio: 1200/630; overflow: hidden; }
.blog-card .bc-cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-card .bc-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; flex-grow: 1; }
.blog-card .bc-cat { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); margin-bottom: .5rem; }
.blog-card h2 { font-size: 1.12rem; margin: 0 0 .5rem; color: var(--text); line-height: 1.3; }
.blog-card p { font-size: .9rem; color: var(--text-muted); margin: 0 0 1rem; flex-grow: 1; }
.blog-card .bc-meta { font-size: .8rem; color: var(--text-muted); }
@media (max-width: 1024px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }
