:root {
  --primary-color: #6A1E9C;
  --secondary-color: #4B1461;
  --accent-color: #A85DD4;
  --light-color: #F5F0FA;
  --dark-color: #1E0830;
  --gradient-primary: linear-gradient(135deg, #6A1E9C 0%, #A85DD4 100%);
  --hover-color: #4B1461;
  --background-color: #FAF7FD;
  --text-color: #28163A;
  --border-color: rgba(106, 30, 156, 0.16);
  --divider-color: rgba(106, 30, 156, 0.1);
  --shadow-color: rgba(75, 20, 97, 0.1);
  --highlight-color: #F2D57F;
  --main-font: 'Lora', serif;
  --alt-font: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  width: 100%;
}

body {
  font-family: var(--alt-font);
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.7;
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 320px;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

h1, h2, h3 {
  font-family: var(--main-font);
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 1rem 0;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  line-height: 1.3;
}

h3 {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  line-height: 1.4;
}

p {
  margin: 0 0 1rem 0;
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.75;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 10px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.hamburger .line {
  width: 22px;
  height: 2px;
  background: var(--primary-color);
  margin: 2px 0;
  transition: 0.3s;
  border-radius: 1px;
}

#menu-toggle {
  display: none;
}

#menu-toggle:checked ~ .mobile-nav {
  max-height: 400px;
  opacity: 1;
}

.mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

.mobile-nav ul {
  padding: 2rem;
  margin: 0;
  list-style: none;
}

.mobile-nav li {
  margin: 1rem 0;
}

.mobile-nav a {
  display: block;
  padding: 0.8rem 0;
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.mobile-nav a:hover {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.97);
  padding: 1.2rem 0;
  position: relative;
  z-index: 1000;
  box-shadow: 0 2px 16px var(--shadow-color);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 3rem;
  width: auto;
}

.navigation ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.navigation a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.navigation a:hover {
  color: var(--primary-color);
}

/* Feature cards — top icon + bottom color bar */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  width: 100%;
}

.feature-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 2.2rem 1.8rem 1.6rem;
  box-shadow: 0 4px 20px var(--shadow-color);
  transition: all 0.3s ease;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-top: 4px solid transparent;
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.feature-card:hover::after {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(106, 30, 156, 0.2);
  border-top-color: var(--accent-color);
}

.feature-icon {
  font-size: 2.4rem;
  margin-bottom: 1.2rem;
  width: 72px;
  height: 72px;
  background: rgba(168, 93, 212, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.feature-card:hover .feature-icon {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
}

/* Comparison table block */
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 24px var(--shadow-color);
}

.compare-table th {
  padding: 1rem 1.5rem;
  font-family: var(--main-font);
  font-size: 1rem;
  text-align: left;
}

.compare-table th.col-habit {
  background: var(--dark-color);
  color: var(--light-color);
  width: 40%;
}

.compare-table th.col-before {
  background: #c0392b;
  color: white;
  width: 30%;
  text-align: center;
}

.compare-table th.col-after {
  background: #1E6B4A;
  color: white;
  width: 30%;
  text-align: center;
}

.compare-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  background: #ffffff;
  font-size: 0.97rem;
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table tr:hover td {
  background: var(--light-color);
}

.compare-table td.col-before {
  text-align: center;
  color: #c0392b;
  font-weight: 600;
}

.compare-table td.col-after {
  text-align: center;
  color: #1E6B4A;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 700;
}

.badge-bad {
  background: rgba(192, 57, 43, 0.1);
  color: #c0392b;
}

.badge-good {
  background: rgba(30, 107, 74, 0.1);
  color: #1E6B4A;
}

/* Testimonials */
.testimonial {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 3px 14px var(--shadow-color);
  transition: all 0.3s ease;
  width: 100%;
}

.testimonial:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(106, 30, 156, 0.18);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-family: var(--main-font);
  font-size: 1rem;
  flex-shrink: 0;
}

/* FAQ Items */
.faq-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin: 1rem 0;
  box-shadow: 0 2px 10px var(--shadow-color);
  padding: 1.8rem 2rem;
  width: 100%;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: var(--accent-color);
  box-shadow: 0 6px 22px rgba(106, 30, 156, 0.14);
}

/* Form */
input, textarea {
  transition: all 0.3s ease;
  font-family: var(--alt-font);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  background: #ffffff;
  color: var(--text-color);
  font-size: 1rem;
  width: 100%;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(106, 30, 156, 0.1);
}

/* Buttons */
.btn, button[type="submit"] {
  transition: all 0.3s ease;
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  font-family: var(--alt-font);
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  box-shadow: 0 3px 14px rgba(106, 30, 156, 0.28);
}

.btn:hover, button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(106, 30, 156, 0.4);
}

/* Contact */
.contact-wrapper {
  width: 80%;
  margin: 0 auto;
}

/* Pattern */
.pattern-bg {
  position: relative;
  overflow: hidden;
}

.pattern-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(168, 93, 212, 0.07) 1.5px, transparent 1.5px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: var(--light-color);
  padding: 3rem 0 1rem;
}

footer a {
  color: var(--light-color);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

footer a:hover {
  opacity: 0.75;
}

/* Extra block */
.extra-block {
  background: var(--light-color);
  padding: 4.5rem 0;
}

/* Responsive */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .navigation {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .contact-wrapper {
    width: 100%;
  }

  .grid-2col {
    grid-template-columns: 1fr !important;
  }

  .compare-table th,
  .compare-table td {
    padding: 0.75rem 0.9rem;
    font-size: 0.88rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }

  .feature-card,
  .testimonial,
  .faq-item {
    padding: 1.5rem 1rem;
  }
}

a:focus, button:focus, input:focus, textarea:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}