/* ===== Variables ===== */
:root {
  --color-bg: #f8fafc;
  --color-bg-alt: #f1f5f9;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #dbeafe;
  --color-accent: #06b6d4;
  --color-success: #22c55e;
  --color-border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --header-height: 72px;
  --transition: 0.25s ease;
  --font: 'Manrope', system-ui, -apple-system, sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.btn--white {
  background: #fff;
  color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.btn--white:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn--lg {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.header--scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  flex-shrink: 0;
}

.logo__icon {
  color: var(--color-primary);
  display: flex;
}

.logo__accent {
  color: var(--color-primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.nav__link:hover {
  color: var(--color-primary);
}

.header__cta {
  flex-shrink: 0;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition);
}

.burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: calc(var(--header-height) + 64px) 0 80px;
  overflow: visible;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #fff 0%, var(--color-bg) 100%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 24px;
}

.badge__dot {
  width: 7px;
  height: 7px;
  background: var(--color-success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero__title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 18px;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 32px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.hero__stats {
  display: flex;
  gap: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.stat__value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.stat__label {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Hero visual */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual {
  position: relative;
  width: 100%;
  max-width: 520px;
  padding: 16px 20px 24px;
}

.hero-visual__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(37, 99, 235, 0.14) 0%, transparent 70%);
  border-radius: var(--radius-xl);
  pointer-events: none;
}

.hero-visual__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  background: #fff;
}

.hero-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  z-index: 3;
}

.hero-badge--top {
  top: 0;
  right: 0;
  animation: float 4s ease-in-out infinite;
}

.hero-badge--bottom {
  bottom: 0;
  left: 0;
  animation: float 4s ease-in-out 2s infinite;
}

.hero-badge__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.hero-badge__icon--green {
  background: #dcfce7;
  color: #16a34a;
}

.hero-badge__icon--orange {
  background: #ffedd5;
  color: #ea580c;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ===== Trust bar ===== */
.trust-bar {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 24px 0;
}

.trust-bar__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.trust-item svg {
  flex-shrink: 0;
  color: var(--color-primary);
}

/* ===== Sections ===== */
.section {
  padding: 96px 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section--widget {
  background: linear-gradient(180deg, var(--color-bg) 0%, #eef2ff 50%, var(--color-bg) 100%);
}

.section__header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}

.section__tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.section__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section__desc {
  font-size: 17px;
  color: var(--color-text-muted);
}

/* ===== Feature cards ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 0 0 28px;
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.feature-card__img {
  width: 100%;
  height: 160px;
  background-image: url('assets/features-eosago.png');
  background-size: 200% 200%;
  background-repeat: no-repeat;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.feature-card__img--1 { background-position: 0% 0%; }
.feature-card__img--2 { background-position: 100% 0%; }
.feature-card__img--3 { background-position: 0% 100%; }
.feature-card__img--4 { background-position: 100% 100%; }

.feature-card__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  padding: 0 28px;
}

.feature-card__text {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.65;
  padding: 0 28px;
}

/* ===== How it works ===== */
.how-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.how-layout__visual {
  position: relative;
}

.how-layout__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  background: #fff;
}

.how-layout__steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step--row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  text-align: left;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  transition: all var(--transition);
}

.step--row:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-sm);
}

.step--row .step__number {
  margin: 0;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  font-size: 14px;
  background: var(--color-primary-light);
  border-color: transparent;
  color: var(--color-primary);
}

.step--row .step__title {
  margin-bottom: 4px;
}

.step--row .step__text {
  font-size: 14px;
}

/* Legacy steps grid (unused) */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary), var(--color-primary-light));
  z-index: 0;
}

.step {
  position: relative;
  z-index: 1;
  text-align: center;
}

.step__number {
  width: 56px;
  height: 56px;
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0 auto 20px;
}

.section--alt .step__number {
  background: var(--color-bg-alt);
}

.step__title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step__text {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ===== Widget ===== */
.widget-wrapper {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.widget-wrapper__glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
  border-radius: var(--radius-xl);
  pointer-events: none;
}

.widget-frame {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}

.widget-frame iframe {
  display: block;
}

/* ===== e-OSAGO info block ===== */
.eosago-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto 32px;
}

.eosago-info__item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.eosago-info__thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}

.eosago-info__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  border-radius: var(--radius-sm);
}

.eosago-info__item strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.eosago-info__item p {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.faq-item[open] {
  box-shadow: var(--shadow-sm);
}

.faq-item__question {
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  user-select: none;
}

.faq-item__question::-webkit-details-marker {
  display: none;
}

.faq-item__question::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item[open] .faq-item__question::after {
  transform: rotate(45deg);
}

.faq-item__answer {
  padding: 0 24px 20px;
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ===== CTA Banner ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e40af 100%);
  padding: 64px 0;
}

.cta-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta-banner__title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.cta-banner__text {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
}

/* ===== Footer ===== */
.footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
  padding-top: 64px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 64px;
  padding-bottom: 48px;
}

.logo--footer {
  color: #fff;
  margin-bottom: 16px;
}

.logo--footer .logo__icon {
  color: #60a5fa;
}

.footer__desc {
  font-size: 14px;
  line-height: 1.7;
  max-width: 360px;
}

.footer__links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.footer__heading {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__col a {
  font-size: 14px;
  transition: color var(--transition);
}

.footer__col a:hover {
  color: #fff;
}

.footer__note {
  font-size: 13px;
  opacity: 0.6;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 0;
}

.footer__bottom-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  opacity: 0.5;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-visual {
    max-width: 480px;
    margin: 0 auto;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .how-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .how-layout__visual {
    max-width: 560px;
    margin: 0 auto;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .steps::before {
    display: none;
  }

  .trust-bar__inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .eosago-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: 24px;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav__link {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
    width: 100%;
    font-size: 16px;
  }

  .nav__link:last-child {
    border-bottom: none;
  }

  .header__cta {
    display: none;
  }

  .burger {
    display: flex;
  }

  .hero {
    padding-bottom: 48px;
  }

  .hero-visual {
    padding: 12px 8px 20px;
  }

  .hero-badge {
    font-size: 12px;
    padding: 8px 12px;
  }

  .hero-badge--top {
    right: 4px;
  }

  .hero-badge--bottom {
    left: 4px;
  }

  .hero__stats {
    gap: 24px;
  }

  .stat__value {
    font-size: 22px;
  }

  .section {
    padding: 64px 0;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .how-layout__steps {
    gap: 12px;
  }

  .step--row {
    padding: 16px 18px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .trust-bar__inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cta-banner__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer__links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__stats {
    flex-direction: column;
    gap: 16px;
  }

  .widget-frame iframe {
    height: 580px !important;
  }
}
