/* ============================================================
   DANVARO — styles.css  v2.1
   ============================================================ */

/* ── Accent ─────────────────────────────────────────────── */
:root {
  --accent-h: 245;
  --accent-c: 0.15;
  --accent-l: 62%;
  --accent:      oklch(var(--accent-l) var(--accent-c) var(--accent-h));
  --accent-glow: oklch(var(--accent-l) var(--accent-c) var(--accent-h) / 0.14);
  --accent-tint: oklch(var(--accent-l) var(--accent-c) var(--accent-h) / 0.07);
}

/* ── Light theme ────────────────────────────────────────── */
[data-theme="light"] {
  --ink:         #0e0e0d;
  --ink-soft:    #444441;
  --ink-fade:    #888882;
  --paper:       #fafaf8;
  --paper-2:     #f3f3f0;
  --line:        rgba(0, 0, 0, 0.07);
  --line-strong: rgba(0, 0, 0, 0.14);
  color-scheme: light;
}

/* ── Dark theme ─────────────────────────────────────────── */
[data-theme="dark"] {
  --ink:         #f2f2ee;
  --ink-soft:    #a0a09a;
  --ink-fade:    #636360;
  --paper:       #111110;
  --paper-2:     #1c1c1a;
  --line:        rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  color-scheme: dark;
}

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --gutter:    clamp(20px, 5vw, 64px);
  --max:       1180px;
  --dock-w:    56px;
  --topbar-h:  48px;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;

  --f-display: 'Inter Display', 'Inter', sans-serif;
  --f-body:    'Inter', sans-serif;
  --f-mono:    'JetBrains Mono', monospace;

  --ease:     cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

/* ── Cursor-follow spotlight (home only — #cursorGlow in DOM) ─ */
.cursor-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* Above sections (z-index 1) but below topbar/dock (z-index 90+) */
  z-index: 2;
  background: radial-gradient(
    ellipse 480px 360px at var(--gx, 50%) var(--gy, 45%),
    oklch(var(--accent-l) var(--accent-c) var(--accent-h) / 0.18),
    transparent 70%
  );
}
[data-theme="dark"] .cursor-glow {
  background: radial-gradient(
    ellipse 480px 360px at var(--gx, 50%) var(--gy, 45%),
    oklch(var(--accent-l) var(--accent-c) var(--accent-h) / 0.12),
    transparent 70%
  );
}
a      { color: inherit; text-decoration: none; }
ul     { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
em     { font-style: italic; }

/* ── Top bar ────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease);
}

.brandline { display: flex; align-items: center; gap: 10px; }

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  color: var(--ink);
  flex-shrink: 0;
  transition: color 0.2s var(--ease);
}
.logo-mark svg { width: 100%; height: 100%; }
.logo-mark:hover { color: var(--accent); }

.brand-word {
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-word .o { color: var(--accent); }

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--ink-fade);
}

.pulse {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1;    transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.75); }
}

.status-link {
  color: var(--ink-fade);
  transition: color 0.2s var(--ease);
}
.status-link:hover { color: var(--accent); }

/* ── Side dock ──────────────────────────────────────────── */
.dock {
  position: fixed;
  left: 0; top: var(--topbar-h); bottom: 0;
  width: var(--dock-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  gap: 4px;
  z-index: 90;
  border-right: 1px solid var(--line);
  background: var(--paper);
  transition: background 0.3s var(--ease);
}
.dock .logo-mark { display: none; }
.dock .divider {
  width: 1px;
  background: var(--line);
  align-self: stretch;
  margin: 6px 16px;
  flex-shrink: 0;
}

.dock-link {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-fade);
  padding: 8px 0;
  transition: color 0.2s var(--ease);
  white-space: nowrap;
  position: relative;
}
.dock-link:hover  { color: var(--ink); }
.dock-link.is-active { color: var(--ink); }
.dock-link.is-active::after {
  content: '';
  position: absolute;
  left: -1px; top: 50%;
  transform: translateY(-50%);
  width: 2px; height: 20px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.theme-toggle {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--ink-fade);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
  margin-top: auto;
  margin-bottom: 2px;
}
.theme-toggle:hover { color: var(--ink); background: var(--paper-2); }

.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--ink-fade);
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.lang-toggle:hover { color: var(--ink); background: var(--paper-2); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.35s var(--ease-out);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  will-change: transform;
}
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line-strong);
}
.btn.ghost:hover { color: var(--ink); border-color: var(--ink); }
.btn .arrow {
  transition: transform 0.35s var(--ease-out);
  will-change: transform;
}
.btn:hover .arrow { transform: translateX(3px); }

