/* ============================================================
   Dot Dzinr: Design Tokens
   ============================================================ */
:root {
  /* Color */
  --bg: #020817;
  --bg-soft: #0a1220;
  --bg-elevated: #0f1a2e;
  --glass: rgba(15, 26, 46, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 129, 37, 0.35);
  --accent: #ff8125;
  --accent-dim: rgba(255, 129, 37, 0.14);
  --accent-glow: rgba(255, 129, 37, 0.35);
  --text-primary: #f5f7fa;
  --text-secondary: #8b95a7;
  --text-tertiary: #5a6478;
  --line: rgba(255, 255, 255, 0.08);

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --container: 1200px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --nav-h: 84px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Base
   ============================================================ */
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Soft top-of-page glow, settles into flat navy */
.page-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(255, 129, 37, 0.16) 0%, rgba(255, 129, 37, 0.05) 32%, transparent 62%),
    radial-gradient(80% 50% at 85% -5%, rgba(120, 150, 220, 0.06) 0%, transparent 55%),
    var(--bg);
}

::selection { background: var(--accent); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

a:focus-visible, button:focus-visible { outline-offset: 4px; }

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--text-primary);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  flex-shrink: 0;
}

h1 { font-size: clamp(2.4rem, 5.2vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.6rem); }
h4 { font-size: 1.05rem; }

p.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 620px;
}

p { color: var(--text-secondary); }

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ============================================================
   Layout
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: clamp(64px, 10vw, 140px) 0;
  position: relative;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: clamp(40px, 6vw, 72px);
  max-width: 680px;
}

.section-head.centered { max-width: 640px; margin-left: auto; margin-right: auto; text-align: center; align-items: center; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: transparent;
  transition: transform 0.35s var(--ease), border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #150900;
  font-weight: 600;
}

.btn-primary:hover { box-shadow: 0 0 0 1px var(--accent), 0 8px 30px -6px var(--accent-glow); }

.btn-ghost {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover { border-color: var(--glass-border-hover); color: var(--accent); }

.btn svg { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }

/* ============================================================
   Glass surfaces
   ============================================================ */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: clamp(28px, 3vw, 38px);
  transition: transform 0.45s var(--ease), border-color 0.35s ease, background 0.35s ease;
  will-change: transform;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--glass-border-hover);
  background: rgba(20, 32, 54, 0.6);
}

/* ============================================================
   Nav
   ============================================================ */
.nav-wrap {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 20px;
  transition: top 0.4s var(--ease);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
  max-width: 940px;
  padding: 14px 14px 14px 22px;
  border-radius: var(--radius-pill);
  background: rgba(10, 18, 32, 0.6);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: padding 0.4s var(--ease), max-width 0.4s var(--ease), background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.nav-wrap.scrolled .nav {
  max-width: 760px;
  padding: 9px 9px 9px 20px;
  background: rgba(8, 14, 26, 0.82);
  box-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.6);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.nav-logo .logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-links a:hover, .nav-links a.active { color: var(--text-primary); background: rgba(255, 255, 255, 0.06); }
.nav-links a.active { color: var(--accent); }

.nav-cta { flex-shrink: 0; }
.nav .btn-primary { padding: 11px 20px; font-size: 0.76rem; }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: rgba(10, 18, 32, 0.62);
  border: 1px solid var(--glass-border);
}
.lang-switch a,
.lang-switch span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  line-height: 1;
}
.lang-switch a {
  color: var(--text-tertiary);
  transition: color 0.2s ease, background 0.2s ease;
}
.lang-switch a:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.06); }
.lang-switch .lang-current {
  color: var(--accent);
  background: rgba(255, 129, 37, 0.14);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: transparent;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
}

