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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text-primary);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(123, 108, 246, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(196, 181, 253, 0.35), transparent 50%),
    linear-gradient(180deg, var(--bg-base) 0%, #f0ecfa 40%, var(--bg-base) 100%);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* —— Nav —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(247, 245, 252, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.site-nav.is-scrolled {
  border-bottom-color: var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--action-primary), #9b8cff);
  display: grid;
  place-items: center;
  color: white;
  font-size: 1.1rem;
  box-shadow: 0 8px 20px rgba(123, 108, 246, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--action-primary);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-surface);
}

.lang-switch a {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.lang-switch a.active {
  background: var(--action-primary);
  color: white;
}

/* —— Hero —— */
.hero {
  padding: 3.5rem 0 4.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.hero-brand {
  font-size: clamp(2.6rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  background: linear-gradient(120deg, var(--text-primary) 20%, var(--action-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
  animation: fadeUp 0.7s ease both;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.version-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--action-primary);
  background: var(--accent-soft);
  border: 1px solid rgba(123, 108, 246, 0.25);
  -webkit-background-clip: unset;
  background-clip: unset;
  background: var(--accent-soft);
}

.hero h1 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  max-width: 18ch;
  margin-bottom: 0.85rem;
  animation: fadeUp 0.7s ease 0.08s both;
}

.hero-lead {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 36ch;
  margin-bottom: 1.75rem;
  animation: fadeUp 0.7s ease 0.14s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: fadeUp 0.7s ease 0.2s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.9rem 1.35rem;
  border-radius: var(--radius-16);
  font-weight: 650;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--action-primary);
  color: var(--text-inverse);
  box-shadow: 0 12px 28px rgba(123, 108, 246, 0.35);
}

.btn-primary:hover {
  background: var(--action-primary-hover);
}

.btn-ghost {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  border-color: var(--action-primary);
  color: var(--action-primary);
}

.hero-stats {
  display: flex;
  gap: 1.75rem;
  margin-top: 2.25rem;
  animation: fadeUp 0.7s ease 0.28s both;
}

.hero-stats strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.hero-stats span {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Phone mock */
.phone-wrap {
  display: flex;
  justify-content: center;
  animation: floatY 5s ease-in-out infinite;
}

.phone {
  width: min(100%, 300px);
  background: linear-gradient(165deg, #2a2348, var(--dark-bg));
  border-radius: 36px;
  padding: 12px;
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone-screen {
  background: var(--bg-base);
  border-radius: 28px;
  overflow: hidden;
  min-height: 520px;
  padding: 1.25rem 1.1rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.phone-greeting {
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.phone-week {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-16);
  padding: 0.85rem;
  margin-bottom: 0.85rem;
}

.phone-week-label {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.55rem;
}

.week-dots {
  display: flex;
  justify-content: space-between;
  gap: 0.25rem;
}

.week-dots span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.week-dots span.on {
  background: var(--action-primary);
  color: white;
}

.phone-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.quick-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-16);
  padding: 0.85rem;
}

.quick-card .emoji {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.quick-card .label {
  font-size: 0.78rem;
  font-weight: 650;
}

.phone-chat {
  background: linear-gradient(135deg, var(--accent-soft), #e0d7ff);
  border-radius: var(--radius-16);
  padding: 1rem;
}

.phone-chat .bot {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
}


.phone-banners {
  display: grid;
  gap: 0.35rem;
  margin: 0.15rem 0 0.5rem;
}

.phone-banner {
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--text-primary);
}

.phone-banner.ai { background: #ede9fe; }
.phone-banner.diary { background: #e8eef8; }
.phone-banner.tests { background: #fff0e6; }

.phone-nav {
  display: flex;
  justify-content: space-around;
  margin-top: auto;
  padding: 0.4rem 0.15rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 -2px 12px rgba(26, 22, 48, 0.06);
  font-size: 0.48rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.phone-nav span.on {
  color: var(--action-primary);
}

.mood-row {
  display: flex;
  gap: 0.35rem;
  font-size: 1.25rem;
}

/* Sections */
section {
  padding: 4.5rem 0;
}

.section-eyebrow {
  color: var(--action-primary);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.65rem;
  max-width: 18ch;
}

.section-sub {
  color: var(--text-secondary);
  max-width: 42ch;
  margin-bottom: 2.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-20);
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--action-primary);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
}

.feature p,
.feature li {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.feature ul {
  margin-top: 0.75rem;
  padding-left: 1.1rem;
}

.feature.featured {
  grid-column: span 2;
  background: linear-gradient(145deg, #fff, var(--accent-soft));
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 1.5rem;
  background: var(--bg-surface);
  border-radius: var(--radius-20);
  border: 1px solid var(--border-subtle);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--action-primary);
  color: white;
  font-weight: 700;
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* Reviews */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.review {
  background: var(--bg-surface);
  border-radius: var(--radius-20);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
}

.stars {
  color: #f5c542;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.review p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--action-primary);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
}

/* Security dark band */
.security {
  background: var(--dark-bg);
  color: #f5f2ff;
  border-radius: var(--radius-24);
  padding: 3rem;
  margin: 1rem 0;
}

.security .section-eyebrow {
  color: var(--accent-lavender);
}

.security .section-sub,
.security li {
  color: var(--text-secondary);
  color: #b0a8c9;
}

.security ul {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.security li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.security li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 720px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-16);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.1rem 1.25rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-primary);
}

.faq-q span.icon {
  color: var(--action-primary);
  font-weight: 700;
}

.faq-a {
  display: none;
  padding: 0 1.25rem 1.15rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.faq-item.open .faq-a {
  display: block;
}

.faq-item.open .faq-q span.icon {
  transform: rotate(45deg);
}

/* Download CTA */
.download {
  text-align: center;
  padding-bottom: 5rem;
}

.download .section-title {
  max-width: none;
  margin-inline: auto;
}

.download .section-sub {
  margin-inline: auto;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.2rem;
  background: var(--dark-bg);
  color: white;
  border-radius: var(--radius-16);
  min-width: 180px;
  text-align: left;
  transition: transform 0.2s, background 0.2s;
}

.store-btn:hover {
  transform: translateY(-2px);
  background: var(--dark-surface);
}

.store-btn small {
  display: block;
  font-size: 0.7rem;
  opacity: 0.75;
}

.store-btn strong {
  font-size: 0.95rem;
}

.store-btn.accent {
  background: var(--action-primary);
}

.store-btn.accent:hover {
  background: var(--action-primary-hover);
}

footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2rem 0 2.5rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a:hover {
  color: var(--action-primary);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(22, 18, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 100;
}

.modal.open {
  display: flex;
}

.modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-24);
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-soft);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: var(--bg-elevated);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .features-grid,
  .steps,
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .feature.featured {
    grid-column: auto;
  }

  .nav-links {
    display: none;
  }

  .phone {
    width: min(100%, 280px);
  }

  .hero {
    padding-top: 2rem;
  }
}
