/* ==========================================================================
   Aplikacija — app landing page
   ========================================================================== */
.x-app { background: var(--x-paper); }

/* Store badges */
.x-app-stores { display: flex; flex-wrap: wrap; gap: 10px; }
.x-app-store { display: inline-flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 22px 0 18px; border-radius: 16px; background: var(--x-ink); color: #fff; text-decoration: none; box-shadow: 0 0 0 1px #ffffff1f; transition: transform .35s var(--x-spring), background .2s, box-shadow .2s; }
.x-app-store svg { width: 26px; height: 26px; fill: currentColor; flex: 0 0 auto; }
.x-app-store span { display: grid; line-height: 1.1; font-family: var(--x-display); font-stretch: 112%; font-weight: 900; font-size: 18px; }
.x-app-store small { font-family: var(--x-ui); font-weight: 500; font-size: 11px; opacity: .75; }
.x-app-store:hover { transform: translateY(-3px); background: #000; }
.x-app-store.is-mine { box-shadow: 0 0 0 3px #fff; }
.x-app-stores--light .x-app-store { background: #fff; color: var(--x-ink); box-shadow: none; }
.x-app-stores--light .x-app-store:hover { background: var(--x-red); color: #fff; }
.x-app-stores--light .x-app-store.is-mine { box-shadow: 0 0 0 3px var(--x-red); }

/* ---------------- Hero ---------------- */
.x-app-hero { position: relative; margin: 12px; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 24px; min-height: min(calc(100svh - 120px), 860px); padding: clamp(28px, 4vw, 64px); border-radius: var(--x-r-l); background: var(--x-red); color: #fff; overflow: hidden; isolation: isolate; }
.x-app-hero__title { margin: 0; font-family: var(--x-display); font-stretch: 125%; font-weight: 900; font-size: clamp(54px, 8vw, 128px); line-height: 1; padding-top: .06em; letter-spacing: -.05em; text-transform: uppercase; }
.x-app-hero__title > span { display: block; padding: .02em 0 .06em; margin-top: -.06em; clip-path: inset(-.5em -.3em 0 -.3em); }
.x-app-hero__title > span:last-child { color: var(--x-ink); }
.x-app-hero__lead { max-width: 480px; margin: 22px 0 28px; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; }
.x-app-hero__points { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; font-weight: 700; font-size: 14px; }
.x-app-hero__points li { display: inline-flex; align-items: center; gap: 8px; }
.x-app-hero__points li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF0844' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat; }

.x-app-hero__stage { position: relative; display: grid; place-items: center; min-height: 600px; }
.x-app-ring { position: absolute; width: min(560px, 90%); aspect-ratio: 1; border-radius: 50%; border: 1.5px solid #ffffff3d; animation: x-app-breathe 6s ease-in-out infinite; }
.x-app-ring--2 { width: min(420px, 68%); border-style: dashed; animation: x-spin 40s linear infinite; }
@keyframes x-app-breathe { 50% { transform: scale(1.05); opacity: .6; } }

/* Phone */
.x-phone { position: relative; z-index: 2; width: 300px; aspect-ratio: 9 / 19.2; padding: 12px; border-radius: 52px; background: linear-gradient(145deg, #2a2a30, #0b0b0d); box-shadow: inset 0 0 0 2px #3a3a42, 0 50px 90px -30px #00000099, 0 0 0 1px #00000040; transform: rotate(-5deg); animation: x-phone-float 7s ease-in-out infinite; }
@keyframes x-phone-float { 50% { transform: rotate(-3deg) translateY(-12px); } }
.x-phone__screen { position: relative; height: 100%; border-radius: 40px; background: #F7F5F2; overflow: hidden; }
.x-phone__island { position: absolute; top: 10px; left: 50%; z-index: 3; width: 92px; height: 26px; margin-left: -46px; border-radius: 20px; background: #0b0b0d; }
.x-ui { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 48px 14px 12px; color: var(--x-ink); font-family: var(--x-ui); }
.x-ui__top { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.x-ui__top b { flex: 1; }
.x-ui__logo { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px #0000000f; overflow: hidden; }
.x-ui__logo img, .x-ui__card-brand img { width: 100% !important; max-width: none; height: 100%; object-fit: cover; transform: scale(1.45); }
.x-ui__bell { width: 30px; height: 30px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E0E10' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 8a6 6 0 1 1 12 0c0 7 3 9 3 9H3s3-2 3-9M10 21a2 2 0 0 0 4 0'/%3E%3C/svg%3E") center / 15px no-repeat; box-shadow: 0 2px 8px #0000000f; }
.x-ui__card { position: relative; display: grid; gap: 2px; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, #FF0844, #c4002f); color: #fff; overflow: hidden; box-shadow: 0 14px 28px -14px #ff0844aa; }
.x-ui__card::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 18px, #ffffff0d 18px 19px); pointer-events: none; }
.x-ui__card::before { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, #ffffff40, transparent); transform: skewX(-20deg); animation: x-shine 4.5s 1.5s infinite; }
.x-ui__card-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.x-ui__card-brand { width: 26px; height: 26px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; }
.x-ui__chip { padding: 3px 7px; border-radius: 999px; border: 1px solid #ffffff80; font-family: var(--x-mono); font-size: 8px; letter-spacing: .08em; }
.x-ui__card small { font-size: 10px; opacity: .85; }
.x-ui__card strong { font-family: var(--x-display); font-stretch: 112%; font-weight: 900; font-size: 30px; line-height: 1; }
.x-ui__card-num { margin-top: 6px; font-family: var(--x-mono); font-size: 10px; opacity: .85; letter-spacing: .12em; }
.x-ui__quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.x-ui__quick span { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px; background: #fff; font-size: 9.5px; font-weight: 600; box-shadow: 0 2px 8px #0000000a; }
.x-ui__ico { width: 26px; height: 26px; border-radius: 9px; background: var(--x-red-soft) center / 15px no-repeat; }
.x-ui__ico--cal { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF0844' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.x-ui__ico--glasses { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF0844' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='6' cy='14' r='4'/%3E%3Ccircle cx='18' cy='14' r='4'/%3E%3Cpath d='M10 14c1-1 3-1 4 0'/%3E%3C/svg%3E"); }
.x-ui__ico--shield { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF0844' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4 6v6c0 5 3.5 8 8 9 4.5-1 8-4 8-9V6z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); }
.x-ui__label { margin: 2px 0 0; font-size: 11px; font-weight: 700; }
.x-ui__tx { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.x-ui__tx li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #fff; box-shadow: 0 2px 8px #0000000a; opacity: 0; transform: translateY(14px); animation: x-tx-in .6s var(--x-spring) forwards; animation-delay: calc(1.2s + var(--i) * .35s); }
.x-ui__tx i { width: 24px; height: 24px; flex: 0 0 auto; border-radius: 8px; background: #e7f6ee url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314804A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 16 6-6 4 4 6-6M14 8h6v6'/%3E%3C/svg%3E") center / 13px no-repeat; }
.x-ui__tx span { flex: 1; display: grid; min-width: 0; font-size: 10px; }
.x-ui__tx b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-ui__tx small { color: var(--x-mute); font-size: 9px; }
.x-ui__tx em { font-style: normal; font-weight: 800; font-size: 10.5px; color: var(--x-ok); white-space: nowrap; }
@keyframes x-tx-in { to { opacity: 1; transform: none; } }
.x-ui__nav { display: flex; justify-content: space-around; align-items: center; margin-top: auto; padding: 8px 6px; border-radius: 18px; background: #fff; box-shadow: 0 2px 10px #0000000f; }
.x-ui__nav i { width: 16px; height: 16px; border-radius: 5px; background: #e2ddd7; }
.x-ui__nav i.is-on { background: var(--x-red); }
.x-ui__nav b { width: 34px; height: 34px; margin-top: -18px; border-radius: 50%; background: var(--x-red); box-shadow: 0 6px 14px -4px #ff0844aa; }

/* Floating chips */
.x-app-float { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 18px; background: #fff; color: var(--x-ink); box-shadow: 0 24px 50px -20px #00000066; }
.x-app-float b { font-family: var(--x-display); font-weight: 900; font-size: 18px; color: var(--x-ok); }
.x-app-float small { display: block; font-size: 12px; color: var(--x-mute); }
.x-app-float--a { top: 16%; left: 2%; display: grid; gap: 0; animation: x-float-chip 6s ease-in-out infinite; }
.x-app-float--b { bottom: 14%; right: 0; animation: x-float-chip 6s 1.5s ease-in-out infinite; }
.x-app-float--b b { font-size: 14px; color: var(--x-ink); font-family: var(--x-ui); font-weight: 800; }
.x-app-float--b i { width: 34px; height: 34px; border-radius: 12px; background: var(--x-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 18px no-repeat; }
@keyframes x-float-chip { 50% { transform: translateY(-10px); } }

/* ---------------- Feature story ---------------- */
.x-app-story { padding-block: clamp(64px, 8vw, 120px); }
.x-app-story__grid { display: grid; grid-template-columns: 1fr minmax(300px, 420px); gap: clamp(28px, 5vw, 80px); align-items: center; }
.x-app-story__tabs { display: grid; gap: 10px; }
.x-app-feature { position: relative; display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 14px 16px; padding: 20px 22px; border: 0; border-radius: var(--x-r-m); background: #fff; color: var(--x-ink); text-align: left; cursor: pointer; overflow: hidden; box-shadow: 0 0 0 1px var(--x-line); transition: box-shadow .3s, transform .4s var(--x-ease), background .3s; }
.x-app-feature:hover { transform: translateX(6px); }
.x-app-feature.is-active { background: var(--x-ink); color: #fff; box-shadow: none; }
.x-app-feature__num { font-family: var(--x-mono); font-size: 12px; color: var(--x-mute); }
.x-app-feature.is-active .x-app-feature__num { color: #ffffff99; }
.x-app-feature__icon { width: 46px; height: 46px; padding: 11px; border-radius: 14px; background: var(--x-red-soft); fill: none; stroke: var(--x-red-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: background .3s, stroke .3s; }
.x-app-feature.is-active .x-app-feature__icon { background: var(--x-red); stroke: #fff; }
.x-app-feature__copy { display: grid; gap: 4px; }
.x-app-feature__copy strong { font-family: var(--x-display); font-stretch: 112%; font-weight: 900; font-size: clamp(18px, 1.7vw, 24px); text-transform: uppercase; line-height: 1.05; }
.x-app-feature__copy > span { font-size: 15px; line-height: 1.5; color: var(--x-mute); max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s var(--x-ease), opacity .3s; }
.x-app-feature.is-active .x-app-feature__copy > span { max-height: 120px; opacity: 1; color: #D6D1CA; }
.x-app-feature__bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--x-red); transform: scaleX(0); transform-origin: left; }
.x-app-feature.is-active .x-app-feature__bar { animation: x-app-progress var(--app-cycle, 6s) linear forwards; }
.x-app-story.is-paused .x-app-feature.is-active .x-app-feature__bar { animation-play-state: paused; }
@keyframes x-app-progress { to { transform: scaleX(1); } }
.x-app-story__stage { position: relative; display: grid; }
.x-app-shot { grid-area: 1 / 1; margin: 0; border-radius: 34px; overflow: hidden; background: #fff; box-shadow: 0 40px 80px -40px #0e0e1066, 0 0 0 1px var(--x-line); animation: x-app-shot-in .6s var(--x-ease); }
.x-app-shot img { display: block; width: 100%; height: auto; }
@keyframes x-app-shot-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }

/* ---------------- Steps ---------------- */
.x-app-steps { margin: 0 12px; padding-block: clamp(56px, 7vw, 110px); border-radius: var(--x-r-l); background: var(--x-ink); color: #fff; }
.x-app-steps h2 { color: #fff; }
.x-app-steps__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.x-app-steps__list li { position: relative; padding: 26px; border-radius: var(--x-r-m); background: #1A1A1F; box-shadow: inset 0 0 0 1px #ffffff14; }
.x-app-steps__list li:not(:last-child)::after { content: "→"; position: absolute; top: 30px; right: -16px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--x-red); font-size: 14px; }
.x-app-steps__num { display: block; font-family: var(--x-display); font-stretch: 125%; font-weight: 900; font-size: 64px; line-height: 1; color: var(--x-red); }
.x-app-steps h3 { margin: 18px 0 6px; font-family: var(--x-display); font-stretch: 112%; font-weight: 900; font-size: 20px; text-transform: uppercase; }
.x-app-steps p { margin: 0; color: #D6D1CA; }

/* ---------------- CTA ---------------- */
.x-app-cta { display: flex; align-items: center; gap: clamp(20px, 4vw, 56px); margin-bottom: clamp(56px, 7vw, 100px); padding: clamp(28px, 4vw, 56px); border-radius: var(--x-r-l); background: var(--x-red); color: #fff; }
.x-app-cta__icon { width: clamp(96px, 12vw, 168px); height: auto; padding: clamp(12px, 1.6vw, 22px); border-radius: 26%; background: #fff; box-sizing: border-box; object-fit: contain; box-shadow: 0 30px 60px -24px #00000080; animation: x-float-chip 6s ease-in-out infinite; }
.x-app-cta h2 { margin: 0 0 22px; font-family: var(--x-display); font-stretch: 125%; font-weight: 900; font-size: clamp(32px, 4.4vw, 68px); line-height: 1; padding-top: .05em; letter-spacing: -.04em; text-transform: uppercase; text-wrap: balance; }

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .x-app-hero { grid-template-columns: 1fr; min-height: 0; }
  .x-app-hero__stage { min-height: 560px; }
  .x-app-story__grid { grid-template-columns: 1fr; }
  .x-app-story__stage { max-width: 380px; width: 100%; margin: 0 auto; grid-row: 1; }
  .x-app-steps__list { grid-template-columns: 1fr; }
  .x-app-steps__list li:not(:last-child)::after { top: auto; bottom: -16px; right: 50%; margin-right: -15px; content: "↓"; }
}
@media (max-width: 640px) {
  .x-app-hero { margin: 8px; padding: 22px 16px 8px; }
  .x-app-hero__title { font-size: clamp(46px, 15vw, 72px); }
  .x-app-stores { flex-direction: column; }
  .x-app-store { width: 100%; justify-content: center; }
  .x-app-hero__stage { min-height: 520px; margin-top: 8px; }
  .x-phone { width: 250px; border-radius: 44px; padding: 10px; }
  .x-phone__screen { border-radius: 34px; }
  .x-app-float--a { top: 6%; left: 0; padding: 10px 12px; }
  .x-app-float--b { bottom: 6%; right: 0; padding: 10px 12px; }
  .x-app-float b { font-size: 15px; }
  .x-app-feature { grid-template-columns: auto 1fr; padding: 16px; }
  .x-app-feature__num { display: none; }
  .x-app-story__stage { max-width: 250px; }
  .x-app-shot { border-radius: 26px; }
  .x-app-feature:hover { transform: none; }
  .x-app-steps { margin: 0 8px; }
  .x-app-cta { flex-direction: column; text-align: center; }
  .x-app-cta .x-app-stores { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .x-phone, .x-app-ring, .x-app-float, .x-app-cta__icon { animation: none; }
  .x-ui__tx li { opacity: 1; transform: none; animation: none; }
}