.nav-toggle span {
  width: 15px;
  height: 1.5px;
  background: var(--text-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-panel {
  position: fixed;
  top: 90px;
  left: 20px;
  right: 20px;
  z-index: 99;
  background: rgba(8, 14, 26, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(18px);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-panel.open { opacity: 1; transform: translateY(0); pointer-events: auto; }

.mobile-panel a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
}

.mobile-panel a:hover, .mobile-panel a.active { color: var(--accent); background: rgba(255, 255, 255, 0.04); }

/* ============================================================
   Hero / particle network
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: calc(var(--nav-h) + 40px);
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.85;
}

.hero-inner { position: relative; z-index: 1; }

.hero-copy { display: flex; flex-direction: column; gap: 26px; max-width: 880px; }

.hero h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); }
.hero h1 em { font-style: normal; color: var(--accent); }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.hero-meta {
  display: flex;
  gap: clamp(20px, 4vw, 56px);
  margin-top: clamp(48px, 7vw, 88px);
  flex-wrap: wrap;
}

.hero-meta div { display: flex; flex-direction: column; gap: 6px; }
.hero-meta .num { font-family: var(--font-display); font-size: clamp(1.6rem, 2.4vw, 2.2rem); font-weight: 600; }
.hero-meta .label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-tertiary); }

/* Floating hero badges */
.hero-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  background: rgba(10, 18, 32, 0.62);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
  white-space: nowrap;
  animation: badge-float 7s ease-in-out infinite;
}
.hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); flex-shrink: 0; }

.hero-badge.b1 { top: 14%; left: 3%; animation-delay: 0s; }
.hero-badge.b2 { top: 20%; right: 4%; animation-delay: 1.4s; }
/* b3 is anchored to the page center rather than a viewport percentage: the hero copy
   column is capped at 620px (see p.lead) inside a 1200px container, so at 1280-1440px
   viewports the left margin (40-120px) is narrower than this badge (~150px) -- there is
   no position in that margin that avoids both overlapping the paragraph and clipping
   off-screen. calc(50% - 770px) keeps a constant ~20px clearance from the container's
   left edge at any width, but only stays fully on-screen from ~1600px up; below that
   the media query hides it rather than let it collide with the paragraph. */
.hero-badge.b3 { bottom: 22%; left: calc(50% - 770px); animation-delay: 2.8s; }
.hero-badge.b4 { bottom: 16%; right: 7%; animation-delay: 4.2s; }

@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (max-width: 1100px) {
  .hero-badge { display: none; }
}

@media (max-width: 1599px) {
  .hero-badge.b3 { display: none; }
}

/* Client logo ribbon */
.logo-ribbon-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 42px 0;
  position: relative;
  z-index: 1;
}
.logo-ribbon-caption {
  text-align: center;
  margin-bottom: 22px;
}
.logo-ribbon {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.logo-ribbon-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 104px;
  animation: ribbon-scroll 36s linear infinite;
}
.logo-ribbon-section:hover .logo-ribbon-track { animation-play-state: paused; }
.logo-ribbon-item {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
/* Source marks are dark navy for print/light use; brightness(0) + invert(1) recolors
   any of them (flat or multi-tone) to a flat white silhouette so they read against
   the site's dark background, regardless of their original fill colors. */
.logo-ribbon-item img {
  height: 62px;
  width: auto;
  max-width: 210px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.68;
  transition: opacity 0.3s ease;
}
.logo-ribbon-item:hover img { opacity: 1; }
@keyframes ribbon-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.scroll-cue .line { width: 32px; height: 1px; background: var(--text-tertiary); position: relative; overflow: hidden; }
.scroll-cue .line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue { 0% { transform: translateX(-100%); } 50% { transform: translateX(0); } 100% { transform: translateX(100%); } }

/* ============================================================
   Floating WhatsApp button
   ============================================================ */
.whatsapp-float {
  position: fixed;
  /* Bottom-right: clear of the nav (top) and the home hero's .scroll-cue,
     which lives at bottom-left, so no fixed-position elements overlap. */
  bottom: 24px;
  right: 24px;
  z-index: 90;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  max-width: 56px;
  max-height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
  /* Own stacking/compositor context: keeps this fixed layer isolated from
     whatever the animated, backdrop-filtered sections elsewhere on the page
     are doing to the compositor, so it can't inherit their paint glitches. */
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
/* Gentle expanding ring behind the button to draw the eye, loops continuously. */
.whatsapp-float::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  opacity: 0.55;
  z-index: -1;
  animation: whatsapp-pulse 2.6s ease-out infinite;
  pointer-events: none;
}
@keyframes whatsapp-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-float::before { animation: none; opacity: 0; }
}
.whatsapp-float svg { width: 30px; height: 30px; display: block; pointer-events: none; }
.whatsapp-float:hover, .whatsapp-float:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32), 0 3px 10px rgba(0, 0, 0, 0.2);
}
.whatsapp-float:hover::before, .whatsapp-float:focus-visible::before {
  animation-play-state: paused;
  opacity: 0;
}
@media (max-width: 480px) {
  .whatsapp-float {
    width: 50px; height: 50px;
    min-width: 50px; min-height: 50px;
    max-width: 50px; max-height: 50px;
    bottom: 18px; right: 18px;
  }
  .whatsapp-float svg { width: 27px; height: 27px; }
}

