/* ============================================================
   Dynamize Group — UI overhaul design system
   Bold & energetic · magenta brand · geometric sans
   ============================================================ */

:root {
  /* Brand magenta scale (brand = #C070B0) */
  --m-50:  oklch(0.97 0.012 340);
  --m-100: oklch(0.94 0.028 340);
  --m-200: oklch(0.88 0.055 342);
  --m-300: oklch(0.80 0.090 344);
  --m-400: oklch(0.72 0.120 345);
  --m-500: oklch(0.655 0.135 345);  /* brand #C070B0 */
  --m-600: oklch(0.575 0.150 346);  /* primary action */
  --m-700: oklch(0.50 0.150 347);
  --m-800: oklch(0.40 0.120 348);

  /* Violet companion (same chroma family, hue shifted) — used only in gradients */
  --v-500: oklch(0.60 0.150 305);
  --v-600: oklch(0.52 0.155 300);

  /* Ink — plum-tinted near black */
  --ink-900: oklch(0.20 0.028 320);
  --ink-800: oklch(0.27 0.026 320);
  --ink-700: oklch(0.36 0.022 320);
  --ink-600: oklch(0.46 0.018 320);
  --ink-500: oklch(0.56 0.014 320);
  --ink-400: oklch(0.66 0.012 320);

  /* Surfaces — warm-neutral off whites */
  --bg:       oklch(0.985 0.004 330);
  --surface:  oklch(1 0 0);
  --surface-2:oklch(0.975 0.006 332);
  --tint:     oklch(0.965 0.012 338);
  --line:     oklch(0.91 0.008 330);
  --line-2:   oklch(0.86 0.010 330);

  --primary: var(--m-600);
  --primary-ink: var(--ink-900);

  /* Type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Shadows (soft, plum-tinted) */
  --sh-xs: 0 1px 2px oklch(0.30 0.03 320 / 0.06);
  --sh-sm: 0 2px 6px oklch(0.30 0.03 320 / 0.07), 0 1px 2px oklch(0.30 0.03 320 / 0.05);
  --sh-md: 0 10px 30px oklch(0.30 0.03 320 / 0.10), 0 2px 8px oklch(0.30 0.03 320 / 0.06);
  --sh-lg: 0 24px 60px oklch(0.30 0.03 320 / 0.14), 0 8px 20px oklch(0.30 0.03 320 / 0.08);
  --sh-brand: 0 16px 40px oklch(0.575 0.15 346 / 0.30);

  /* Layout */
  --container: 1180px;
  --container-narrow: 860px;
  --gutter: clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }

/* Sticky footer: app fills the viewport, main grows, footer sits at the bottom */
#root { display: flex; flex-direction: column; min-height: 100vh; }
#root > main { flex: 1 0 auto; }
.footer { flex-shrink: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink-800);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-900);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--m-200); color: var(--ink-900); }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.container.narrow { max-width: var(--container-narrow); }

.section { padding-block: calc(clamp(38px, 5.2vw, 76px) * var(--section-scale, 1)); }
.section.tight { padding-block: calc(clamp(26px, 3.5vw, 48px) * var(--section-scale, 1)); }

.stack { display: flex; flex-direction: column; }

