/* --- STAGE 0: GLOBAL VARIABLES & RESET --- */
:root {
  /* Color Palette: Soft Mint & Deep Charcoal */
  --bg-main: #f5faf8; /* Very light mint/white */
  --bg-secondary: #e0f2f1; /* Soft sage accent */
  --text-main: #1f2937; /* Deep charcoal */
  --text-muted: #4b5563; /* Grey */
  --accent: #10b981; /* Fresh Emerald */
  --accent-dark: #047857; /* Hover state */
  --white: #ffffff;

  /* Typography */
  --font-main: "Manrope", sans-serif;

  /* Sizes & Radius */
  --container-width: 1240px;
  --header-height: 80px;
  --radius-sm: 8px;
  --radius-md: 16px; /* Squircle */
  --radius-lg: 24px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  display: block;
}

/* Utilities */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- STAGE 1: HEADER --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(245, 250, 248, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.header__container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main);
}

.header__nav {
  display: flex;
  align-items: center;
}

.header__menu {
  display: flex;
  gap: 40px;
}

.header__link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  padding: 5px 0;
}

/* Micro-interaction: Underline slide */
.header__link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--accent);
  transition: width var(--transition-smooth);
}

.header__link:hover {
  color: var(--text-main);
}

.header__link:hover::after {
  width: 100%;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header__btn {
  background-color: var(--text-main);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-md); /* Squircle */
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform var(--transition-fast),
    background-color var(--transition-fast);
}

.header__btn:hover {
  background-color: var(--accent);
  transform: translateY(-2px); /* Micro-interaction */
}

.header__burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-main);
}

/* --- STAGE 2: FOOTER --- */
.footer {
  background-color: var(--text-main);
  color: #e5e7eb;
  padding: 80px 0 40px;
  margin-top: auto;
  border-top-left-radius: 40px; /* Stylistic choice */
  border-top-right-radius: 40px;
}

.footer__container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  /* Asymmetric Grid Strategy: Brand col is wider */
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 60px;
}

.header__title--footer {
  color: var(--white);
}

.footer__desc {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #9ca3af;
  max-width: 300px;
  line-height: 1.7;
}

.footer__note {
  display: block;
  margin-top: 30px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

.footer__heading {
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 24px;
  font-weight: 700;
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer__link {
  font-size: 0.9rem;
  color: #d1d5db;
  transition: padding-left var(--transition-fast), color var(--transition-fast);
}

/* Micro-interaction: Shift right on hover */
.footer__link:hover {
  color: var(--accent);
  padding-left: 8px;
}

.footer__list--contacts {
  gap: 18px;
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: #d1d5db;
}

.footer__icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  margin-top: 3px;
}

/* Mobile Adaptation */
@media (max-width: 992px) {
  .header__menu {
    display: none; /* Logic for JS toggle will be added */
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--bg-main);
    flex-direction: column;
    padding: 40px 20px;
    border-bottom: 1px solid #ddd;
    gap: 20px;
  }

  .header__menu.is-active {
    display: flex;
  }

  .header__burger {
    display: block;
  }

  .footer__container {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 576px) {
  .footer__container {
    grid-template-columns: 1fr;
  }

  .header__btn {
    display: none; /* Save space on mobile header */
  }

  .footer {
    border-radius: 20px 20px 0 0;
  }
}

/* --- BUTTONS & UTILS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: var(--radius-md); /* Squircle */
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn--primary {
  background-color: var(--text-main);
  color: var(--white);
  border: 1px solid var(--text-main);
}

.btn--primary:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
}

.btn--text {
  background: transparent;
  color: var(--text-main);
  padding: 16px 0;
}

.btn--text:hover {
  color: var(--accent);
  gap: 15px; /* Icon slides right */
}

.btn--white {
  background-color: var(--white);
  color: var(--text-main);
}
.btn--white:hover {
  background-color: #f0f0f0;
}

.text-accent {
  color: var(--accent);
}