/* ============================================================
   Page hero (non-home, shorter)
   ============================================================ */
.page-hero {
  padding: calc(var(--nav-h) + 96px) 0 40px;
  position: relative;
}

.page-hero .container { display: flex; flex-direction: column; gap: 20px; }
.page-hero h1 { max-width: 780px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.breadcrumb a:hover { color: var(--accent); }

/* ============================================================
   Grids
   ============================================================ */
.grid {
  display: grid;
  gap: 22px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-solo { grid-template-columns: minmax(0, 1fr); max-width: 640px; margin: 0 auto; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================================
   Service card
   ============================================================ */
.service-card { display: flex; flex-direction: column; gap: 18px; height: 100%; }
.service-card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.service-card .icon svg { width: 22px; height: 22px; }
.service-card h3 { font-size: 1.15rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.service-card .tags { margin-top: auto; padding-top: 6px; }
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 5px 11px;
}

/* ============================================================
   Portfolio grid
   ============================================================ */
.work-card {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.work-thumb {
  aspect-ratio: 16 / 11;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--glass-border);
}
.work-thumb .glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s var(--ease);
}
.work-card:hover .work-thumb .glyph { transform: scale(1.06); }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.work-card:hover .work-thumb img { transform: scale(1.06); }
.work-thumb.contain { background: #fff; display: flex; align-items: center; justify-content: center; }
.work-thumb.contain img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; padding: 20px; box-sizing: border-box; }
.work-body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 10px; }
.work-body .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.work-body h3 { font-size: 1.2rem; }
.work-arrow { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.3s ease, transform 0.3s var(--ease), border-color 0.3s ease; }
.work-arrow svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.work-card:hover .work-arrow { background: var(--accent); border-color: var(--accent); }
.work-card:hover .work-arrow svg { transform: translate(2px, -2px); color: #150900; }

/* ============================================================
   Team
   ============================================================ */
.team-solo { display: flex; justify-content: center; }
.team-solo .team-card { max-width: 720px; width: 100%; }
.team-card { display: flex; flex-direction: column; gap: 16px; }
.team-card-featured { flex-direction: row; align-items: center; gap: 32px; text-align: left; }
.team-card-featured .team-avatar { width: 180px; height: 180px; flex-shrink: 0; }
.team-card-body { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 640px) {
  .team-card-featured { flex-direction: column; text-align: center; }
  .team-card-featured .team-avatar { width: 140px; height: 140px; }
}
.team-avatar {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--bg);
  background: linear-gradient(155deg, var(--accent) 0%, #b85300 100%);
}
.team-card h3 { font-size: 1.05rem; }
.team-role { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.team-card.open-role h3, .team-card.open-role .team-role, .team-card.open-role p { color: var(--text-tertiary); }

/* ============================================================
   Process / node line (used sparingly, genuine sequences only)
   ============================================================ */
.node-line { display: flex; flex-direction: column; }
.node-step { display: flex; gap: 22px; padding: 26px 0; border-top: 1px solid var(--line); }
.node-step:last-child { border-bottom: 1px solid var(--line); }
.node-marker { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 0; padding-top: 4px; }
.node-marker .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.node-step-body { display: flex; flex-direction: column; gap: 8px; }
.node-step-body h4 { color: var(--text-primary); }

/* ============================================================
   Testimonials
   ============================================================ */
.testimonial-card { display: flex; flex-direction: column; gap: 18px; height: 100%; }

/* Fractional star ratings: a muted background row of 5 stars with a filled
   accent-colored row clipped to (rating/5) width layered on top. */
.testimonial-stars { position: relative; height: 15px; width: max-content; }
.testimonial-stars .stars-bg,
.testimonial-stars .stars-fg { display: flex; gap: 4px; white-space: nowrap; }
.testimonial-stars .stars-bg { color: var(--line); }
.testimonial-stars .stars-fg { position: absolute; top: 0; left: 0; overflow: hidden; color: var(--accent); }
.testimonial-stars svg { width: 15px; height: 15px; flex-shrink: 0; }

.testimonial-quote { color: var(--text-primary); font-size: 0.96rem; line-height: 1.65; flex-grow: 1; }
.testimonial-person { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--glass-border);
}
.testimonial-name { display: block; font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.testimonial-role { display: block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-tertiary); margin-top: 2px; }

/* Testimonial ribbon: same continuous marquee mechanism as the client logo
   ribbon, paced slower since these cards carry text people need time to read. */
.testimonial-ribbon {
  overflow: hidden;
  margin-top: 44px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.testimonial-ribbon-track {
  display: flex;
  align-items: stretch;
  width: max-content;
  gap: 24px;
  padding: 4px 24px;
  animation: ribbon-scroll 95s linear infinite;
}
.testimonial-ribbon:hover .testimonial-ribbon-track { animation-play-state: paused; }
.testimonial-ribbon-item {
  flex-shrink: 0;
  width: min(400px, 84vw);
  display: flex;
}
.testimonial-ribbon-item .testimonial-card { flex: 1; }

@media (max-width: 700px) {
  .testimonial-ribbon-item { width: min(320px, 82vw); }
  /* Mobile GPUs choke on 14 simultaneous animated backdrop-filter cards
     (the ribbon renders the testimonial set twice for the seamless loop):
     the compositor drops or corrupts the layers, so the cards -- and on
     some devices unrelated fixed-position layers like the WhatsApp button
     -- can render blank or solid black. Swap blur for a flat, near-opaque
     fill on small screens; still reads as a card, costs far less to paint. */
  .testimonial-ribbon-item .testimonial-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(15, 26, 46, 0.94);
  }
}

/* ============================================================
   CTA band
   ============================================================ */
.cta-band {
  padding: clamp(48px, 6vw, 72px) clamp(28px, 6vw, 72px);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 129, 37, 0.1), rgba(255, 129, 37, 0.02));
  border: 1px solid var(--glass-border-hover);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { max-width: 480px; }

/* ============================================================
   Footer
   ============================================================ */
footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
}
.footer-top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; padding-bottom: 48px; }
.footer-brand { display: flex; flex-direction: column; gap: 16px; max-width: 320px; }
.footer-cols { display: flex; gap: clamp(32px, 6vw, 80px); flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: var(--text-secondary); font-size: 0.92rem; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}
.footer-socials { display: flex; gap: 10px; }
.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.social-icon svg { width: 16px; height: 16px; }
.social-icon:hover { color: var(--accent); border-color: var(--glass-border-hover); background: var(--accent-dim); }

