/* ===========================
   0. Font fallback to reduce CLS from web font swap
   =========================== */

@font-face {
  font-family: "Nunito Sans Fallback";
  src: local("Arial");
  size-adjust: 100.1%;
  ascent-override: 99%;
  descent-override: 22%;
  line-gap-override: 0%;
}

/* ===========================
   1. CSS Variables
   =========================== */

:root {
  /* Colors */
  --color-bg-primary: #0f0e1a;
  --color-bg-secondary: rgba(255, 255, 255, 0.1);
  --color-bg-header: #0d1c33;
  --color-bg-hero-start: #3c008f;
  --color-bg-hero-end: #1a154a;
  --color-bg-content: #131222;
  --color-bg-footer: #081626;
  --color-green-primary: #1aee79;
  --color-green-dark: #0bb79a;
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.7);
  --color-text-muted: rgba(164, 175, 190, 0.8);
  --color-text-button: #161616;
  --color-border-light: rgba(255, 255, 255, 0.1);
  --color-overlay: rgba(4, 17, 31, 0.95);
  --color-header-btn-stroke: #e9eaec;

  /* Typography */
  --font-family: "Nunito Sans", "Nunito Sans Fallback", sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.5rem;
  --font-size-xl: 2rem;
  --font-size-2xl: 2.5rem;
  --font-size-3xl: 3rem;

  --font-weight-regular: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  --line-height-tight: 1.2;
  --line-height-base: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  --spacing-4xl: 5rem;

  /* Layout */
  --max-width: 90rem;
  --container-padding: 1rem;
  --header-height: 3.75rem;
  --border-radius-sm: 0.5rem;
  --border-radius-md: 0.75rem;
  --border-radius-lg: 2rem;
  --border-radius-full: 62.5rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* ===========================
   2. Reset / Base
   =========================== */

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

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

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  min-width: 20rem;
  overflow-x: hidden;
}

body.has-modal {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

/* ===========================
   3. Layout Utilities
   =========================== */

.wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

@media (min-width: 48rem) {
  :root {
    --container-padding: 1.5rem;
  }
}

@media (min-width: 64rem) {
  :root {
    --container-padding: 2rem;
  }
}

/* ===========================
   4. Components: Button
   =========================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);
  line-height: 1;
  text-decoration: none;
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition:
    opacity var(--transition-base),
    transform var(--transition-fast);
  white-space: nowrap;
}

.button--primary {
  padding: 0.875rem 2rem;
  color: var(--color-text-button);

  background: linear-gradient(
    95.34deg,
    var(--color-green-dark) 0%,
    var(--color-green-primary) 100%
  );
}

.button--primary:hover {
  opacity: 0.9;
}

.button--primary:active {
  transform: scale(0.98);
}

.button--cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  width: 266px;
  margin-left: auto;
  margin-right: auto;
  background: var(--color-green-primary);
}

.button--outline {
  padding: 0.625rem 1.5rem;
  color: var(--color-green-primary);
  background: transparent;
  border: 2px solid var(--color-green-primary);
}

.button--outline:hover {
  background: var(--color-green-primary);
  color: var(--color-text-button);
}

/* ===========================
   5. Header
   =========================== */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg-header);
  height: var(--header-height);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--spacing-md);
}

.header__burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  width: var(--font-size-2xl);
  height: var(--font-size-2xl);
  background: var(--color-bg-secondary);
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 0.25rem;
  flex-shrink: 0;
}

.header__burger-line {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 1px;
  margin-left: auto;
  margin-right: auto;
  transition:
    transform var(--transition-base),
    opacity var(--transition-base);
}

.header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header__logo-img {
  height: 2.5rem;
  width: auto;
}

/* Desktop nav: hidden on mobile */
.header__nav {
  display: none;
  align-items: center;
  gap: var(--spacing-xl);
  margin: 0 auto;
}

.header__nav-link {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  transition: color var(--transition-base);
  white-space: nowrap;
}

.header__nav-link:hover,
.header__nav-link.active {
  color: var(--color-green-primary);
}

.inner-link {
  color: var(--color-green-primary);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.16em;
  transition:
    color var(--transition-base),
    text-decoration-color var(--transition-base),
    letter-spacing var(--transition-fast);
}

.inner-link:hover,
.inner-link:focus-visible {
  text-decoration-color: var(--color-green-primary);
}

/* Login */
.header__login {
  display: inline-flex;
  align-items: center;

  flex-shrink: 0;
}

@media (min-width: 64rem) {
  .header__login {
    margin-left: none;
  }
}

.header__login-text {
  display: none;
}

.header__login-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--font-size-2xl);
  height: var(--font-size-2xl);
  background: var(--color-bg-secondary);
  border: none;
  border-radius: var(--border-radius-sm);
}

.header__login-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: var(--color-header-btn-stroke);
}