/* --- HERO SECTION --- */
.hero {
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.hero__container {
  display: grid;
  grid-template-columns: 1.2fr 1fr; /* Asymmetric split */
  align-items: center;
  gap: 60px;
}

.hero__badge {
  display: inline-block;
  background-color: var(--bg-secondary);
  color: var(--accent-dark);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero__title {
  font-size: 4rem; /* Giant typography */
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 30px;
  letter-spacing: -0.02em;
}

.hero__desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 500px;
}

.hero__note {
  display: block;
  margin-top: 10px;
  font-weight: 600;
  color: var(--text-main);
}

.hero__actions {
  display: flex;
  gap: 30px;
  align-items: center;
  margin-bottom: 60px;
}

.hero__stats {
  display: flex;
  gap: 50px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 30px;
}

.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Hero Visual & Animation Prep */
.hero__image-wrapper {
  position: relative;
  width: 100%;
  height: 600px; /* Tall asymmetric image */
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform: rotate(2deg); /* Breaking symmetry */
  transition: transform 0.5s ease;
}

.hero__image-wrapper:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__float-card {
  position: absolute;
  bottom: 40px;
  left: -20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  transform: rotate(-2deg);
}

.icon-success {
  color: var(--accent);
  width: 20px;
}

/* --- SECTION GENERAL --- */
.section {
  padding: 100px 0;
}

.section-header {
  margin-bottom: 60px;
  max-width: 600px;
}

.section-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 0;
  width: 10px;
  height: 10px;
  background-color: var(--accent);
  border-radius: 50%;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* --- USAGE SECTION (Broken Grid) --- */
.usage__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 30px;
}

.usage__item {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  transition: transform var(--transition-smooth),
    box-shadow var(--transition-smooth);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.usage__item:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  border-color: rgba(16, 185, 129, 0.3);
}

/* First item spans 2 columns */
.usage__item--large {
  grid-column: 1 / 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #f8fafc; /* Slight contrast */
}

.usage__item--accent {
  background-color: var(--text-main);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.usage__icon-box {
  width: 60px;
  height: 60px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dark);
  margin-bottom: 24px;
}

.usage__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.usage__text {
  color: var(--text-muted);
  font-size: 1rem;
}

.text-white {
  color: var(--white);
}
.text-white-mute {
  color: #9ca3af;
  margin-bottom: 20px;
}

/* Mobile Responses */
@media (max-width: 992px) {
  .hero__container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__title {
    font-size: 3rem;
  }
  .hero__actions {
    justify-content: center;
  }
  .hero__stats {
    justify-content: center;
  }
  .hero__image-wrapper {
    height: 400px;
    transform: rotate(0);
    margin-top: 40px;
  }

  .usage__grid {
    grid-template-columns: 1fr;
  }
  .usage__item--large {
    grid-column: 1;
  }
}

/* --- ADVANTAGES SECTION --- */
.advantages__container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
}

.advantages__intro {
  position: sticky;
  top: 120px; /* Header height + gap */
  padding-right: 40px;
}

.advantages__decor {
  margin-top: 60px;
  animation: spin 20s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.advantages__list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.adv-card {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: transform var(--transition-smooth);
}

.adv-card:hover {
  transform: translateX(10px); /* Asymmetric hover effect */
  border-color: rgba(16, 185, 129, 0.3);
}

.adv-card__icon {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--bg-secondary); /* Very light mint color for number */
  margin-bottom: 20px;
  line-height: 1;
}

.adv-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.adv-card__text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.adv-card--highlight {
  background-color: var(--accent);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.adv-card--highlight .adv-card__title {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

/* --- REVIEWS SECTION (Dark Theme) --- */
.reviews {
  background-color: var(--text-main); /* Dark background */
  color: var(--white);
  border-radius: 40px; /* Visual separation */
  margin: 40px 20px; /* Create a 'floating' dark section look */
  width: auto; /* Override width to respect margin */
}

/* Fix for container inside reduced width section */
.reviews .container {
  max-width: 1200px;
}

.reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.review-card {
  background-color: rgba(255, 255, 255, 0.05); /* Glassmorphism hint */
  padding: 30px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  height: 100%;
  backdrop-filter: blur(5px);
}

.review-card--accent {
  background-color: var(--accent);
  transform: translateY(-20px); /* Break the grid line */
}

.review-card__header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.review-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.review-card__name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.review-card__loc {
  font-size: 0.8rem;
  color: #9ca3af;
}

.review-card__text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #d1d5db;
  flex-grow: 1; /* Push rating to bottom */
  margin-bottom: 20px;
  font-style: italic;
}

.review-card__rating {
  display: flex;
  gap: 4px;
  color: #fbbf24; /* Star color */
}

.icon-star {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.bg-white {
  background-color: var(--white);
}
.text-dark {
  color: var(--text-main);
}

/* RESPONSIVE */
@media (max-width: 992px) {
  .advantages__container {
    grid-template-columns: 1fr;
  }

  .advantages__intro {
    position: static;
    margin-bottom: 40px;
  }

  .reviews__grid {
    grid-template-columns: 1fr;
  }

  .review-card--accent {
    transform: translateY(0);
  }

  .reviews {
    margin: 0;
    border-radius: 0;
  }
}
.faq__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.faq__q {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}

.faq__a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.text-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.contact {
  background-color: var(--bg-secondary); /* Light sage background */
  border-radius: 40px 40px 0 0; /* Visual bridge to footer */
  padding-bottom: 80px;
}

.contact__container {
  display: grid;
  grid-template-columns: 1fr 1.2fr; /* Asymmetric */
  gap: 60px;
  align-items: center;
}

.contact__benefits {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.benefit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text-main);
}

/* --- FORM STYLES --- */
.form {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  position: relative;
  min-height: 400px;
}

.form__group {
  margin-bottom: 20px;
  position: relative;
}

.form__label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.form__input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-fast);
  background-color: #f9fafb;
}

