@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --bg: #07080f;
  --bg-2: #0d0f1c;
  --text: #eef0ff;
  --muted: #9aa0c3;
  --line: rgba(255, 255, 255, .09);
  --glass: rgba(255, 255, 255, .045);
  --violet: #7c5cff;
  --cyan: #22d3ee;
  --pink: #ff5cad;
  --grad: linear-gradient(120deg, var(--violet), var(--cyan));
  --radius: 26px;
  --maxw: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--violet); color: #fff; }

.wrap { width: min(var(--maxw), 100% - 40px); margin-inline: auto; }
section { padding: clamp(72px, 11vw, 150px) 0; position: relative; }

/* ---------- Background ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: var(--bg); }
.aurora i {
  position: absolute; border-radius: 50%; filter: blur(110px); opacity: .5;
  animation: drift 24s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { width: 60vmax; height: 60vmax; background: #4b2fd6; top: -25vmax; left: -15vmax; }
.aurora i:nth-child(2) { width: 50vmax; height: 50vmax; background: #0891b2; right: -20vmax; top: 10vmax; animation-delay: -8s; opacity: .38; }
.aurora i:nth-child(3) { width: 40vmax; height: 40vmax; background: #a3227a; bottom: -20vmax; left: 25vw; animation-delay: -15s; opacity: .3; }
@keyframes drift { to { transform: translate3d(8vmax, 6vmax, 0) scale(1.15); } }
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.grid-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000, transparent 75%);
}

/* ---------- Scroll progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { to { transform: scaleX(1); } }
}

/* ---------- Nav ---------- */
header.nav { position: fixed; top: 14px; left: 0; right: 0; z-index: 90; }
.nav-inner {
  width: min(var(--maxw), 100% - 28px); margin-inline: auto; padding: 10px 14px 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: rgba(14, 16, 30, .6); border: 1px solid var(--line); border-radius: 999px;
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; }
.brand svg { width: 28px; height: 28px; }
.brand span { color: var(--muted); font-weight: 500; }
.nav nav { display: flex; gap: 6px; align-items: center; }
.nav nav a { padding: 8px 14px; border-radius: 999px; font-size: .95rem; color: var(--muted); transition: .2s; }
.nav nav a:hover, .nav nav a[aria-current] { color: var(--text); background: var(--glass); }
.nav nav a.cta { color: #fff; background: var(--grad); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  --a: 0deg; position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px; font-weight: 600; font-size: 1rem; cursor: pointer; border: 0;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s;
}
.btn.primary { color: #fff; background: var(--grad); box-shadow: 0 10px 40px -10px var(--violet); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -8px var(--violet); }
.btn.ghost { color: var(--text); background: var(--glass); border: 1px solid var(--line); }
.btn.ghost:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .08); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: grid; align-items: center; padding-top: 140px; padding-bottom: 80px; }
.pill {
  display: inline-flex; gap: 10px; align-items: center; padding: 7px 16px 7px 8px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line); font-size: .9rem; color: var(--muted);
}
.pill b { background: var(--grad); color: #fff; font-weight: 600; padding: 2px 10px; border-radius: 999px; font-size: .78rem; }
h1, h2, h3 { line-height: 1.05; letter-spacing: -.035em; font-weight: 750; }
h1 { font-size: clamp(2.3rem, 6vw, 4.5rem); margin: 22px 0; max-width: 15ch; }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.7rem); }
.grad-text {
  background: linear-gradient(var(--angle), var(--violet), var(--cyan), var(--pink), var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: spin 8s linear infinite;
}
@keyframes spin { to { --angle: 360deg; } }
.lead { font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--muted); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.stats { display: flex; flex-wrap: wrap; gap: 14px 48px; margin-top: 64px; }
.stats div { font-size: .92rem; color: var(--muted); }
.stats strong { display: block; font-size: 1.2rem; color: var(--text); letter-spacing: -.02em; }

.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: center; }
.hero-visual { position: relative; height: 560px; }
.orbit { position: absolute; inset: 0; margin: auto; width: min(460px, 100%); aspect-ratio: 1; }
.orbit .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .16); animation: rot 40s linear infinite; }
.orbit .ring:nth-child(2) { inset: 14%; animation-duration: 28s; animation-direction: reverse; border-style: solid; border-color: rgba(124, 92, 255, .3); }
.orbit .ring:nth-child(3) { inset: 30%; animation-duration: 18s; }
@keyframes rot { to { transform: rotate(360deg); } }
.orbit .ring em {
  position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 20px 4px var(--cyan);
}
.orbit .ring:nth-child(2) em { background: var(--pink); box-shadow: 0 0 20px 4px var(--pink); }
.orbit .core {
  position: absolute; inset: 38%; border-radius: 30%; display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(124, 92, 255, .5), rgba(34, 211, 238, .35));
  border: 1px solid rgba(255, 255, 255, .25); box-shadow: 0 0 80px rgba(124, 92, 255, .6), inset 0 0 30px rgba(255, 255, 255, .15);
  backdrop-filter: blur(10px); animation: float 6s ease-in-out infinite;
}
.orbit .core svg { width: 46%; }
@keyframes float { 50% { transform: translateY(-14px); } }
.chip {
  position: absolute; padding: 10px 16px; border-radius: 14px; font-size: .85rem; font-weight: 600;
  background: rgba(20, 22, 40, .7); border: 1px solid var(--line); backdrop-filter: blur(14px);
  animation: float 7s ease-in-out infinite;
}
.chip:nth-of-type(1) { top: 6%; left: 0; }
.chip:nth-of-type(2) { top: 30%; right: -4%; animation-delay: -2s; }
.chip:nth-of-type(3) { bottom: 22%; left: -6%; animation-delay: -4s; }
.chip:nth-of-type(4) { bottom: 4%; right: 6%; animation-delay: -1s; }