/* ── Hero ───────────────────────────────────────────────── */
.hero-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.hero-canvas canvas { width: 100%; height: 100%; }

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--topbar-h) + 80px) var(--gutter) 100px calc(var(--gutter) + var(--dock-w));
  z-index: 1;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-fade);
  margin-bottom: 24px;
}
.hero-eyebrow .slash { color: var(--accent); font-size: 14px; }

.hero-title {
  font-family: var(--f-display);
  font-size: clamp(56px, 8vw, 120px);
  font-weight: 240;
  letter-spacing: -0.04em;
  line-height: 0.92;
  margin-bottom: 32px;
  max-width: 14em;
}
/* Mask reveal: override generic .reveal translate on the title block */
.hero-title.reveal {
  opacity: 0;
  transform: none;
}
.hero-title.reveal.is-in {
  opacity: 1;
  transform: none;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line span {
  display: block;
  clip-path: inset(100% 0 0 0);
  transform: translateY(1.05em);
  transition:
    clip-path 0.85s var(--ease-out),
    transform 0.85s var(--ease-out);
}
.hero-title.reveal.is-in .line span {
  clip-path: inset(0 0 0 0);
  transform: translateY(0);
}
.hero-title.reveal.is-in .line:nth-child(1) span { transition-delay: 0.08s; }
.hero-title.reveal.is-in .line:nth-child(2) span { transition-delay: 0.2s; }
.hero-title em { font-style: italic; font-weight: 320; color: var(--accent); }

.hero-sub {
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 350;
  color: var(--ink-soft);
  max-width: 48ch;
  line-height: 1.55;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: calc(var(--gutter) + var(--dock-w));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-fade);
  transition: opacity 0.45s var(--ease);
}
.scroll-hint.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.scroll-hint .bar {
  width: 1px;
  height: 40px;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}
.scroll-hint .bar::after {
  content: '';
  position: absolute;
  top: -100%; left: 0; right: 0;
  height: 100%;
  background: var(--accent);
  animation: scrollbar 2s var(--ease-out) infinite 0.5s;
}
@keyframes scrollbar {
  0%   { top: -100%; }
  100% { top:  200%; }
}

/* ── Section template ───────────────────────────────────── */
.s {
  position: relative;
  padding: 120px var(--gutter) 120px calc(var(--gutter) + var(--dock-w));
  z-index: 1;
}
.s + .s { border-top: 1px solid var(--line); }

.s-head {
  max-width: var(--max);
  margin: 0 auto 64px;
}

.s-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-fade);
  margin-bottom: 20px;
}
.s-label .num { color: var(--accent); }

.s-title {
  font-family: var(--f-display);
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 280;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 22em;
}
.s-title em { font-style: italic; font-weight: 340; color: var(--accent); }

/* ── Services ───────────────────────────────────────────── */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  max-width: var(--max);
  margin: 0 auto;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.service {
  display: flex;
  gap: 28px;
  padding: 40px 36px;
  background: var(--paper);
  transition: background 0.2s var(--ease);
}
.service:hover { background: var(--paper-2); }

.service > .num {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 4px;
}
.service h3 {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 420;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}
.service p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 16px;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink-fade);
}

