:root {
  --primary: #526dad;
  --light: #e7eeff;
  --accent: #fbc02d;
  --accent-light: #fdf2d8;
  --text-dark: #263250;
  --bg-white: #ffffff;
  --space-xs: clamp(4px, 1vw, 12px);
  --space-sm: clamp(12px, 2vw, 16px);
  --space-md: clamp(16px, 3vw, 24px);
  --space-lg: clamp(24px, 4vw, 40px);
  --space-xl: clamp(40px, 8vw, 80px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Figtree', sans-serif;
  color: var(--text-dark);
  line-height: 1.4;
  background-color: var(--bg-white);
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 var(--space-md); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.max-w-md { max-width: 1000px; margin: var(--space-md) auto; }

/* ACCESsIBILITY */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* TEXT STYLES */
.display-lg { font-size: clamp(1.8rem, 5vw, 3.2rem); font-weight: 700; line-height: 1.2; color: var(--primary); margin-bottom: var(--space-md); }
.title-lg { font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.3; color: var(--primary); margin-top: var(--space-xl); position: relative; display: inline-block; }
.title-md { font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 700; line-height: 1.3; color: var(--primary); margin-top: var(--space-md); }
.title-sm { font-size: clamp(1.1rem, 2.5vw, 2rem); font-weight: 400; line-height: 1.4; color: var(--primary); margin-top: var(--space-lg); }
.body-lg { font-size: clamp(1rem, 2.5vw, 1.5rem); font-weight: 400; line-height: 1.6; color: var(--text-dark); }
.body-md { font-size: clamp(0.95rem, 2.2vw, 1.375rem); font-weight: 400; line-height: 1.5; color: var(--text-dark); }
.body-sm { font-size: clamp(0.85rem, 2vw, 1.2rem); font-weight: 400; line-height: 1.7; color: var(--text-dark); }

.title-lg::after {
  content: '';
  width: 40px;
  height: 3px;
  background: var(--accent);
  bottom: -16px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* LANG SWITCHER */
.lang-switcher { position: absolute; top: var(--space-md); right: var(--space-lg); z-index: 10; }
.lang-btn {
    display: flex; align-items: center; flex-direction: row-reverse; gap: var(--space-xs);
    background-color: var(--bg-white); border: 2px solid var(--light);
    border-radius: var(--space-lg); padding: var(--space-xs) var(--space-sm);
    cursor: pointer; transition: all 0.3s ease;
}
.lang-btn:hover { background-color: var(--light); transform: translateY(-2px); box-shadow: 0 10px 32px rgba(0,0,0,0.03); }
#lang-text { font-family: inherit; font-size: clamp(0.85rem, 2vw, 1rem); font-weight: 600; color: var(--primary); }
#lang-flag { font-size: clamp(0.95rem, 2vw, 1.2rem); line-height: 1; display: flex; align-items: center; }

/* HERO */
.hero { display: flex; align-items: center; background: radial-gradient(circle at 0% 80%, var(--light) 0%, var(--bg-white) 50%); }
.hero-flex { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); padding: clamp(40px, 6vw, 80px); width: 100%; }
.hero-content { display: flex; flex: 1.1; flex-direction: column; align-items: flex-start; max-width: 600px; }
.hero-visual { width: 100%; max-width: clamp(180px, 35vw, 480px); height: auto; margin-top: var(--space-md); }
.logo { width: clamp(96px, 20vw, 150px); margin-bottom: clamp(24px, 6vw, 80px); align-self: self-start; }

/* CARDS */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); max-width: 1400px; margin: var(--space-lg) auto 0; padding: var(--space-lg) var(--space-lg) 0; }
.card { min-height: clamp(180px, 40vw, 280px); perspective: 1000px; cursor: pointer; }
.card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); transform-style: preserve-3d; }
.card:hover .card-inner, .card:focus-within .card-inner { transform: rotateY(180deg); }

.card-front, .card-back {
    position: absolute; inset: 0; backface-visibility: hidden; display: flex; flex-direction: column;
    border-radius: var(--space-sm); box-shadow: 0 10px 32px rgba(0,0,0,0.03); padding: var(--space-md);
    align-items: center;
}
.card-front { justify-content: space-between; background: var(--bg-white); border: 2px solid var(--light); }
.card-back { justify-content: center; background: var(--light); border: 2px solid var(--bg-white); transform: rotateY(180deg); text-align: center; }

.icon { width: clamp(48px, 6vw, 64px); height: auto; }
.icon-arrow { width: clamp(28px, 4vw, 40px); height: auto; align-self: flex-end; }

/* FEATURE ROWS */
.feature-row { max-width: 1400px; margin: var(--space-xl) auto 0; padding: 0 var(--space-xl); display: flex; align-items: center; gap: var(--space-xl); }
.is-reversed { flex-direction: row-reverse; }
.is-reversed .feature-wrapper::before { right: auto; left: calc(-1 * var(--space-sm)); }
.feature-content { display:flex; flex: 2; flex-direction: column; gap: var(--space-md)}
.feature-wrapper { flex: 1; position: relative; display: flex; justify-content: center; margin-top: var(--space-lg); }

.feature-img { position: relative; z-index: 2; width: 100%; max-width: 312px; height: auto; display: block; }

.feature-wrapper::before {
    content: ""; position: absolute; right: calc(-1 * var(--space-md)); top: calc(-1 * var(--space-sm));
    width: 60%; height: 120%; background-color: var(--accent-light); z-index: 1;
}

/* FOOTER */
footer { max-width: 680px; margin: var(--space-xl) auto var(--space-lg); text-align: center; }
.logos-grid { display: flex; align-items: center; justify-content: center; gap: var(--space-xl); margin: var(--space-md); }
.logo-footer { width: clamp(40px, 20vw, 132px); }

/* RESPONSIVE */
@media (max-width: 768px) {
 .hero-flex { flex-direction: column; align-items: center; text-align: center; padding: var(--space-lg) var(--space-md); }
    .hero-content { align-items: left; text-align: left; }
    .logo { align-self: left; }
    .hero { background: radial-gradient(circle at 0% 0%, var(--light) 0%, var(--bg-white) 50%); }
}

@media (max-width: 580px) {
  #lang-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0);}
  .card-grid { grid-template-columns: 1fr; }
  .feature-row { flex-direction: column; text-align: center;gap: var(--space-sm); }
  .feature-img { max-width: 280px; margin-top: 0; }
  .feature-wrapper::before { right: calc(-1 * var(--space-md)); bottom: calc(-1 * var(--space-md)); width: 60%; height: 100%; top: auto;}
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-visual video { display: none; }
  .card-inner { transition: none; }
}