/* FRAGA-style iGaming affiliate layout — mobile-first, min width 320px */

:root {
  --color-bg: #0d0d0f;
  --color-bg-elevated: #121214;
  --color-surface: #1a1a1d;
  --color-surface-hover: #222226;
  --color-border: #2c2c30;
  --color-border-soft: rgba(255, 255, 255, 0.06);
  --color-text: #ffffff;
  --color-muted: #8e8e93;
  --color-accent: #f13e56;
  --color-accent-hover: #ff4d6a;
  --color-accent-soft: rgba(241, 62, 86, 0.16);
  --color-magenta: #c026d3;
  --color-magenta-line: linear-gradient(90deg, #7c3aed 0%, #c026d3 50%, #f13e56 100%);
  --container: 910px;
  --hero-title: 1175px;
  --header-h: 56px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition-fast: 0.15s ease;
  --transition-drawer: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  padding-top: var(--header-h);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 1000;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius);
}

.skip-link:focus {
  left: 8px;
}

.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page {
  overflow-x: hidden;
}

.page--fraga {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(192, 38, 211, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(241, 62, 86, 0.08), transparent 50%),
    var(--color-bg);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 24px);
}

.section {
  padding-block: clamp(2rem, 5vw, 4rem);
}

.section__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section__intro {
  margin: 0 0 1.5rem;
  color: var(--color-muted);
  max-width: 65ch;
  font-size: 0.98rem;
}

/* ——— Long-form article content ——— */
.page-content {
  padding-top: 0;
}

.page-content > h2 {
  margin: clamp(2rem, 5vw, 3rem) 0 0.75rem;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.page-content > h2:first-child {
  margin-top: 0;
}

.page-content > h3 {
  margin: 1.5rem 0 0.65rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.page-content > p {
  margin: 0 0 1rem;
}

.page-content > ul,
.page-content > ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}

.page-content > ul li,
.page-content > ol li {
  margin-bottom: 0.45rem;
}

.page-content > ul li::marker {
  color: var(--color-accent);
}

.page-content > ol li::marker {
  color: var(--color-accent);
  font-weight: 700;
}

.page-content > .table-wrap {
  margin-block: 1.25rem 1.5rem;
}

.page-content > .faq-list {
  margin-top: 1rem;
}

/* ——— Header ——— */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 900;
  height: var(--header-h);
  background: rgba(13, 13, 15, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-soft);
}

.site-header__accent {
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--color-magenta-line);
  pointer-events: none;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 100%;
  max-width: min(100%, calc(var(--container) + 48px));
  margin-inline: auto;
  padding-inline: clamp(12px, 3vw, 20px);
}

.site-header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 10px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.site-header__burger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.site-header__burger.is-active .site-header__burger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.site-header__burger.is-active .site-header__burger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-header__logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  text-decoration: none;
  filter: drop-shadow(0 0 12px rgba(241, 62, 86, 0.35));
}

.site-header__logo-img {
  width: auto;
  height: 28px;
  max-width: 110px;
}

.site-header__nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.site-header__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header__list a {
  display: inline-block;
  padding: 8px 12px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.site-header__list a:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.site-header__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-header__drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 850;
  background: rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-drawer);
}

.site-header__drawer-backdrop:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.btn:active {
  transform: scale(0.98);
}

.btn--ghost {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
  font-weight: 600;
}

.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--color-text);
  background: var(--color-surface);
}

.btn--primary {
  background: linear-gradient(135deg, #f13e56 0%, #e11d48 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(241, 62, 86, 0.4);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--color-accent-hover) 0%, #f13e56 100%);
  box-shadow: 0 6px 20px rgba(241, 62, 86, 0.5);
}

@media (max-width: 379px) {
  .site-header__login {
    display: none;
  }
}

@media (min-width: 380px) {
  .site-header__login {
    display: inline-flex;
  }
}

@media (max-width: 767px) {
  .site-header__burger {
    display: flex;
    order: -1;
  }

  .site-header__inner {
    flex-wrap: nowrap;
  }

  .site-header__logo {
    flex: 1;
    justify-content: center;
    margin-inline: -44px;
  }

  .site-header__nav {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 880;
    flex: none;
    width: min(88vw, 320px);
    height: 100dvh;
    height: 100vh;
    padding: calc(var(--header-h) + 16px) 16px 24px;
    background: var(--color-bg-elevated);
    border-right: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform var(--transition-drawer);
    justify-content: flex-start;
  }

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

  .site-header__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .site-header__list a {
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: var(--radius);
  }

  .site-header__actions .btn--primary {
    min-height: 36px;
    padding-inline: 14px;
    font-size: 0.8125rem;
  }

  .site-header__actions .btn--ghost {
    min-height: 36px;
    padding-inline: 12px;
    font-size: 0.8125rem;
  }
}

@media (min-width: 768px) {
  .site-header__drawer-backdrop {
    display: none !important;
  }
}

@media (max-width: 639px) and (min-width: 768px) {
  .site-header__inner {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--header-h);
    padding-block: 10px;
  }

  .site-header__nav {
    order: 3;
    flex-basis: 100%;
  }

  body {
    padding-top: calc(var(--header-h) + 40px);
  }
}

