/* ── Palette & tokens ─────────────────────────────── */
:root {
  --perano: #b1cdf6;
  --cloud-burst: #242e4c;
  --trout: #4f5161;
  --mid-gray: #666771;

  --bg: #f7f9fd;
  --surface: #ffffff;
  --perano-tint: #e4edfb;   /* perano lightened for washes */
  --perano-line: #ccdcf7;   /* perano-derived hairline */
  --cloud-hover: #2f3b60;   /* cloud burst raised one step */

  /* Strong, deliberate curves — built-ins are too weak */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ── Reset & base ─────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--trout);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img, video { display: block; max-width: 100%; }

h1, h2, h3 { color: var(--cloud-burst); }

/* ── Layout ───────────────────────────────────────── */
.container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-wide { max-width: 1160px; }

/* ── Scroll reveals ───────────────────────────────── */
/* Small translate + fade, strong ease-out, staggered with --d */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 600ms var(--ease-out) var(--d, 0ms),
    transform 600ms var(--ease-out) var(--d, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 980px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 180ms ease, border-color 180ms ease;
}
/* Feedback on press — instant, subtle */
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--cloud-burst); color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--cloud-burst);
  border: 1.5px solid var(--perano-line);
}
.btn-light { background: #fff; color: var(--cloud-burst); }
.btn-ghost {
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  background: rgba(36, 46, 76, 0.18);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn-small { padding: 9px 20px; font-size: 0.9rem; }

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--cloud-hover); }
  .btn-secondary:hover { background: var(--perano-tint); border-color: var(--perano); }
  .btn-light:hover { background: var(--perano-tint); }
  .btn-ghost:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; }
}

/* ── Navbar — translucent material, scroll edge ───── */
.navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  width: min(calc(100% - 48px), 1100px);
  z-index: 100;
  transform: translateX(-50%);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 32px -16px rgba(36, 46, 76, 0.28);
  transition: box-shadow 300ms ease, background-color 300ms ease;
}
.navbar.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 36px -14px rgba(36, 46, 76, 0.34);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand-logo { height: 30px; width: auto; }
.nav-actions { display: flex; align-items: center; gap: 20px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--trout);
  transition: color 160ms ease;
}
.language-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--perano-line);
  border-radius: 980px;
  background: var(--perano-tint);
}
.language-option {
  min-width: 32px;
  border: 0;
  border-radius: 980px;
  padding: 4px 7px;
  background: transparent;
  color: var(--trout);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.language-option.is-active {
  background: var(--surface);
  color: var(--cloud-burst);
  box-shadow: 0 1px 3px rgba(36, 46, 76, 0.15);
}
@media (hover: hover) and (pointer: fine) {
  .nav-links a:not(.btn):hover { color: var(--cloud-burst); }
}

/* ── Hero ─────────────────────────────────────────── */
.hero {
  padding: 0;
  text-align: center;
  background: var(--bg);
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 700;
  line-height: 1.05;          /* tight leading for display text */
  letter-spacing: -0.02em;    /* negative tracking as type grows */
  color: #fff;
  text-wrap: balance;
}
.hero .subtitle {
  margin: 22px auto 0;
  max-width: 560px;
  font-size: 1.15rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.84);
}
.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero image card — full-width, edge-to-edge */
.hero-media {
  position: relative;
  min-height: 100svh;
  border-radius: 0;
  overflow: hidden;
}
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(25, 31, 47, 0.08) 10%, rgba(25, 31, 47, 0.25) 40%, rgba(25, 31, 47, 0.7) 65%, rgba(25, 31, 47, 0.92) 100%),
    linear-gradient(to right, rgba(25, 31, 47, 0.15), transparent 50%);
}
.hero-media img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 66px;
  width: min(680px, calc(100% - 48px));
  transform: translateX(-50%);
}

/* ── Features ─────────────────────────────────────── */
.features { padding: 110px 0 90px; }
.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 56px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 960px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .features-grid { grid-template-columns: 1fr; }
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--perano-line);
  border-radius: 18px;
  padding: 30px 26px;
  transition:
    opacity 600ms var(--ease-out) var(--d, 0ms),
    transform 600ms var(--ease-out) var(--d, 0ms),
    box-shadow 250ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .feature-card:hover { box-shadow: 0 12px 32px -16px rgba(36, 46, 76, 0.25); }
}
.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--perano-tint);
  color: var(--cloud-burst);
  margin-bottom: 18px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 1.1rem; font-weight: 650; margin-bottom: 6px; }
.feature-card p { color: var(--mid-gray); font-size: 0.95rem; line-height: 1.55; }

/* ── How it works ─────────────────────────────────── */
.how { padding: 90px 0 110px; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 32px; }
}
.step { text-align: left; }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cloud-burst);
  color: var(--perano);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 16px;
}
.step h3 { font-size: 1.15rem; font-weight: 650; margin-bottom: 6px; }
.step p { color: var(--mid-gray); font-size: 0.97rem; line-height: 1.55; }

/* ── Stats — dark band ────────────────────────────── */
.stats {
  background: var(--cloud-burst);
  padding: 72px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 24px; }
}
.stat { display: grid; gap: 4px; }
.stat-value {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--perano);
}
.stat-label {
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.72);
}

