/* === Font (self-hosted, variable 400-800, latin) === */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --page: #0D0F30;
  --surface: #17153B;
  --line: rgba(255, 255, 255, .1);
  --text: #FFFFFF;
  --muted: #B4B1D8;
  --cta: #22C55E;
  --cta-hover: #3DDC74;
  --cta-text: #062A14;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; height: 100%; }
ul { list-style: none; }
a { text-decoration: none; color: var(--text); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; }

body {
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--page);
  height: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* === Layout === */
.background-backdrop {
  position: relative;
  width: 100%;
  min-height: 100%;
  background: linear-gradient(180deg, rgba(13, 15, 48, .55) 0%, rgba(13, 15, 48, .85) 30%, var(--page) 70%), url('./assets/images/bg-desktop.webp') top center / cover no-repeat;
}
.bg-container {
  margin-bottom: 24px;
  padding: 0 16px;
}
.wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
}

/* === Hero === */
.sub-header__container {
  padding: 28px 0 8px;
  text-align: center;
}
.sub-header__txt h1 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
}
.sub-header__txt p {
  max-width: 34em;
  margin: 10px auto 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

/* === Offers === */
.offers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0 40px;
}
.offer-wrapper {
  position: relative;
  margin-top: 30px;
  border-radius: 0 12px 12px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--label-color, #8733FF);
}
/* label = tab attached to the card's top edge, same colour as the card's top border */
.offer-label {
  position: absolute;
  bottom: 100%;
  left: -1px;
  max-width: calc(100% + 2px);
}
.offer-label span {
  display: block;
  padding: 6px 14px 5px;
  border-radius: 8px 8px 0 0;
  background: var(--label-color, #8733FF);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offer-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "logo rating" "bonus bonus" "cta cta";
  align-items: center;
  gap: 16px;
  padding: 24px 16px 16px;
}
.offer-rank { display: none; }

.offer-logo {
  grid-area: logo;
  display: block;
  height: 56px;
}
.offer-logo span {
  display: block;
  width: 100%;
  height: 100%;
  background: no-repeat left center / contain;
}

.offer-rating {
  grid-area: rating;
  text-align: right;
}
.score-point {
  display: block;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}
.stars {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 1px;
}
.star-5::before { content: "\2605\2605\2605\2605\2605"; color: #FFC701; }
.star-4::before { content: "\2605\2605\2605\2605\2606"; color: #FFC701; }
.star-3::before { content: "\2605\2605\2605\2606\2606"; color: #FFC701; }

.offer-bonus {
  grid-area: bonus;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.offer-bonus__title {
  font-size: 13px;
  color: var(--muted);
}
.offer-bonus__main, .offer-bonus__extra { text-transform: uppercase; }
.offer-bonus__main {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}
.offer-bonus__extra {
  font-size: 15px;
  font-weight: 600;
}

.offer-btn { grid-area: cta; }
.offer-btn a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 8px;
  background: var(--cta);
  color: var(--cta-text);
  font-size: 16px;
  font-weight: 800;
  transition: background-color .15s ease;
}
.offer-btn a:hover { background: var(--cta-hover); }

/* === Offers column header (desktop) === */
.offers-header { display: none; }

/* === What to compare === */
.compare { margin-bottom: 40px; }
.compare > h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
}
.compare-list {
  display: grid;
  gap: 12px;
}
.compare-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-areas: "icon title" "icon text";
  column-gap: 16px;
  align-items: start;
  padding: 18px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.compare-item img { grid-area: icon; width: 44px; height: 44px; object-fit: contain; object-position: left center; }
.compare-item h3 { grid-area: title; font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.compare-item p { grid-area: text; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* === FAQ === */
.faq {
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.faq > h2,
.bonuses .content-heading {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
}
.faq-tab {
  border-bottom: 1px solid var(--line);
}
.faq-tab button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px 0;
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}
.faq-tab button .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #E4E2F5;
}
.faq-tab button .icon .minus { display: none; }
.faq-tab button.is-open .icon .plus { display: none; }
.faq-tab button.is-open .icon .minus { display: block; }
.faq-tab .faq-content {
  max-height: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  transition: max-height .25s ease;
}
.faq-tab .faq-content.is-open { padding-bottom: 16px; }

/* === How this page works === */
.bonuses {
  margin-top: 40px;
}
.bonuses .content {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* === Footer === */
.main-footer {
  margin-top: 56px;
  background: #0A0B26;
  border-top: 1px solid var(--line);
}
.footer-top {
  display: grid;
  gap: 24px;
  padding: 32px 0 24px;
}
.footer-brand {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.footer-about p:not(.footer-brand),
.footer-rg p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.footer-rg h2 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.footer-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.footer-badges img { height: 30px; width: auto; }
.footer-badges a { display: inline-flex; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 16px 0 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* === Tablet / desktop === */
@media (min-width: 768px) {
  .sub-header__container { padding: 48px 0 16px; }
  .sub-header__txt h1 { font-size: 38px; }
  .sub-header__txt p { font-size: 17px; }

  .offer-container {
    grid-template-columns: 24px 170px minmax(0, 1fr) 90px 170px;
    grid-template-areas: "rank logo bonus rating cta";
    gap: 24px;
    padding: 28px 24px 24px 20px;
  }
  .offer-rank {
    grid-area: rank;
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--muted);
  }
  .offer-logo { height: 64px; }
  .offer-logo span { background-position: center; }
  .offer-rating { text-align: center; }
  .score-point { font-size: 32px; }
  .offer-bonus__main { font-size: 21px; }

  .compare-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .compare-item { grid-template-columns: 1fr; grid-template-areas: "icon" "title" "text"; row-gap: 12px; padding: 22px 20px; }
  .compare-item h3 { margin-bottom: 0; }
  .faq-tab button { font-size: 17px; padding: 20px 0; }
  .faq-tab .faq-content { font-size: 15px; }
  .bonuses .content { font-size: 15px; }
  .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 48px; padding-top: 40px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .offer-container {
    grid-template-columns: 20px 140px minmax(0, 1fr) 150px;
    grid-template-areas: "rank logo bonus cta" "rank logo bonus rating";
    gap: 12px 20px;
  }
  .offer-bonus {
    align-self: stretch;
    justify-content: center;
    padding: 0 20px;
    border-top: 0;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}
@media (min-width: 1024px) {
  /* same columns as .offer-container, so the titles sit over their columns */
  .offers-header {
    display: grid;
    grid-template-columns: 24px 170px minmax(0, 1fr) 90px 170px;
    grid-template-areas: "casino casino bonus rating cta";
    align-items: center;
    gap: 24px;
    padding: 12px 25px 12px 21px;
    border-radius: 10px;
    background: #121034;
    border: 1px solid var(--line);
    color: #D9D7F2;
    font-size: 14px;
    font-weight: 700;
  }
  .offers-header__casino { grid-area: casino; }
  .offers-header__bonus { grid-area: bonus; }
  .offers-header__rating { grid-area: rating; text-align: center; }
  .offers-header__cta { grid-area: cta; text-align: center; }
  .offer-bonus__title { display: none; } /* the column header labels it on desktop */
  /* column separators: drawn in the middle of the 24px gaps, so column widths match the header */
  .offer-container { align-items: stretch; }
  .offer-logo, .offer-rank { align-self: center; }
  .offer-bonus, .offer-rating, .offer-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .offer-bonus { padding-top: 0; border-top: 0; }
  .offer-bonus::before, .offer-rating::before, .offer-btn::before,
  .offers-header__bonus::before, .offers-header__rating::before, .offers-header__cta::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -12px;
    width: 1px;
    background: var(--line);
  }
  .offers-header__bonus, .offers-header__rating, .offers-header__cta { position: relative; }
  .offers-header__bonus::before, .offers-header__rating::before, .offers-header__cta::before { top: -12px; bottom: -12px; }
  /* fixed backgrounds repaint on every scroll on phones, so only desktop gets it */
  .background-backdrop { background-attachment: scroll, fixed; }
  .bg-container { max-width: 1000px; margin: 0 auto 24px; padding: 0; }
  .sub-header__txt h1 { font-size: 44px; }
}
