/* Viral App Ventures — company site. No build step, no third-party requests. */

@font-face { font-family: "Plus Jakarta Sans"; src: url("assets/fonts/plus-jakarta-sans-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("assets/fonts/plus-jakarta-sans-700.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("assets/fonts/plus-jakarta-sans-800.woff") format("woff"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  --canvas: #fafafb;
  --surface: #ffffff;
  --ink: #16161d;
  --ink-2: #4a4a57;       /* 8.2:1 on canvas */
  --line: rgba(22, 22, 29, 0.1);
  --accent: #4a3cff;      /* indigo, 6.6:1 on canvas */
  --accent-ink: #ffffff;
  --glass: rgba(245, 245, 247, 0.72);
  --floor: rgba(22, 22, 29, 0.07);
  --b1: #4a3cff;
  --b2: #ff6a3d;
  --b3: #8f86ff;
  --b4: #d9d6f7;
  --b5: #1b1b26;
  --radius: 20px;
  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0c0c11;
    --surface: #17171f;
    --ink: #f3f3f7;
    --ink-2: #b4b4c2;      /* 9.6:1 on canvas */
    --line: rgba(243, 243, 247, 0.12);
    --accent: #8f86ff;     /* 6.9:1 on canvas */
    --accent-ink: #0c0c11;
    --glass: rgba(12, 12, 17, 0.7);
    --floor: rgba(243, 243, 247, 0.06);
    --b5: #e4e4ee;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 1.0625rem/1.55 "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--canvas); padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 700; }
.skip:focus { top: 12px; }

.container { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }

/* ───────── Header ───────── */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.bar__in { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -0.02em; font-size: 1.0625rem; }
.brand svg { width: 26px; height: 26px; flex: none; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { text-decoration: none; font-weight: 700; font-size: 0.9375rem; color: var(--ink-2); padding: 10px 14px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { color: var(--ink); background: var(--line); }
@media (max-width: 560px) { .nav a:not(:last-child) { display: none; } }

/* ───────── Hero ───────── */
.hero { padding: clamp(36px, 7vw, 88px) 0 clamp(40px, 7vw, 96px); overflow: hidden; }
.hero__in { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: clamp(8px, 3vw, 40px); }
.hero h1 {
  margin: 0 0 28px;
  font-weight: 800; letter-spacing: -0.045em; line-height: 0.96;
  font-size: clamp(2.9rem, 7.2vw, 6rem);
}
.lede { margin: 0 0 32px; color: var(--ink-2); font-size: clamp(1.0625rem, 1.5vw, 1.25rem); max-width: 30em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px; border-radius: 14px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  background: var(--ink); color: var(--canvas);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.97); }
.link { font-weight: 700; text-decoration: none; padding: 12px 4px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.link span { transition: transform 0.2s; }
.link:hover span { transform: translateX(4px); }
.link:hover { text-decoration: underline; text-underline-offset: 5px; }

@media (max-width: 860px) {
  .hero__in { grid-template-columns: 1fr; }
  .hero__stage { order: -1; }
}

/* ───────── 3D brick stage ───────── */
.hero__stage { perspective: 1600px; display: grid; place-items: center; aspect-ratio: 1 / 0.92; width: 100%; }
@media (max-width: 860px) { .hero__stage { aspect-ratio: 1 / 0.7; } }

.stage {
  --s: clamp(40px, 7.2vw, 74px);   /* brick footprint */
  --gap: calc(var(--s) * 0.09);
  --u: calc(var(--s) * 0.36);      /* one height unit */
  --rx: 0deg; --rz: 0deg;
  position: relative;
  width: calc(var(--s) * 5 + var(--gap) * 4);
  height: calc(var(--s) * 5 + var(--gap) * 4);
  transform-style: preserve-3d;
  transform: rotateX(calc(58deg + var(--rx))) rotateZ(calc(-45deg + var(--rz)));
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@media (max-width: 860px) { .stage { --s: clamp(34px, 9.4vw, 58px); } }

.floor {
  position: absolute; inset: calc(var(--s) * -0.7);
  border-radius: calc(var(--s) * 0.5);
  background:
    repeating-linear-gradient(0deg, var(--floor) 0 1px, transparent 1px calc(var(--s) + var(--gap))),
    repeating-linear-gradient(90deg, var(--floor) 0 1px, transparent 1px calc(var(--s) + var(--gap)));
  background-position: calc(var(--s) * 0.7) calc(var(--s) * 0.7);
  transform: translateZ(-2px);
}

.brick {
  position: absolute;
  width: var(--s); height: var(--s);
  left: calc(var(--x) * (var(--s) + var(--gap)));
  top: calc(var(--y) * (var(--s) + var(--gap)));
  transform-style: preserve-3d;
  animation: rise 1.1s cubic-bezier(0.2, 0.9, 0.25, 1.15) both;
  animation-delay: calc((var(--x) + var(--y)) * 90ms + 150ms);
}
.cube {
  --H: calc(var(--h) * var(--u));
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  animation: bob var(--dur) ease-in-out infinite alternate;
  animation-delay: calc(var(--x) * -0.7s - var(--y) * 0.4s);
}
.cube i { position: absolute; display: block; }
.cube .top {
  inset: 0;
  transform: translateZ(var(--H));
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.4) 0 17%, rgba(0,0,0,0.16) 19% 25%, transparent 27%) 0 0 / 50% 50%,
    var(--c);
  border-radius: calc(var(--s) * 0.08);
}
.cube .front {
  left: 0; top: 100%; width: 100%; height: var(--H);
  transform-origin: top;
  transform: translateZ(var(--H)) rotateX(-90deg);
  background: color-mix(in srgb, var(--c) 80%, black);
}
.cube .side {
  right: 100%; top: 0; width: var(--H); height: 100%;
  transform-origin: right;
  transform: translateZ(var(--H)) rotateY(-90deg);
  background: color-mix(in srgb, var(--c) 62%, black);
}

@keyframes rise {
  from { transform: translateZ(calc(var(--s) * -4)); }
  to   { transform: translateZ(0); }
}
@keyframes bob {
  from { transform: translateZ(0); }
  to   { transform: translateZ(calc(var(--u) * var(--amp))); }
}

/* ───────── Sections ───────── */
.section { padding: clamp(56px, 8vw, 112px) 0; border-top: 1px solid var(--line); }
.section h2 { margin: 0; font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; font-size: clamp(1.875rem, 4vw, 3rem); text-wrap: balance; }
.split { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(24px, 6vw, 80px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.work { list-style: none; margin: 0; padding: 0; }
.work li { border-top: 1px solid var(--line); }
.work li:first-child { border-top: 0; }
.row {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 20px;
  padding: 24px 0; text-decoration: none;
}
a.row:hover h3 { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.row__icon { width: 64px; height: 64px; border-radius: 15px; background: #483cff; display: grid; place-items: center; }
.row__icon img { width: 40px; height: 40px; }
.row__icon--empty { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.row h3 { margin: 0 0 2px; font-size: clamp(1.375rem, 2.4vw, 1.75rem); font-weight: 800; letter-spacing: -0.025em; }
.row p { margin: 0; color: var(--ink-2); }
.row__meta { color: var(--ink-2); font-weight: 700; font-size: 0.9375rem; white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.row__meta svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.row--quiet h3, .row--quiet p, .row--quiet .row__meta { color: var(--ink-2); }
@media (max-width: 640px) {
  .row { grid-template-columns: 56px 1fr; gap: 16px; }
  .row__icon { width: 56px; height: 56px; }
  .row__meta { grid-column: 2; margin-top: -4px; }
}

.about p { margin: 0 0 20px; font-size: clamp(1.1875rem, 2vw, 1.5rem); line-height: 1.45; letter-spacing: -0.01em; text-wrap: pretty; }
.facts { margin: 36px 0 0; }
.facts div { display: grid; grid-template-columns: 11rem 1fr; gap: 8px 24px; padding: 18px 0; border-top: 1px solid var(--line); }
.facts dt { font-weight: 800; letter-spacing: -0.01em; }
.facts dd { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) { .facts div { grid-template-columns: 1fr; } }

.mail { display: inline-block; font-weight: 800; font-size: clamp(1.5rem, 4.6vw, 3.25rem); letter-spacing: -0.035em; line-height: 1.1; color: var(--ink); text-decoration: none; word-break: break-word; border-bottom: 3px solid var(--accent); padding-bottom: 4px; }
.mail:hover { color: var(--accent); }
.contact address { font-style: normal; color: var(--ink-2); margin-top: 28px; }

/* ───────── Footer ───────── */
.foot { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--ink-2); font-size: 0.9375rem; }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 32px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot nav a { text-decoration: none; font-weight: 700; padding: 10px 0; min-height: 44px; display: inline-flex; align-items: center; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.foot small { display: block; max-width: 56em; line-height: 1.6; font-size: 0.8125rem; margin-top: 4px; }

/* ───────── Document pages (support, privacy, imprint) ───────── */
.doc { padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); }
.doc__in { max-width: 44rem; }
.doc h1 { margin: 0 0 12px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; font-size: clamp(2.25rem, 5.4vw, 3.75rem); text-wrap: balance; }
.doc .meta { color: var(--ink-2); margin: 0 0 40px; }
.doc h2 { margin: 44px 0 10px; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.doc p, .doc li { color: var(--ink-2); }
.doc p { margin: 0 0 14px; }
.doc ul { padding-left: 1.2em; margin: 0 0 14px; }
.doc li { margin: 6px 0; }
.doc strong { color: var(--ink); }
.doc a { color: var(--accent); font-weight: 700; text-underline-offset: 3px; }
.doc address { font-style: normal; color: var(--ink-2); line-height: 1.7; margin: 0 0 14px; }
.doc dl { margin: 0 0 14px; display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; }
.doc dt { color: var(--ink); font-weight: 700; }
.doc dd { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) { .doc dl { grid-template-columns: 1fr; gap: 0; } .doc dd { margin-bottom: 12px; } }

.notfound { min-height: 60vh; display: grid; place-content: center; text-align: center; gap: 16px; padding: 64px 0; }
.notfound h1 { margin: 0; font-size: clamp(4rem, 14vw, 9rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.notfound p { margin: 0; color: var(--ink-2); }

/* ───────── Reveal ───────── */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .brick, .cube { animation: none; }
  .stage { transition: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .link span { transition: none; }
}
@media (forced-colors: active) { .btn { border: 1.5px solid ButtonText; } }

.actions--center { justify-content: center; }