/* Desktop header */
@media (min-width: 64rem) {
  :root {
    --header-height: 4.25rem;
  }

  .header__burger {
    display: none;
  }

  .header__nav {
    display: flex;
  }
}

@media (min-width: 30rem) {
  .header__login-icon {
    display: none;
  }

  .header__login-text {
    display: inline;
  }

  .header__login {
    background: var(--color-green-primary);

    padding: 0.5rem 1.5rem;
    border: 2px solid var(--color-green-primary);
    border-radius: var(--border-radius-sm);
    color: var(--color-text-button);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
  }

  .header__login:hover {
    opacity: 0.9;
  }
}

/* ===========================
   6. Mobile Menu (dropdown from header)
   =========================== */

.mobile-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  background: var(--color-bg-header);
  z-index: 150;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition:
    transform var(--transition-slow),
    opacity var(--transition-slow),
    visibility 0s var(--transition-slow);
}

.mobile-menu.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition:
    transform var(--transition-slow),
    opacity var(--transition-slow),
    visibility 0s 0s;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  padding: var(--spacing-xl) var(--container-padding);
  gap: var(--spacing-lg);
  height: 79vh;
  overflow-y: hidden;

  @media (min-width: 30rem) {
    height: auto;
  }
}

.mobile-menu__link {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  padding: var(--spacing-sm) 0;
  transition: color var(--transition-base);
}

.mobile-menu__link:hover,
.mobile-menu__link.active {
  color: var(--color-green-primary);
}

.mobile-menu__footer {
  padding: var(--spacing-lg) var(--container-padding) var(--spacing-2xl);
}

@media (min-width: 30rem) {
  .mobile-menu__footer {
    display: none;
  }
}

/* Backdrop with blur */
.mobile-menu-backdrop {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  z-index: 140;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(0.5rem);
  backdrop-filter: blur(0.5rem);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-slow),
    visibility 0s var(--transition-slow);
  pointer-events: none;
}

.mobile-menu-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity var(--transition-slow),
    visibility 0s 0s;
}

/* Burger → X animation */
.header__burger.is-active .header__burger-line:nth-child(1) {
  transform: translateY(0.475rem) rotate(45deg);
  width: 0.75rem;
}

.header__burger.is-active .header__burger-line:nth-child(2) {
  opacity: 0;
}

.header__burger.is-active .header__burger-line:nth-child(3) {
  transform: translateY(-0.375rem) rotate(-45deg);
  width: 0.75rem;
}

@media (min-width: 64rem) {
  .mobile-menu,
  .mobile-menu-backdrop {
    display: none;
  }
}

/* ===========================
   7. Hero Section
   =========================== */

.hero {
  position: relative;
  overflow: hidden;
  background-color: #513aff;
  background-image:
    linear-gradient(
      90deg,
      rgba(26, 21, 74, 0.85) 0%,
      rgba(51, 35, 136, 0.7) 40%,
      transparent 100%
    ),
    linear-gradient(135deg, #3d2bb3 0%, #19105a 100%);
}

.content-wrapper {
  max-width: 1440px;
  position: relative;
  margin-left: auto;
  margin-right: auto;
}

/* --- Decorative stars (absolute) --- */

.hero__stars {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  width: 6rem;
  height: auto;
}

.hero__stars--left {
  top: 0;
  left: 0;
}

.hero__stars--right {
  bottom: 0;
  right: 0;
}

/* --- Roulette image (absolute) --- */

.hero__image {
  position: absolute;
  z-index: 2;
  left: 50%;
  transform: translateX(-50%);
  width: 483px;
  height: 258px;
}

.hero__image img {
  height: auto;
  display: block;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* --- Text content --- */

.hero__container {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12rem;
  padding-bottom: var(--spacing-2xl);

  @media (min-width: 30rem) {
    padding-top: 10rem;
  }
}

.hero__content {
  text-align: center;
  width: 100%;
}

.hero__subtitle {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}

.hero__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xl);
}

.hero__cta {
  font-size: var(--font-size-md);
  padding: 1rem 2.5rem;
  width: 100%;
  max-width: 300px;

  @media (min-width: 30rem) {
    width: auto;
  }
}

/* --- Tablet --- */

@media (min-width: 64rem) {
  .hero__image {
    /*width: 22rem;
        top: 1.5rem;*/
    width: 780px;
    height: 400px;
  }

  .hero__container {
    padding-top: 18rem;
    padding-bottom: var(--spacing-2xl);
  }

  .hero__stars--left {
    width: 8rem;
  }

  .hero__stars--right {
    width: 8rem;
    transform: rotate(180deg);
  }

  .hero__title {
    font-size: var(--font-size-2xl);
  }
}

/* --- Desktop --- */

