@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Jost:ital,wght@0,100..900;1,100..900&display=swap");

/* Theme 02 — tokens and rules specific to this design. Loaded after style.css (same cascade layers). */

/* BASE – element defaults and design tokens */
@layer base {
  :root {
    --primary: #c8a96e;
    --white: #f5f3ef;
    --light-gray: #ebe7e0;
    --gray: #b3b3b3;
    --dark-gray: #141414;
    --md-gray: #424242;
    --dark: #0a0a0a;
    --font-display: "Jost", sans-serif;
    --font-body: "Inter", sans-serif;
  }

  body {
    color: var(--white);
    background-color: var(--dark);
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    margin: 0;
    text-transform: uppercase;
  }

  h1,
  h2,
  h3 {
    span {
      color: var(--primary);
    }
  }

  h1 {
    font-size: 6rem;
    font-weight: 900;
    line-height: 0.9;

    @media screen and (max-width: 1199px) {
      font-size: 4rem;
    }

    @media screen and (max-width: 767px) {
      font-size: 2.5rem;
    }
  }

  h2 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;

    @media screen and (max-width: 1199px) {
      font-size: 3rem;
    }

    @media screen and (max-width: 767px) {
      font-size: 2.5rem;
    }
  }

  h3 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;

    @media screen and (max-width: 1199px) {
      font-size: 2.5rem;
    }

    @media screen and (max-width: 767px) {
      font-size: var(--text-2xl);
    }
  }

  h4 {
    font-size: var(--text-2xl);
    font-weight: 600;
    line-height: 1;

    @media screen and (max-width: 767px) {
      font-size: var(--text-lg);
    }
  }

  article {
    img {
      border-radius: var(--border-radius-0);
    }

    h2,
    h3 {
      margin: 50px 0 20px;
    }

    h3 {
      font-size: var(--text-lg);
    }
  }
}

/* LAYOUT – containers, page skeleton, grids, header/footer shells */
@layer layout {
  .page-content {
    margin-top: 85px;
  }

  .top-bar {
    background: color-mix(in srgb, var(--light) 80%, transparent);

    .lang {
      .lang-select {
        background: color-mix(in srgb, var(--light) 80%, transparent);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      }
    }

    ul.menu {
      &.show {
        @media (max-width: 767px) {
          ul.dropdown li a {
            color: var(--light) !important;
          }
        }
      }

      li.menu-item {
        ul.dropdown {
          background: color-mix(in srgb, var(--light) 80%, transparent);
        }
      }
    }
  }

  @media (max-width: 767px) {
    .top-bar ul.menu li.menu-item ul.dropdown {
      background: transparent;
    }
  }

  footer {
    margin-top: 50px;

    .footer-wrap {
      .footer-links {
        color: var(--white);

        a {
          color: var(--white);
        }
      }
    }
  }
}