/* ---------- Type scale ---------- */
.display {
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.lead {
  font-size: clamp(1.1rem, 1.7vw, 1.32rem);
  line-height: 1.55;
  color: var(--ink-700);
}
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--m-600);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--m-500);
  border-radius: 2px;
}
.muted { color: var(--ink-500); }
.grad-text {
  background: linear-gradient(100deg, var(--m-600), var(--v-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .22s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--m-600);
  color: white;
  box-shadow: var(--sh-brand);
}
.btn-primary:hover { background: var(--m-700); transform: translateY(-2px); box-shadow: 0 22px 48px oklch(0.575 0.15 346 / 0.38); }
.btn-dark { background: var(--ink-900); color: white; }
.btn-dark:hover { background: var(--ink-800); transform: translateY(-2px); box-shadow: var(--sh-md); }
.btn-ghost {
  background: var(--surface);
  color: var(--ink-900);
  border-color: var(--line-2);
  box-shadow: var(--sh-xs);
}
.btn-ghost:hover { border-color: var(--m-400); color: var(--m-700); transform: translateY(-2px); box-shadow: var(--sh-sm); }
.btn-link {
  padding: 0; background: none;
  color: var(--m-700); font-weight: 600;
  font-family: var(--font-display);
}
.btn-link .arrow { transition: transform .2s ease; }
.btn-link:hover .arrow { transform: translateX(4px); }
.btn-lg { padding: 17px 30px; font-size: 1.06rem; }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  transition: transform .22s ease, box-shadow .25s ease, border-color .25s ease;
}
.card.hoverable:hover { transform: translateY(-5px); box-shadow: var(--sh-md); border-color: var(--line-2); }

/* ---------- Chips / pills ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 0.82rem;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--tint);
  color: var(--m-700);
  border: 1px solid var(--m-100);
}

/* ---------- Pill nav badge ---------- */
.badge-soft {
  display:inline-flex; align-items:center; gap:8px;
  background: var(--m-50); color: var(--m-700);
  border:1px solid var(--m-100);
  border-radius: var(--r-pill);
  padding: 6px 14px 6px 8px;
  font-size: 0.84rem; font-weight: 600;
  font-family: var(--font-display);
}
.badge-soft .dot { width:8px; height:8px; border-radius:50%; background: var(--m-500); box-shadow:0 0 0 4px var(--m-100); }

/* ---------- Image placeholders ---------- */
.ph {
  position: relative;
  border-radius: var(--r-md);
  background:
    repeating-linear-gradient(135deg,
      oklch(0.94 0.02 338) 0 12px,
      oklch(0.965 0.012 338) 12px 24px);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.ph::after {
  content: attr(data-label);
  font-family: "Space Grotesk", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-500);
  background: var(--surface);
  padding: 5px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  box-shadow: var(--sh-xs);
}
.ph.dark {
  background:
    repeating-linear-gradient(135deg,
      oklch(0.30 0.03 320) 0 12px,
      oklch(0.26 0.03 320) 12px 24px);
  border-color: oklch(0.34 0.03 320);
}
.ph.dark::after { background: var(--ink-900); color: var(--ink-400); border-color: oklch(0.36 0.03 320); }

