:root {
  --bg: #07090f;
  --bg-2: #0b0f19;
  --panel: #0f1420;
  --panel-2: #141a28;
  --line: #1e2638;
  --line-2: #2a3450;
  --text: #eef1f7;
  --muted: #9aa4b8;
  --faint: #6b7489;
  --blue: #3b7bff;
  --blue-soft: #8db4ff;
  --radius: 22px;
  --accent: var(--blue);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; }
a { color: var(--blue-soft); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--text); }
::selection { background: rgba(59, 123, 255, 0.35); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 9, 15, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -0.2px; }
.brand { min-height: 44px; }
.brand-logo { width: 32px; height: 32px; flex: none; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)); }
.brand .tld { color: var(--faint); font-weight: 600; }
.top nav { display: flex; align-items: center; gap: 4px; }
.top nav a {
  color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 500;
  padding: 8px 12px; border-radius: 10px;
}
.top nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.top nav a[aria-current="page"] { color: var(--text); }

/* ---------- Type ---------- */
.eyebrow { color: var(--accent); font-weight: 600; font-size: 12.5px; letter-spacing: 1.8px; text-transform: uppercase; }
h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.04; margin: 14px 0 18px; letter-spacing: -1.6px; font-weight: 750; }
h2 { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.6px; font-weight: 700; }
h3 { font-size: 18px; margin: 0 0 6px; letter-spacing: -0.2px; }
.lead { color: var(--muted); font-size: 18.5px; line-height: 1.6; max-width: 620px; margin: 0; }
.gradient-text {
  background: linear-gradient(100deg, #c3d5ff 0%, #8fb0ff 50%, #5b86ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14.5px; text-decoration: none;
  background: var(--accent); color: #06080d; border: 1px solid transparent;
  transition: transform 0.15s, filter 0.15s, border-color 0.15s;
}
.btn:hover { filter: brightness(1.08); color: #06080d; transform: translateY(-1px); }
.btn.ghost { background: rgba(255, 255, 255, 0.03); color: var(--text); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--accent); color: var(--text); filter: none; }
.btn.soon { background: var(--panel-2); color: var(--muted); border-color: var(--line); cursor: default; transform: none; }
.btn.primary-blue { background: var(--blue); color: #fff; }
.btn.primary-blue:hover { color: #fff; }
.apple { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Home hero ---------- */
.hero-home { position: relative; padding: 112px 0 72px; text-align: center; }
.hero-home .lead { margin: 0 auto; }
.hero-bg {
  position: absolute; inset: 0 0 auto; height: 640px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(50% 55% at 50% 0%, rgba(59, 123, 255, 0.22), transparent 70%),
    radial-gradient(30% 40% at 18% 30%, rgba(198, 244, 50, 0.07), transparent 70%),
    radial-gradient(30% 40% at 82% 30%, rgba(255, 224, 106, 0.07), transparent 70%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(60% 70% at 50% 20%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(60% 70% at 50% 20%, #000, transparent 75%);
}
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); color: var(--muted); font-size: 13.5px;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.15); }
.icon-row { display: flex; justify-content: center; gap: 16px; margin: 36px 0 0; }
.icon-row img { width: 60px; height: 60px; border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255,255,255,0.06); }
.stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 40px; margin-top: 40px; color: var(--muted); font-size: 14.5px; }
.stats strong { display: block; color: var(--text); font-size: 22px; letter-spacing: -0.4px; }

/* ---------- Section heads ---------- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 16px 0 24px; }
.section-head p { color: var(--muted); margin: 0; max-width: 460px; }

/* ---------- App showcase ---------- */
.showcase { display: grid; gap: 24px; padding-bottom: 96px; }
.app-row {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 40px;
  padding: 44px 48px 0; border-radius: 28px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.app-row::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(55% 75% at 95% 100%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%);
}
.app-row > * { position: relative; }
.app-row .copy { padding-bottom: 44px; }
.app-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.app-icon { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 0 0 1px rgba(255,255,255,0.08); flex: none; }
.app-row h2 { margin: 2px 0 0; font-size: clamp(24px, 3vw, 32px); }
.app-row p { color: var(--muted); margin: 0 0 20px; }
.app-row ul { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; }
.app-row li { color: #d7dce8; padding-left: 28px; position: relative; font-size: 15.5px; }
.app-row li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.app-row li::after {
  content: ""; position: absolute; left: 6px; top: 8px; width: 5px; height: 8px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg);
}
.phone {
  justify-self: center; align-self: end; width: min(290px, 100%); aspect-ratio: 9 / 13;
  border-radius: 40px 40px 0 0; border: 9px solid #1b2233; border-bottom: 0;
  overflow: hidden; background: #000; box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.55);
}
.phone img { width: 100%; height: auto; display: block; }
.phone.full { aspect-ratio: auto; border-radius: 40px; border-bottom: 9px solid #1b2233; }

.theme-kelepir { --accent: #ffd84d; }
.theme-carjam { --accent: #5ec2ff; }
.theme-bustraffic { --accent: #1682e8; }
.theme-gainup { --accent: #c6f432; }
.theme-caloriai { --accent: #f2f4f8; }

/* ---------- App page ---------- */
.app-hero { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: center; padding: 72px 0 40px; }
.app-hero .app-icon { width: 84px; height: 84px; border-radius: 20px; margin-bottom: 22px; }
.app-hero .links { margin-top: 26px; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 24px 0 72px; }
.feature { padding: 22px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.feature strong { display: block; margin-bottom: 6px; font-size: 16px; }
.feature span { color: var(--muted); font-size: 15px; }
.feature .num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; margin-bottom: 14px; font-weight: 700; font-size: 14px; color: #06080d; background: var(--accent); }
.legal-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 0 0 88px; }
.legal-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; font-weight: 600;
}
.legal-card span { color: var(--faint); font-weight: 400; font-size: 14px; display: block; }
.legal-card:hover { border-color: var(--accent); color: var(--text); }

/* ---------- Documents ---------- */
.doc { overflow-wrap: break-word; }
.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding: 56px 0 96px; }
.toc { position: sticky; top: 96px; align-self: start; font-size: 14px; }
.toc .eyebrow { display: block; margin-bottom: 12px; }
.toc a { display: block; color: var(--muted); text-decoration: none; padding: 6px 0 6px 14px; border-left: 1px solid var(--line); }
.toc a:hover { color: var(--text); border-color: var(--accent); }
.doc { max-width: 720px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -1.2px; }
.doc h2 { font-size: 21px; letter-spacing: -0.3px; margin: 36px 0 8px; }
.doc h3 { margin-top: 28px; }
.doc p, .doc li { color: #cfd5e2; }
.doc ul { padding-left: 20px; }
.doc li { margin: 8px 0; }
.doc .updated { color: var(--faint); font-size: 14px; margin-top: -6px; }
.lang-switch { display: inline-flex; padding: 4px; gap: 4px; margin: 10px 0 8px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.lang-switch a { padding: 6px 14px; border-radius: 9px; font-size: 14px; text-decoration: none; color: var(--muted); }
.lang-switch a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.divider { border: 0; border-top: 1px solid var(--line); margin: 64px 0 40px; }
.contact {
  padding: 20px 22px; border-radius: 16px; margin: 24px 0;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line);
}
.contact a { font-weight: 600; }

/* ---------- Contact band ---------- */
.contact-band {
  position: relative; overflow: hidden;
  margin: 0 0 96px; padding: 48px 32px; border-radius: 28px; text-align: center;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line);
}
.contact-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(50% 90% at 50% 0%, rgba(59, 123, 255, 0.16), transparent 70%);
}
.contact-band > * { position: relative; }
.contact-band p { color: var(--muted); margin: 0 auto 22px; max-width: 480px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 56px 24px 32px; }
.foot-grid p { color: var(--faint); font-size: 14px; margin: 12px 0 0; max-width: 280px; }
.foot-grid h4 { margin: 4px 0 14px; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.foot-grid a { display: block; color: var(--muted); text-decoration: none; font-size: 14.5px; padding: 4px 0; }
.foot-grid a:hover { color: var(--text); }
.foot-grid a.brand { display: inline-flex; padding: 0; color: var(--text); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 20px 24px 36px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13.5px; }

@media (max-width: 900px) {
  .app-row { grid-template-columns: 1fr; padding: 32px 24px 0; gap: 8px; }
  .app-row .copy { padding-bottom: 16px; }
  .phone { width: min(250px, 78%); }
  .app-hero { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; }
  .app-hero .phone { max-width: 300px; margin: 0 auto; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 36px; }
  .toc { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .section-head { flex-direction: column; align-items: start; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .hero-home { padding: 72px 0 48px; }
  .top nav a { padding: 8px 8px; font-size: 13.5px; }
  .top nav .hide-sm { display: none; }
  .foot-grid { grid-template-columns: 1fr; padding: 40px 18px 24px; }
  .foot-bottom { padding: 18px 18px 32px; }
}

/* ---------- Hero fan + principles ---------- */
.hero-cta { justify-content: center; margin-top: 30px; }
.fan { position: relative; height: 420px; max-width: 760px; margin: 56px auto 0; }
.fan-phone {
  position: absolute; bottom: 0; left: 50%; width: 200px; aspect-ratio: 9 / 18.5;
  border-radius: 34px; border: 7px solid #1b2233; overflow: hidden; background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: transform 0.5s cubic-bezier(.2,.7,.2,1);
}
.fan-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.fan { --p: 0; overflow-x: clip; overflow-clip-margin: 0; }
.fan-phone.center { width: 220px; transform: translateX(-50%) translateY(calc(var(--p) * -40px)) scale(calc(1 + var(--p) * 0.04)); z-index: 3; }
.fan-phone.left {
  transform: translateX(calc(-118% - var(--p) * 22%)) translateY(calc(18px - var(--p) * 10px)) rotate(calc(-9deg - var(--p) * 6deg));
  z-index: 2; opacity: 0.92;
}
.fan-phone.right {
  transform: translateX(calc(18% + var(--p) * 22%)) translateY(calc(18px - var(--p) * 10px)) rotate(calc(9deg + var(--p) * 6deg));
  z-index: 2; opacity: 0.92;
}
.fan-phone { transition: transform 0.12s linear; }
.fan::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 120px; z-index: 4;
  background: linear-gradient(transparent, var(--bg));
}

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 96px; }
.principle {
  padding: 24px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line);
  transition: border-color 0.2s, transform 0.2s;
}
.principle:hover { border-color: var(--line-2); transform: translateY(-2px); }
.principle svg {
  width: 38px; height: 38px; padding: 8px; border-radius: 11px; margin-bottom: 16px;
  fill: none; stroke: var(--blue-soft); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  background: rgba(59, 123, 255, 0.12);
}
.principle strong { display: block; font-size: 17px; margin-bottom: 4px; }
.principle span { color: var(--muted); font-size: 15px; }

.app-row { transition: border-color 0.25s, transform 0.25s; }
.app-row:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.app-row .phone { transition: transform 0.4s cubic-bezier(.2,.7,.2,1); }
.app-row:hover .phone { transform: translateY(-8px); }

/* Reveal on scroll: only hidden when JS runs, so content never disappears without it. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .principles { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .fan { height: 300px; margin-top: 40px; }
  .fan-phone { width: 138px; border-width: 5px; border-radius: 24px; }
  .fan-phone.center { width: 152px; }
}
@media (prefers-reduced-motion: reduce) {
  .fan-phone, .app-row, .app-row .phone, .principle { transition: none; }
}

/* ---------- Galleries & promo images ---------- */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 20px; margin: 0 -4px 72px;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.gallery:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 12px; }
.gallery figure { margin: 0; scroll-snap-align: start; }
.gallery img {
  width: 100%; height: auto; display: block; border-radius: 22px;
  border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s, border-color 0.25s;
}
.gallery figure:hover img { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.phone.promo { border: 0; border-radius: 26px 26px 0 0; background: transparent; }
.phone.promo img { height: 100%; object-fit: cover; object-position: top; }
.promo-hero {
  width: 100%; max-width: 340px; height: auto; justify-self: center; border-radius: 30px;
  border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px color-mix(in srgb, var(--accent) 12%, transparent);
}
@media (max-width: 900px) { .promo-hero { max-width: 300px; } }
@media (max-width: 560px) { .gallery { grid-auto-columns: 68%; } }
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } }


/* ---------- Scroll effects ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 30; pointer-events: none;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, #6f9bff, #3b7bff 60%, #c6f432);
}
.top { transition: background 0.25s, border-color 0.25s; }
.top .wrap { transition: height 0.25s; }
.top.scrolled { background: rgba(7, 9, 15, 0.9); border-color: rgba(255, 255, 255, 0.09); }
.top.scrolled .wrap { height: 54px; }

.js .stagger {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js .stagger.in { opacity: 1; transform: none; }
.js .gallery .stagger { transform: translateY(24px) scale(0.97); }
.js .gallery .stagger.in { transform: none; }

.app-row .phone, .promo-hero, .app-hero .phone { --shift: 0px; translate: 0 var(--shift); }
.js .app-row.reveal .phone { opacity: 0; transform: translateY(60px); transition: opacity 0.8s ease 0.15s, transform 0.9s cubic-bezier(.2,.7,.2,1) 0.15s; }
.js .app-row.reveal.in .phone { opacity: 1; transform: none; }
.app-row:hover .phone { transform: translateY(-8px); }

@media (prefers-reduced-motion: reduce) {
  .progress { display: none; }
  .js .stagger, .js .app-row.reveal .phone { opacity: 1; transform: none; transition: none; }
  .app-row .phone, .promo-hero, .app-hero .phone { translate: none; }
}

/* Very narrow phones: the logo mark alone keeps the nav on one line. */
@media (max-width: 380px) {
  .top .brand-text { display: none; }
  .top nav { gap: 0; }
  .top nav a { padding: 8px 7px; }
}
.top nav a { min-height: 40px; display: inline-flex; align-items: center; }
.contact-band .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; justify-content: center; }
/* Four apps in the bar: keep every label on one line and let the row scroll if a phone is too narrow. */
.top nav a { white-space: nowrap; }
.top nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
@media (max-width: 460px) {
  .top .brand-text { display: none; }
  .top nav { gap: 0; }
  .top nav a { padding: 8px 7px; }
}