/* COMPONENTS – reusable UI pieces */
@layer components {
  .btn {
    justify-content: center;
    width: fit-content;
    max-width: none;
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    font-weight: 600;
    line-height: 1.25;
    text-transform: uppercase;
    transition:
      background-color var(--ease-fast),
      color var(--ease-fast),
      border-color var(--ease-fast);

    &:hover {
      border-color: var(--white);
      background: var(--white);
      color: var(--dark);
      transform: none;
    }

    &.secondary {
      background: transparent;
      color: var(--white);

      &:hover {
        border-color: var(--primary);
        background: var(--primary);
        color: var(--dark);
      }
    }
  }

  .error-page .btn {
    border: none;
  }

  .error-page .btn {
    background: var(--primary);
  }

  .error-page .btn {
    color: var(--white);
  }

  .card {
    gap: 25px;
    padding: 1rem;
    border-radius: var(--border-radius-2);
    background: var(--dark-gray);

    .card-header {
      display: flex;
      flex-direction: column;
      gap: 15px;

      .card-icon {
        width: 60px;
        height: 60px;
      }

      .card-title {
        font-size: var(--text-xl);
      }
    }

    .card-content {
      color: var(--gray);
      font-size: var(--text-sm);
    }

    .card-footer {
      display: flex;
      align-items: center;
    }

    h3 {
      font-size: var(--text-lg);
      font-weight: 600;
    }

    .icon-card {
      width: 24px;
      height: 24px;
    }

    .text-gray {
      max-width: 280px;
      font-size: var(--text-sm);
    }

    &.flex-column {
      @media screen and (max-width: 767px) {
        align-items: center;
      }
    }
  }

  .slider-controls {
    border: 2px solid var(--border);

    .nav-btn {
      background: transparent;
    }
  }

  .pic-container {
    border-radius: var(--border-radius-0);

    &.icon-video::before {
      background-image: url(../images/icons/icon-play-gold.svg);
    }

    &.icon-audio::before {
      background-image: url(../images/icons/icon-sound-gold.svg);
    }

    &.icon-article::before {
      background-image: url(../images/icons/icon-book-gold.svg);
    }

    &.icon-book::before {
      background-image: url(../images/icons/icon-book-gold.svg);
    }
  }

  .slide-button .pic-container.video::before {
    content: url(../images/icons/icon-play-gold.svg);
  }

  .slide-button {
    border-radius: var(--border-radius-0);
    background-color: var(--dark-gray);

    .pic-container {
      img {
        min-height: 200px;
        max-height: 200px;
      }
    }

    .text-container {
      h3,
      p {
        display: -webkit-box;
        overflow: hidden;
        color: var(--white);
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
      }
    }
  }

  .slide-button .btn {
    border: none;
  }

  .slide-button .btn {
    background-color: color-mix(in srgb, var(--primary) 20%, transparent);
  }

  .slide-button .btn {
    color: var(--primary);
  }

  .banner-exclusive {
    width: 100%;
    min-height: 390px;
    margin: 0 0 -50px;
    background: var(--dark);
    color: var(--primary);

    .container {
      max-width: 1440px;
      padding-inline: 2rem;

      @media screen and (max-width: 767px) {
        padding-inline: 1rem;
      }
    }

    .d-flex {
      justify-content: center;
      min-height: 290px;
    }

    .subtitle {
      display: block;
      margin-bottom: 0.75rem;
      color: var(--primary);
      font-size: var(--text-xs);
      font-weight: 400;
      letter-spacing: 0.12em;
      line-height: 1.2;
      text-transform: none;
    }

    h3 {
      color: var(--light);
      font-size: clamp(2.5rem, 7vw, 4rem);
      font-weight: 700;
      line-height: 0.95;
      text-align: center;

      @media screen and (max-width: 767px) {
        font-size: clamp(3.25rem, 15vw, 5rem);
      }

      span {
        display: block;
      }
    }

    .banner-description {
      max-width: 620px;
      margin-top: 2rem;
      color: var(--gray);
      font-size: var(--text-lg);
      line-height: 1.35;
      text-align: center;

      @media screen and (max-width: 767px) {
        font-size: var(--text-md);
      }
    }

    .banner-logos {
      display: none;
    }
  }

  .login-popup {
    .btn {
      color: var(--dark);
    }
  }

  .login-popup .btn {
    border: none;
  }

  .app-store {
    color: var(--md-gray);
  }

  .btn-login {
    border: 2px solid var(--dark);
  }

  .btn-login {
    padding: 0;
  }

  .btn-login {
    background: transparent;
  }

  .contact-popup .btn-login {
    border: 0;
  }

  .contact-popup .btn-login {
    background: var(--primary);
  }

  .contact-popup .btn-login {
    color: var(--white);
  }

  .color-btn {
    padding: 0 32px;
  }

  .color-btn {
    transition: transform 0.15s ease;
  }
}

