:root {
  --bg: #f4f7fc;
  --text: #1a2744;
  --muted: #5a6b8a;
  --matio-navy: #1a2744;
  --matio-cyan: #00c2e8;
  --matio-purple: #7b4fd4;
  --matio-teal: #00b4a6;
  --matio-gold: #ffc83d;
  --brand: #7b4fd4;
  --brand-dark: #5a36b8;
  --brand-gradient: linear-gradient(135deg, #00c2e8 0%, #7b4fd4 100%);
  --white: #ffffff;
  --radius: 20px;
  --radius-lg: 32px;
  --font: "Nunito", system-ui, sans-serif;
  --font-display: "Quicksand", "Nunito", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 247, 252, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

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

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.logo-img--icon {
  height: 48px;
  width: auto;
}

.nav {
  display: flex;
  gap: 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--brand-dark);
}

/* Hero */
.hero {
  padding: 3.5rem 0 4rem;
  background: linear-gradient(
    160deg,
    rgba(0, 194, 232, 0.12) 0%,
    var(--bg) 40%,
    rgba(123, 79, 212, 0.1) 100%
  );
}

.hero-brand {
  margin-bottom: 1rem;
}

.hero-logo {
  width: min(340px, 100%);
  height: auto;
  display: block;
}

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

.eyebrow {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  color: #111827;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.hero-points {
  margin: 0 0 2rem;
  padding-left: 0;
  list-style: none;
  color: var(--text);
}

.hero-points li {
  margin-bottom: 0.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.btn-primary {
  background: var(--brand-gradient);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(123, 79, 212, 0.35);
}

.btn-ghost {
  background: var(--white);
  color: var(--brand-dark);
  border: 2px solid rgba(123, 79, 212, 0.25);
}

/* Phone mock */
.phone-frame {
  border-radius: 2.2rem;
  overflow: hidden;
  background: #111;
  padding: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  max-width: 280px;
  margin-inline: auto;
}

.phone-frame img {
  border-radius: 1.6rem;
  width: 100%;
}

.phone-frame--sm {
  max-width: 200px;
  padding: 8px;
}

.phone-frame--slider {
  max-width: 200px;
  padding: 8px;
  flex-shrink: 0;
}

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

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  text-align: center;
  margin: 0 0 0.75rem;
}

.section-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.section-intro--left {
  text-align: left;
  margin-left: 0;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.about-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.about-card h3 {
  font-family: var(--font-display);
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.about-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Categories */
.categories {
  background: var(--white);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.cat-card {
  background: var(--cat);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.cat-card::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.cat-icon {
  font-size: 1.5rem;
  font-weight: 800;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.cat-card h3 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  position: relative;
  z-index: 1;
}

.cat-card p {
  margin: 0;
  font-size: 0.88rem;
  opacity: 0.92;
  flex: 1;
  position: relative;
  z-index: 1;
}

.cat-meta {
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.85;
  margin-top: 0.75rem;
  position: relative;
  z-index: 1;
}

/* App preview carousel — slide one-by-one (no fade scroll) */
.preview-carousel-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 2rem 1rem 1.5rem;
  overflow: hidden;
}

.app-carousel {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto auto;
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.5rem;
  min-height: 420px;
}

.carousel-arrow--prev {
  grid-column: 1;
  grid-row: 1;
}

.carousel-viewport {
  grid-column: 2;
  grid-row: 1;
}

.carousel-arrow--next {
  grid-column: 3;
  grid-row: 1;
}

.carousel-caption {
  grid-column: 1 / -1;
  grid-row: 2;
}

.carousel-dots {
  grid-column: 1 / -1;
  grid-row: 3;
}

.app-carousel.is-mobile {
  min-height: 0;
  row-gap: 0.5rem;
}

.carousel-viewport {
  width: 664px;
  max-width: 100%;
  margin-inline: auto;
  overflow: hidden;
  position: relative;
}

.carousel-viewport::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 380px;
  background: radial-gradient(
    ellipse at center,
    rgba(91, 142, 220, 0.18) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 400px;
  z-index: 1;
}

.carousel-slide {
  position: absolute;
  left: 50%;
  top: 0;
  width: 200px;
  margin: 0 0 0 -100px;
  text-align: center;
  transition:
    transform 0.55s cubic-bezier(0.25, 0.8, 0.25, 1),
    filter 0.45s ease,
    opacity 0.45s ease;
  filter: grayscale(100%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.carousel-slide.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.carousel-slide.is-adjacent {
  filter: grayscale(60%);
  opacity: 0.72;
  pointer-events: auto;
  z-index: 2;
}

.carousel-slide.is-active {
  filter: grayscale(0%);
  opacity: 1;
  pointer-events: auto;
  z-index: 3;
}

.carousel-caption {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-align: center;
}

.carousel-arrow {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--matio-cyan), var(--matio-purple));
  color: var(--white);
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 140, 66, 0.45);
  transition: transform 0.15s ease, background 0.15s ease;
  z-index: 3;
}

.carousel-arrow:hover {
  filter: brightness(1.08);
  transform: scale(1.06);
}

.carousel-arrow:active {
  transform: scale(0.96);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #d1d5db;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dot.is-active {
  background: var(--brand);
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .preview-carousel-wrap {
    padding: 1.25rem 0.65rem 1rem;
  }

  .app-carousel {
    column-gap: 0.4rem;
  }

  .carousel-arrow {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
  }

  .carousel-viewport::before {
    width: min(220px, 72vw);
    height: 340px;
  }

  .carousel-slide {
    width: min(220px, 72vw);
    margin-left: calc(min(220px, 72vw) / -2);
  }

  .carousel-track {
    height: min(380px, 58vh);
  }

  .phone-frame--slider {
    max-width: min(220px, 72vw);
  }

  .carousel-slide.is-adjacent {
    opacity: 0;
    pointer-events: none;
  }
}

/* Languages */
.languages {
  background: linear-gradient(135deg, #eef6ff 0%, #f5f0ff 100%);
}

.languages-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.lang-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.lang-list li {
  background: var(--white);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.lang-flag {
  font-size: 1.5rem;
}

/* CTA */
.cta-box {
  text-align: center;
  background: var(--brand-gradient);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
}

.cta-box h2 {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.cta-box p {
  margin: 0 auto;
  max-width: 520px;
  opacity: 0.95;
}

.cta-note {
  margin-top: 1rem !important;
  font-size: 0.9rem;
  opacity: 0.8 !important;
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-inner p {
  margin: 0.25rem 0;
}

.footer-muted {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .languages-inner {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    order: 1;
  }

  .hero-phone {
    order: 2;
    margin-top: 0.5rem;
  }

  .phone-frame {
    max-width: 220px;
  }

  .nav {
    gap: 0.85rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .container {
    width: min(1120px, 94vw);
  }

  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.75rem 0;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem 1rem;
    font-size: 0.82rem;
    width: 100%;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .hero-phone {
    display: none;
  }

  .hero-copy {
    text-align: center;
    max-width: 36rem;
    margin-inline: auto;
  }

  .hero-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
  }

  .hero-logo {
    margin-inline: auto;
  }

  .hero-points {
    text-align: center;
    display: block;
    margin-inline: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero h1 {
    font-size: clamp(1.65rem, 7vw, 2.25rem);
  }

  .lead {
    font-size: 1.05rem;
  }

  .section {
    padding: 3rem 0;
    text-align: center;
  }

  .section h2,
  .section-intro,
  .section-intro--left,
  .about-card,
  .about-card h3,
  .about-card p,
  .cat-card,
  .cat-card h3,
  .cat-card p,
  .cat-meta,
  .languages-inner,
  .languages-inner > div,
  .languages-inner h2,
  .lang-list li,
  .carousel-caption,
  .cta-box,
  .cta-box h2,
  .cta-box p,
  .site-footer,
  .site-footer p {
    text-align: center;
  }

  .section-intro {
    font-size: 1rem;
    margin-bottom: 1.75rem;
  }

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

  .lang-list li {
    justify-content: center;
  }

  .cta-box {
    padding: 2rem 1.25rem;
  }
}

@media (max-width: 560px) {
  .hero {
    padding-top: 1.5rem;
  }

  .logo-img--icon {
    height: 40px;
  }
}
