/* ============================================================
   AutomateWithClark — design system
   Dark-first, flat-surface theme inspired by developer-tool
   marketing sites: charcoal surface stack (#0e0e0e / #151515 /
   #1c1c1b), parchment text (#e9ebdf), depth from luminance
   shifts instead of box-shadows, jade accent used sparingly,
   forest-teal brand panel, Inter + Space Grotesk captions.
   ============================================================ */

:root {
  /* typography — overridable from the admin Typography card */
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-heading: var(--font-body);
  --font-caption: 'Space Grotesk', 'Inter', ui-sans-serif, system-ui, sans-serif;

  /* accent palette — overridable from the admin Appearance card */
  --primary: #34a77f;
  --secondary: #518dd2;
  /* gradient stops are separate vars so the admin panel can override them */
  --grad-1: #34a77f;
  --grad-2: #41a0a8;
  --grad-3: #518dd2;
  --gradient: linear-gradient(90deg, var(--grad-1), var(--grad-2) 50%, var(--grad-3));
  --gold: #d9b876;
  --gold-2: #b08d4f;
  --gradient-gold: linear-gradient(90deg, var(--gold), var(--gold-2));

  /* dark theme (default) — surface stack, darkest is recessed */
  --bg: #151515;
  --bg-alt: #0e0e0e;
  --card: #1c1c1b;
  --card-hover: #232322;
  --border: #2c2d2a;
  --border-strong: #3f403d;
  --text: #e9ebdf;
  --text-soft: #cbccc4;
  --text-muted: #94958e;
  --nav-bg: rgba(21, 21, 21, 0.85);
  /* solid buttons invert the page: parchment on dark, ink on light */
  --btn-bg: #e9ebdf;
  --btn-fg: #111210;
  /* brand panel */
  --teal: #185849;
  --teal-deep: #0e352c;
  --ease: cubic-bezier(0.72, 0, 0.12, 1);
  /* background blueprint grid — parchment-tinted hairlines */
  --grid-line: rgba(233, 235, 223, 0.05);
}

[data-theme="light"] {
  --bg: #faf9f5;
  --bg-alt: #f1f0ea;
  --card: #ffffff;
  --card-hover: #f6f5ef;
  --border: #e3e2d9;
  --border-strong: #cfcec3;
  --text: #1c1c17;
  --text-soft: #45463f;
  --text-muted: #6f7068;
  --nav-bg: rgba(250, 249, 245, 0.88);
  --btn-bg: #1c1c17;
  --btn-fg: #faf9f5;
  --grid-line: rgba(28, 28, 23, 0.055);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

html {
  background: var(--bg);
  transition: background 0.3s ease;
}

body {
  font-family: var(--font-body);
  background: transparent;
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  transition: color 0.3s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* fixed blueprint-grid layer behind all content — hairlines in the page's own
   ink, fading out toward the lower viewport so content slabs stay quiet */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 110% 75% at 50% 0%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 110% 75% at 50% 0%, #000 30%, transparent 78%);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h3 { font-weight: 600; letter-spacing: -0.01em; }

::selection {
  background: color-mix(in srgb, var(--primary) 30%, transparent);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.grad-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.grad-gold {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- eyebrow label (was a pill badge) ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-caption);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: var(--primary);
  flex-shrink: 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--btn-bg) 85%, var(--bg));
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-outline:hover {
  border-color: var(--text-muted);
  background: color-mix(in srgb, var(--text) 5%, transparent);
}
.btn-sm { padding: 8px 18px; font-size: 0.84rem; }
.btn-lg { padding: 13px 30px; font-size: 0.95rem; }

/* ---------- navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.navbar.scrolled { border-bottom-color: var(--border); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: inline-flex;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
/* image logo — displays 36px tall, upload 320×80px (2×) for sharp retina */
.logo-img {
  display: block;
  height: 36px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
/* the mobile-menu CTA is an <a> inside .nav-links — keep button colors */
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: var(--btn-fg); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-mobile-actions { display: none; }

/* theme toggle — quiet icon button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  padding: 0;
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--border-strong); color: var(--text); }
.theme-toggle svg { width: 17px; height: 17px; display: block; }
.toggle-icon-img { width: 18px; height: 18px; object-fit: contain; display: block; border-radius: 3px; }
.toggle-icon-emoji { font-size: 1rem; line-height: 1; }
.theme-toggle .toggle-label {
  font-size: 0.84rem;
  font-weight: 500;
  font-family: inherit;
}
/* mobile menu variant keeps its label and grows to fit */
.nav-mobile-actions .theme-toggle {
  width: auto;
  padding: 8px 14px;
  border-color: var(--border);
}
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: inline-flex; }
[data-theme="light"] .icon-sun { display: inline-flex; }
[data-theme="light"] .icon-moon { display: none; }

/* hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  width: 22px; height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 160px 0 96px;
  overflow: hidden;
}
/* single quiet atmospheric wash instead of glow blobs */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 55% 60% at 80% 10%, color-mix(in srgb, var(--teal) 30%, transparent), transparent 70%);
  opacity: 0.5;
}
[data-theme="light"] .hero::before { opacity: 0.14; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 72px;
  align-items: center;
  position: relative;
}
.hero h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.1rem);
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1.04;
  margin-bottom: 18px;
}
.hero-role {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text-soft);
  margin-bottom: 22px;
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 36px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-visual { display: flex; justify-content: center; }
.hero-img-frame {
  width: min(340px, 80vw);
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--card);
}
.hero-img-frame img,
.hero-placeholder {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.hero-placeholder {
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-initials {
  font-family: var(--font-caption);
  font-size: 4.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ---------- tools strip ---------- */
.tools-strip {
  padding: 40px 0 44px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.tools-label {
  text-align: center;
  font-family: var(--font-caption);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 26px;
}
/* marquee: track holds two copies of the list; shifting -50%
   moves exactly one full copy, so the loop is seamless */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee-scroll 40s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; }
}
/* plain logo row — no pills, muted until hover */
.marquee-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 56px;
  font-family: var(--font-caption);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-soft);
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.25s var(--ease);
}
.marquee-item:hover { opacity: 1; }
.marquee-item img {
  height: 22px;
  width: 22px;
  object-fit: contain;
}

