/* ===== Loop — Landing styles =====================================
   Light minimal + glassmorphism + 3D
   Tokens
================================================================= */
:root {
  --bg: #FAFAF7;
  --bg-2: #F2EFE9;
  --ink: #0A0A0A;
  --ink-2: #1A1A1A;
  --muted: #6E6E6A;
  --muted-2: #9A9893;
  --line: #E4E1DA;
  --line-2: #D6D2C9;
  --accent: oklch(0.65 0.13 40);
  --accent-soft: oklch(0.65 0.13 40 / .12);
  --accent-deep: oklch(0.55 0.14 40);
  --glass-bg: rgba(255, 255, 252, 0.55);
  --glass-border: rgba(10, 10, 10, 0.06);
  --shadow-sm: 0 1px 2px rgba(10,10,10,.04), 0 2px 8px rgba(10,10,10,.04);
  --shadow-md: 0 4px 12px rgba(10,10,10,.06), 0 12px 40px rgba(10,10,10,.08);
  --shadow-lg: 0 24px 80px -20px rgba(10,10,10,.18);
  --radius: 18px;
  --radius-lg: 28px;
  --max: 1280px;
  --gutter: 28px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter Tight', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'ss01', 'ss02', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  cursor: none;
  overflow-x: hidden;
}

/* ─── Cursor ─────────────────────────────────── */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .25s ease, height .25s ease, border-color .25s;
}
.cursor-ring.hover {
  width: 64px; height: 64px;
  background: rgba(255,255,255,.08);
}
@media (max-width: 900px), (hover: none) {
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}

/* ─── Layout ─────────────────────────────────── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.section { position: relative; padding: 140px 0; }
.section--tight { padding: 100px 0; }

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--ink);
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.04em; }
h1 { font-size: clamp(48px, 7vw, 116px); line-height: 0.96; letter-spacing: -0.05em; }
h2 { font-size: clamp(38px, 5vw, 72px); line-height: 1.02; }
h3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.2; }
p  { margin: 0; line-height: 1.55; color: var(--ink-2); }

.serif { font-family: 'Fraunces', serif; font-style: italic; font-weight: 300; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ─── Header ─────────────────────────────────── */
.header {
  position: fixed; top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 32px);
  max-width: var(--max);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 12px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
}
.header__brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.04em; font-size: 18px; }
.header__brand svg { display: block; }
.header__nav { display: flex; gap: 4px; }
.header__nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 100px;
  transition: background .2s;
}
.header__nav a:hover { background: rgba(10,10,10,.05); }
.header__right { display: flex; align-items: center; gap: 8px; }
.lang-toggle {
  display: inline-flex;
  background: rgba(10,10,10,.04);
  border-radius: 100px;
  padding: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
}
.lang-toggle button {
  border: 0; background: transparent;
  padding: 6px 10px;
  border-radius: 100px;
  cursor: pointer;
  color: var(--muted);
  font: inherit;
  transition: all .2s;
}
.lang-toggle button.active {
  background: var(--ink);
  color: var(--bg);
}

@media (max-width: 760px) {
  .header__nav { display: none; }
}