/* ── CTA ──────────────────────────────────────────── */
.cta {
  padding: 120px 0;
  text-align: center;
  background:
    radial-gradient(700px 380px at 50% 110%, var(--perano-tint) 0%, rgba(228, 237, 251, 0) 70%),
    var(--bg);
}
.cta h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.cta p { color: var(--mid-gray); margin-bottom: 30px; font-size: 1.1rem; }

/* ── Contact section ──────────────────────────────── */
.contact {
  padding: 110px 0 120px;
  background:
    radial-gradient(700px 380px at 50% 110%, var(--perano-tint) 0%, rgba(228, 237, 251, 0) 70%),
    var(--bg);
}
.contact .section-title { margin-bottom: 8px; }
.contact-subtitle {
  text-align: center;
  color: var(--mid-gray);
  font-size: 1.08rem;
  max-width: 520px;
  margin: 0 auto 32px;
}

/* Phone link with Viber icon */
.contact-phone {
  text-align: center;
  margin-bottom: 40px;
}
.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 650;
  color: var(--cloud-burst);
  transition: color 160ms ease;
}
.phone-link:hover { color: #665cac; }  /* Viber purple-ish */
.viber-icon {
  width: 26px;
  height: 26px;
  color: #7b519d;  /* Viber brand purple */
  flex-shrink: 0;
}
.phone-label {
  display: block;
  font-size: 0.85rem;
  color: var(--mid-gray);
  margin-top: 4px;
}

/* Contact form */
.contact-form {
  max-width: 580px;
  margin: 0 auto;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 500px) {
  .form-row { grid-template-columns: 1fr; }
}
.form-group { display: flex; flex-direction: column; }
.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cloud-burst);
  margin-bottom: 6px;
}
.form-group input {
  padding: 13px 16px;
  border: 1.5px solid var(--perano-line);
  border-radius: 14px;
  font: inherit;
  font-size: 0.97rem;
  color: var(--cloud-burst);
  background: var(--surface);
  transition: border-color 200ms ease, box-shadow 200ms ease;
  outline: none;
}
.form-group input::placeholder { color: #b0b4c2; }
.form-group input:focus {
  border-color: var(--perano);
  box-shadow: 0 0 0 3px rgba(177, 205, 246, 0.45);
}
.form-hint {
  font-size: 0.82rem;
  color: var(--mid-gray);
  margin-bottom: 16px;
}
.form-error {
  font-size: 0.88rem;
  color: #d63e3e;
  margin-bottom: 12px;
  min-height: 1.3em;
}
.form-success {
  margin-top: 14px;
  padding: 12px 16px;
  background: #e6f4ea;
  border-radius: 12px;
  color: #1e7e34;
  font-size: 0.93rem;
  font-weight: 500;
}
.contact-form .btn { margin-top: 4px; }

/* ── Footer ───────────────────────────────────────── */
.footer {
  background: var(--cloud-burst);
  padding: 48px 0;
  color: rgba(255, 255, 255, 0.72);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
}
.footer-brand .brand-logo {
  height: 30px;
  width: auto;
  filter: brightness(0) invert(1);
}
.footer-links { display: flex; gap: 24px; font-size: 0.92rem; }
@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover { color: #fff; }
}
.footer-links a { transition: color 160ms ease; }
.footer-copy { font-size: 0.85rem; color: rgba(255, 255, 255, 0.45); }

/* ── Mobile ───────────────────────────────────────── */
@media (max-width: 720px) {
  .navbar {
    top: 12px;
    width: calc(100% - 24px);
    border-radius: 16px;
  }
  .nav-container { height: 58px; padding-inline: 14px; }
  .brand-logo { height: 24px; }
  .nav-actions { gap: 10px; }
  .nav-links { display: none; }
  .navbar .btn-small { padding: 8px 12px; font-size: 0.8rem; }
  .language-option { min-width: 28px; padding-inline: 5px; }
  .hero { padding: 0; }
  .hero-media {
    min-height: 100svh;
    border-radius: 0;
  }
  .hero-media img { object-position: 56% center; }
  .hero-overlay { bottom: 40px; width: calc(100% - 36px); }
  .hero h1 { font-size: clamp(2.1rem, 10.5vw, 2.7rem); }
  .hero .subtitle { font-size: 1rem; line-height: 1.5; }
  .hero-actions { margin-top: 26px; gap: 10px; }
  .hero-actions .btn { padding: 12px 20px; font-size: 0.9rem; }
  .features, .how { padding: 72px 0; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ── Accessibility ────────────────────────────────── */
/* Reduced motion: keep the fades that aid comprehension, drop the movement */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .feature-card {
    transform: none;
    transition: opacity 200ms ease;
  }
  .btn:active { transform: none; }
}

/* Reduced transparency: solid chrome, no blur */
@media (prefers-reduced-transparency: reduce) {
  .navbar {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  .navbar { background: #fff; border-bottom: 1px solid var(--cloud-burst); }
  .feature-card { border-color: var(--trout); }
}
