@font-face {
  font-family: 'Comfortaa';
  src: url('assets/fonts/Comfortaa.ttf') format('truetype');
  font-weight: 300 700;
  font-display: swap;
}

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

:root {
  --beige: #F6F0E7;
  --blue: #629DBC;
  --dark: #1C1C1C;
  --muted: #6b6b6b;
}

body {
  font-family: 'Comfortaa', sans-serif;
  background: linear-gradient(170deg, #F6F0E7 35%, #629DBC 100%);
  color: var(--dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Hero ── */
.hero {
  padding: 64px 80px 32px;
}

.hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 56px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  width: 460px;
  max-width: 100%;
  flex-shrink: 0;
}

.hero-text {
  padding-top: 16px;
  flex: 1;
}

.tagline {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 36px;
}

.rustore-link {
  display: inline-block;
  text-decoration: none;
  transition: opacity 0.2s;
}

.rustore-link img {
  display: block;
  height: 60px;
  width: auto;
}

.rustore-link:hover {
  opacity: 0.7;
}

/* ── Theme toggle ── */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  color: var(--dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s;
}

.theme-toggle:hover {
  background: rgba(0, 0, 0, 0.14);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

/* ── Dark theme ── */
html[data-theme="dark"] body {
  background: linear-gradient(170deg, #2A2A2A 15%, #121212 90%);
  color: #F0EBE3;
}

html[data-theme="dark"] .theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  color: #F0EBE3;
}

html[data-theme="dark"] .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
}

html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

html[data-theme="dark"] .logo {
  filter: invert(1);
}

html[data-theme="dark"] footer {
  border-top-color: rgba(255, 255, 255, 0.09);
}

html[data-theme="dark"] .footer-links a {
  color: #F0EBE3;
}

html[data-theme="dark"] .footer-links a:hover {
  color: var(--blue);
}

html[data-theme="dark"] .footer-links .sep {
  color: #7a7a7a;
}

html[data-theme="dark"] .copyright {
  color: #F0EBE3;
}

html[data-theme="dark"] .dot {
  background: #4a4a4a;
}

html[data-theme="dark"] .dot.active {
  background: var(--blue);
}

html[data-theme="dark"] body.doc-body {
  background: #2A2A2A;
  color: #F0EBE3;
}

html[data-theme="dark"] .doc-page .back {
  color: var(--blue);
}

html[data-theme="dark"] .doc-page h1,
html[data-theme="dark"] .doc-content h2,
html[data-theme="dark"] .doc-content p,
html[data-theme="dark"] .doc-content li {
  color: #F0EBE3;
}

html[data-theme="dark"] .doc-page .updated {
  color: #9a9a9a;
}

html[data-theme="dark"] .doc-content a {
  color: var(--blue);
}

.hero-subtitle {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--muted);
  margin-top: -20px;
  margin-bottom: 28px;
}

/* ── Features ── */
.features {
  padding: 0 80px 80px;
}

.features-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.features-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
}

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

.feature-card {
  background: rgba(255, 255, 255, 0.45);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(8px);
}

.feature-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 10px;
}

.feature-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--muted);
}

.reviews {
  margin-top: 56px;
}

.reviews-list {
  display: flex;
  justify-content: center;
  gap: 20px;
  align-items: stretch;
}

.review-card {
  background: rgba(255, 255, 255, 0.45);
  border-radius: 20px;
  padding: 28px 32px;
  backdrop-filter: blur(8px);
  flex: 1;
  max-width: 380px;
  min-width: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.review-stars {
  font-size: 1.25rem;
  margin-bottom: 14px;
}

.review-text {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 16px;
  color: var(--dark);
}

.review-author {
  font-size: 0.8rem;
  color: var(--muted);
}

html[data-theme="dark"] .review-card {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .review-text {
  color: #F0EBE3;
}

.features-cta {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.features-rustore-badge {
  height: 60px;
  width: auto;
  display: block;
}

html[data-theme="dark"] .hero-subtitle {
  color: #9a9a9a;
}

html[data-theme="dark"] .feature-card {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .feature-card p {
  color: #9a9a9a;
}

html[data-theme="dark"] .features-rustore-badge {
  filter: invert(1);
}

/* ── Screens ── */
.screens {
  padding: 0 40px 64px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.screens-track {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.screen-slide {
  flex: 1;
  min-width: 0;
}

.screen-slide img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
}

.screens-dots {
  display: none;
}

/* ── Dots (mobile only) ── */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c5c5c5;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  border: none;
  padding: 0;
}

.dot.active {
  background: var(--blue);
  transform: scale(1.4);
}

/* ── Footer ── */
footer {
  margin-top: auto;
  padding: 28px 40px;
  border-top: 1px solid rgba(0, 0, 0, 0.09);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--dark);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

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

.footer-links .sep {
  color: var(--muted);
  user-select: none;
}

.copyright {
  font-size: 0.8rem;
  color: var(--dark);
}

/* ── Document pages ── */
.doc-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 64px 40px 80px;
  flex: 1;
}

.doc-page .back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #2a6fa8;
  font-size: 0.9rem;
  margin-bottom: 40px;
  transition: opacity 0.2s;
}

.doc-page .back:hover {
  opacity: 0.7;
}

.doc-page h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.doc-page .updated {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 40px;
}

.doc-placeholder {
  background: rgba(255,255,255,0.5);
  border: 1px dashed rgba(0,0,0,0.15);
  border-radius: 16px;
  padding: 48px 40px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

body.doc-body {
  background: var(--beige);
}

.doc-content h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 10px;
  color: var(--dark);
}

.doc-content p {
  font-size: 0.925rem;
  line-height: 1.75;
  margin-bottom: 10px;
  color: var(--dark);
}

.doc-content ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

.doc-content li {
  font-size: 0.925rem;
  line-height: 1.75;
  margin-bottom: 4px;
  color: var(--dark);
}

.doc-content a {
  color: #2a6fa8;
  text-decoration: none;
}

.doc-content a:hover {
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero {
    padding: 48px 40px 28px;
  }

  .logo {
    width: 340px;
  }

  .tagline {
    font-size: 1.6rem;
  }

  .screens {
    padding: 16px 32px 56px;
  }

  .features {
    padding: 0 40px 64px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 36px 24px 24px;
  }

  .hero-subtitle {
    display: none;
  }

  .features {
    padding: 0 24px 56px;
  }

  .features-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .feature-card {
    padding: 20px;
  }

  .hero-inner {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .logo {
    width: 200px;
  }

  .tagline {
    font-size: 0.8rem;
    margin-bottom: 16px;
  }

  .rustore-link img {
    height: 48px;
  }

  .screens {
    padding: 8px 0 48px;
  }

  .screens-track {
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 24px;
  }

  .screens-track::-webkit-scrollbar {
    display: none;
  }

  .screen-slide {
    flex: 0 0 58%;
    scroll-snap-align: center;
  }

  .screens-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding-bottom: 8px;
  }

  footer {
    padding: 24px;
  }

  .footer-links {
    flex-direction: column;
    gap: 14px;
  }

  .footer-links .sep {
    display: none;
  }

  .doc-page {
    padding: 40px 24px 60px;
  }
}
