/* Perynta — motion & colour layer (concept).
   Loaded on top of site.css. Everything here is decorative:
   .fx        = JS is running (layout extras, hover effects)
   .fx-motion = JS is running AND the visitor allows motion (animations, reveals)
   With "reduce motion" or without JS the site looks like the normal version. */

@property --fx-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  --fx-blue: #2b62f0;
  --fx-violet: #7c4dff;
  --fx-teal: #19c3b4;
  --fx-grad: linear-gradient(100deg, #7fa2ff 0%, #b49bff 45%, #5fe3d3 100%);
  --fx-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Scroll progress ---------- */
.fx-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 70; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--fx-blue), var(--fx-violet), var(--fx-teal)); pointer-events: none; }

/* ---------- Header on scroll ---------- */
.fx .site-header { transition: background .3s, box-shadow .3s; }
.fx .site-header.is-scrolled { background: rgba(7, 19, 48, .96); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .45); }

/* ---------- Aurora backgrounds (hero, page hero, CTA) ---------- */
.fx-aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.fx-aurora span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .75; will-change: transform; }
.fx-aurora span:nth-child(1) { width: 52vmax; height: 52vmax; top: -28%; right: -12%; background: radial-gradient(circle, rgba(43, 98, 240, .9), transparent 62%); }
.fx-aurora span:nth-child(2) { width: 44vmax; height: 44vmax; bottom: -42%; left: -14%; background: radial-gradient(circle, rgba(124, 77, 255, .8), transparent 62%); opacity: .6; }
.fx-aurora span:nth-child(3) { width: 30vmax; height: 30vmax; top: 18%; left: 38%; background: radial-gradient(circle, rgba(25, 195, 180, .7), transparent 60%); opacity: .35; }
.fx-motion .fx-aurora span:nth-child(1) { animation: fx-drift-a 18s ease-in-out infinite alternate; }
.fx-motion .fx-aurora span:nth-child(2) { animation: fx-drift-b 23s ease-in-out infinite alternate; }
.fx-motion .fx-aurora span:nth-child(3) { animation: fx-drift-c 27s ease-in-out infinite alternate; }
@keyframes fx-drift-a { to { transform: translate(-12%, 14%) scale(1.15); } }
@keyframes fx-drift-b { to { transform: translate(18%, -16%) scale(1.1); } }
@keyframes fx-drift-c { to { transform: translate(-30%, 22%) scale(1.3); } }
.fx .hero::before, .fx .page-hero::before { opacity: .5; }
.fx .cta-band::before { display: none; }

/* Pointer glow in dark areas */
.fx .hero, .fx .page-hero, .fx .cta-band { --gx: 70%; --gy: 30%; }
.fx .hero .fx-glow, .fx .page-hero .fx-glow, .fx .cta-band .fx-glow { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(500px circle at var(--gx) var(--gy), rgba(127, 162, 255, .16), transparent 60%); }

