:root {
  --bg-image-url: url('../img/bg.jpg');
  --header-height: 68px;
}

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

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  background-color: #070a0f;
  color: #f8fafc;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

.prison-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: #070a0f;
  background-image:
    radial-gradient(ellipse at 50% 40%, rgba(10, 14, 22, 0.24) 0%, rgba(7, 10, 15, 0.72) 68%, rgba(5, 6, 9, 0.94) 100%),
    linear-gradient(180deg, rgba(6, 8, 12, 0.65) 0%, rgba(12, 6, 8, 0.26) 46%, rgba(6, 7, 10, 0.88) 100%),
    var(--bg-image-url),
    radial-gradient(circle at 20% 20%, #131c2b 0%, #070a0f 55%, #160609 100%);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.prison-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 34%, rgba(185, 28, 28, 0.14) 0%, transparent 48%),
    radial-gradient(circle at 12% 88%, rgba(153, 27, 27, 0.22) 0%, transparent 36%),
    radial-gradient(circle at 88% 85%, rgba(153, 27, 27, 0.20) 0%, transparent 36%);
}

#rain-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.42;
}

.page-shell {
  position: relative;
  z-index: 10;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}

.hero-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: clamp(1.25rem, 3.5vh, 2.75rem) clamp(1rem, 3vw, 2rem);
}

.hero-container {
  width: 100%;
  max-width: min(820px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-logo-wrap {
  width: 100%;
  max-width: clamp(270px, 58vw, 600px);
  margin-bottom: clamp(0.35rem, 1.4vh, 0.9rem);
  user-select: none;
}

.hero-subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(0.72rem, 1.35vw, 1.05rem);
  letter-spacing: clamp(0.16em, 0.35vw, 0.34em);
  line-height: 1.35;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.92);
}

.hero-desc {
  max-width: 34rem;
  font-size: clamp(0.84rem, 1.15vw, 0.98rem);
  line-height: 1.6;
  color: rgba(203, 213, 225, 0.95);
  margin-bottom: clamp(1.25rem, 2.8vh, 2rem);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 14, 0.76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(0.85rem, 2.5vw, 2rem);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.4vw, 2.5rem);
}

.mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(239, 68, 68, 0.45);
}

.hamburger-lines {
  width: 20px;
  height: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-lines span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: currentColor;
  border-radius: 999px;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  transform-origin: center;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-lines span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-lines span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-lines span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-drawer {
  display: none;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  border-top: 1px solid transparent;
  background: rgba(8, 11, 16, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: max-height 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, border-color 0.25s ease;
}

.mobile-drawer.is-open {
  max-height: 360px;
  opacity: 1;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #cbd5e1;
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.mobile-nav-link.is-active {
  color: #ffffff;
  font-weight: 600;
  background: linear-gradient(90deg, rgba(185, 28, 28, 0.28) 0%, rgba(185, 28, 28, 0.06) 100%);
  border-left: 3px solid #ef4444;
}

.nav-link-active {
  color: #ffffff;
  position: relative;
}

.nav-link-active::after {
  content: '';
  position: absolute;
  left: -6px;
  right: -6px;
  bottom: -16px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #ef4444 20%, #ff4d4d 50%, #ef4444 80%, transparent 100%);
  box-shadow: 0 0 10px 1px rgba(239, 68, 68, 0.85);
  border-radius: 999px;
}

.cta-grid {
  width: 100%;
  max-width: 560px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
  margin-bottom: clamp(1.2rem, 2.6vh, 1.85rem);
}

.chamfer-btn-wrap {
  position: relative;
  display: inline-flex;
  width: 100%;
  min-height: 54px;
  padding: 1.5px;
  clip-path: polygon(
    14px 0%, calc(100% - 14px) 0%,
    100% 14px, 100% calc(100% - 14px),
    calc(100% - 14px) 100%, 14px 100%,
    0% calc(100% - 14px), 0% 14px
  );
  transition: transform 0.2s ease, filter 0.25s ease;
}

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

.chamfer-btn-wrap:active {
  transform: translateY(0) scale(0.99);
}

.chamfer-btn-inner {
  width: 100%;
  min-height: 51px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  clip-path: polygon(
    13px 0%, calc(100% - 13px) 0%,
    100% 13px, 100% calc(100% - 13px),
    calc(100% - 13px) 100%, 13px 100%,
    0% calc(100% - 13px), 0% 13px
  );
  transition: background 0.25s ease;
}

.btn-register-glow {
  filter: drop-shadow(0 0 14px rgba(220, 38, 38, 0.55));
}

.btn-register-glow:hover {
  filter: drop-shadow(0 0 22px rgba(239, 68, 68, 0.82));
}

.btn-register-border {
  background: linear-gradient(180deg, #ff5c5c 0%, #dc2626 50%, #991b1b 100%);
}

.btn-register-inner {
  background: linear-gradient(180deg, #b91c1c 0%, #8a1414 55%, #6b0f0f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-register-glow:hover .btn-register-inner {
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 60%, #7f1d1d 100%);
}

.btn-login-glow {
  filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.65));
}

.btn-login-glow:hover {
  filter: drop-shadow(0 0 16px rgba(226, 232, 240, 0.28));
}

.btn-login-border {
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.65) 0%, rgba(148, 163, 184, 0.35) 50%, rgba(203, 213, 225, 0.5) 100%);
}

.btn-login-inner {
  background: linear-gradient(180deg, rgba(20, 26, 36, 0.84) 0%, rgba(10, 14, 20, 0.90) 100%);
  backdrop-filter: blur(8px);
}

.btn-login-glow:hover .btn-login-inner {
  background: linear-gradient(180deg, rgba(30, 38, 52, 0.90) 0%, rgba(15, 20, 28, 0.94) 100%);
}

.social-grid {
  width: 100%;
  max-width: 540px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: clamp(1.2rem, 2.6vh, 1.85rem);
}

.chamfer-social-wrap {
  position: relative;
  display: inline-flex;
  width: 100%;
  min-height: 46px;
  padding: 1px;
  clip-path: polygon(
    10px 0%, calc(100% - 10px) 0%,
    100% 10px, 100% calc(100% - 10px),
    calc(100% - 10px) 100%, 10px 100%,
    0% calc(100% - 10px), 0% 10px
  );
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.4) 0%, rgba(71, 85, 105, 0.25) 100%);
  transition: transform 0.2s ease, background 0.25s ease, filter 0.25s ease;
}

