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

:root {
  --bg-gradient: radial-gradient(circle at top left, #dbeafe, #f9fafb 55%, #e5e7eb);
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.16);
  --text-main: #0f172a;
  --text-muted: #6b7280;
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-bg-secondary: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(148, 163, 184, 0.45);
  --radius-xl: 1.5rem;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
  --transition-fast: 0.2s ease-out;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  line-height: 1.6;
}

/* Layout helpers */
.container {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(22px);
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.96),
    rgba(255, 255, 255, 0.78),
    transparent
  );
  border-bottom: 1px solid rgba(209, 213, 219, 0.8);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.8rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
}

.brand-name {
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-link {
  position: relative;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.3rem 0.4rem;
  border-radius: 999px;
  transition: var(--transition-fast);
  backdrop-filter: blur(6px);
}

.nav-link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.35), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: -1;
}

.nav-link:hover {
  color: #111827;
  background: rgba(249, 250, 251, 0.9);
  box-shadow: 0 0 0 1px rgba(209, 213, 219, 0.8);
}

.nav-link:hover::before {
  opacity: 1;
}

.nav-contact {
  border-radius: 999px;
  padding-inline: 0.9rem;
  background: rgba(79, 70, 229, 0.1);
  color: #1d4ed8;
}

.nav-contact:hover {
  background: rgba(79, 70, 229, 0.16);
  box-shadow: 0 0 25px rgba(129, 140, 248, 0.45);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(209, 213, 219, 0.8);
  transition: var(--transition-fast);
}

.nav-toggle:hover {
  box-shadow: 0 0 24px rgba(148, 163, 184, 0.65);
  transform: translateY(-1px);
}

.nav-toggle-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-main);
  border-radius: 999px;
}

.nav-toggle-line + .nav-toggle-line {
  margin-top: 5px;
}

/* Hero section */
.hero {
  padding: 2.8rem 0 1rem;
}

.hero-inner {
  text-align: center;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 4vw, 2.9rem);
  letter-spacing: 0.02em;
}

.hero-text p {
  max-width: 640px;
  margin: 1rem auto 0;
  color: var(--text-muted);
}

/* Counter */
.counter-section {
  padding: 1.5rem 0 3rem;
}

.counter-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
  gap: 1.5rem;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
}

.glass-secondary {
  background: var(--glass-bg-secondary);
}

.section-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  display: block;
}

.counter-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

#text-input {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 2px solid rgba(209, 213, 219, 0.9);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-main);
  font: inherit;
  line-height: 1.5;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(243, 244, 246, 0.9);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), transform var(--transition-fast);
}

#text-input::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

#text-input:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--accent-soft), 0 0 40px rgba(129, 140, 248, 0.35);
  transform: translateY(-1px);
}

/* Summary box */
.counter-summary {
  border-radius: 1.2rem;
  padding: 1.1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.counter-summary h2 {
  font-size: 1.1rem;
}

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

.stats-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.stats-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(209, 213, 219, 0.9);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
  transition: var(--transition-fast);
}

.stats-list li:hover {
  transform: translateY(-1px);
  border-color: var(--accent-soft);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.stats-list .label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.stats-list .value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* Buttons */
.btn-primary {
  margin-top: 0.4rem;
  align-self: flex-start;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #f9fafb;
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.98),
    rgba(56, 189, 248, 0.9)
  );
  box-shadow: 0 14px 35px rgba(59, 130, 246, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    opacity var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 18px 40px rgba(59, 130, 246, 0.45);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.35);
}

/* Sections Header */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2rem;
}

.section-header h2 {
  font-size: 1.6rem;
}

.section-header p {
  margin-top: 0.5rem;
  color: var(--text-muted);
}

/* Benefits */
.benefits-section {
  padding: 2.5rem 0 3rem;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}

.glass-card {
  background: var(--glass-bg);
  border-radius: 1.3rem;
  padding: 0.85rem;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  display: flex;
  gap: 0.8rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    border-color var(--transition-fast), background var(--transition-fast);
}

.glass-card:hover {
  transform: translateY(-4px) translateZ(0);
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(79, 70, 229, 0.65);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.12);
}

.benefit-image-wrapper {
  flex: 0 0 70px;
  max-width: 70px;
}

.benefit-image {
  width: 100%;
  height: 70px;
  border-radius: 1rem;
  object-fit: cover;
  background: rgba(249, 250, 251, 0.9);
  border: 1px solid rgba(209, 213, 219, 0.9);
}

.benefit-content h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.benefit-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* FAQ */
.faq-section {
  padding: 2.5rem 0 3.2rem;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.faq-item {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  transition: var(--transition-fast);
}

.faq-item.open {
  border-color: rgba(79, 70, 229, 0.6);
  box-shadow: 0 22px 60px rgba(79, 70, 229, 0.18);
}

.faq-question {
  width: 100%;
  padding: 0.9rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}

.faq-icon {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: max-height 0.25s ease-out, padding-bottom 0.25s ease-out;
}

.faq-item.open .faq-answer {
  padding-bottom: 0.8rem;
}

/* Footer */
.footer {
  border-top: 1px solid rgba(209, 213, 219, 0.9);
  background: rgba(129, 140, 248, 0.35);
  backdrop-filter: blur(18px);
  padding-top: 1.8rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.4fr;
  gap: 1.5rem;
  align-items: flex-start;
}

.footer-column h3 {
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.footer-column p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-list {
  list-style: none;
}

.footer-list li + li {
  margin-top: 0.35rem;
}

.footer-list a {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 1px;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.footer-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(79, 70, 229, 0.9),
    rgba(56, 189, 248, 0.9)
  );
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast);
}

.footer-list a:hover {
  color: #111827;
  transform: translateY(-1px);
}

.footer-list a:hover::after {
  transform: scaleX(1);
}

.footer-bottom {
  margin-top: 1.3rem;
  padding: 0.75rem 0 1.1rem;
  border-top: 1px solid rgba(209, 213, 219, 0.9);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
  .counter-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .counter-summary {
    order: -1;
  }

  .benefit-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    inset-inline: 1rem;
    top: 56px;
    padding: 0.7rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(209, 213, 219, 0.9);
    flex-direction: column;
    transform-origin: top;
    transform: scaleY(0.8);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s ease-out, opacity 0.18s ease-out;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: scaleY(1);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hero {
    padding-top: 2.1rem;
  }

  .hero-text h1 {
    font-size: clamp(1.9rem, 6vw, 2.4rem);
  }
}