/* ---------- Headline ---------- */
.fx .hero h1 em, .fx .page-hero h1 em { font-style: normal; }
.fx .hero h1 em .fx-word, .fx .hero h1 em:not(:has(.fx-word)) {
  background: var(--fx-grad); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fx-motion .hero h1 em .fx-word { animation: fx-word .9s var(--fx-ease) both, fx-shimmer 6s ease-in-out 1.5s infinite alternate; animation-delay: calc(var(--i) * 55ms + 120ms), calc(1.5s + var(--i) * 80ms); }
.fx .fx-word { display: inline-block; }
.fx-motion .fx-word { animation: fx-word .9s var(--fx-ease) both; animation-delay: calc(var(--i) * 55ms + 120ms); }
@keyframes fx-word { from { opacity: 0; transform: translateY(.55em) rotate(3deg); filter: blur(8px); } }
@keyframes fx-shimmer { to { background-position: 100% 0; } }
.fx-motion .hero .lead, .fx-motion .hero .actions, .fx-motion .hero .hero-alt, .fx-motion .hero .trust,
.fx-motion .page-hero .lead, .fx-motion .page-hero .actions, .fx-motion .hero .eyebrow, .fx-motion .page-hero .eyebrow {
  animation: fx-rise 1s var(--fx-ease) both;
}
.fx-motion .hero .eyebrow, .fx-motion .page-hero .eyebrow { animation-delay: 0s; }
.fx-motion .hero .lead, .fx-motion .page-hero .lead { animation-delay: .45s; }
.fx-motion .hero .actions, .fx-motion .page-hero .actions { animation-delay: .6s; }
.fx-motion .hero .hero-alt { animation-delay: .7s; }
.fx-motion .hero .trust { animation-delay: .8s; }
@keyframes fx-rise { from { opacity: 0; transform: translateY(18px); } }

/* Eyebrow accent line */
/* Not tied to .fx (added by motion.js after first paint): the line takes space, so it must be
   there from the first paint to avoid a layout shift. */
.eyebrow::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--fx-blue), var(--fx-violet)); }
.section-dark .eyebrow::before, .hero .eyebrow::before, .page-hero .eyebrow::before { background: linear-gradient(90deg, #7fa2ff, var(--fx-teal)); }
.section-head.center .eyebrow::before { display: none; }

/* ---------- Hero mock-up: 3D tilt + booking demo ---------- */
.fx .mock { perspective: 1400px; }
.fx .mock-browser { transform: rotateX(var(--rx, 4deg)) rotateY(var(--ry, -8deg)) rotate(-1deg); transition: transform .5s var(--fx-ease); transform-style: preserve-3d; position: relative; }
.fx-motion .mock { animation: fx-rise 1.2s var(--fx-ease) .35s both; }
.fx .mock-slots span { transition: background .3s, color .3s, border-color .3s, transform .3s; }
.fx .mock-slots span.on { transform: scale(1.06); }
.fx-motion .toast { opacity: 0; translate: 0 14px; transition: opacity .5s var(--fx-ease), translate .5s var(--fx-ease); }
.fx-motion .toast.is-show { opacity: 1; translate: 0 0; }
.fx-cursor { position: absolute; left: 0; top: 0; width: 22px; height: 22px; z-index: 3; pointer-events: none; transition: transform .9s var(--fx-ease); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.fx-cursor::after { content: ""; position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--fx-blue); opacity: 0; }
.fx-cursor.is-click::after { animation: fx-ripple .5s ease-out; }
@keyframes fx-ripple { from { opacity: .9; transform: scale(.3); } to { opacity: 0; transform: scale(1.8); } }
.fx-cursor svg { width: 22px; height: 22px; }

/* ---------- Scroll reveals ---------- */
.fx-motion .fx-reveal { opacity: 0; translate: 0 32px; transition: opacity .9s var(--fx-ease), translate .9s var(--fx-ease); transition-delay: calc(var(--d, 0) * 90ms); }
.fx-motion .fx-reveal.is-in { opacity: 1; translate: 0 0; }

/* ---------- Cards: lift + spotlight ---------- */
.fx .card { position: relative; }
.fx .card, .fx .plan { transition: transform .35s var(--fx-ease), box-shadow .35s var(--fx-ease), border-color .35s; }
.fx .card:hover, .fx .plan:hover { transform: translateY(-5px); box-shadow: 0 24px 50px -24px rgba(10, 20, 40, .35); }
.fx .card:not(.start-card.primary):hover { border-color: rgba(43, 98, 240, .35); }
.fx .card::after, .fx .plan::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(43, 98, 240, .12), transparent 45%); }
.fx .section-dark .card::after, .fx .start-card.primary::after, .fx .plan-featured::after { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(127, 162, 255, .18), transparent 45%); }
.fx .card:hover::after, .fx .plan:hover::after { opacity: 1; }
.fx .card-icon { transition: transform .4s var(--fx-ease), background .4s, color .4s; }
.fx .card:hover .card-icon { transform: rotate(-8deg) scale(1.08); background: linear-gradient(135deg, var(--fx-blue), var(--fx-violet)); color: #fff; }
/* The "message sent" card keeps its green check mark, also under the mouse. */
.fx .contact-form-done:hover .card-icon { transform: none; background: #e3f6ef; color: #0b7a55; }

/* Featured plan: animated gradient border */
.fx .plan-featured { border: 1.5px solid transparent; background: linear-gradient(var(--navy), var(--navy)) padding-box, conic-gradient(from var(--fx-angle), var(--fx-blue), var(--fx-violet), var(--fx-teal), var(--fx-blue)) border-box; }
.fx-motion .plan-featured { animation: fx-spin 6s linear infinite; }
.fx .start-card.primary { border: 1.5px solid transparent; background: linear-gradient(var(--navy), var(--navy)) padding-box, conic-gradient(from var(--fx-angle), var(--fx-blue), var(--fx-violet), var(--fx-teal), var(--fx-blue)) border-box; }
.fx-motion .start-card.primary { animation: fx-spin 8s linear infinite; }
@keyframes fx-spin { to { --fx-angle: 360deg; } }
.fx .plan-flag { background: linear-gradient(90deg, var(--fx-blue), var(--fx-violet)); }

/* Steps: line fills when visible */
.fx-motion .step::after { width: 0; transition: width 1.2s var(--fx-ease) .25s; background: linear-gradient(90deg, var(--fx-blue), var(--fx-violet), var(--fx-teal)); }
.fx-motion .step.is-in::after { width: 100%; }

/* International facts grid */
.fx .fact { transition: background .35s; }
.fx .fact:hover { background: #0b1a40; }

/* Buttons: soft glow on primary */
.fx .btn:not(.btn-ghost):not(.btn-light) { background-image: linear-gradient(100deg, var(--fx-blue), #4a5cf5 55%, var(--fx-violet)); box-shadow: 0 10px 30px -12px rgba(43, 98, 240, .7); }
.fx .btn:not(.btn-ghost):not(.btn-light):hover { box-shadow: 0 16px 40px -14px rgba(124, 77, 255, .8); }
/* The featured plan's button is light with dark text (site.css): keep it solid, never on the gradient. */
.fx .plan-featured .btn:not(.btn-ghost):not(.btn-light) { background-image: none; box-shadow: 0 10px 30px -14px rgba(127, 162, 255, .55); }
.fx .plan-featured .btn:not(.btn-ghost):not(.btn-light):hover { background-image: none; box-shadow: 0 16px 40px -16px rgba(127, 162, 255, .7); }
.fx .btn { transition: background .2s, transform .2s, border-color .2s, color .2s, box-shadow .3s, translate .25s var(--fx-ease); }

/* ---------- Language marquee ---------- */
.fx-marquee { position: relative; overflow: hidden; background: var(--navy); border-block: 1px solid var(--navy-line); padding: 22px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.fx-track { display: flex; gap: 52px; width: max-content; font: 650 clamp(1.5rem, 3.4vw, 2.6rem)/1 var(--font-display); letter-spacing: -.03em; color: rgba(238, 242, 255, .92); white-space: nowrap; }
.fx-track span:nth-of-type(even) { color: transparent; -webkit-text-stroke: 1px rgba(127, 162, 255, .7); }
.fx-track i { font-style: normal; color: var(--fx-teal); }
.fx-motion .fx-track { animation: fx-marquee 45s linear infinite; }
.fx-marquee:hover .fx-track { animation-play-state: paused; }
@keyframes fx-marquee { to { transform: translateX(-50%); } }

/* ---------- Light sections: a little more colour ---------- */
.fx .section-soft { background: radial-gradient(900px 400px at 15% 0%, rgba(124, 77, 255, .08), transparent 70%), radial-gradient(800px 380px at 90% 100%, rgba(25, 195, 180, .08), transparent 70%), var(--surface-2); }
.fx .offer { position: relative; overflow: hidden; }
.fx .offer::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--warm), #ff7a59); }

@media (max-width: 640px) {
  .fx-aurora span { filter: blur(40px); }
  .fx .mock-browser { --rx: 0deg; --ry: 0deg; }
}
@media (hover: none) {
  .fx .card:hover, .fx .plan:hover { transform: none; }
}

/* Reduce motion: no pointer-driven movement, no hover lifts, no demo cursor */
html:not(.fx-motion) .fx-cursor { display: none; }
@media (prefers-reduced-motion: reduce) {
  .fx .card:hover, .fx .plan:hover, .fx .contact-card:hover,
  .fx .card:hover .card-icon, .btn:hover, .lang-option:hover { transform: none; }
  .fx .btn { translate: none !important; }
  .fx .mock-browser { transform: rotate(-1deg); }
  .fx .card::after, .fx .plan::after, .fx .fx-glow { display: none; }
}