.form__input:focus {
  outline: none;
  border-color: var(--accent);
  background-color: var(--white);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.form__error {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 5px;
  display: none;
}

.form__group.error .form__input {
  border-color: #ef4444;
}

.form__group.error .form__error {
  display: block;
}

.form__check-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form__check-group a {
  color: var(--accent-dark);
  text-decoration: underline;
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
  margin-top: 2px;
}

.captcha-box {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 15px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 24px;
  width: fit-content;
  cursor: pointer;
  transition: border-color 0.2s;
  user-select: none;
}

.captcha-box:hover {
  border-color: #d1d5db;
}

.captcha-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #c4c4c4;
  border-radius: 4px;
  background: var(--white);
  position: relative;
  transition: all 0.2s;
}

.captcha-checkbox.checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.captcha-checkbox.checked::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.captcha-label {
  font-size: 0.9rem;
  color: var(--text-main);
  font-weight: 500;
}

.captcha-logo {
  margin-left: auto;
  color: #9ca3af;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.8);
}

.form__submit {
  width: 100%;
  justify-content: center;
}

.form__footer-note {
  text-align: center;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 15px;
}

.form__success {
  display: none;
  text-align: center;
  padding: 40px 20px;
  animation: fadeIn 0.5s ease;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.success-icon {
  width: 60px;
  height: 60px;
  color: var(--accent);
  margin-bottom: 20px;
}

.success-icon svg {
  width: 100%;
  height: 100%;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 992px) {
  .contact__container {
    grid-template-columns: 1fr;
  }
  .faq__grid {
    grid-template-columns: 1fr;
  }
}
/* --- FORM FIXES --- */
.form__check-group-wrapper {
  margin-bottom: 24px;
}
.form__check-group {
  margin-bottom: 4px; /* Space for potential error */
}

/* --- COOKIE POPUP --- */
.cookie-popup {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(150%); /* Hidden initially */
  background: var(--white);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  max-width: 400px;
  width: 90%;
  border: 1px solid rgba(16, 185, 129, 0.2);
  transition: transform var(--transition-smooth);
}

.cookie-popup.is-visible {
  transform: translateX(-50%) translateY(0);
}

.cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-main);
}

.cookie-content a {
  color: var(--accent-dark);
  text-decoration: underline;
}

.btn--xs {
  padding: 8px 16px;
  font-size: 0.8rem;
}

/* --- TEXT PAGES STYLES (Privacy, Terms etc.) --- */
/* Ці стилі працюватимуть на сторінках типу privacy.html */
.pages {
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 80px;
  background-color: var(--bg-main);
  min-height: 80vh;
}

.pages .container {
  max-width: 800px; /* Readability focus */
  background: var(--white);
  padding: 60px;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.pages h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 40px;
  color: var(--text-main);
  border-bottom: 2px solid var(--bg-secondary);
  padding-bottom: 20px;
}

.pages h2 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--text-main);
}

.pages p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.pages ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.pages li {
  margin-bottom: 10px;
}

.pages a {
  color: var(--accent);
  text-decoration: underline;
}

/* Mobile for pages */
@media (max-width: 768px) {
  .pages .container {
    padding: 30px 20px;
  }
  .pages h1 {
    font-size: 1.8rem;
  }
}