/* PAGES – page-specific blocks */
@layer pages {
  .hero {
    --hero-line: color-mix(in srgb, var(--white) 10%, transparent);
    position: relative;
    isolation: isolate;
    width: 100%;
    padding-block: 6rem 0;
    overflow: hidden;
    background: var(--dark);

    @media screen and (max-width: 1199px) {
      padding-block-start: 4rem;
    }

    @media screen and (max-width: 767px) {
      padding-block-start: 3rem;
    }

    &::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 1;
      pointer-events: none;
      background: color-mix(in srgb, var(--dark) 50%, transparent);
    }

    > .bg-video {
      position: absolute;
      inset: 0;
      z-index: 0;
      display: block;
      width: 100%;
      height: 100%;
      margin: 0;
      object-fit: cover;
      object-position: center;
      filter: sepia(2) contrast(1.5) brightness(0.75);
      pointer-events: none;
    }

    > .hero-content {
      position: relative;
      z-index: 2;
    }

    .hero-copy {
      width: 100%;
      color: var(--white);

      @media screen and (max-width: 767px) {
        max-width: none;

        .btn {
          width: 100%;
        }
      }

      .label {
        color: var(--primary);
        font-size: var(--text-sm);
        font-weight: 500;
        line-height: 1.4;
        letter-spacing: 0.08em;
      }

      h1 {
        color: var(--white);
        font-size: clamp(3rem, 10vw, 6rem);
      }

      p {
        max-width: 480px;
        font-size: var(--text-md);
        line-height: 1.6;
      }
    }

    .insights {
      position: relative;
      z-index: 2;
      width: 100%;
      border-top: 1px solid var(--hero-line);

      .insight-item {
        flex: 1;
        min-width: 0;
        padding: 1.5rem;
        border-inline-end: 1px solid var(--hero-line);
        background: linear-gradient(
          90deg,
          color-mix(in srgb, var(--dark) 80%, transparent) 0%,
          color-mix(in srgb, var(--dark) 40%, transparent) 100%
        );

        &:last-child {
          border-inline-end: 0;
        }

        @media screen and (max-width: 767px) {
          border-inline-end: 0;
          border-bottom: 1px solid var(--hero-line);

          &:last-child {
            border-bottom: 0;
          }
        }

        .insight-title {
          margin-bottom: 5px;
          color: var(--primary);
          font-family: var(--font-display);
          font-size: var(--text-2xl);
          font-weight: 800;
          line-height: 1.2;
        }

        .insight-description {
          color: var(--gray);
          font-size: var(--text-sm);
          font-weight: 400;
          line-height: 1.4;
          letter-spacing: 0.06em;
          text-transform: none;
        }
      }
    }
  }

  .banner-img {
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 0;
    width: auto;
    height: 100%;
    object-fit: cover;
    transform: translateY(-50%);

    @media screen and (max-width: 767px) {
      position: relative;
      top: 0;
      max-width: 100%;
      height: auto;
      margin-top: 20px;
      transform: none;
    }
  }

  .features-section {
    margin-block: 6rem 2rem;

    .features-content {
      width: 100%;
    }

    .features-heading {
      max-width: 700px;
      margin-bottom: 3.25rem;

      .subtitle {
        display: block;
        margin-bottom: 0.5rem;
        color: var(--primary);
        font-size: var(--text-xs);
        font-weight: 700;
        letter-spacing: 0.12em;
        line-height: 1.2;
        text-transform: uppercase;
      }

      h2 {
        color: var(--dark);
        font-size: clamp(3rem, 5vw, 5rem);
        font-weight: 400;
        line-height: 0.95;

        @media screen and (max-width: 767px) {
          font-size: clamp(2.75rem, 13vw, 4rem);
        }

        span {
          display: block;
        }
      }
    }

    .features-list {
      width: 100%;

      @media screen and (max-width: 991px) {
        flex-wrap: wrap;
      }

      @media screen and (max-width: 767px) {
        flex-direction: column;
      }
    }

    .feature-card {
      flex: 1 1 0;
      min-width: 0;
      min-height: 290px;
      padding: 2rem;
      border: 1px solid var(--gray);
      border-radius: var(--border-radius-0);
      background: var(--white);
      transition:
        border-color var(--ease-fast),
        box-shadow var(--ease-fast),
        transform var(--ease-fast);

      &:hover {
        border-color: var(--primary);
        box-shadow: 0 12px 30px rgb(17 17 17 / 8%);
        transform: translateY(-3px);
      }

      @media screen and (max-width: 991px) {
        flex-basis: calc((100% - 20px) / 2);
      }

      @media screen and (max-width: 767px) {
        width: 100%;
        min-height: 260px;
        padding: 1.5rem;
      }

      .feature-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 1.75rem;
        border-radius: var(--border-radius-0);
        background: var(--primary);
        color: var(--white);
        font-size: var(--text-2xl);
      }

      h3 {
        margin: 0 0 0.85rem;
        color: var(--dark);
        font-size: var(--text-xl);
        font-weight: 400;
        line-height: 1;
      }

      p {
        max-width: 390px;
        color: var(--gray);
        font-size: var(--text-md);
        line-height: 1.5;
      }

      .feature-link {
        display: inline-flex;
        align-items: center;
        gap: 0.65rem;
        width: fit-content;
        margin-top: auto;
        padding-top: 1.5rem;
        color: var(--primary);
        font-size: var(--text-xs);
        font-weight: 700;
        letter-spacing: 0.06em;
        line-height: 1;
        text-transform: uppercase;

        span {
          font-size: var(--text-xl);
          line-height: 0.7;
        }

        &:hover {
          color: var(--dark);
        }
      }
    }
  }

  .hero-subpage {
    position: relative;
    isolation: isolate;

    &::before {
      content: "";
      position: absolute;
      inset-block: 0;
      left: 50%;
      z-index: -1;
      width: 100vw;
      background: url(../images/banners/hero-subpage_background.jpg) no-repeat center / cover;
      pointer-events: none;
      transform: translateX(-50%);
    }

    .intro {
      h1 {
        color: var(--white);

        span {
          color: var(--white);
        }
      }
    }

    .filters {
      > a {
        color: var(--dark);
      }

      label {
        min-height: 38px;
        border: 1px solid var(--md-gray);
        border-radius: var(--border-radius-0);
        background: transparent;
        color: var(--primary);
      }

      input:checked + label {
        color: var(--dark);

        span {
          color: var(--dark);
        }
      }
    }
  }

  .app-content {
    article p {
      color: var(--light-gray);
    }
  }

  .sidebar-list-wrapper {
    .sidebar-list {
      .sidebar-item {
        a {
          padding-bottom: 20px;
          border-bottom: 1px solid var(--md-gray);
        }

        .text {
          h3 {
            color: var(--light);
          }

          .description {
            color: var(--white);
            line-height: 12px;
          }
        }
      }
    }
  }

  .contact-info {
    & .info-box {
      & .info-text {
        h3,
        p,
        a {
          color: var(--light);
        }
      }
    }
  }

  .text ul li,
  .text p {
    display: -webkit-box;
    overflow: hidden;
    color: var(--white);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .filters {
    input[type="radio"]:checked + label {
      color: var(--dark);
    }

    &.filters-fit input[type="radio"]:checked + label {
      border-color: var(--primary);
      background-color: var(--primary);
      color: var(--white);
    }
  }

  .app {
    .app-selection {
      border-radius: var(--border-radius-0);
    }

    .app-description {
      .btn {
        color: var(--dark);
      }
    }
  }

  .myGames {
    .swiper-slide {
      img.icon-app {
        border-radius: var(--border-radius-0) var(--border-radius-0) 0 0;
      }
    }

    .swiper-slide-content {
      border-radius: var(--border-radius-0);
      background: var(--dark);
    }

    .text {
      color: var(--white);

      h3 {
        color: var(--white);
      }
    }
  }

  .intro-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.8em;
    line-height: normal;
  }

  .title-section {
    margin-bottom: 2rem;

    > div:first-child {
      flex: 1;
      min-width: 0;
      max-width: 550px;
    }

    .label {
      display: block;
      color: var(--primary);
      font-size: var(--text-sm);
      font-weight: 500;
      line-height: 1.4;
      text-transform: uppercase;
    }

    h2 {
      margin-bottom: 0;
      font-size: var(--text-2xl);
      line-height: 1.15;
    }

    .section-description {
      flex: 0 1 320px;
      min-width: 0;
      max-width: 320px;
      color: var(--gray);
      font-size: var(--text-sm);

      p {
        line-height: 1.6;
      }

      .text-link {
        margin-top: 1rem;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--primary);
        font-size: var(--text-sm);
        font-weight: 600;
        line-height: 1.4;
        text-align: start;
        cursor: pointer;

        &:hover {
          color: var(--dark);
        }
      }
    }

    .slider-controls {
      flex-shrink: 0;
      width: fit-content;
      min-width: 0;
      margin-top: 1rem;
      margin-left: auto;

      a {
        color: var(--primary);
      }
    }

    @media screen and (max-width: 767px) {
      align-items: stretch;

      > div:first-child,
      .section-description {
        flex-basis: auto;
        width: 100%;
        max-width: none;
      }

      .slider-controls {
        align-self: flex-end;
      }
    }
  }

  .custom-grid .custom-wrap {
    background-color: var(--dark-gray);
  }

  .custom-grid img {
    border-radius: var(--border-radius-0);
  }

  .flag-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;

    @media (min-width: 768px) {
      justify-content: left;
    }

    img {
      width: 100%;
      height: 75px;
      border-radius: var(--border-radius-1);
      object-fit: cover;
    }
  }

  .flag-wrap {
    width: 100%;
    max-width: 134px;
    padding: 12px 8px 0;

    h3 {
      height: auto;
    }
  }

  .custom-wrap h3,
  .flag-wrap h3 {
    display: -webkit-box;
    margin: 10px;
    padding: 0;
    overflow: hidden;
    color: var(--white);
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1.25rem;
    text-align: left;
    text-transform: none;
    text-overflow: ellipsis;
    word-wrap: break-word;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}