@media (min-width: 64rem) {
  .hero__image {
    left: 50%;
    transform: translateX(-90%);
    width: 780px;
    height: 400px;
  }

  .hero__container {
    padding-top: var(--spacing-3xl);
    padding-bottom: var(--spacing-3xl);
    align-items: flex-end;
    justify-content: center;

    min-height: 400px;
  }

  .hero__content {
    text-align: left;
    max-width: 50%;
  }

  .hero__stars--left {
    width: 10rem;
  }

  .hero__stars--right {
    width: 10rem;
  }

  .hero__title {
    font-size: var(--font-size-3xl);
  }

  .hero__subtitle {
    font-size: var(--font-size-lg);
  }
}

/* ===========================
   8. Content Section
   =========================== */

.content-section {
  background: var(--color-bg-primary);
  padding: var(--spacing-2xl) 0;
  flex: 1;
}

.content-section__blocks {
  min-height: 2000px;
}

.content-section__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--spacing-lg);
}

.content-section__text {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-lg);
}

.content-section__subtitle {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-md);
}

.content-section__list {
  margin-bottom: var(--spacing-xl);
  padding-left: var(--spacing-md);
}

.content-section__list-item {
  position: relative;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-sm);
  padding-left: var(--spacing-md);
}

.content-section__list-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.625rem;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--color-green-primary);
}

.content-section__cta {
  margin-top: var(--spacing-md);
}

/* --- Content Tables --- */

.content-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.content-table th,
.content-table td {
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border-light);
}

.content-table th {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  background: var(--color-bg-secondary);
}

.content-table tr:last-child td {
  border-bottom: none;
}

@media (max-width: 47.999rem) {
  .content-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* --- Content inner lists (ul/ol inside blocks) --- */

.content-section__text ul,
.content-section__text ol {
  margin: var(--spacing-md) 0 var(--spacing-lg);
  padding-left: var(--spacing-xl);
}

.content-section__text ul li,
.content-section__text ol li {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-sm);
  position: relative;
}

.content-section__text ul {
  list-style: none;
}

.content-section__text ul li::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--spacing-md));
  top: 0.625rem;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--color-green-primary);
}

.content-section__text ol {
  list-style: decimal;
}

.content-section__text ol li::marker {
  color: var(--color-green-primary);
  font-weight: var(--font-weight-semibold);
}

/* --- Content h4 subheadings --- */

.content-section__text h4 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
}

/* --- Content paragraphs inside text divs --- */

.content-section__text p {
  margin-bottom: var(--spacing-md);
}

.content-section__text p:last-child {
  margin-bottom: 0;
}

/* --- FAQ Section --- */

.faq {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.faq__item {
  border: 1px solid var(--color-border-light);
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-lg);
}

.faq__question {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}

.faq__answer {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

@media (min-width: 48rem) {
  .content-table {
    font-size: var(--font-size-base);
  }

  .content-section__text ul li,
  .content-section__text ol li {
    font-size: var(--font-size-base);
  }

  .faq__answer {
    font-size: var(--font-size-base);
  }
}

@media (min-width: 48rem) {
  .content-section {
    padding: var(--spacing-3xl) 0;
  }

  .content-section__title {
    font-size: var(--font-size-xl);
  }

  .content-section__text {
    font-size: var(--font-size-base);
  }
}

@media (min-width: 64rem) {
  .content-section {
    padding: var(--spacing-4xl) 0;
  }

  .content-section .container {
    max-width: 60rem;
  }
}

/* ===========================
   9. Awards Section
   =========================== */

.awards {
  background: var(--color-bg-primary);
  padding: var(--spacing-xl) 0;
  border-top: 1px solid var(--color-border-light);
}

.awards__grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
}

.awards__item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.awards__badge {
  height: 2.5rem;
  width: auto;
  opacity: 0.6;
}

.awards__label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  line-height: var(--line-height-tight);
}

@media (min-width: 48rem) {
  .awards__grid {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-xl);
  }
}

@media (min-width: 64rem) {
  .awards__grid {
    flex-wrap: nowrap;
    justify-content: space-between;
  }
}

/* ===========================
   10. Footer
   =========================== */

.footer {
  background: var(--color-bg-primary);
  padding: var(--spacing-2xl) 0;
  border-top: 1px solid var(--color-border-light);
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--spacing-lg);
}

.footer__text {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
}

.footer__disclaimer .footer__text {
  font-weight: var(--font-weight-semibold);
}

.footer__badges {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.footer__badge {
  height: 2rem;
  width: auto;
  opacity: 0.7;
}

@media (min-width: 64rem) {
  .footer .container {
    max-width: 60rem;
  }
}

/* ===========================
   11. Page Content (sub-pages)
   =========================== */

.page-content {
  flex: 1;
  padding: var(--spacing-2xl) 0;
}

.page-content__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-lg);
}

.page-content__text {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

@media (min-width: 48rem) {
  .page-content {
    padding: var(--spacing-3xl) 0;
  }

  .page-content__title {
    font-size: var(--font-size-2xl);
  }
}