/* ============================================================
   Contact form
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: start; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); }
.field input, .field textarea, .field select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color 0.25s ease, background 0.25s ease;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); background: rgba(255, 129, 37, 0.04); outline: none; }
.field select option { color: #0b1220; background: #ffffff; }
.field .error-msg { font-size: 0.78rem; color: var(--accent); min-height: 1.1em; }
.field.has-error input, .field.has-error textarea { border-color: #ff5c5c; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  display: none;
  margin-top: 16px;
}
.form-status.show { display: block; }
.form-status.success { border-color: rgba(120, 220, 150, 0.4); color: #8fe0a8; }
.form-status.error { border-color: rgba(255, 92, 92, 0.4); color: #ff8f8f; }

.contact-info-card { display: flex; flex-direction: column; gap: 22px; }
.contact-info-row { display: flex; gap: 16px; align-items: flex-start; }
.contact-info-row .icon {
  width: 38px; height: 38px; border-radius: 10px; background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0;
}
.contact-info-row .icon svg { width: 18px; height: 18px; }
.contact-info-row h4 { font-size: 0.95rem; }
.contact-info-row p { font-size: 0.9rem; margin: 0; }
.contact-info-row a { color: var(--text-primary); }
.contact-info-row a:hover { color: var(--accent); }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > * { transition-delay: calc(var(--i, 0) * 90ms); }

/* ============================================================
   Case study specific
   ============================================================ */
.case-hero-meta { display: flex; gap: clamp(20px, 5vw, 56px); flex-wrap: wrap; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 8px 0 0; }
.case-hero-meta div { display: flex; flex-direction: column; gap: 6px; }
.case-hero-meta .label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-tertiary); }
.case-hero-meta .val { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; }
.case-visual {
  aspect-ratio: 21 / 10;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  position: relative;
  margin: 40px 0;
}

.case-visual.with-image {
  aspect-ratio: auto;
  min-height: 320px;
  max-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass);
}
.case-visual.with-image img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }

