@layer reset, base, layout, components, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: auto; }
  body { margin: 0; }
  img { max-width: 100%; display: block; }
  a { color: inherit; text-decoration: none; }
  ul { margin: 0; padding: 0; list-style: none; }
  button { font: inherit; }
}

@layer base {
  :root {
    --primary: #fffbf0;
    --secondary: #fef3e2;
    --accent-gold: #d97706;
    --accent-deep: #92400e;
    --accent-glow: #fbbf24;
    --text-primary: #292524;
    --text-secondary: #78716c;
    --text-muted: #a8a29e;
    --surface-glass: rgba(255,251,240,0.85);
    --gradient-hero: linear-gradient(135deg, #fffbf0 0%, #fef3e2 40%, #fde68a22 100%);
    --gradient-gold: linear-gradient(135deg, #d97706, #fbbf24, #d97706);
    --gradient-radial-glow: radial-gradient(ellipse at 30% 50%, rgba(217,119,6,0.08) 0%, transparent 60%);
    --shadow-warm: 0 4px 24px rgba(217,119,6,0.12);
    --shadow-elevated: 0 20px 60px rgba(41,37,36,0.12), 0 4px 16px rgba(217,119,6,0.08);
    --font-display: "Playfair Display", serif;
    --font-body: "DM Sans", system-ui, sans-serif;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
  }

  body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--primary);
    line-height: 1.75;
  }

  h1, h2, h3, h4 {
    font-family: var(--font-display);
    margin: 0;
  }

  p { margin: 0; color: var(--text-secondary); }

  :focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(217,119,6,0.4);
    border-radius: 8px;
  }

  @media (prefers-color-scheme: dark) {
    body { background: #1c1917; color: #f5f0e6; }
    p { color: #d4d0cc; }
  }
}

@layer layout {
  .section {
    position: relative;
    padding: 100px 0;
  }

  .section__inner {
    width: min(1200px, 92%);
    margin: 0 auto;
  }

  .section__label {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 12px;
  }

  .section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    position: relative;
  }

  .balance-text { text-wrap: balance; }

  .section__underline {
    width: 120px;
    height: 2px;
    background: var(--accent-gold);
    margin: 16px 0 24px;
    transform-origin: left center;
    transform: scaleX(0);
  }

  .ornament {
    opacity: 0.3;
    margin-bottom: 24px;
  }

  .gold-dots {
    color: var(--accent-gold);
    letter-spacing: 0.6em;
    font-weight: 600;
    margin-bottom: 24px;
  }

  .section__intro {
    max-width: 680px;
    margin-bottom: 40px;
  }

  .section--features {
    background: #fffdf5;
    clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
    background-image: linear-gradient(rgba(217,119,6,0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(217,119,6,0.04) 1px, transparent 1px);
    background-size: 120px 120px;
  }

  .section--bonuses {
    background: var(--secondary);
    clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
  }

  .section--bonuses::before {
    content: \"\";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 0 0 0 100%;
    background: rgba(217,119,6,0.06);
    top: 0;
    right: 0;
  }

  .section--games::after {
    content: \"\";
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 100% 0 0 0;
    background: rgba(217,119,6,0.06);
    bottom: 0;
    left: 0;
  }

  .section--games {
    background: #fffdf5;
  }

  .section--payments {
    background: var(--secondary);
  }

  .section--apps {
    background: #fffdf5;
  }
}

@layer components {
  .nav__links {
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 0.95rem;
  }

  .nav__links a {
    position: relative;
    padding-bottom: 4px;
  }

  .nav__links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-gold);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav__links a:hover::after { transform: scaleX(1); }

  .nav__actions {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .nav__cta {
    border: 1px solid var(--accent-gold);
    background: transparent;
    padding: 8px 18px;
  }

  .nav__cta:hover {
    background: var(--gradient-gold);
    color: #1c1917;
  }

  .nav__hamburger {
    display: none;
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    cursor: pointer;
  }

  .nav__hamburger span {
    display: block;
    height: 2px;
    background: var(--text-primary);
    margin: 7px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav__hamburger.is-open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .nav__hamburger.is-open span:nth-child(2) { opacity: 0; }
  .nav__hamburger.is-open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

  .nav__mobile {
    position: fixed;
    inset: 0;
    background: rgba(255,251,240,0.97);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 120px 32px;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    z-index: 999;
  }

  .nav__mobile.is-open { transform: translateX(0); }

  .nav__mobile a {
    font-size: 1.4rem;
    font-family: var(--font-display);
    transform: translateX(40px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
  }

  .nav__mobile.is-open a { transform: translateX(0); opacity: 1; }
  .nav__mobile.is-open a:nth-child(2) { transition-delay: 0.05s; }
  .nav__mobile.is-open a:nth-child(3) { transition-delay: 0.1s; }
  .nav__mobile.is-open a:nth-child(4) { transition-delay: 0.15s; }
  .nav__mobile.is-open a:nth-child(5) { transition-delay: 0.2s; }
  .nav__mobile.is-open a:nth-child(6) { transition-delay: 0.25s; }

  .nav__close {
    position: absolute;
    top: 24px;
    right: 24px;
    border: none;
    background: transparent;
  }

  .hero__lead { max-width: 560px; }

  .hero__image { will-change: transform; }

  .hero__lead--drop::first-letter {
    font-family: var(--font-display);
    font-size: 2.6rem;
    color: var(--accent-gold);
    padding-right: 6px;
  }

  .hero__trust {
    display: flex;
    gap: 16px;
    font-size: 0.95rem;
    color: var(--text-secondary);
  }

  .hero__rating img { height: 20px; }

  .hero__texture {
    position: absolute;
    inset: 0;
    background-image:
      var(--gradient-radial-glow),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Ccircle cx='20' cy='30' r='1' fill='rgba(217,119,6,0.08)'/%3E%3Ccircle cx='70' cy='80' r='1' fill='rgba(217,119,6,0.06)'/%3E%3Ccircle cx='100' cy='40' r='1' fill='rgba(217,119,6,0.05)'/%3E%3C/svg%3E"),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cpath d='M0 10 L160 10' stroke='rgba(217,119,6,0.06)' stroke-width='1'/%3E%3Cpath d='M0 60 L160 60' stroke='rgba(217,119,6,0.04)' stroke-width='1'/%3E%3Cpath d='M0 110 L160 110' stroke='rgba(217,119,6,0.04)' stroke-width='1'/%3E%3Cpath d='M10 0 L10 160' stroke='rgba(217,119,6,0.04)' stroke-width='1'/%3E%3Cpath d='M60 0 L60 160' stroke='rgba(217,119,6,0.04)' stroke-width='1'/%3E%3Cpath d='M110 0 L110 160' stroke='rgba(217,119,6,0.04)' stroke-width='1'/%3E%3C/svg%3E");
    opacity: 0.8;
    pointer-events: none;
  }

  .hero__particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(217,119,6,0.5);
    animation: particleDrift 8s linear infinite;
  }

  .hero__particles span:nth-child(odd) { width: 4px; height: 4px; opacity: 0.6; }
  .hero__particles { position: absolute; inset: 0; pointer-events: none; }
  .hero__particles span:nth-child(1) { left: 10%; top: 70%; animation-delay: 0s; }
  .hero__particles span:nth-child(2) { left: 18%; top: 55%; animation-delay: 1s; }
  .hero__particles span:nth-child(3) { left: 26%; top: 80%; animation-delay: 2s; }
  .hero__particles span:nth-child(4) { left: 34%; top: 60%; animation-delay: 3s; }
  .hero__particles span:nth-child(5) { left: 42%; top: 75%; animation-delay: 4s; }
  .hero__particles span:nth-child(6) { left: 50%; top: 65%; animation-delay: 5s; }
  .hero__particles span:nth-child(7) { left: 58%; top: 80%; animation-delay: 1.5s; }
  .hero__particles span:nth-child(8) { left: 66%; top: 55%; animation-delay: 2.5s; }
  .hero__particles span:nth-child(9) { left: 74%; top: 78%; animation-delay: 3.5s; }
  .hero__particles span:nth-child(10) { left: 82%; top: 60%; animation-delay: 4.5s; }
  .hero__particles span:nth-child(11) { left: 90%; top: 70%; animation-delay: 5.5s; }
  .hero__particles span:nth-child(12) { left: 14%; top: 62%; animation-delay: 6s; }
  .hero__particles span:nth-child(13) { left: 46%; top: 85%; animation-delay: 2.2s; }
  .hero__particles span:nth-child(14) { left: 68%; top: 72%; animation-delay: 3.2s; }
  .hero__particles span:nth-child(15) { left: 88%; top: 82%; animation-delay: 4.2s; }

  .features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .feature-card {
    background: #fffbf0;
    border-radius: 20px;
    padding: 28px;
    border-left: 4px solid var(--accent-gold);
    box-shadow: var(--shadow-warm);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
  }

  .feature-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: radial-gradient(circle at center, rgba(217,119,6,0.18), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }

  .feature-card:hover {
    transform: perspective(800px) rotateX(-2deg) rotateY(4deg) translateZ(8px);
    box-shadow: var(--shadow-elevated);
    border-left-color: var(--accent-glow);
  }

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

  .feature-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #fef3e2, #fde68a44);
    box-shadow: inset 0 0 12px rgba(217,119,6,0.1);
    margin-bottom: 16px;
  }

  .feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    line-height: 1.2;
  }

  .feature-card a {
    display: inline-flex;
    margin-top: 16px;
    color: var(--accent-gold);
    font-weight: 600;
  }

  .stats {
    background: linear-gradient(135deg, #292524 0%, #3c3330 100%);
    color: #fbbf24;
    padding: 60px 0;
  }

  .stats__inner {
    width: min(1200px, 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    text-align: center;
    gap: 18px;
  }

  .stat-number {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-variant-numeric: tabular-nums;
  }

  .stat-label { color: #d4d0cc; }

  .stat__divider {
    width: 1px;
    height: 60px;
    background: rgba(251,191,36,0.3);
    justify-self: center;
  }

  .bonus-stack {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    position: relative;
  }

  .bonus-stack .bonus-card:nth-child(1) { transform: translateY(-8px); z-index: 3; }
  .bonus-stack .bonus-card:nth-child(2) { transform: translateY(0); z-index: 2; }
  .bonus-stack .bonus-card:nth-child(3) { transform: translateY(8px); z-index: 1; }

  .bonus-card {
    background: #fffbf0;
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow-warm);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    background-clip: padding-box;
  }

  .bonus-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: var(--gradient-gold);
    z-index: -1;
  }

  .bonus-card::after {
    content: \"\";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(217,119,6,0.18), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .bonus-card:hover::after { opacity: 1; }

  .bonus-card__banner {
    background: var(--gradient-gold);
    color: #1c1917;
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
  }

  .bonus-card__value {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 12px;
    font-variant-numeric: tabular-nums;
  }

  .bonus-card__badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #1c1917;
    color: var(--accent-glow);
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
  }

  .bonus-card__media {
    width: 100%;
    height: 160px;
    border-radius: 16px;
    margin: 16px 0;
    object-fit: cover;
  }

  .bonus-card__ribbon {
    position: absolute;
    top: 18px;
    right: -60px;
    transform: rotate(35deg);
    background: var(--gradient-gold);
    color: #1c1917;
    padding: 6px 80px;
    font-size: 0.75rem;
  }

  .bonus-card--featured { transform: translateY(-12px); }

  .bonus-mini {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 32px;
  }

  .bonus-mini__item {
    background: #fffbf0;
    border-radius: 16px;
    padding: 12px;
    display: grid;
    gap: 10px;
    box-shadow: var(--shadow-warm);
  }

  .bonus-mini__item img {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
  }

  .games {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  .sports-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 32px;
  }

  .sports-strip__item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    min-height: 180px;
    box-shadow: var(--shadow-warm);
    background: #1c1917;
  }

  .sports-strip__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .sports-strip__item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(28,25,23,0.9) 0%, rgba(28,25,23,0.2) 65%, transparent 100%);
  }

  .sports-strip__item span {
    position: absolute;
    left: 16px;
    bottom: 14px;
    color: #fff;
    font-weight: 600;
    z-index: 1;
    text-shadow: 0 6px 18px rgba(0,0,0,0.35);
  }

  .game-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    min-height: 260px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: var(--shadow-warm);
    background: #1c1917;
  }

  .game-card.is-hidden {
    opacity: 0;
    transform: scale(0.98);
    pointer-events: none;
  }

  .game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.4s ease;
    will-change: transform;
  }

  .game-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(28,25,23,0.92) 0%, rgba(28,25,23,0.25) 55%, transparent 100%);
    transition: opacity 0.3s ease;
    z-index: 1;
  }

  .game-card__content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: #fff;
    display: grid;
    gap: 8px;
    z-index: 2;
    text-shadow: 0 6px 18px rgba(0,0,0,0.35);
  }

  .game-card__content button {
    width: fit-content;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .game-card .btn--ghost {
    color: #fef3e2;
    border-color: rgba(251,191,36,0.7);
    background: rgba(28,25,23,0.35);
  }

  .game-card .btn--ghost:hover {
    background: var(--gradient-gold);
    color: #1c1917;
  }

  .game-card:hover img { transform: scale(1.06); }
  .game-card:hover .game-card__overlay { opacity: 0.8; }
  .game-card:hover .game-card__content button { opacity: 1; transform: translateY(0); }

  .tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 24px 0 32px;
  }

  .tab {
    border: 1px solid var(--accent-gold);
    background: transparent;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
  }

  .tab.is-active {
    background: var(--gradient-gold);
    color: #1c1917;
  }

  .payments {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 30px;
  }

  .payment-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    gap: 16px;
    align-items: center;
    box-shadow: var(--shadow-warm);
    transition: transform 0.3s ease;
  }

  .payment-card:hover { transform: translateY(-6px); }

  .payment-card__logo {
    min-width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--secondary);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--accent-deep);
  }

  .payments__marquee { display: none; }

  .security {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 20px;
  }

  .security__item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-warm);
  }

  .apps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    align-items: center;
  }

  .apps__media {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-elevated);
  }

  .apps__media img {
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
  }

  .apps__platforms {
    display: flex;
    gap: 16px;
    margin: 20px 0 28px;
    flex-wrap: wrap;
  }

  .apps__platform {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 10px 14px;
    border-radius: 999px;
    box-shadow: var(--shadow-warm);
    font-weight: 600;
    color: var(--accent-deep);
  }

  .footer {
    background: #292524;
    color: #d4d0cc;
  }

  .footer__top {
    width: min(1200px, 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 24px;
    padding: 60px 0 30px;
  }

  .footer__top h4 { margin-bottom: 12px; color: #fff; }

  .footer__top a {
    display: block;
    color: #d4d0cc;
    margin-bottom: 8px;
  }

  .footer__top a:hover { color: var(--accent-glow); }

  .footer__social { display: flex; gap: 12px; margin: 12px 0; }

  .footer__rule {
    height: 1px;
    background: var(--gradient-gold);
    animation: borderShimmer 4s linear infinite;
  }

  .footer__bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    padding: 16px 4vw 24px;
    background: #1c1917;
    font-size: 0.75rem;
    color: #78716c;
  }

  .footer__flags {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 16px 0 32px;
    background: #1c1917;
  }
}

@layer utilities {
  .animate-on-scroll {
    opacity: 0;
    transform: translateY(32px);
  }

  .is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .no-scroll { overflow: hidden; }
}