.chamfer-social-wrap:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.62) 0%, rgba(220, 38, 38, 0.55) 100%);
  filter: drop-shadow(0 0 12px rgba(220, 38, 38, 0.25));
}

.chamfer-social-inner {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(11, 15, 22, 0.80);
  backdrop-filter: blur(8px);
  clip-path: polygon(
    9.5px 0%, calc(100% - 9.5px) 0%,
    100% 9.5px, 100% calc(100% - 9.5px),
    calc(100% - 9.5px) 100%, 9.5px 100%,
    0% calc(100% - 9.5px), 0% 9.5px
  );
  transition: background 0.2s ease;
}

.chamfer-social-wrap:hover .chamfer-social-inner {
  background: rgba(18, 24, 34, 0.92);
}

.store-badge-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.95rem;
  border-radius: 0.65rem;
  background: rgba(10, 14, 21, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.store-badge-btn:hover {
  background: rgba(19, 26, 38, 0.92);
  border-color: rgba(255, 255, 255, 0.34);
  transform: translateY(-1px);
}

.custom-scroll::-webkit-scrollbar {
  width: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 999px;
}

.custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(185, 28, 28, 0.7);
  border-radius: 999px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(220, 38, 38, 0.95);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-animate {
  animation: modalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes subtlePulseGlow {
  0%, 100% { filter: drop-shadow(0 0 16px rgba(220, 38, 38, 0.45)); }
  50% { filter: drop-shadow(0 0 26px rgba(239, 68, 68, 0.72)); }
}

.logo-x-glow {
  animation: subtlePulseGlow 4.5s ease-in-out infinite;
}

@media (min-width: 1441px) {
  .hero-logo-wrap {
    max-width: 640px;
  }
  .cta-grid {
    max-width: 600px;
  }
  .social-grid {
    max-width: 580px;
  }
}

@media (max-width: 899px) {
  .desktop-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
  .mobile-drawer {
    display: block;
  }
}

@media (max-width: 519px) {
  :root {
    --header-height: 62px;
  }
  .cta-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .social-grid {
    gap: 0.5rem;
  }
  .store-badges-wrap {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
    gap: 0.6rem;
  }
  .store-badge-btn {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 374px) {
  .social-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 600px) {
  :root {
    --header-height: 54px;
  }
  .hero-main {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  .hero-logo-wrap {
    max-width: min(320px, 42vw);
    margin-bottom: 0.25rem;
  }
  .hero-desc {
    margin-bottom: 0.85rem;
    font-size: 0.82rem;
  }
  .cta-grid {
    margin-bottom: 0.85rem;
    gap: 0.75rem;
  }
  .chamfer-btn-wrap {
    min-height: 46px;
  }
  .chamfer-btn-inner {
    min-height: 43px;
  }
  .social-grid {
    margin-bottom: 0.85rem;
  }
}