/* ---------- sections ---------- */
.section { padding: 104px 0; }
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section + .section-alt, .section-alt + .section { border-top: none; }
.section-head {
  text-align: left;
  max-width: 640px;
  margin: 0 0 56px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.section-head p, .section-head .rich-text {
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* ---------- cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.card:hover {
  border-color: var(--border-strong);
  background: var(--card-hover);
}
.service-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.service-card .service-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
}
.service-icon {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 22px;
}
.service-icon svg { width: 20px; height: 20px; display: block; }
.service-icon-img { width: 24px; height: 24px; object-fit: contain; display: block; }
.service-icon-emoji { font-size: 1.3rem; line-height: 1; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.tag {
  font-family: var(--font-caption);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.card-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}
.card-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- portfolio ---------- */
.filter-row {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.filter-btn:hover { border-color: var(--border-strong); color: var(--text); }
.filter-btn.active {
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-color: transparent;
}
.portfolio-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.portfolio-card.hidden { display: none; }
.portfolio-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.portfolio-thumb.has-media { cursor: zoom-in; }
.thumb-slides { position: absolute; inset: 0; }
.thumb-slide { position: absolute; inset: 0; display: none; }
.thumb-slide.active { display: block; }
.thumb-slide img,
.thumb-slide video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.portfolio-card:hover .thumb-slide.active img { transform: scale(1.03); }
.play-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(14, 14, 14, 0.7);
  border: 1px solid rgba(233, 235, 223, 0.25);
  color: #e9ebdf;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  padding-left: 3px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.zoom-hint {
  position: absolute;
  top: 12px; right: 12px;
  width: 30px; height: 30px;
  border-radius: 6px;
  background: rgba(14, 14, 14, 0.7);
  border: 1px solid rgba(233, 235, 223, 0.2);
  color: #e9ebdf;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  pointer-events: none;
}
.zoom-hint svg { width: 14px; height: 14px; display: block; }
.portfolio-thumb.has-media:hover .zoom-hint,
.portfolio-thumb.has-media:focus .zoom-hint { opacity: 1; }
.thumb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(233, 235, 223, 0.2);
  background: rgba(14, 14, 14, 0.65);
  color: #e9ebdf;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.thumb-nav:hover { background: rgba(14, 14, 14, 0.9); }
.thumb-nav.prev { left: 10px; }
.thumb-nav.next { right: 10px; }
.thumb-dots {
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.thumb-dots .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(233, 235, 223, 0.35);
  transition: background 0.2s ease;
}
.thumb-dots .dot.active { background: #e9ebdf; }
.thumb-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  opacity: 0.6;
}
.thumb-placeholder svg { width: 40px; height: 40px; }
a.thumb-link {
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
a.thumb-link:hover { opacity: 1; }
.cat-chip {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(14, 14, 14, 0.75);
  border: 1px solid rgba(233, 235, 223, 0.15);
  color: #e9ebdf;
  font-family: var(--font-caption);
  font-size: 0.66rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  backdrop-filter: blur(6px);
}
.portfolio-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.portfolio-body h3 { font-size: 1.02rem; margin-bottom: 8px; }
.portfolio-body .portfolio-desc { color: var(--text-muted); font-size: 0.88rem; flex: 1; }
.portfolio-links { display: flex; gap: 16px; margin-top: 16px; flex-wrap: wrap; }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}
.about-text h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.about-role {
  font-family: var(--font-caption);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.about-bio { color: var(--text-muted); font-size: 0.97rem; margin-bottom: 28px; }
.about-skills h3 { font-size: 1.05rem; margin-bottom: 18px; }
.skills-list { display: flex; flex-direction: column; gap: 8px; }
.skill-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-soft);
  transition: border-color 0.2s var(--ease);
}
.skill-item:hover { border-color: var(--border-strong); }
.check {
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- contact — the one saturated brand moment ---------- */
.contact-box {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 48px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--teal), var(--teal-deep));
  border: 1px solid color-mix(in srgb, var(--teal) 55%, #e9ebdf 12%);
  position: relative;
  overflow: hidden;
}
.contact-box .badge { color: rgba(233, 235, 223, 0.6); }
.contact-box .badge-dot { background: #e9ebdf; }
.contact-box h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  letter-spacing: -0.02em;
  color: #e9ebdf;
  margin-bottom: 16px;
}
.contact-box h2 .grad-text {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: #e9ebdf;
}
.contact-box p, .contact-box .contact-desc {
  color: rgba(233, 235, 223, 0.72);
  max-width: 520px;
  margin: 0 auto 36px;
}
.contact-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.contact-box .btn-primary { background: #e9ebdf; color: #0e352c; }
.contact-box .btn-primary:hover { background: #d7dac9; }
.contact-box .btn-outline {
  color: #e9ebdf;
  border-color: rgba(233, 235, 223, 0.3);
}
.contact-box .btn-outline:hover {
  border-color: rgba(233, 235, 223, 0.6);
  background: rgba(233, 235, 223, 0.06);
}

/* ---------- testimonials ---------- */
.testimonials-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.testimonial-card { display: flex; flex-direction: column; }
.stars { margin-bottom: 16px; letter-spacing: 3px; }
.star { color: var(--border-strong); font-size: 0.82rem; }
.star.filled { color: var(--gold); }
.testimonial-text {
  color: var(--text-soft);
  font-size: 0.92rem;
  flex: 1;
  margin-bottom: 24px;
}
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: #e9ebdf;
  font-family: var(--font-caption);
  font-weight: 500;
  font-size: 0.8rem;
}
.testimonial-author strong { display: block; font-size: 0.9rem; font-weight: 600; }
.author-role { color: var(--text-muted); font-size: 0.78rem; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  background: var(--bg-alt);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.footer p {
  color: var(--text-muted);
  font-family: var(--font-caption);
  font-size: 0.8rem;
}
.footer-admin {
  color: var(--text-muted);
  font-family: var(--font-caption);
  font-size: 0.78rem;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.footer-admin:hover { color: var(--text); opacity: 1; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 10, 10, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 56px 72px 64px;
}
.lightbox.open { display: flex; }
.lb-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y;
}
.lb-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.38s var(--ease);
  will-change: transform;
}
.lb-stage img,
.lb-stage video {
  max-width: min(1100px, 88vw);
  max-height: 80vh;
  border-radius: 8px;
  border: 1px solid rgba(233, 235, 223, 0.12);
}
.lb-close {
  position: absolute;
  top: 18px; right: 22px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(233, 235, 223, 0.2);
  background: rgba(233, 235, 223, 0.06);
  color: #e9ebdf;
  font-size: 1rem;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease;
}
.lb-close:hover { background: rgba(233, 235, 223, 0.16); }
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(233, 235, 223, 0.2);
  background: rgba(233, 235, 223, 0.06);
  color: #e9ebdf;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease;
}
.lb-nav:hover { background: rgba(233, 235, 223, 0.16); }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-footer {
  position: absolute;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  color: #e9ebdf;
  font-size: 0.85rem;
  font-weight: 500;
  background: rgba(14, 14, 14, 0.7);
  border: 1px solid rgba(233, 235, 223, 0.12);
  padding: 8px 18px;
  border-radius: 999px;
  max-width: 90vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-counter { color: rgba(233, 235, 223, 0.55); }
@media (max-width: 700px) {
  .lightbox { padding: 56px 12px 64px; }
  .lb-nav { width: 40px; height: 40px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-stage img, .lb-stage video { max-width: 94vw; }
}

/* ---------- case study page ---------- */
.cs-hero { padding: 140px 0 72px; }
.cs-hero-head { max-width: 860px; }
.cs-title {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}
.cs-summary {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 680px;
  margin-bottom: 44px;
}
.cs-client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.cs-client-cell {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cs-client-label {
  font-family: var(--font-caption);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.cs-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.cs-metric {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 26px 24px;
}
.cs-metric-value {
  display: block;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.cs-metric-label { color: var(--text-muted); font-size: 0.85rem; }

.cs-section-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 26px;
}
.cs-num {
  font-family: var(--font-caption);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  color: var(--primary);
  flex-shrink: 0;
  padding-top: 8px;
}
.cs-label {
  display: inline-block;
  font-family: var(--font-caption);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.cs-section-head h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); letter-spacing: -0.02em; }
.cs-text {
  color: var(--text-muted);
  max-width: 760px;
  margin-bottom: 36px;
  font-size: 1rem;
}
.cs-cards { margin-top: 8px; }
.cs-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.cs-card p { color: var(--text-muted); font-size: 0.9rem; }
.cs-card-tag {
  display: inline-block;
  font-family: var(--font-caption);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.cs-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.cs-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.cs-quote {
  margin-top: 36px;
  padding: 24px 28px;
  border-left: 2px solid var(--gold);
  background: var(--card);
  border-radius: 0 8px 8px 0;
  color: var(--text-soft);
  max-width: 760px;
}
.cs-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.cs-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  font-size: 0.9rem;
}
.cs-table th, .cs-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.cs-table th {
  font-family: var(--font-caption);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--bg-alt);
}
.cs-table tr:last-child td { border-bottom: none; }
.cs-table td:first-child { font-weight: 600; }
.cs-before { color: #c4675f; }
.cs-after { color: var(--primary); font-weight: 600; }

@media (max-width: 700px) {
  .cs-section-head { gap: 14px; }
}

/* ---------- cookie consent banner ---------- */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 140%);
  z-index: 250;
  width: min(680px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  transition: transform 0.35s var(--ease);
}
.cookie-banner.show { transform: translate(-50%, 0); }
.cookie-text {
  flex: 1;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.cookie-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 14px; }
  .cookie-actions { flex-direction: row; justify-content: center; flex-wrap: wrap; }
}

/* ---------- scroll to top ---------- */
.scroll-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 240;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.2s ease;
}
.scroll-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.scroll-top:hover { border-color: var(--text-muted); }

/* ---------- rich text (WYSIWYG output) ---------- */
.rich-text p { margin: 0 0 0.9em; }
.rich-text p:last-child { margin-bottom: 0; }
.rich-text ul, .rich-text ol { margin: 0 0 0.9em 1.5em; }
.rich-text li { margin-bottom: 0.3em; }
.rich-text a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.rich-text a:hover { opacity: 0.85; }
.rich-text blockquote {
  border-left: 2px solid var(--border-strong);
  padding-left: 14px;
  margin: 0 0 0.9em;
  color: var(--text-soft);
}
/* Quill indent / align classes */
.rich-text .ql-indent-1 { padding-left: 2.5em; }
.rich-text .ql-indent-2 { padding-left: 5em; }
.rich-text .ql-indent-3 { padding-left: 7.5em; }
.rich-text .ql-indent-4 { padding-left: 10em; }
.rich-text .ql-indent-5 { padding-left: 12.5em; }
.rich-text .ql-indent-6 { padding-left: 15em; }
.rich-text .ql-indent-7 { padding-left: 17.5em; }
.rich-text .ql-indent-8 { padding-left: 20em; }
.rich-text li.ql-indent-1 { padding-left: 0; margin-left: 2.5em; }
.rich-text li.ql-indent-2 { padding-left: 0; margin-left: 5em; }
.rich-text li.ql-indent-3 { padding-left: 0; margin-left: 7.5em; }
.rich-text .ql-align-center { text-align: center; }
.rich-text .ql-align-right { text-align: right; }
.rich-text .ql-align-justify { text-align: justify; }

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; gap: 48px; }
  .hero-text { order: 2; }
  .hero-visual { order: 1; justify-content: center; }
  .hero-img-frame { width: min(220px, 60vw); }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 820px) {
  .container { padding: 0 20px; }
  .nav-cta { display: none; }
  .nav-actions .theme-toggle { display: none; }
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 24px;
    transform: translateY(-130%);
    transition: transform 0.3s var(--ease);
    z-index: 99;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
  }
  .nav-mobile-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 18px;
  }
  .hero { padding: 128px 0 72px; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }
  .contact-box { padding: 48px 24px; }
}