/* ─── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 100px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  transition: transform .2s, background .2s, color .2s;
  will-change: transform;
}
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--ink-2); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: rgba(10,10,10,.04); }
.btn .arrow { transition: transform .3s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ─── Hero ───────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 160px 0 100px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero__bg canvas { width: 100%; height: 100%; display: block; opacity: .6; }
.hero__inner { position: relative; z-index: 2; }
.hero__row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 60px;
}
.hero__lead {
  font-size: clamp(15px, 1.2vw, 18px);
  color: var(--muted);
  max-width: 360px;
  text-align: right;
  line-height: 1.5;
}
.hero h1 .word { display: inline-block; }
.hero h1 .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(60%);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1);
}
.hero h1 .played .char { opacity: 1; transform: translateY(0); }
.hero h1 .accent { font-style: italic; font-family: 'Fraunces', serif; font-weight: 300; }
.hero__loop {
  display: inline-block;
  vertical-align: middle;
  margin: 0 8px;
}
.hero__cta { display: flex; gap: 14px; margin-top: 56px; flex-wrap: wrap; }

.hero__meta {
  margin-top: 100px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.hero__meta div span {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 6px;
}
.hero__meta div strong { font-weight: 500; font-size: 17px; letter-spacing: -0.02em; }

@media (max-width: 800px) {
  .hero__row { grid-template-columns: 1fr; align-items: start; }
  .hero__lead { text-align: left; max-width: 100%; }
  .hero__meta { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Marquee ────────────────────────────────── */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  overflow: hidden;
  background: var(--bg);
}
.marquee__track {
  display: flex;
  gap: 80px;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
}
.marquee__item {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 28px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 80px;
  letter-spacing: -0.02em;
}
.marquee__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ─── Services ───────────────────────────────── */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 64px;
}
.service-card {
  position: relative;
  padding: 36px;
  border-radius: var(--radius-lg);
  background: var(--bg);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s, border-color .5s;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-2);
}
.service-card__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.2em;
}
.service-card__title {
  font-size: clamp(28px, 2.6vw, 38px);
  letter-spacing: -0.04em;
  margin-top: 4px;
  line-height: 1.05;
}
.service-card__desc {
  color: var(--muted);
  font-size: 15px;
  margin-top: 14px;
  max-width: 380px;
}
.service-card__viz {
  align-self: flex-end;
  position: relative;
  width: 140px; height: 140px;
}
.service-card__tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 18px;
}
.service-card__tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 100px;
  background: rgba(10,10,10,.04);
  color: var(--ink-2);
  letter-spacing: 0.04em;
}

@media (max-width: 800px) {
  .services { grid-template-columns: 1fr; }
}

/* ─── Cases ──────────────────────────────────── */
.cases-list { margin-top: 60px; border-top: 1px solid var(--line); }
.case-row {
  display: grid;
  grid-template-columns: 60px 2fr 1fr 1fr 80px;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
  position: relative;
  transition: padding-left .4s cubic-bezier(.2,.8,.2,1);
  cursor: none;
}
.case-row:hover { padding-left: 18px; }
.case-row__num { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); letter-spacing: 0.1em; }
.case-row__title { font-size: clamp(22px, 2.2vw, 32px); font-weight: 500; letter-spacing: -0.03em; }
.case-row__sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.case-row__tag { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-2); letter-spacing: 0.1em; }
.case-row__metric { font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.case-row__metric strong { font-family: 'Inter Tight'; font-weight: 500; font-size: 24px; letter-spacing: -0.02em; display: block; }
.case-row__metric span { font-size: 11px; color: var(--muted); letter-spacing: 0.15em; text-transform: uppercase; }
.case-row__arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  transition: background .3s, color .3s, border-color .3s;
}
.case-row:hover .case-row__arrow { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.case-row__hover-image {
  position: absolute;
  pointer-events: none;
  width: 280px; height: 180px;
  border-radius: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  opacity: 0;
  transform: translate(0, -50%) scale(.9);
  transition: opacity .25s, transform .25s;
  z-index: 5;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.case-row:hover .case-row__hover-image { opacity: 1; transform: translate(0, -50%) scale(1); }

@media (max-width: 800px) {
  .case-row { grid-template-columns: 40px 1fr 60px; }
  .case-row__tag, .case-row__metric { display: none; }
}

/* ─── Process ────────────────────────────────── */
.process-track {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.process-step {
  padding: 32px 28px 32px 0;
  border-left: 1px solid var(--line);
  padding-left: 28px;
  position: relative;
}
.process-step:first-child { border-left: 1px solid var(--ink); }
.process-step__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink);
  position: absolute;
  top: 32px; left: -4px;
}
.process-step__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.process-step__title {
  font-size: 22px;
  letter-spacing: -0.03em;
  margin-top: 14px;
  font-weight: 500;
}
.process-step__desc {
  color: var(--muted);
  font-size: 14px;
  margin-top: 10px;
  line-height: 1.55;
}
.process-step__time {
  margin-top: 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent-deep);
  letter-spacing: 0.1em;
}
@media (max-width: 800px) { .process-track { grid-template-columns: 1fr 1fr; } }

/* ─── Stack (3D-glass cards) ─────────────────── */
.stack {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.stack-chip {
  position: relative;
  padding: 20px 16px;
  border-radius: var(--radius);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s;
  min-height: 130px;
  overflow: hidden;
}
.stack-chip:hover { transform: translateY(-4px) rotateX(4deg); box-shadow: var(--shadow-lg); }
.stack-chip svg { width: 28px; height: 28px; }
.stack-chip__name { font-size: 15px; font-weight: 500; letter-spacing: -0.02em; }
.stack-chip__cat { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); letter-spacing: 0.15em; text-transform: uppercase; margin-top: auto; }