/* ——— Hero ——— */
.hero {
  position: relative;
  padding-block: clamp(1.5rem, 4vw, 2.75rem);
}

.hero::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 50%;
  width: min(100%, var(--hero-title));
  height: 70%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(241, 62, 86, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.hero__title-wrap {
  position: relative;
  max-width: var(--hero-title);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 24px);
}

.hero__title {
  margin: 0 auto 1rem;
  text-align: center;
  font-size: clamp(1.65rem, 5.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
  color: #ffffff;
  filter: drop-shadow(0 2px 24px rgba(241, 62, 86, 0.2));
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero__title {
    background: linear-gradient(180deg, #ffffff 0%, #e4e4e7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.hero .container .hero__lead,
.hero .container .section__intro {
  margin-top: 0;
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.hero-banner__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.hero-banner {
  width: 100%;
  max-width: 100%;
  margin: clamp(1.25rem, 3vw, 2rem) 0 0;
}

.hero .hero-banner__link .hero-banner {
  margin-top: clamp(1.25rem, 3vw, 2rem);
}

.page-content > h2 + .hero-banner__link {
  display: block;
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
}

.page-content > h2 + .hero-banner__link .hero-banner {
  margin-top: 0;
}

.hero-banner .media-wide__inner {
  display: block;
  min-width: 0;
  padding: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  line-height: 0;
  background: transparent;
}

.hero-banner img {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  object-position: left center;
}

@media (min-width: 641px) {
  .hero-banner img {
    height: 100%;
  }
}

@media (max-width: 640px) {
  .hero-banner .media-wide__inner {
    aspect-ratio: auto;
  }

  .hero-banner img {
    height: auto;
    object-fit: contain;
    object-position: center;
  }
}

/* ——— Media ——— */
.media-wide {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border-soft);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.media-wide__inner {
  aspect-ratio: 21 / 9;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: var(--color-muted);
  font-size: 0.9rem;
  text-align: center;
  background: linear-gradient(145deg, #1f1f23 0%, #141416 100%);
}

@media (max-width: 640px) {
  .media-wide__inner {
    aspect-ratio: 16 / 10;
  }
}

.media-wide img,
.media-wide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ——— Tables ——— */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-soft);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border-soft);
  vertical-align: top;
}

.table tbody tr:hover td,
.table tbody tr:hover th {
  background: var(--color-surface-hover);
}

.table th {
  font-weight: 600;
  color: var(--color-text);
  background: rgba(241, 62, 86, 0.08);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.table-note {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* ——— Subsections ——— */
.subsection {
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.subsection:last-child {
  margin-bottom: 0;
}

.subsection__title {
  margin: 0 0 0.65rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.bullet-list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  color: var(--color-muted);
}

.bullet-list li {
  margin-bottom: 0.35rem;
}

.bullet-list li::marker {
  color: var(--color-accent);
}

/* ——— FAQ ——— */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-soft);
  background: var(--color-surface);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item[open] {
  border-color: rgba(241, 62, 86, 0.35);
}

.faq-item summary {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 600;
  font-size: 0.9375rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-muted);
  border-bottom: 2px solid var(--color-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 4px;
  border-color: var(--color-accent);
}

.faq-item__answer {
  padding: 0 18px 18px;
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
  border-top: 1px solid var(--color-border-soft);
}

.faq-item[open] .faq-item__answer {
  padding-top: 14px;
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--color-border-soft);
  padding-block: 1.5rem 2rem;
  background: var(--color-bg-elevated);
  margin-top: 1rem;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
  padding-inline: clamp(16px, 4vw, 24px);
}

.site-footer__copy {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.site-footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  font-size: 0.8125rem;
}

.site-footer__links a {
  color: var(--color-text);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.site-footer__links a:hover {
  background: var(--color-surface);
  color: var(--color-accent);
}

/* ——— Content typography in sections ——— */
.section:not(.page-content) p,
.subsection p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 65ch;
}

.page-content p,
.page-content ul,
.page-content ol {
  color: rgba(255, 255, 255, 0.88);
}

.section code,
.subsection code,
.faq-item__answer code {
  font-size: 0.88em;
  padding: 0.15em 0.4em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fda4af;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
