/*
 * Piruby — identitate vizuală V3-A (cromatica roșie).
 * Carmin RGB 199/0/58 și roșu RGB 237/69/52, universul cromatic de 12 nuanțe
 * și banda în 6 culori de pe cartea de vizită și foaia cu antet.
 */

@font-face {
  font-family: "AXIS";
  src: url("/assets/axis-extrabold-af3055a4.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --crimson: #c7003a;
  --red: #ed4534;
  --band-1: #c7003a;
  --band-2: #d83d2c;
  --band-3: #e94b3e;
  --band-4: #f05c50;
  --band-5: #f16c5e;

  --ink: #1d1c1e;
  --paper: #ffffff;
  --paper-2: #f8f4f2;
  --line: #ebe4e1;
  --line-2: #d9d0cc;
  --text: #1d1c1e;
  --muted: #5d5759;
  --dim: #a29a9c;

  --bands: linear-gradient(90deg, var(--band-1) 0 16.66%, var(--band-2) 0 33.33%, var(--band-3) 0 50%, var(--band-4) 0 66.66%, var(--band-5) 0 83.33%, var(--band-1) 0);
  --display: "AXIS", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sans: "Helvetica Neue", Helvetica, "Inter", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --nav-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; margin: 0; line-height: 1.02; letter-spacing: -0.01em; }
p { margin: 0; }
::selection { background: var(--crimson); color: #fff; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 0.78em; letter-spacing: 0; }
.muted { color: var(--dim); }
.container { width: min(1240px, 100% - 48px); margin-inline: auto; }

/* Grid and flex children may shrink below their content (long code, mocks). */
.hero__inner > *, .cases > *, .case > *, .services > *, .stack__cloud > *, .study__story > *,
.contact__inner > *, .mock-erp__main, .mock-store > *, .mock-build > *, .mock-geo > * { min-width: 0; }

/* ---------- logo ---------- */

.logo { width: 100%; height: auto; overflow: visible; }
.logo__pi { fill: var(--crimson); }
.logo__ruby { fill: var(--red); }

/* ---------- brand strip ---------- */

.strip { display: flex; height: 16px; }
.strip i { flex: 1; transform-origin: left; }
.strip i:nth-child(1), .strip i:nth-child(6) { background: var(--band-1); }
.strip i:nth-child(2) { background: var(--band-2); }
.strip i:nth-child(3) { background: var(--band-3); }
.strip i:nth-child(4) { background: var(--band-4); }
.strip i:nth-child(5) { background: var(--band-5); }
.strip--hero { position: absolute; top: 36px; right: 0; width: min(36vw, 520px); }
.strip--hero i { animation: band-in 0.9s var(--ease) both; }
.strip--hero i:nth-child(2) { animation-delay: 0.06s; }
.strip--hero i:nth-child(3) { animation-delay: 0.12s; }
.strip--hero i:nth-child(4) { animation-delay: 0.18s; }
.strip--hero i:nth-child(5) { animation-delay: 0.24s; }
.strip--hero i:nth-child(6) { animation-delay: 0.3s; }
@keyframes band-in { from { transform: scaleX(0); } }
.strip--footer { height: 10px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.95em 1.4em; border: 2px solid transparent; border-radius: 0;
  font: 700 15px/1 var(--sans); letter-spacing: 0.01em; cursor: pointer; white-space: nowrap;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.35s var(--ease);
}
.btn span { transition: transform 0.25s var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn--lg { padding: 1.15em 1.7em; font-size: 16px; }
.btn--small { padding: 0.8em 1.15em; font-size: 14px; }
.btn--primary { background: var(--crimson); color: #fff; }
.btn--primary:hover { background: var(--red); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: #fff; }

/* ---------- nav ---------- */

.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.nav--scrolled, .nav--open { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); width: min(1240px, 100% - 48px); margin-inline: auto; }
.nav__logo { display: block; width: 128px; }
.nav__links { display: flex; align-items: center; gap: 32px; font-size: 15px; font-weight: 500; }
.nav__links a:not(.btn) { position: relative; padding: 6px 0; }
.nav__links a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--crimson); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.nav__links a:not(.btn):hover::after { transform: scaleX(1); }
.nav__toggle { display: none; }

@media (max-width: 860px) {
  :root { --nav-h: 70px; }
  .nav__logo { width: 104px; }
  .nav__toggle { display: grid; gap: 6px; width: 46px; height: 46px; place-content: center; border: 2px solid var(--ink); background: #fff; cursor: pointer; }
  .nav__toggle span:not(.sr-only) { width: 20px; height: 2px; background: var(--ink); transition: transform 0.3s; }
  .nav--open .nav__toggle span:nth-of-type(2) { transform: translateY(4px) rotate(45deg); }
  .nav--open .nav__toggle span:nth-of-type(3) { transform: translateY(-4px) rotate(-45deg); }
  .nav__links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 4px 24px 24px; background: #fff; border-bottom: 1px solid var(--line); font: 800 24px var(--display);
  }
  .nav__links a:not(.btn) { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .nav__links a:not(.btn)::after { display: none; }
  .nav__links .btn { margin-top: 20px; justify-content: center; font-family: var(--sans); }
  .nav--open .nav__links { display: flex; }
}

/* ---------- scroll progress & cursor ---------- */

.nav__progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: var(--bands); transform: scaleX(0); transform-origin: left; }

.cursor {
  position: fixed; top: 0; left: 0; z-index: 200; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  background: var(--crimson); pointer-events: none; opacity: 0; mix-blend-mode: multiply;
  transition: width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease), opacity 0.3s, background 0.3s;
}
.cursor--on { opacity: 1; }
.cursor--hot { width: 54px; height: 54px; margin: -27px 0 0 -27px; background: var(--red); opacity: 0.35; }

/* ---------- hero ---------- */

.hero { position: relative; padding-top: 120px; }
.hero__inner { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 72px; align-items: center; }

.pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 500; color: var(--muted); }
.pill__dot { width: 8px; height: 8px; background: var(--crimson); animation: ping 1.8s infinite; }
@keyframes ping { 50% { opacity: 0.25; } }

.hero__title { margin-top: 30px; font-size: clamp(34px, 4.25vw, 64px); line-height: 1.04; letter-spacing: -0.01em; }
.hero__title .line { display: block; overflow: hidden; padding-top: 0.14em; margin-top: -0.14em; padding-bottom: 0.06em; }
.hero__title .line > span { display: inline-block; animation: line-up 1.1s var(--ease) both; }
.hero__title .line:nth-child(2) > span { animation-delay: 0.12s; }
.hero__title .line:nth-child(3) > span { animation-delay: 0.24s; }
@keyframes line-up { from { transform: translateY(110%); } }
.hero__accent { color: var(--crimson); white-space: nowrap; }
.hero__accent .char { display: inline-block; transition: transform 0.38s var(--ease), opacity 0.38s, color 0.38s; transition-delay: calc(var(--ci) * 18ms); }
.hero__accent .char:nth-child(n + 6) { color: var(--red); }
.hero__accent.is-leaving .char { transform: translateY(-0.6em) rotate(-8deg); opacity: 0; }
.hero__accent .char--in { animation: char-in 0.6s var(--ease) both; animation-delay: calc(var(--ci) * 28ms); }
@keyframes char-in { from { transform: translateY(0.7em) rotate(10deg); opacity: 0; } }
.hero__lead { margin-top: 28px; max-width: 560px; font-size: 19px; line-height: 1.55; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

.hero__visual { position: relative; padding: 0 0 132px; perspective: 1400px; animation: reveal-in 1.2s var(--ease) 0.3s both; }
.stage { --rx: 0deg; --ry: 0deg; position: relative; transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform 0.6s var(--ease); }
.universe { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); aspect-ratio: 4 / 3; transform-style: preserve-3d; box-shadow: 0 50px 90px -40px rgba(199, 0, 58, 0.6); }
.universe i { --lift: 0; background: var(--c); transform: translateZ(calc(var(--lift) * 70px)); filter: brightness(calc(1 + var(--lift) * 0.12)); box-shadow: 0 calc(var(--lift) * 30px) calc(var(--lift) * 40px) -10px rgba(90, 0, 20, 0.45); transition: background-color 1.4s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease), filter 0.35s; }
.universe__logo { position: absolute; left: 50%; top: 50%; width: 58%; transform: translate3d(-50%, -50%, 90px); pointer-events: none; filter: drop-shadow(0 12px 18px rgba(90, 0, 20, 0.35)); }
.universe__logo .logo__pi, .universe__logo .logo__ruby { fill: #fff; }

.terminal { position: absolute; left: -40px; bottom: -132px; width: 74%; background: var(--ink); color: #e8e3e1; box-shadow: 0 40px 70px -24px rgba(29, 28, 30, 0.6); transform: translateZ(140px); }
.terminal__bar, .mock__bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; }
.terminal__bar { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.terminal__bar i, .mock__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--band-1); }
.terminal__bar i:nth-child(2), .mock__bar i:nth-child(2) { background: var(--band-3); }
.terminal__bar i:nth-child(3), .mock__bar i:nth-child(3) { background: var(--band-5); }
.terminal__bar span, .mock__bar span { margin-left: 10px; font: 11.5px var(--mono); color: #8d8689; }
.terminal__body { margin: 0; padding: 16px 18px 20px; font: 11.5px/1.75 var(--mono); white-space: pre; overflow-x: auto; }
.caret { display: inline-block; width: 7px; height: 1.1em; vertical-align: -0.2em; background: var(--red); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero__stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 88px 0 0; border-top: 2px solid var(--ink); }
.hero__stats div { position: relative; display: flex; flex-direction: column-reverse; gap: 6px; padding: 24px 24px 28px 0; }
.hero__stats div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.hero__stats dt { font-size: 14px; color: var(--muted); }
.hero__stats dd { margin: 0; font: 800 clamp(44px, 5vw, 68px)/1 var(--display); color: var(--crimson); }

.marquee { margin-top: 24px; padding: 22px 0; overflow: hidden; background: var(--crimson); color: #fff; }
.marquee__track { display: flex; align-items: center; gap: 34px; width: max-content; animation: marquee 40s linear infinite; font: 800 22px var(--display); text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; }
.marquee__dot { font-size: 12px; color: var(--band-5); }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (max-width: 1020px) {
  .hero__inner { grid-template-columns: 1fr; gap: 56px; }
  .hero__visual { max-width: 640px; margin-left: 44px; }
  .hero__stats { grid-template-columns: 1fr 1fr; }
  .hero__stats div:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero__stats div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .hero { padding-top: 84px; }
  .strip--hero { top: 24px; width: 46vw; height: 12px; }
  .hero__lead { font-size: 17px; }
  .hero__actions .btn { flex: 1 1 100%; justify-content: center; }
  .hero__visual { margin-left: 0; padding-bottom: 0; }
  .terminal { position: relative; left: auto; bottom: auto; margin: -28px 0 0 16px; width: calc(100% - 16px); transform: none; }
  .terminal__body { font-size: 10px; }
  .hero__stats { margin-top: 56px; }
  .hero__stats div, .hero__stats div + div { padding: 18px 12px 20px 0; }
  .hero__stats div:nth-child(even) { padding-left: 16px; }
}

/* ---------- giant scrolling type ---------- */

.bigtype { padding: 110px 0 30px; overflow: hidden; }
.bigtype__row { display: flex; align-items: center; gap: 48px; width: max-content; font: 800 clamp(64px, 11vw, 170px)/1.05 var(--display); text-transform: uppercase; white-space: nowrap; will-change: transform; }
.bigtype__row i { flex: none; width: 0.42em; height: 0.42em; background: var(--crimson); }
.bigtype__row--outline { color: transparent; -webkit-text-stroke: 2px var(--crimson); }
.bigtype__row--outline i { background: var(--red); }

/* ---------- sections ---------- */

.section { position: relative; padding: 140px 0; }
.section--tight { padding: 64px 0; }
.section--alt { background: var(--paper-2); }
.section--ink { background: var(--ink); color: #f3efee; }
.section--red { background: var(--crimson); color: #fff; overflow: hidden; }
.section__head { max-width: 820px; margin-bottom: 72px; }

/* The eyebrow carries the broken "I" from the logo. */
.eyebrow { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 26px; font: 500 13px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.16em; color: var(--crimson); }
.eyebrow::before { content: ""; flex: none; width: 5px; height: 16px; margin-top: 26px; background: currentColor; box-shadow: 0 -22px 0 currentColor; }
.section--ink .eyebrow { color: var(--band-5); }
.section--red .eyebrow, .eyebrow--light { color: #fff; }

.section__title { font-size: clamp(32px, 4.2vw, 58px); line-height: 1.06; letter-spacing: -0.005em; }
.section--ink .muted { color: #6f696b; }
.section__lead { margin-top: 24px; font-size: 19px; color: var(--muted); max-width: 640px; }
.section--ink .section__lead { color: #a8a1a3; }

@media (max-width: 640px) { .section { padding: 96px 0; } .section__head { margin-bottom: 48px; } }

/* reveal on scroll */
.will-reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--reveal-delay, 0ms); }
.will-reveal.is-visible { opacity: 1; transform: none; }
.reveal-now { animation: reveal-in 0.9s var(--ease) both; animation-delay: var(--reveal-delay, 0ms); }
@keyframes reveal-in { from { opacity: 0; transform: translateY(28px); } }

/* ---------- case cards: a sticky stack ---------- */

.cases { display: flex; flex-direction: column; gap: 48px; padding-bottom: 40px; }
.case {
  --covered: 0;
  position: sticky; top: calc(var(--nav-h) + 24px + var(--i) * 14px);
  display: grid; grid-template-columns: 1.25fr 1fr; min-height: min(560px, calc(100vh - var(--nav-h) - 120px));
  background: #fff; border: 1px solid var(--line); overflow: hidden;
  box-shadow: 0 -10px 40px -24px rgba(29, 28, 30, 0.25);
  transform: scale(calc(1 - var(--covered) * 0.06)); transform-origin: 50% 0;
  filter: brightness(calc(1 - var(--covered) * 0.12));
  transition: border-color 0.4s, box-shadow 0.4s;
}
.case:nth-child(even) { grid-template-columns: 1fr 1.25fr; }
.case:nth-child(even) .case__visual { order: 2; }
.case::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px; background: var(--bands); transform: scaleX(0); transform-origin: left; transition: transform 0.7s var(--ease); }
.case:hover::after { transform: scaleX(1); }
.case:hover { box-shadow: 0 40px 80px -40px color-mix(in srgb, var(--accent) 70%, transparent); }
.case__visual { position: relative; display: flex; align-items: center; padding: 48px; overflow: hidden; background: var(--accent); }
.case__visual::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0 25%, rgba(255, 255, 255, 0.06) 0 50%, rgba(255, 255, 255, 0.12) 0 75%, rgba(255, 255, 255, 0.18) 0); }
.case__visual .mock { position: relative; width: 100%; border: 0; box-shadow: 0 40px 70px -30px rgba(40, 0, 10, 0.7); transform: rotate(-2deg); transition: transform 0.7s var(--ease); }
.case:nth-child(even) .case__visual .mock { transform: rotate(2deg); }
.case:hover .case__visual .mock { transform: rotate(0) scale(1.03); }
.case__body { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 56px; }
.case__index { font: 800 clamp(64px, 8vw, 120px)/0.9 var(--display); color: transparent; -webkit-text-stroke: 2px var(--accent); margin-bottom: 8px; }
.case__index small { font-size: 0.32em; -webkit-text-stroke: 0; color: var(--dim); margin-left: 6px; }
.case__kicker { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); }
.case__name { font-size: clamp(32px, 3.6vw, 52px); }
.case__tagline { color: var(--muted); font-size: 18px; max-width: 440px; }
.case__more { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; margin-top: 16px; padding: 14px 20px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; transition: background 0.3s, gap 0.3s var(--ease); }
.case:hover .case__more { background: var(--accent); gap: 16px; }

@media (max-width: 900px) {
  .cases { gap: 24px; }
  .case, .case:nth-child(even) { position: relative; top: auto; grid-template-columns: 1fr; min-height: 0; transform: none; filter: none; }
  .case:nth-child(even) .case__visual { order: 0; }
  .case__visual { padding: 28px; }
  .case__body { padding: 30px 28px 34px; }
  .case__index { font-size: 64px; }
}

/* ---------- product mocks (light) ---------- */

.mock {
  background: #fff; border: 1px solid var(--line); border-bottom: 0; overflow: hidden;
  font-size: 12px; color: #3a3537;
  box-shadow: 0 -20px 50px -30px color-mix(in srgb, var(--accent) 60%, transparent);
  transition: transform 0.5s var(--ease);
}
.mock__bar { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.mock__bar span { color: var(--dim); }
.mock__body { padding: 18px; min-height: 236px; }
.mock small { color: var(--dim); font-size: 11px; }
.mock strong { color: var(--ink); font-family: var(--display); font-weight: 800; }

.mock-erp { display: flex; gap: 14px; }
.mock-erp__side { display: flex; flex-direction: column; gap: 10px; padding-top: 2px; }
.mock-erp__side b { width: 26px; height: 26px; background: var(--paper-2); }
.mock-erp__side b.on { background: var(--accent); }
.mock-erp__main { flex: 1; }
.mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-kpis div { padding: 12px; background: var(--paper-2); display: flex; flex-direction: column; gap: 4px; border-left: 3px solid var(--accent); }
.mock-kpis strong { font-size: 22px; }
.mock-rows { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.mock-row { display: grid; grid-template-columns: 64px 1fr 74px 60px; align-items: center; gap: 10px; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.mock-row code { font: 11px var(--mono); color: var(--accent); }
.mock-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-row em { font-style: normal; font-size: 11px; color: var(--muted); }
.mock-row i, .mock-pillars i { height: 5px; background: linear-gradient(90deg, var(--accent) var(--p), var(--line) var(--p)); }

.mock-store { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mock-store__img { min-height: 214px; display: flex; gap: 6px; padding: 18px 14px 0; background: linear-gradient(180deg, #f6eeea, #efe3de); border-top: 6px solid #6b5f5b; }
.mock-store__img span { flex: 1; background: repeating-linear-gradient(90deg, var(--accent) 0 8px, color-mix(in srgb, var(--accent) 78%, #000) 8px 16px); animation: sway 5s ease-in-out infinite; transform-origin: top; }
.mock-store__img span:nth-child(2) { animation-delay: -1.5s; }
.mock-store__img span:nth-child(3) { animation-delay: -3s; }
@keyframes sway { 50% { transform: skewX(2deg); } }
.mock-store__cfg { display: flex; flex-direction: column; gap: 8px; }
.mock-store__cfg > strong { font-size: 18px; }
.mock-field { display: flex; justify-content: space-between; padding: 8px 10px; background: var(--paper-2); }
.mock-field b { color: var(--ink); }
.mock-swatches { display: flex; gap: 8px; }
.mock-swatches i { width: 22px; height: 22px; background: #3a2e4f; outline: 2px solid transparent; outline-offset: 2px; }
.mock-swatches i:nth-child(2) { background: var(--accent); }
.mock-swatches i:nth-child(3) { background: #8a6d5a; }
.mock-swatches i:nth-child(4) { background: #d7d0c4; }
.mock-swatches i.on { outline-color: var(--ink); }
.mock-price { display: flex; justify-content: space-between; align-items: baseline; }
.mock-price span { font-size: 11px; color: var(--dim); }
.mock-price b { font: 800 18px var(--display); color: var(--ink); }
.mock-cta { text-align: center; padding: 10px; background: var(--accent); color: #fff; font-weight: 700; }

.mock-energy { position: relative; }
.mock-map { width: 100%; height: 204px; }
.mock-map path { fill: color-mix(in srgb, var(--accent) 8%, #fff); stroke: color-mix(in srgb, var(--accent) 55%, #fff); stroke-width: 1; stroke-dasharray: 3 3; }
.mock-map circle { fill: var(--accent); }
.mock-map .pulse { fill: none; stroke: var(--accent); stroke-width: 1.5; transform-origin: 190px 65px; animation: pulse 2s ease-out infinite; }
@keyframes pulse { from { transform: scale(0.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.mock-card { position: absolute; right: 0; bottom: 0; width: 58%; padding: 14px; background: #fff; border: 1px solid var(--line); box-shadow: 0 16px 30px -18px rgba(29, 28, 30, 0.35); display: flex; flex-direction: column; gap: 6px; }
.mock-card strong { font-size: 16px; }
.mock-steps { display: flex; gap: 3px; }
.mock-steps i { flex: 1; height: 4px; background: var(--line); }
.mock-steps i.on { background: var(--accent); }
.mock-tag { font-size: 11px; color: var(--accent); font-weight: 600; }

.mock-search { padding: 11px 14px; background: var(--paper-2); border: 1px solid var(--line); color: var(--muted); }
.mock-search span { color: var(--accent); margin-right: 6px; }
.mock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.mock-lot { padding: 14px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.mock-lot:first-child { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.mock-lot span { font-size: 18px; }
.mock-lot strong { font-size: 13px; }
.mock-lot small { color: var(--accent); font-weight: 600; }

.mock-build { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 14px; }
.mock-tree { display: flex; flex-direction: column; gap: 4px; font: 11px var(--mono); color: var(--muted); }
.mock-tree span { padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-tree .in { padding-left: 18px; }
.mock-tree .in2 { padding-left: 28px; }
.mock-tree .on { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); font-weight: 500; }
.mock-doc { padding: 14px; background: var(--paper-2); display: flex; flex-direction: column; gap: 10px; }
.mock-doc p { display: flex; flex-direction: column; gap: 6px; }
.mock-doc p b { height: 6px; background: var(--line-2); }
.mock-doc p b.short { width: 60%; }
.mock-ai { font-size: 11px; padding: 8px 10px; color: var(--accent); background: #fff; border: 1px dashed var(--accent); }
.mock-flow { display: flex; gap: 4px; flex-wrap: wrap; }
.mock-flow span { font-size: 10.5px; padding: 4px 8px; border: 1px solid var(--line-2); color: var(--muted); background: #fff; }
.mock-flow span.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

.mock-geo { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 18px; align-items: center; }
.mock-gauge { position: relative; }
.mock-gauge svg { width: 100%; height: auto; transform: rotate(-90deg); }
.mock-gauge circle { fill: none; stroke: var(--line); stroke-width: 10; }
.mock-gauge circle.val { stroke: var(--accent); stroke-dasharray: 314; stroke-dashoffset: 69; }
.mock-gauge strong { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: 34px; }
.mock-gauge strong small { font-size: 12px; }
.mock-pillars { display: flex; flex-direction: column; gap: 12px; }
.mock-pillars div:not(.mock-llm) { display: flex; flex-direction: column; gap: 6px; }
.mock-pillars i { height: 7px; }
.mock-llm { display: flex; flex-wrap: wrap; gap: 6px; }
.mock-llm span { font-size: 10.5px; padding: 4px 8px; background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent); font-weight: 600; }
.mock-llm span.off { background: var(--paper-2); color: var(--dim); }

@media (max-width: 520px) {
  .mock__body { padding: 12px; }
  .mock-kpis { grid-template-columns: 1fr 1fr; }
  .mock-kpis div:last-child { display: none; }
  .mock-row { grid-template-columns: 56px 1fr 56px; }
  .mock-row i { display: none; }
  .mock-store, .mock-build, .mock-geo { grid-template-columns: 1fr; }
  .mock-store__img { min-height: 120px; }
  .mock-gauge { max-width: 140px; margin-inline: auto; }
}

/* ---------- services ---------- */

.services { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); }
.service {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 40px 34px 36px;
  background: #fff; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  transition: background 0.35s, color 0.35s, opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.service__icon { display: grid; place-items: center; width: 52px; height: 52px; background: var(--crimson); color: #fff; font-size: 20px; transition: background 0.35s, color 0.35s; }
.service h3 { font-size: 21px; }
.service p { color: var(--muted); font-size: 16px; transition: color 0.35s; }
.service__proof { margin-top: auto; padding-top: 12px; color: var(--dim); transition: color 0.35s; }
.service:hover { background: var(--crimson); color: #fff; }
.service:hover .service__icon { background: #fff; color: var(--crimson); }
.service:hover p, .service:hover .service__proof { color: rgba(255, 255, 255, 0.85); }

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

/* ---------- process (ink) ---------- */

.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(255, 255, 255, 0.14); }
.step { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 40px 30px 10px 0; }
.step + .step { padding-left: 30px; border-left: 1px solid rgba(255, 255, 255, 0.14); }
.step::before { content: ""; position: absolute; top: -1px; left: 0; width: 0; height: 4px; transition: width 1.2s var(--ease) 0.2s; }
.step:nth-child(1)::before { background: var(--band-1); }
.step:nth-child(2)::before { background: var(--band-2); }
.step:nth-child(3)::before { background: var(--band-3); }
.step:nth-child(4)::before { background: var(--band-5); }
.step.is-visible::before, .step.reveal-now::before, .step:not(.will-reveal)::before { width: 100%; }
.step__num { font: 800 64px/1 var(--display); color: transparent; -webkit-text-stroke: 1.5px var(--band-5); }
.step h3 { font-size: 22px; color: #fff; }
.step__time { color: var(--band-5); }
.step p { color: #a8a1a3; font-size: 16px; }

@media (max-width: 900px) {
  .process { grid-template-columns: 1fr 1fr; }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
  .process { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 32px 0 22px; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }
}

/* ---------- stack ---------- */

.stack__cloud { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stack__group { padding-top: 22px; border-top: 4px solid var(--ink); }
.stack__group:nth-child(1) { border-color: var(--band-1); }
.stack__group:nth-child(2) { border-color: var(--band-2); }
.stack__group:nth-child(3) { border-color: var(--band-3); }
.stack__group:nth-child(4) { border-color: var(--band-5); }
.stack__group h3 { margin-bottom: 18px; font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 13px; border: 1px solid var(--line-2); background: #fff; font-size: 14px; font-weight: 500; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.chip:hover { border-color: var(--crimson); background: var(--crimson); color: #fff; }
.chips--lg .chip { padding: 13px 20px; font-size: 17px; }

@media (max-width: 980px) { .stack__cloud { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .stack__cloud { grid-template-columns: 1fr; } }

/* ---------- why (red) ---------- */

.section--red::after { content: ""; position: absolute; right: -8vw; top: 0; bottom: 0; width: 36vw; background: linear-gradient(90deg, var(--band-2) 0 25%, var(--band-3) 0 50%, var(--band-4) 0 75%, var(--band-5) 0); opacity: 0.4; transform: skewX(-12deg); pointer-events: none; }
.section--red .container { position: relative; z-index: 1; }
.why { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(255, 255, 255, 0.4); }
.why__item { padding: 34px 28px 0 0; }
.why__item + .why__item { padding-left: 28px; border-left: 1px solid rgba(255, 255, 255, 0.4); }
.why__item h3 { font-size: 20px; margin-bottom: 12px; color: #fff; }
.why__item p { color: rgba(255, 255, 255, 0.88); font-size: 16px; }

@media (max-width: 900px) {
  .why { grid-template-columns: 1fr 1fr; }
  .why__item:nth-child(3) { padding-left: 0; border-left: 0; }
  .why__item { padding-bottom: 30px; }
}
@media (max-width: 520px) {
  .why { grid-template-columns: 1fr; border-top: 0; }
  .why__item, .why__item + .why__item { padding: 28px 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.4); }
}

/* ---------- contact: the back of the business card ---------- */

.contact { position: relative; overflow: hidden; color: #fff; padding: 150px 0; }
.contact__bands { position: absolute; inset: 0; display: flex; }
.contact__bands i { flex: 1; transform-origin: bottom; }
.contact__bands.will-reveal { opacity: 1; transform: none; }
.contact__bands.will-reveal i { transform: scaleY(0); transition: transform 1.1s var(--ease); }
.contact__bands.will-reveal.is-visible i { transform: none; }
.contact__bands.will-reveal i:nth-child(2) { transition-delay: 0.08s; }
.contact__bands.will-reveal i:nth-child(3) { transition-delay: 0.16s; }
.contact__bands.will-reveal i:nth-child(4) { transition-delay: 0.24s; }
.contact__bands.will-reveal i:nth-child(5) { transition-delay: 0.32s; }
.contact__bands.will-reveal i:nth-child(6) { transition-delay: 0.4s; }
.contact__bands i:nth-child(1), .contact__bands i:nth-child(6) { background: var(--band-1); }
.contact__bands i:nth-child(2) { background: var(--band-2); }
.contact__bands i:nth-child(3) { background: var(--band-3); }
.contact__bands i:nth-child(4) { background: var(--band-4); }
.contact__bands i:nth-child(5) { background: var(--band-5); }
.contact__inner { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.contact__title { font-size: clamp(36px, 4.8vw, 66px); line-height: 1.06; }
.contact__lead { margin-top: 26px; max-width: 520px; font-size: 19px; color: rgba(255, 255, 255, 0.92); }

.contact__card { padding: 44px 44px 36px; background: #fff; color: var(--ink); box-shadow: 0 50px 90px -40px rgba(60, 0, 15, 0.7); transform: rotate(-2deg); transition: transform 0.5s var(--ease), opacity 0.9s var(--ease); }
.contact__card:hover { transform: rotate(0); }
.contact__logo { width: 190px; margin-bottom: 30px; }
.contact__name { font: 700 22px var(--sans); color: var(--crimson); }
.contact__role { color: var(--red); margin-bottom: 26px; }
.contact__list { list-style: none; margin: 0; padding: 0; }
.contact__list a { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); transition: color 0.2s, padding 0.3s var(--ease); }
.contact__list a:hover { color: var(--crimson); padding-left: 8px; }
.contact__list .mono { color: var(--dim); text-transform: uppercase; letter-spacing: 0.12em; }
.contact__list strong { font-size: 18px; word-break: break-word; }

@media (max-width: 900px) {
  .contact { padding: 110px 0; }
  .contact__inner { grid-template-columns: 1fr; gap: 48px; }
  .contact__card { transform: none; padding: 32px 26px 24px; }
  .contact__list a { grid-template-columns: 1fr auto; }
  .contact__list .mono { grid-column: 1 / -1; }
}

/* ---------- footer ---------- */

.footer { background: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-top: 72px; }
.footer__logo { display: block; width: 150px; }
.footer__claim { margin-top: 22px; max-width: 340px; color: var(--muted); font-size: 15px; }
.footer__title { margin-bottom: 18px; font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: 0.16em; color: var(--dim); }
.footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.footer__list a { transition: color 0.2s; }
.footer__list a:hover { color: var(--crimson); }
.footer__address { font-style: normal; font-size: 15px; color: var(--red); line-height: 1.6; }
.footer__address strong { display: block; margin-bottom: 4px; color: var(--crimson); }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 64px; padding: 26px 0 34px; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }

@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__grid > :first-child { grid-column: 1 / -1; } }

/* ---------- case study page ---------- */

.study__hero { position: relative; padding: 120px 0 0; background: linear-gradient(180deg, #fff 0 62%, color-mix(in srgb, var(--accent) 9%, #fff) 62%); }
.back { display: inline-flex; gap: 8px; margin-bottom: 44px; color: var(--muted); font-size: 13px; transition: color 0.2s; }
.back:hover { color: var(--crimson); }
.study__title { margin-top: 18px; font-size: clamp(48px, 8.4vw, 120px); line-height: 0.92; letter-spacing: -0.02em; }
.study__tagline { margin-top: 26px; max-width: 780px; font-size: clamp(20px, 2.4vw, 28px); line-height: 1.35; color: var(--muted); }
.study__meta { display: flex; flex-wrap: wrap; gap: 56px; margin-top: 44px; padding-top: 26px; border-top: 2px solid var(--ink); }
.study__meta div { display: flex; flex-direction: column; gap: 4px; }
.study__meta small { color: var(--dim); text-transform: uppercase; letter-spacing: 0.16em; }
.study__meta span, .study__meta a { font-weight: 700; }
.study__meta a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.study__visual { margin-top: 72px; max-width: 940px; margin-inline: auto; }
.study__visual .mock { box-shadow: 0 -30px 80px -40px color-mix(in srgb, var(--accent) 70%, transparent); }
.study__visual .mock__body { min-height: 300px; padding: 26px; font-size: 13px; }

.study__facts { display: grid; grid-template-columns: repeat(3, 1fr); }
.fact { padding: 40px 36px; color: #fff; }
.fact:nth-child(1) { background: var(--band-1); }
.fact:nth-child(2) { background: var(--band-3); }
.fact:nth-child(3) { background: var(--band-5); }
.fact strong { display: block; font: 800 clamp(44px, 5vw, 72px)/1 var(--display); }
.fact span { display: block; margin-top: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.92); }

.study__story { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; }
.study__text { font-size: 21px; line-height: 1.6; color: #3a3537; }

.next-study { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 60px; overflow: hidden; background: var(--accent); color: #fff; }
.next-study::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 30%; background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 33%, rgba(255, 255, 255, 0.16) 0 66%, rgba(255, 255, 255, 0.24) 0); transition: width 0.6s var(--ease); }
.next-study:hover::after { width: 45%; }
.next-study > .mono { position: relative; color: rgba(255, 255, 255, 0.8); text-transform: uppercase; letter-spacing: 0.16em; }
.next-study strong { position: relative; font: 800 clamp(36px, 5.2vw, 68px)/1 var(--display); }
.next-study__tag { position: relative; max-width: 620px; font-size: 18px; color: rgba(255, 255, 255, 0.9); }

@media (max-width: 820px) {
  .study__facts { grid-template-columns: 1fr; }
  .study__story { grid-template-columns: 1fr; gap: 40px; }
  .next-study { padding: 36px; }
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- language switch ---------- */

.lang { display: inline-flex; border: 1px solid var(--line-2); }
.nav__links .lang a { padding: 7px 10px; font: 600 12px/1 var(--mono); letter-spacing: 0.08em; color: var(--muted); transition: background 0.2s, color 0.2s; }
.lang a:hover { color: var(--crimson); }
.nav__links .lang a::after { display: none; }
.lang a.is-current { background: var(--ink); color: #fff; }
@media (max-width: 860px) {
  .nav__links .lang { align-self: flex-start; margin-top: 18px; }
  .nav__links .lang a { padding: 10px 14px; border: 0; font-size: 14px; }
}

/* ---------- real screenshots ---------- */

.shot { margin: 0; overflow: hidden; background: #fff; box-shadow: 0 40px 70px -30px rgba(40, 0, 10, 0.55); }
.shot img { width: 100%; height: auto; }
.case__visual .shot { position: relative; width: 100%; transform: rotate(-2deg); transition: transform 0.7s var(--ease); }
.case:nth-child(even) .case__visual .shot { transform: rotate(2deg); }
.case:hover .case__visual .shot { transform: rotate(0) scale(1.03); }
.case__visual .shot img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.study__visual .shot { box-shadow: 0 -30px 80px -40px color-mix(in srgb, var(--accent) 70%, transparent), 0 40px 70px -40px rgba(29, 28, 30, 0.4); }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.gallery .shot:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
@media (max-width: 820px) { .gallery { grid-template-columns: 1fr; } }