@media (max-width: 1000px) { .stack { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px)  { .stack { grid-template-columns: repeat(2, 1fr); } }

/* ─── FAQ ───────────────────────────────────── */
.faq { margin-top: 60px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px 0;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 500;
  letter-spacing: -0.02em;
  cursor: none;
}
.faq-icon { width: 16px; height: 16px; position: relative; flex-shrink: 0; margin-left: 24px; }
.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute; left: 50%; top: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.faq-icon::before { width: 16px; height: 1px; }
.faq-icon::after  { width: 1px; height: 16px; }
.faq-item.open .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .5s cubic-bezier(.2,.8,.2,1);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 720px;
}
.faq-item.open .faq-a { padding-bottom: 28px; }

/* ─── Contact / CTA ──────────────────────────── */
.cta {
  position: relative;
  padding: 120px 0;
  background: var(--ink);
  color: var(--bg);
  overflow: hidden;
}
.cta__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: end; }
.cta h2 { font-size: clamp(44px, 6vw, 96px); line-height: 0.95; letter-spacing: -0.05em; color: var(--bg); }
.cta h2 .serif { color: oklch(0.85 0.06 60); }
.cta__form {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 32px;
}
.cta__form label { display: block; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 8px; }
.cta__form input, .cta__form textarea, .cta__form select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.18);
  color: var(--bg);
  font: inherit;
  font-size: 17px;
  padding: 8px 0 14px;
  margin-bottom: 22px;
  outline: none;
  transition: border-color .25s;
}
.cta__form select option { color: var(--ink); }
.cta__form input:focus, .cta__form textarea:focus, .cta__form select:focus { border-bottom-color: var(--bg); }
.cta__form textarea { resize: none; min-height: 80px; }
.cta__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -8px; margin-bottom: 22px; }
.cta__chips button {
  background: transparent;
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.7);
  border-radius: 100px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  cursor: none;
  transition: all .25s;
}
.cta__chips button.on { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.cta__submit {
  background: var(--bg);
  color: var(--ink);
  border: 0;
  border-radius: 100px;
  padding: 14px 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: none;
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform .2s;
}
.cta__submit:hover { transform: translateY(-2px); }
.cta__bg-loop {
  position: absolute;
  right: -10%; top: 50%;
  transform: translateY(-50%);
  width: 1100px; height: 600px;
  opacity: 0.06;
  pointer-events: none;
}
@media (max-width: 900px) {
  .cta__inner { grid-template-columns: 1fr; }
}

/* ─── Footer ─────────────────────────────────── */
.footer {
  padding: 28px 0 22px;
  background: var(--ink);
  color: rgba(255,255,255,.55);
  border-top: 1px solid rgba(255,255,255,.08);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
}
.footer .container { display: flex; justify-content: space-between; width: 100%; align-items: center; }

/* ─── Reveal helpers ─────────────────────────── */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.20s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.28s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 0.36s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 0.44s; }

/* ─── Section header layout ─────────────────── */
.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
}
.section-head__lead { max-width: 380px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.section-head h2 { max-width: 760px; }
.section-head h2 .serif { color: var(--accent-deep); }

@media (max-width: 800px) {
  .section-head { grid-template-columns: 1fr; }
  .section { padding: 100px 0; }
}

/* ─── Logo svg motion ────────────────────────── */
@keyframes drawLoop {
  to { stroke-dashoffset: 0; }
}
.hero-loop-path {
  stroke-dasharray: 700;
  stroke-dashoffset: 700;
  animation: drawLoop 2.4s 0.6s cubic-bezier(.6,.05,.3,1) forwards;
}
.hero-loop-flow {
  stroke-dasharray: 6 10;
  animation: hero-flow 4s linear infinite;
  animation-delay: 3s;
  opacity: 0;
  animation-fill-mode: forwards;
}
@keyframes hero-flow {
  0% { opacity: 0; stroke-dashoffset: 0; }
  10% { opacity: 1; }
  100% { opacity: 1; stroke-dashoffset: -160; }
}

/* ─── Process loop visual ───────────────────── */
.process-loop {
  margin-top: 64px;
  display: flex;
  justify-content: center;
}
.process-loop svg { max-width: 100%; height: auto; }