/* ── Approach ───────────────────────────────────────────── */
.approach {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: var(--max);
  margin: 0 auto;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.step {
  padding: 40px 32px;
  background: var(--paper);
  transition: background 0.2s var(--ease);
}
.step:hover { background: var(--paper-2); }

.step h4 {
  font-family: var(--f-display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.step p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.step .dur {
  display: block;
  margin-top: 24px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
}

/* ── About / Studio ─────────────────────────────────────── */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  max-width: var(--max);
  margin: 0 auto;
}

.about .copy p {
  font-family: var(--f-display);
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 320;
  letter-spacing: -0.02em;
  line-height: 1.45;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.about .copy p:last-child { margin-bottom: 0; }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.stat .n {
  font-family: var(--f-display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 240;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 6px;
}
.stat .n sup {
  font-size: 0.45em;
  font-weight: 400;
  vertical-align: super;
  color: var(--accent);
}
.stat .l {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-fade);
}

/* ── Clients marquee ────────────────────────────────────── */
.clients {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  z-index: 1;
  background: var(--paper);
}
.clients::before,
.clients::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}
.clients::before { left: 0;  background: linear-gradient(to right, var(--paper), transparent); }
.clients::after  { right: 0; background: linear-gradient(to left,  var(--paper), transparent); }

.clients-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 30s linear infinite;
  padding: 20px 0;
}
.clients-track:hover { animation-play-state: paused; }

.clients-track .client-item {
  padding: 0 36px;
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink-fade);
  white-space: nowrap;
  border-right: 1px solid var(--line);
  transition: color 0.2s var(--ease);
}
.clients-track .client-item:hover { color: var(--ink); }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── CTA ────────────────────────────────────────────────── */
.cta {
  position: relative;
  text-align: center;
  padding: 140px var(--gutter) 140px calc(var(--gutter) + var(--dock-w));
  overflow: hidden;
  z-index: 1;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(800px 600px at 50% 50%, var(--accent-glow), transparent 65%);
  pointer-events: none;
}
.cta-inner {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}
.cta h2 {
  font-family: var(--f-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 260;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 20px;
}
.cta h2 em { font-style: italic; font-weight: 340; color: var(--accent); }
.cta p {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 36px;
  max-width: 40ch;
  margin-left: auto;
  margin-right: auto;
}

/* ── Footer ─────────────────────────────────────────────── */
.foot {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px;
  padding: 64px var(--gutter) 48px calc(var(--gutter) + var(--dock-w));
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  position: relative;
  z-index: 1;
}
.foot .foot-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-fade);
}
.foot .col .brand-word { font-size: 20px; margin-bottom: 12px; }
.foot .brandcol p {
  font-size: 13px;
  color: var(--ink-fade);
  line-height: 1.55;
  max-width: 26ch;
}
.foot h5 {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-fade);
  margin-bottom: 16px;
}
.foot ul { display: flex; flex-direction: column; gap: 10px; }
.foot ul li,
.foot ul li a {
  font-size: 14px;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}
.foot ul li a:hover { color: var(--accent); }

/* ── Reveal animations ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity   0.65s var(--ease-out) var(--d, 0s),
    transform 0.65s var(--ease-out) var(--d, 0s);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

/* ── Tablet landscape: ≤ 1024px ─────────────────────────── */
@media (max-width: 1024px) {
  .approach { grid-template-columns: repeat(2, 1fr); }
}

/* ── Tablet portrait: ≤ 860px ──────────────────────────── */
@media (max-width: 860px) {
  .services { grid-template-columns: 1fr; }
  .about    { grid-template-columns: 1fr; gap: 48px; }

  .foot {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .foot .brandcol { grid-column: 1 / -1; }
}

/* ── Mobile: ≤ 680px ────────────────────────────────────── */
@media (max-width: 680px) {
  /* Hide side dock — topbar takes over */
  .dock { display: none; }

  /* Remove dock offset from all padded blocks */
  .hero,
  .s,
  .cta {
    padding-left:  var(--gutter);
    padding-right: var(--gutter);
  }

  .foot {
    padding-left:  var(--gutter);
    padding-right: var(--gutter);
    grid-template-columns: 1fr;
  }

  .s { padding-top: 80px; padding-bottom: 80px; }
  .cta { padding-top: 100px; padding-bottom: 100px; }

  .approach { grid-template-columns: 1fr; }
  .stats    { grid-template-columns: 1fr 1fr; }

  /* Hero: tighten up */
  .hero { padding-top: calc(var(--topbar-h) + 48px); padding-bottom: 72px; }
  .hero-title { font-size: clamp(44px, 13vw, 72px); }
  .hero-sub   { font-size: 16px; }
  .scroll-hint { left: var(--gutter); }

  /* Footer single column */
  .foot { gap: 24px; }
  .foot-bottom { flex-direction: column; gap: 6px; }
}

/* ── Small mobile: ≤ 400px ──────────────────────────────── */
@media (max-width: 400px) {
  .hero-title { font-size: clamp(38px, 11vw, 56px); }
  .stats      { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
}

/* Hide global cursor spotlight on touch / narrow viewports */
@media (max-width: 680px) {
  .cursor-glow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title .line span {
    clip-path: none !important;
    transform: none !important;
    transition: none !important;
  }
  .cursor-glow { display: none !important; }
}