/* ---------- Marquee ---------- */
.marquee { padding: 26px 0; border-block: 1px solid var(--line); overflow: hidden; background: rgba(255, 255, 255, .02); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: slide 38s linear infinite; }
.marquee-track span { color: var(--muted); font-weight: 600; font-size: 1.1rem; white-space: nowrap; display: flex; align-items: center; gap: 56px; }
.marquee-track span::after { content: "✦"; color: var(--violet); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Section heads ---------- */
.eyebrow { color: var(--cyan); font-weight: 600; font-size: .85rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 18px; }
.head { max-width: 760px; margin-bottom: 64px; }
.head p { color: var(--muted); margin-top: 16px; font-size: 1.05rem; }

/* ---------- Bento cards with glow border ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.card {
  position: relative; padding: 34px; border-radius: var(--radius); background: var(--glass);
  border: 1px solid var(--line); overflow: hidden; isolation: isolate; transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(124, 92, 255, .22), transparent 60%);
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(34, 211, 238, .9), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask-composite: exclude;
}
.card:hover::before, .card:hover::after { opacity: 1; }
.card:hover { transform: translateY(-4px); }
.card .ico {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 26px;
  background: linear-gradient(145deg, rgba(124, 92, 255, .3), rgba(34, 211, 238, .15)); border: 1px solid var(--line);
}
.card .ico svg { width: 26px; height: 26px; stroke: #fff; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.card p { color: var(--muted); }
.card ul { list-style: none; padding: 0; margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.card li { font-size: .82rem; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--text); }
.span-3 { grid-column: span 3; } .span-2 { grid-column: span 2; } .span-4 { grid-column: span 4; }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.step { padding: 30px 26px; border-top: 2px solid var(--line); position: relative; counter-increment: s; }
.step::before { content: "0" counter(s); font-size: 2.6rem; font-weight: 800; letter-spacing: -.05em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step h3 { font-size: 1.15rem; margin: 10px 0; }
.step p { color: var(--muted); font-size: .98rem; }

/* ---------- Product teaser ---------- */
.product {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: clamp(28px, 5vw, 64px);
  border-radius: 36px; border: 1px solid var(--line); overflow: hidden; position: relative;
  background: radial-gradient(800px circle at 90% 10%, rgba(34, 211, 238, .16), transparent 55%), radial-gradient(700px circle at 0% 100%, rgba(124, 92, 255, .25), transparent 55%), var(--bg-2);
}
.product .phones { position: relative; height: 520px; }
.phone { position: absolute; width: 46%; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .55)); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.phone.p1 { left: 4%; top: 30px; transform: rotate(-7deg); z-index: 1; }
.phone.p2 { right: 4%; top: -10px; transform: rotate(6deg); z-index: 2; }
.product:hover .p1 { transform: rotate(-10deg) translate(-14px, 6px); }
.product:hover .p2 { transform: rotate(9deg) translate(14px, -6px); }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0 34px; }
.badge-row span { padding: 6px 14px; border-radius: 999px; font-size: .85rem; border: 1px solid var(--line); background: var(--glass); color: var(--muted); }

