@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/inter-latin.woff2") format("woff2");
}

:root {
  --tivi-blue: #0288d1;
  --text-primary: rgba(0, 0, 0, 0.87);
  --text-secondary: rgba(0, 0, 0, 0.6);
  --divider: rgba(0, 0, 0, 0.12);
  --paper: #fff;
  --soft: #f5f5f5;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text-primary);
  background: #fff;
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

main {
  flex: 1;
  padding-top: 32px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  color: var(--text-primary);
  box-shadow: none;
}

.toolbar {
  min-height: 64px;
  width: 100%;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  position: relative;
  display: flex;
  align-items: center;
  width: 160px;
  aspect-ratio: 320 / 80;
  text-decoration: none;
}

.logo-link img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plain-action {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--tivi-blue);
  min-width: 64px;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.plain-action:hover {
  background: rgba(2, 136, 209, 0.04);
}

.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.wide-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.intro h1,
.features-section h2,
.download-section h2 {
  margin: 0;
  color: var(--text-primary);
  text-align: center;
  font-size: 34px;
  line-height: 1.235;
  font-weight: 400;
  letter-spacing: 0;
}

.notice {
  margin-top: 32px;
  padding: 16px;
  border-radius: 12px;
  background: var(--soft);
}

.notice p,
.download-card p,
.feature p,
.downloader-line,
.caption,
.footer-inner p {
  margin: 0;
}

.notice p {
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.5;
}

.notice strong {
  font-weight: 700;
}

.screenshots {
  margin-top: 48px;
}

.carousel-shell {
  position: relative;
}

.carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.edge-spacer {
  flex: 0 0 4%;
}

.slide {
  position: relative;
  flex: 0 0 92%;
  margin: 0;
  aspect-ratio: 1920 / 1080;
  scroll-snap-align: center;
}

.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  object-fit: contain;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border: 0;
  border-radius: 50%;
  color: rgba(0, 0, 0, 0.54);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.nav-arrow:hover {
  background: #fff;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.24);
}

.nav-arrow:disabled {
  color: rgba(0, 0, 0, 0.26);
  background: rgba(255, 255, 255, 0.56);
  box-shadow: none;
  cursor: default;
}

.nav-arrow svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.nav-prev {
  left: 12px;
}

.nav-next {
  right: 12px;
}

.caption {
  margin-top: 12px;
  color: var(--text-secondary);
  text-align: center;
  font-size: 14px;
  line-height: 1.43;
}

.features-section {
  margin-top: 48px;
}

.features-section h2,
.download-section h2 {
  margin-bottom: 24px;
}

.features {
  display: flex;
  flex-wrap: wrap;
  row-gap: 32px;
}

.feature {
  flex: 1 1 50%;
  display: flex;
  gap: 20px;
}

.feature:nth-child(odd) {
  padding-right: 32px;
}

.feature:nth-child(even) {
  padding-left: 32px;
}

.icon-box {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(2, 136, 209, 0.08);
}

.icon-box svg {
  width: 28px;
  height: 28px;
  fill: var(--tivi-blue);
}

.feature h3 {
  margin: 0 0 4px;
  color: var(--tivi-blue);
  font-size: 24px;
  line-height: 1.334;
  font-weight: 400;
  letter-spacing: 0;
}

.feature p,
.download-card p {
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.5;
}

.download-section {
  margin-top: 48px;
  margin-bottom: 48px;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.download-card {
  min-height: 172px;
  padding: 24px;
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  height: 48px;
  margin-top: auto;
  padding: 8px 22px;
  border-radius: 4px;
  background: var(--tivi-blue);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  line-height: 26px;
  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.primary-button:hover {
  background: #0277bd;
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);
}

.play-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  margin-top: auto;
  text-decoration: none;
}

.play-badge img {
  width: auto;
  height: 100%;
  display: block;
}

.downloader-line {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 16px;
}

.downloader-line code {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 8px;
  background: #f5f5f5;
  color: var(--text-primary);
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
}

.site-footer {
  margin-top: auto;
  padding: 24px 0;
  background: var(--paper);
  border-top: 1px solid var(--divider);
}

.footer-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-around;
  gap: 8px 24px;
  white-space: nowrap;
}

.footer-inner p,
.footer-inner a {
  color: var(--text-secondary);
  text-align: center;
  font-size: 14px;
  line-height: 1.43;
}

.footer-inner a {
  text-decoration: underline;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 4px;
  background: rgba(33, 33, 33, 0.96);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 639px) {
  main {
    padding-top: 32px;
  }

  .toolbar {
    min-height: 56px;
    padding: 0 12px;
  }

  .logo-link {
    width: 120px;
  }

  .plain-action {
    min-width: 48px;
    padding: 6px;
  }

  .container,
  .wide-container {
    padding: 0 16px;
  }

  .intro h1,
  .features-section h2,
  .download-section h2 {
    font-size: 30px;
    line-height: 1.25;
  }

  .screenshots,
  .features-section,
  .download-section {
    margin-top: 48px;
  }

  .edge-spacer {
    flex-basis: 0;
  }

  .slide {
    flex-basis: 100%;
  }

  .slide img {
    border-radius: 12px;
  }

  .nav-arrow {
    display: none;
  }

  .features {
    row-gap: 16px;
  }

  .feature {
    flex-basis: 100%;
    padding: 0;
  }

  .feature:nth-child(odd),
  .feature:nth-child(even) {
    padding: 0;
  }

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

  .footer-inner {
    flex-direction: column;
  }
}
