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

  * {
    margin: 0;
  }

  html {
    block-size: 100%;
    text-size-adjust: none;
    -webkit-text-size-adjust: none;
  }

  html:focus-within {
    scroll-behavior: smooth;
  }

  body {
    min-block-size: 100dvh;
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
  }

  h1,
  h2,
  h3,
  h4 {
    text-wrap: balance;
  }

  p {
    text-wrap: pretty;
  }

  ol,
  ul {
    list-style: none;
  }

  body > :is(header, footer),
  main,
  section,
  article {
    container-type: inline-size;
  }

  [popover] {
    margin: 0;
    padding: 0;
  }

  a:not([class]) {
    text-decoration-skip-ink: auto;
  }

  img,
  picture,
  video,
  canvas,
  svg {
    display: block;
    max-inline-size: 100%;
  }

  input,
  button,
  textarea,
  select {
    font: inherit;
    letter-spacing: inherit;
    word-spacing: inherit;
    color: currentColor;
  }

  @media (prefers-reduced-motion: reduce) {
    html:focus-within {
      scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }
}

/* ── Container ── */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* ── Navbar ── */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition:
    background 0.3s ease,
    backdrop-filter 0.3s ease;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}

.navbar--scrolled {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.navbar__brand img {
  height: 46px;
  width: auto;
}

.navbar__links {
  display: flex;
  gap: 1.5rem;
}

.navbar__links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: clamp(0.9rem, 2vw, 1.25rem);
  transition: color 0.2s ease;
}

.navbar__links a:hover {
  color: #fff;
}

.navbar__links a.navbar__link--active {
  color: #fff;
}

/* ── Header ── */

.header {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

.header::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180px;
  height: 180px;
  margin: -90px 0 0 -90px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: header-spin 0.8s linear infinite;
  z-index: 0;
}

@keyframes header-spin {
  to { transform: rotate(360deg); }
}

.header__video {
  position: absolute;
  top: 0;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%);
  object-fit: cover;
  z-index: 1;
}

/* dot-matrix overlay — radial dots via tiny repeating gradient */
.header__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
    radial-gradient(circle, rgba(0, 0, 0, 0.5) 1px, transparent 1px);
  background-size:
    cover,
    3px 3px;
  pointer-events: none;
  z-index: 1;
}

.header__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 clamp(1rem, 4vw, 3rem);
  color: #fff;
  text-align: center;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}

.header__title {
  font-size: clamp(2.5rem, 6vw, 6rem);
  font-weight: 700;
  line-height: 1.1;
}

.header__subtitle {
  font-size: clamp(1.2rem, 2.5vw, 2.5rem);
  font-weight: 400;
  margin-top: 0.4em;
  display: flex;
  align-items: center;
  gap: 0.3em;
}

.header__subtitle img {
  height: 1em;
  width: auto;
}

.header__youtube {
  display: inline-block;
  margin-top: 1.2rem;
  color: #ff0033;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.header__youtube:hover {
  opacity: 0.8;
  transform: scale(1.15);
}

.header__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.7);
  animation: scroll-bounce 2s cubic-bezier(0.45, 0, 0.15, 1) infinite;
}

@keyframes scroll-bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 0.7;
  }
  50% {
    transform: translateX(-50%) translateY(12px);
    opacity: 1;
  }
}

/* ── Features ── */

.features {
  padding: clamp(3rem, 8vw, 7rem) 0;
  background: #0a0a0a;
  color: #fff;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}

.features__title {
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 4rem);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
}

.feature-card-wrapper {
  --glow-x: 50%;
  --glow-y: 50%;
  position: relative;
  border-radius: 12px;
}

/* border glow layer — sits behind the card */
.feature-card-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    250px circle at var(--glow-x) var(--glow-y),
    var(--accent),
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.feature-card-wrapper:hover::before {
  opacity: 1;
}

.feature-card {
  position: relative;
  padding: clamp(1.5rem, 2vw, 2.5rem);
  border-radius: 11px;
  margin: 1px;
  background: #0a0a0a;
  height: calc(100% - 2px);
}

/* inner glow */
.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    300px circle at var(--glow-x) var(--glow-y),
    color-mix(in srgb, var(--accent) 15%, transparent),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.feature-card-wrapper:hover .feature-card::before {
  opacity: 1;
}

.feature-card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  color: var(--accent);
}

.feature-card-wrapper:nth-child(1) {
  --accent: #f59e0b;
}
.feature-card-wrapper:nth-child(2) {
  --accent: #3b82f6;
}
.feature-card-wrapper:nth-child(3) {
  --accent: #a78bfa;
}
.feature-card-wrapper:nth-child(4) {
  --accent: #34d399;
}
.feature-card-wrapper:nth-child(5) {
  --accent: #f472b6;
}
.feature-card-wrapper:nth-child(6) {
  --accent: #fb7185;
}