.mockup-tile {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  aspect-ratio: 4 / 3;
  background: var(--glass);
}
.mockup-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Logo wall */
.logo-wall-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.logo-wall-tile {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  box-sizing: border-box;
  color: var(--text-secondary);
  transition: transform 0.4s var(--ease), border-color 0.35s ease, color 0.35s ease, background 0.35s ease;
}
.logo-wall-tile:hover { transform: translateY(-6px); border-color: var(--glass-border-hover); color: var(--accent); background: rgba(20, 32, 54, 0.6); }
.logo-wall-tile svg { width: 100%; height: 100%; display: block; }
/* Source marks are dark navy (or, for a couple, full-color illustrations) for
   print/light use; brightness(0) + invert(1) recolors any of them to a flat
   white silhouette so they read against the wall's dark tile background,
   regardless of original fill colors. Same treatment as the homepage ribbon. */
.logo-wall-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.72;
  transition: opacity 0.35s ease;
}
.logo-wall-tile:hover img { opacity: 1; }

@media (max-width: 860px) {
  .logo-wall-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .logo-wall-grid { grid-template-columns: repeat(2, 1fr); }
}
.case-section { display: grid; grid-template-columns: 200px 1fr; gap: 40px; padding: 44px 0; border-top: 1px solid var(--line); }
.case-section .case-label { display: flex; flex-direction: column; gap: 10px; }
.case-section p + p { margin-top: 14px; }
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.result-stat { display: flex; flex-direction: column; gap: 6px; }
.result-stat .num { font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 600; color: var(--accent); }
.result-stat .label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); }

.case-nav { display: flex; justify-content: space-between; gap: 20px; padding: 40px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.case-nav a { display: flex; flex-direction: column; gap: 8px; }
.case-nav .dir { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-tertiary); }
.case-nav .title { font-family: var(--font-display); font-size: 1.1rem; }
.case-nav a:hover .title { color: var(--accent); }
.case-nav .next { text-align: right; margin-left: auto; }

.mockup-caption { display: block; margin-top: 12px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-tertiary); text-align: center; }

.color-swatch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.color-swatch { border-radius: var(--radius-md); border: 1px solid var(--glass-border); overflow: hidden; display: flex; flex-direction: column; }
.color-swatch .swatch-fill { height: 120px; }
.color-swatch .swatch-body { padding: 18px 20px 22px; background: var(--glass); display: flex; flex-direction: column; gap: 4px; }
.color-swatch .swatch-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; }
.color-swatch .swatch-hex { font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent); }
.color-swatch .swatch-meta { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-tertiary); margin-top: 4px; }
.color-swatch .swatch-desc { margin-top: 8px; font-size: 0.88rem; }

.type-specimen { border-radius: var(--radius-md); border: 1px solid var(--glass-border); background: var(--glass); padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 22px; }
.type-specimen .specimen-name { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.type-specimen .specimen-name h3 { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); }
.type-specimen .glyphs { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 2.4vw, 1.6rem); letter-spacing: 0.02em; color: var(--text-primary); line-height: 1.6; word-break: break-word; }
.type-specimen .headline-sample { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -0.01em; padding-top: 6px; border-top: 1px solid var(--line); }

@media (max-width: 700px) {
  .color-swatch-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   About page
   ============================================================ */
.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.value-list { display: flex; flex-direction: column; }
.value-row { display: grid; grid-template-columns: 60px 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); }
.value-row:last-child { border-bottom: 1px solid var(--line); }
.value-row .index { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); padding-top: 4px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .about-split { grid-template-columns: 1fr; gap: 36px; }
  .case-section { grid-template-columns: 140px 1fr; gap: 24px; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav { padding: 10px 10px 10px 20px; }
  .nav-wrap.scrolled .nav { max-width: 92vw; }
  .lang-switch a, .lang-switch span { padding: 6px 9px; font-size: 0.68rem; }
}

@media (max-width: 700px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .case-section { grid-template-columns: 1fr; gap: 12px; }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { flex-direction: column; gap: 32px; }
  .cta-band { flex-direction: column; align-items: flex-start; text-align: left; }
  .hero-meta { gap: 24px; }
  .value-row { grid-template-columns: 36px 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  h1 { letter-spacing: -0.01em; }
  .btn { padding: 13px 22px; font-size: 0.76rem; }
  .scroll-cue { display: none; }
  .results-grid { grid-template-columns: 1fr; }
}
