/* v15 · 1) the first screen: «маршрут в Канаду» as quiet motion graphics instead of the stock photo;
         2) the calculator: the month in one ring — rent, food, phone and transport, and what stays. */

/* ---------- 1 · hero background ---------- */
.h15-bg { background: radial-gradient(120% 90% at 78% 30%, #1D3550 0%, #0F1923 62%); }
.h15-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.h15-overlay { background: linear-gradient(90deg, rgba(15, 25, 35, .96) 0%, rgba(15, 25, 35, .82) 38%, rgba(15, 25, 35, .1) 70%, rgba(15, 25, 35, 0) 100%) !important; }
.h15-star { fill: #fff; opacity: .5; animation: h15Twinkle 3.2s ease-in-out infinite; animation-delay: var(--d); }
.h15-lat { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 2; }
.h15-route { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 3; stroke-dasharray: 3 12; stroke-linecap: round; }
.h15-routefill { fill: none; stroke: #E31837; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: h15Draw 7s ease-in-out infinite; }
.h15-home circle { fill: #F5C451; }
.h15-ping { transform-box: fill-box; transform-origin: center; animation: h15Ping 2.4s ease-out infinite; }
.h15-ca circle { fill: #E31837; }
.h15-ca use { color: #fff; }
.h15-ca { transform-box: fill-box; transform-origin: center; animation: h15Beat 7s ease-in-out infinite; }
.h15-glow { opacity: .8; transform-box: fill-box; transform-origin: center; animation: h15Glow 7s ease-in-out infinite; }
.h15-plane path { fill: #fff; }
.h15-plane { offset-path: path("M1150 770 C1110 540 1250 370 1440 360"); offset-rotate: auto 90deg; offset-distance: 0%; opacity: 0; animation: h15Fly 7s ease-in-out infinite; }
.h15-fall { color: #E31837; opacity: 0; transform-box: fill-box; transform-origin: center; animation: h15Fall var(--t) linear infinite; animation-delay: var(--d); }
@keyframes h15Twinkle { 50% { opacity: .15; } }
@keyframes h15Draw { 0%, 8% { stroke-dashoffset: 1; } 62%, 88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes h15Fly { 0%, 8% { offset-distance: 0%; opacity: 0; } 12% { opacity: 1; } 62% { offset-distance: 100%; opacity: 1; } 68%, 100% { offset-distance: 100%; opacity: 0; } }
@keyframes h15Beat { 0%, 60%, 100% { scale: 1; } 66% { scale: 1.22; } 72% { scale: .96; } 78% { scale: 1.06; } }
@keyframes h15Glow { 0%, 58%, 100% { opacity: .5; scale: .9; } 68% { opacity: 1; scale: 1.15; } }
@keyframes h15Ping { 0% { scale: 1; opacity: .8; } 100% { scale: 3.2; opacity: 0; } }
@keyframes h15Fall { 0% { translate: var(--x) -60px; rotate: 0deg; opacity: 0; } 10% { opacity: .55; } 90% { opacity: .55; } 100% { translate: calc(var(--x) - 160px) 960px; rotate: 360deg; opacity: 0; } }
@media (max-width: 900px) {
    .h15-overlay { background: linear-gradient(180deg, rgba(15, 25, 35, .55) 0%, rgba(15, 25, 35, .8) 30%, rgba(15, 25, 35, .8) 70%, rgba(15, 25, 35, .6) 100%) !important; }
}
@media (prefers-reduced-motion: reduce) {
    .h15-svg * { animation: none !important; }
    .h15-routefill { stroke-dashoffset: 0; }
    .h15-plane { opacity: 1; offset-distance: 100%; }
}

/* ---------- 2 · calculator ---------- */
.c15 { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 40px; align-items: center; max-width: 920px; margin: 0 auto; padding: 32px;
    background: #fff; border: 1px solid #E5E7EB; border-radius: 16px; box-shadow: 0 30px 60px -44px rgba(17, 24, 39, .4); }
.c15-chart { position: relative; aspect-ratio: 1; }
.c15-chart svg { display: block; width: 100%; height: 100%; }
.c15-track { fill: none; stroke: #F3F4F6; stroke-width: 30; }
.c15-seg { fill: none; stroke-width: 30; stroke-dasharray: 0 100; stroke-dashoffset: var(--off); transition: stroke-dasharray .9s cubic-bezier(.3, 0, .2, 1); transition-delay: calc(var(--k) * .3s); }
.c15-seg--rent { stroke: #E31837; } .c15-seg--food { stroke: #F5C451; } .c15-seg--comm { stroke: #3B82C4; } .c15-seg--rest { stroke: #16A34A; }
.c15.is-in .c15-seg { stroke-dasharray: var(--len) 100; }
.c15-mid { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; padding: 0 70px; }
.c15-mid > span { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6B7280; line-height: 1.3; }
.c15-mid b { margin-top: 6px; font-size: 40px; font-weight: 900; line-height: 1; color: #16A34A; letter-spacing: -.02em; white-space: nowrap; }
.c15-mid > small { margin-top: 4px; font-size: 13px; font-weight: 700; color: #9CA3AF; }
.c15-list { display: grid; gap: 0; }
.c15-income { display: grid; gap: 2px; padding-bottom: 16px; border-bottom: 1px solid #E5E7EB; }
.c15-income > span { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6B7280; }
.c15-income b { font-size: 32px; font-weight: 900; color: #111827; letter-spacing: -.02em; white-space: nowrap; }
.c15-income b small { font-size: 15px; font-weight: 700; color: #9CA3AF; letter-spacing: 0; }
.c15-income em { font-style: normal; font-size: 13px; color: #6B7280; }
.c15-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #F3F4F6; font-size: 15px; color: #374151; }
.c15-row b { font-weight: 800; color: #E31837; white-space: nowrap; }
.c15-dot { width: 12px; height: 12px; border-radius: 50%; }
.c15-dot--rent { background: #E31837; } .c15-dot--food { background: #F5C451; } .c15-dot--comm { background: #3B82C4; }
.c15-row--total { grid-template-columns: minmax(0, 1fr) auto; font-weight: 800; color: #111827; border-bottom: 0; }
.c15-row--total b { color: #111827; }
.c15-result { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: center; margin-top: 8px; padding: 16px 20px; border-radius: 14px; background: #ECFDF5; border: 1px solid #A7F3D0; }
.c15-result > div { display: grid; gap: 2px; min-width: 0; }
.c15-result > div > span { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #047857; }
.c15-result b { font-size: 28px; font-weight: 900; color: #065F46; white-space: nowrap; }
.c15-result b small { font-size: 14px; font-weight: 700; opacity: .7; }
.c15-result em { font-style: normal; font-size: 13.5px; line-height: 1.45; color: #047857; }
.c15-house { width: 64px; height: 64px; overflow: visible; }
.c15-roof { fill: #E31837; } .c15-wall { fill: #fff; stroke: #065F46; stroke-width: 2; } .c15-win { fill: #F5C451; } .c15-door { fill: #065F46; } .c15-chim { fill: #9CA3AF; }
.c15-smoke circle { fill: #D1D5DB; transform-box: fill-box; transform-origin: center; animation: c15Smoke 3s ease-out infinite; }
.c15-smoke circle:nth-child(2) { animation-delay: -1.5s; }
.c15-win { animation: c15Light 4s ease-in-out infinite; }
@keyframes c15Smoke { 0% { opacity: 0; translate: 0 6px; scale: .6; } 30% { opacity: .9; } 100% { opacity: 0; translate: 4px -10px; scale: 1.3; } }
@keyframes c15Light { 0%, 100% { fill: #F5C451; } 50% { fill: #FDE68A; } }
.calculator .calculator__disclaimer { max-width: 920px; margin: 16px auto 0; }
@media (max-width: 900px) {
    .c15 { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px; }
    .c15-chart { width: min(260px, 100%); margin: 0 auto; }
    .c15-mid { padding: 0 56px; }
    .c15-mid b { font-size: 34px; }
    .c15-income b { font-size: 28px; }
    .c15-result { grid-template-columns: 48px minmax(0, 1fr); padding: 14px 16px; }
    .c15-house { width: 48px; height: 48px; }
    .c15-result b { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .c15-seg { transition: none; stroke-dasharray: var(--len) 100; } .c15-smoke circle, .c15-win { animation: none; } }
@media (min-width: 701px) and (max-width: 1200px) { .h15-svg { opacity: .5; } } /* narrow laptops and tablets: the text takes the whole width, the picture stays a background */