.feature-card__icon svg {
  width: 100%;
  height: 100%;
}

.feature-card__title {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card__text {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

.features__philosophy {
  max-width: 640px;
  margin: clamp(2rem, 5vw, 4rem) auto 0;
  text-align: center;
}

.features__philosophy-title {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.75rem;
}

.features__philosophy-text {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .navbar {
    position: sticky;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .header {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .header__title {
    font-size: clamp(1.6rem, 5vw, 2.5rem);
  }

  .header__youtube {
    margin-top: 0.6rem;
  }

  .header__youtube svg {
    width: 36px;
    height: 36px;
  }

  .header__scroll-hint {
    display: none;
  }

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

  .feature-card-wrapper {
    --glow-x: 100% !important;
    --glow-y: 0px !important;
  }

  .feature-card-wrapper::before,
  .feature-card::before {
    opacity: 1 !important;
  }
}

@media (max-width: 360px) {
  .navbar {
    height: 56px;
    padding: 0 1rem;
  }

  .navbar__brand img {
    height: 36px;
  }

  .navbar__links {
    gap: 0.8rem;
  }

  .navbar__links a {
    font-size: 0.9rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Download ── */

.download {
  position: relative;
  padding: clamp(3rem, 8vw, 7rem) 0;
  background:
    radial-gradient(
        80% 60% at 50% 0%,
        rgba(255, 194, 51, 0.08) 0%,
        transparent 70%
      )
      no-repeat,
    #0f0f0f;
  color: #fff;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}

.download__title {
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

.download__subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  margin-bottom: 0.5rem;
}

.download__alpha {
  text-align: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.download__alpha a {
  display: inline-block;
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.download__alpha a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.download__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.download__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: clamp(1.5rem, 2vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.download__card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.download__card--detected {
  border-color: #ffc233;
  background: rgba(255, 194, 51, 0.06);
}

.download__card--detected:hover {
  border-color: #ffc233;
  background: rgba(255, 194, 51, 0.1);
}

.download__card svg,
.download__card-icon {
  width: 36px;
  height: 36px;
  opacity: 0.8;
}

.download__card-title {
  font-size: 1rem;
  font-weight: 600;
}

.download__card-info {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

.download__license {
  text-align: center;
}

.download__buy-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  background: #ffc233;
  color: #000;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.download__buy-btn:hover {
  opacity: 0.85;
}

.download__alt {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.5);
}

.download__sub-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 0.75rem;
}

.download__sub-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 1.05rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.download__sub-link:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.download__sub-icon {
  height: 20px;
  width: auto;
}

.download__disclaimer {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 600px) {
  .download__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── How to Use ── */

.howto {
  padding: clamp(3rem, 8vw, 7rem) 0;
  background: #0a0a0a;
  color: #fff;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}

.howto__title {
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.howto__youtube {
  display: flex;
  align-items: center;
  gap: 0.5em;
  width: fit-content;
  margin: 0 auto;
  color: #ff0033;
  text-decoration: none;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 600;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  transition: opacity 0.2s ease;
}

.howto__youtube:hover {
  opacity: 0.8;
}

.howto__section-title {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.howto__content {
  display: flex;
  gap: 2rem;
}

.howto__tabs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 180px;
}

.howto__tab {
  padding: 0.6rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.howto__tab:hover {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

.howto__tab--active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.howto__panels {
  flex: 1;
}

.howto__panel {
  display: none;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
}

.howto__panel--active {
  display: block;
}

.howto__panel-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #fff;
}

.howto__panel p {
  margin-bottom: 0.75rem;
}

.howto__panel code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.howto__code {
  display: block;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 0.75rem 0 1rem;
  font-family: monospace;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  overflow-x: auto;
  white-space: pre;
}

.howto__note {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .howto__content {
    flex-direction: column;
    gap: 1.5rem;
  }

  .howto__tabs {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    min-width: 0;
  }

  .howto__tab {
    text-align: center;
    white-space: nowrap;
  }
}

/* ── Footer ── */

.footer {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background:
    radial-gradient(
        80% 60% at 50% 100%,
        rgba(0, 184, 228, 0.06) 0%,
        transparent 70%
      )
      no-repeat,
    #050505;
  text-align: center;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.3);
}

.footer p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
}

.footer__flag {
  width: 1.4em;
  border-radius: 2px;
}

.footer a {
  color: #00b8e4;
  text-decoration: none;
}

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

.footer__share {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.footer__share-label {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.3);
}

.footer__share-icons {
  display: flex;
  gap: 0.75rem;
}

.footer__share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s ease;
}

.footer__share-btn:hover {
  color: #fff;
  text-decoration: none;
}

.footer__share-btn svg {
  width: 18px;
  height: 18px;
}