/* ---------- Reveal ----------
   Content is always visible. (Scroll-triggered opacity fades were removed:
   the preview/export environment freezes CSS transitions, which stranded
   re-revealed content invisible. Motion now comes from the page transition,
   hover states, and interactive widgets — all user/active-frame triggered.) */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: oklch(0.985 0.004 330 / 0.82);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.nav.scrolled { background: oklch(0.985 0.004 330 / 0.9); border-bottom-color: var(--line); box-shadow: var(--sh-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 20px; }
.nav-logo img { height: 30px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  position: relative;
  font-family: var(--font-display);
  font-weight: 500; font-size: 0.97rem;
  color: var(--ink-700);
  padding: 9px 14px; border-radius: var(--r-pill);
  transition: color .18s ease, background .18s ease;
}
.nav-link:hover { color: var(--ink-900); background: var(--tint); }
.nav-link.active { color: var(--m-700); }
.nav-link.active::after {
  content:""; position:absolute; left:14px; right:14px; bottom:3px; height:2px;
  background: var(--m-500); border-radius:2px;
}
.nav-cta { display:flex; align-items:center; gap: 10px; }
.nav-burger { display:none; width:44px; height:44px; border-radius:var(--r-md); border:1px solid var(--line-2); background:var(--surface); align-items:center; justify-content:center; }
.nav-burger span, .nav-burger span::before, .nav-burger span::after {
  content:""; display:block; width:20px; height:2px; background:var(--ink-900); border-radius:2px; transition: transform .25s ease, opacity .2s ease; position:relative;
}
.nav-burger span::before { position:absolute; top:-6px; }
.nav-burger span::after { position:absolute; top:6px; }
.nav-burger.open span { background: transparent; }
.nav-burger.open span::before { transform: translateY(6px) rotate(45deg); }
.nav-burger.open span::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu { display:none; }

@media (max-width: 900px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-burger { display: inline-flex; }
  .mobile-menu {
    display: block;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    max-height: 0; transition: max-height .35s ease;
  }
  .mobile-menu.open { max-height: 480px; }
  .mobile-menu .mm-inner { padding: 14px var(--gutter) 26px; display:flex; flex-direction:column; gap:4px; }
  .mobile-menu .nav-link { font-size: 1.15rem; padding: 13px 6px; }
  .mobile-menu .nav-link.active::after { display:none; }
  .mobile-menu .btn { margin-top: 12px; }
}

/* ---------- Logo wall (client marquee) ---------- */
.logo-wall {
  background: var(--ink-900);
  border-radius: var(--r-xl);
  padding: clamp(18px,2.2vw,26px) 0;
  overflow: hidden;
  position: relative;
}
.logo-wall__heading {
  text-align:center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(0.70 0.012 320);
  margin-bottom: clamp(14px,1.8vw,20px);
}
.logo-wall__viewport {
  -webkit-mask-image: linear-gradient(90deg, transparent, black 7%, black 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 7%, black 93%, transparent);
  overflow: hidden;
}
.logo-wall__track {
  display: flex;
  align-items: center;
  gap: clamp(42px, 5vw, 78px);
  width: max-content;
  animation: marquee 52s linear infinite;
}
.logo-wall:hover .logo-wall__track { animation-play-state: paused; }
.logo-wall__track img {
  height: 38px; width: auto; flex-shrink: 0;
  opacity: 0.62;
  transition: opacity .25s ease, transform .25s ease;
}
.logo-wall__track img:hover { opacity: 1; transform: scale(1.07); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .logo-wall__track { animation: none; } }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--ink-900); color: oklch(0.82 0.012 320); }
.footer a { color: oklch(0.82 0.012 320); transition: color .18s ease; }
.footer a:hover { color: white; }
.footer .footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-block: 64px 40px;
}
.footer h4 { color: white; font-size: 0.95rem; letter-spacing: 0.02em; margin-bottom: 16px; }
.footer .f-links { display:flex; flex-direction:column; gap: 11px; font-size: 0.96rem; }
.footer-logo img { height: 30px; }
.footer-bottom {
  border-top: 1px solid oklch(0.30 0.02 320);
  padding-block: 22px 30px;
  display:flex; justify-content:space-between; align-items:center; gap:16px;
  font-size: 0.86rem; color: oklch(0.66 0.012 320);
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  .footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer .f-brand { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .footer .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Generic grids ---------- */
.grid { display: grid; gap: 24px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .cols-4 { grid-template-columns: repeat(2,1fr); } .cols-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

/* dotted bg utility */
.dotted {
  background-image: radial-gradient(oklch(0.80 0.04 340 / 0.5) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ---------- Form controls ---------- */
.inp {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink-900);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 13px 15px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.inp::placeholder { color: var(--ink-400); }
.inp:focus { outline: none; border-color: var(--m-500); background: var(--surface); box-shadow: 0 0 0 4px var(--m-100); }
.inp[data-err="true"] { border-color: var(--m-600); box-shadow: 0 0 0 4px var(--m-100); }

.svc-toggle, .filter-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem;
  padding: 9px 16px; border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink-700);
  border: 1px solid var(--line-2);
  transition: all .18s ease;
}
.svc-toggle:hover, .filter-pill:hover { border-color: var(--m-300); color: var(--m-700); }
.svc-toggle[data-on="true"], .filter-pill[data-on="true"] {
  background: var(--m-600); color: white; border-color: var(--m-600);
  box-shadow: var(--sh-sm);
}

/* ---------- Service finder ---------- */
.finder-opt {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 15px 18px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line-2);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
  cursor: pointer; width: 100%;
}
.finder-opt:hover { border-color: var(--m-400); box-shadow: var(--sh-sm); transform: translateY(-2px); }
.finder-opt[data-on="true"] { border-color: var(--m-500); background: var(--m-50); box-shadow: 0 0 0 3px var(--m-100); }
.finder-opt__icon { width: 42px; height: 42px; border-radius: 11px; background: var(--tint); color: var(--m-700); display: grid; place-items: center; flex-shrink: 0; transition: background .18s ease, color .18s ease; }
.finder-opt:hover .finder-opt__icon, .finder-opt[data-on="true"] .finder-opt__icon { background: var(--m-600); color: white; }
.finder-opt__label { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--ink-900); flex: 1; line-height: 1.25; }
.finder-opt__arrow { color: var(--ink-400); flex-shrink: 0; transition: transform .18s ease, color .18s ease; }
.finder-opt:hover .finder-opt__arrow { color: var(--m-600); transform: translateX(3px); }
@media (max-width: 560px) { .finder .grid[style*="repeat"] { grid-template-columns: 1fr !important; } }

/* ---------- Responsive grid collapses ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr !important; }
  .hero-grid > .ph, .hero-grid .reveal > .ph { max-width: 520px; }
}
@media (max-width: 820px) {
  .section .container[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .card[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

/* ---------- Blog ---------- */
.post-body { max-width: 720px; }
.post-body p:first-child { margin-top: 0; font-size: 1.2rem; color: var(--ink-800); }
@media (max-width: 760px) {
  .blog-featured { grid-template-columns: 1fr !important; }
}

/* page transition (transform-only so it never strands content invisible) */
.page-fade { animation: pageFade .45s ease both; }
@keyframes pageFade { from { transform: translateY(7px); } to { transform: none; } }

/* ============================================================
   TWEAK VARIANTS (driven by the Tweaks panel)
   ============================================================ */
/* Card style */
.cards-outline .card { box-shadow: none !important; border-color: var(--line-2); }
.cards-outline .card.hoverable:hover { box-shadow: none !important; border-color: var(--m-400); transform: translateY(-3px); }
.cards-outline .nav.scrolled { box-shadow: none; }

/* Button shape */
.btns-rounded .btn { border-radius: 12px; }
.btns-square .btn { border-radius: 4px; }

/* ---------- Device preview (mobile/desktop tweak) ---------- */
.dz-stage {
  position: fixed; inset: 0; z-index: 2147483600;
  background:
    radial-gradient(circle at 50% 0%, oklch(0.32 0.05 330), oklch(0.18 0.02 320));
  display: grid; place-items: center; padding: 28px 16px;
}
.dz-phone {
  position: relative;
  width: 390px; max-width: calc(100vw - 32px);
  height: min(844px, calc(100vh - 56px));
  background: #0c0a0e;
  border-radius: 46px;
  padding: 12px;
  box-shadow: 0 0 0 2px oklch(0.4 0.02 320), 0 40px 80px rgba(0,0,0,0.5);
}
.dz-phone__notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 132px; height: 26px; background: #0c0a0e; border-radius: 0 0 16px 16px; z-index: 3;
}
.dz-phone__screen {
  width: 100%; height: 100%;
  border-radius: 34px; overflow: hidden; background: var(--bg); position: relative;
}
.dz-phone__screen iframe { width: 100%; height: 100%; border: 0; display: block; }
.dz-label {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.04em;
  color: oklch(0.9 0.01 320); display: flex; align-items: center; gap: 8px;
  background: oklch(1 0 0 / 0.08); border: 1px solid oklch(1 0 0 / 0.14);
  padding: 8px 16px; border-radius: 999px;
}