/* ---------- About / Contact ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.facts { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--glass); overflow: hidden; }
.facts div { display: flex; justify-content: space-between; gap: 20px; padding: 20px 28px; border-bottom: 1px solid var(--line); }
.facts div:last-child { border: 0; }
.facts dt { color: var(--muted); } .facts dd { font-weight: 600; text-align: right; margin: 0; }
.cta-box {
  text-align: center; padding: clamp(40px, 7vw, 96px) 24px; border-radius: 40px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(124, 92, 255, .35), rgba(34, 211, 238, .2)); border: 1px solid rgba(255, 255, 255, .15);
}
.cta-box h2 { max-width: 18ch; margin: 0 auto 20px; }
.cta-box .lead { margin: 0 auto 36px; color: #cfd3f5; }

footer { border-top: 1px solid var(--line); padding: 44px 0; color: var(--muted); font-size: .92rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
footer nav { display: flex; gap: 22px; }
footer a:hover { color: var(--text); }

/* ---------- GymRat page ---------- */
.app-hero { padding-top: 150px; }
.app-hero .hero-grid { grid-template-columns: 1.1fr .9fr; }
.app-icon { width: 92px; height: 92px; border-radius: 26px; display: grid; place-items: center; background: linear-gradient(145deg, #2f9bff, #0b5fff); box-shadow: 0 20px 50px -10px rgba(47, 155, 255, .6); margin-bottom: 26px; }
.app-icon svg { width: 54px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hero-phone { position: relative; justify-self: center; width: min(340px, 78%); animation: float 7s ease-in-out infinite; filter: drop-shadow(0 40px 70px rgba(47, 155, 255, .35)); }
.hero-phone::before { content: ""; position: absolute; inset: 10% -25%; z-index: -1; background: radial-gradient(closest-side, rgba(47, 155, 255, .45), transparent); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.showcase { display: flex; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 20px max(20px, calc((100vw - var(--maxw)) / 2)) 50px; scrollbar-width: none; }
.showcase::-webkit-scrollbar { display: none; }
#kuvat .wrap { position: relative; }
.showcase-nav { position: absolute; bottom: 0; right: 0; display: flex; gap: 10px; }
.showcase-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); color: var(--text); font-size: 1.6rem; line-height: 1; cursor: pointer; transition: background .2s, border-color .2s; }
.showcase-nav button:hover { background: rgba(255, 255, 255, .1); border-color: var(--cyan); }
@media (hover: none) { .showcase-nav { display: none; } }
.shot { flex: 0 0 min(300px, 70vw); scroll-snap-align: center; text-align: center; }
.shot img { filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .5)); transition: transform .4s; }
.shot:hover img { transform: translateY(-8px) scale(1.02); }
.shot figcaption { margin-top: 18px; color: var(--muted); font-size: .95rem; }
.shot figcaption b { display: block; color: var(--text); font-size: 1.05rem; }

.doc { max-width: 780px; padding-top: 150px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); max-width: none; margin: 0 0 12px; }
.doc h2 { font-size: 1.3rem; margin: 44px 0 12px; letter-spacing: -.02em; }
.doc p, .doc li { color: #c6cae8; margin-bottom: 12px; }
.doc ul { padding-left: 22px; }
.doc a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(36px) scale(.98); filter: blur(8px); transition: opacity .9s, transform .9s cubic-bezier(.2, .8, .2, 1), filter .9s; transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; filter: none; }
@supports (animation-timeline: view()) {
  .rv { opacity: 1; transform: none; filter: none; transition: none; animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
  @keyframes reveal { from { opacity: 0; transform: translateY(50px) scale(.97); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
}

@view-transition { navigation: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .app-hero .hero-grid, .product, .about { grid-template-columns: 1fr; }
  .hero-visual { height: 420px; order: -1; margin-top: -30px; }
  .bento .span-3, .bento .span-2, .bento .span-4 { grid-column: span 6; }
  .steps, .features { grid-template-columns: 1fr 1fr; }
  .nav nav a:not(.cta):not(.lang) { display: none; }
  .product .phones { height: 440px; }
  .hero-phone { order: -1; }
}
@media (max-width: 560px) {
  .steps, .features { grid-template-columns: 1fr; }
  .card { padding: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; filter: none; }
}

.nav nav a.lang { font-size: .8rem; font-weight: 600; letter-spacing: .08em; border: 1px solid var(--line); color: var(--text); }
