/* ==========================================================================
   Dafa Partners — Dafabet landing page
   Rebuilt to match the Figma frames (375w / 1440w / 1920w).
   Fonts: Inter (UI + body), Montserrat (hero display type)
   ========================================================================== */

:root {
  /* Brand */
  --primary: #AF0000;
  --primary-hover: #800000;
  --primary-focus: #940000;
  --primary-press: #660000;
  --primary-alert: #FF1E1E;

  /* Neutrals */
  --text-dark: #0F1010;
  --text-neutral-1: #303635;
  --text-neutral-2: #5D6260;
  --surface: #FAFAFA;          /* header, cards, footer */
  --page-bg: #F2F3F2;          /* page background */
  --surface-hover: #F2F3F2;
  --surface-press: #DCDFDF;
  --border: #E9EAE9;
  --secondary-border: #CCCCCC;
  --secondary-border-hover: #999999;
  --secondary-border-press: #808080;
  --menu-selected: #252828;
  --social: #CCCCCC;

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Montserrat', 'Inter', sans-serif;

  --radius-card: 16px;
  --radius-panel: 24px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
svg { display: block; flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}


/* ==========================================================================
   Buttons — follows the Figma "Buttons" component set
   Medium: 40px tall · Small: 30px tall
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 40px;
  padding: 0 12px;
  border-radius: 32px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn--sm {
  height: 30px;
  padding: 0 12px;
  font-size: 11px;
}

.btn--sm svg { width: 14px; height: 14px; }

/* Primary */
.btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 0 2px 0 rgba(15, 15, 15, 0.15);
}
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn--primary:focus-visible { background: var(--primary-focus); border-color: var(--primary-focus); }
.btn--primary:active { background: var(--primary-press); border-color: var(--primary-press); }

/* Secondary */
.btn--secondary {
  background: var(--surface);
  border-color: var(--secondary-border);
  color: var(--text-neutral-1);
}
.btn--secondary:hover { background: var(--surface-hover); border-color: var(--secondary-border-hover); }
.btn--secondary:focus-visible { background: var(--surface-hover); border-color: var(--surface-hover); }
.btn--secondary:active { background: var(--surface-press); border-color: var(--secondary-border-press); }

/* Ghost */
.btn--ghost {
  background: transparent;
  color: var(--text-dark);
  padding-left: 12px;
  padding-right: 12px;
}
.btn--ghost:hover { color: var(--text-neutral-2); }
.btn--ghost:focus-visible { background: var(--surface-hover); }
.btn--ghost:active { background: var(--surface-hover); color: var(--text-dark); }


/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  height: 66px;
  padding: 0 48px;
}

.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo svg { width: 156px; height: auto; }

.main-nav {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.main-nav__list {
  display: flex;
  align-items: center;
  gap: 36px;
}

/* Header menu item — Default / Hover / Selected / Press */
.main-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 32px;
  background: transparent;
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.main-nav__link:hover { background: var(--surface-press); }
.main-nav__link:active { background: transparent; color: var(--text-neutral-2); }

.main-nav__link.is-current,
.has-dropdown.is-open > .main-nav__link,
.has-dropdown:hover > .main-nav__link,
.has-dropdown:focus-within > .main-nav__link {
  background: var(--menu-selected);
  color: #FFFFFF;
}

/* Dropdown */
.has-dropdown { position: relative; }

.dropdown {
  position: absolute;
  top: calc(100% + 11px);
  left: -31px;
  min-width: 172px;
  padding: 4px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(15, 15, 15, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

/* invisible bridge so the menu stays open while the pointer moves down */
.dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.is-open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.dropdown a {
  display: block;
  padding: 16px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.3px;
  color: var(--text-dark);
  white-space: nowrap;
}
.dropdown a:hover,
.dropdown a:focus-visible { background: var(--surface-hover); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-dark);
  cursor: pointer;
}
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }


/* ==========================================================================
   Hero carousel — 344px tall on tablet / desktop
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  height: 344px;
  background: #EAE8E5;

  /* Text block left edge: 144px at 1440w, 264px at 1920w (plus 16px body padding) */
  --hero-pad: clamp(32px, calc(32px + (100vw - 834px) * 0.1848), 144px);
  --hero-arrow-x: clamp(24px, calc(72px + (100vw - 1440px) * 0.2), 72px);
}

@media (min-width: 1440px) {
  .hero {
    --hero-pad: clamp(144px, calc(144px + (100vw - 1440px) * 0.25), 264px);
    --hero-arrow-x: clamp(72px, calc(72px + (100vw - 1440px) * 0.2), 168px);
  }
}

.hero-slides {
  display: flex;
  height: 100%;
  transition: transform .55s cubic-bezier(.65, 0, .35, 1);
}

.hero-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-slide__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}

/* Wider artwork (slide 2): pin to the right at full height so the
   cricketer doesn't sit behind the text. Left edge of the image is already
   faded to off-white, so it blends into the hero background. */
.hero-slide__image--right {
  left: auto;
  right: 0;
  width: auto;
  height: 100%;
  object-fit: contain;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%);
          mask-image: linear-gradient(to right, transparent 0, #000 12%);
}

.hero-slide--fade-bg {
  background: linear-gradient(to bottom, #E9E9EA 0%, #FBFBFB 50%, #E6E6E6 100%);
}

/* No overlay behind the text on tablet / desktop */
.hero-slide__overlay { display: none; }

.hero-slide__caption {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 16px 0 calc(var(--hero-pad) + 16px);
}

.hero-slide__eyebrow {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: 0.1px;
  color: var(--primary);
}

.hero-slide__figure {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 800;
  line-height: 68px;
  color: var(--primary);
}

.hero-slide__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.hero-slide__desc {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: 0.1px;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.hero-slide__text {
  max-width: 295px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.25px;
  color: var(--text-neutral-1);
  margin-bottom: 16px;
}

.hero-slide__actions {
  display: flex;
  gap: 16px;
}

/* Arrow buttons */
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 15, 15, 0.25);
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.hero-nav:hover { background: rgba(15, 15, 15, 0.15); border-color: rgba(255, 255, 255, 0.2); }
.hero-nav:active { background: rgba(15, 15, 15, 0.4); }
.hero-nav--prev { left: var(--hero-arrow-x); }
.hero-nav--next { right: var(--hero-arrow-x); }

/* Paginator */
.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 1px 0 rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: width .15s ease, background-color .15s ease;
}
.hero-dots button.is-active {
  width: 24px;
  background: var(--surface);
}


/* ==========================================================================
   Section titles
   ========================================================================== */
.section-title {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  text-transform: uppercase;
  color: var(--text-dark);
}

.br-mobile { display: none; }


/* ==========================================================================
   Benefits
   ========================================================================== */
.benefits {
  padding: 24px 16px 0;
}

.benefits__card {
  max-width: 1192px;
  margin: 0 auto;
  padding: 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.benefit-item__icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #FFFFFF;
}

.benefit-item h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0.1px;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.benefit-item p {
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.25px;
  color: var(--text-neutral-1);
}


/* ==========================================================================
   Products
   ========================================================================== */
.products {
  padding: 48px 16px 0;
}

.products__grid {
  max-width: 1008px;
  margin: 20px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 320px);
  justify-content: center;
  gap: 24px;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.product-card__image {
  width: 100%;
  height: 176px;
  object-fit: cover;
}

.product-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.product-card h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: 0.1px;
  margin-bottom: 8px;
}

.product-card p {
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.25px;
  color: var(--text-neutral-1);
  margin-bottom: 12px;
}

.product-card__actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 24px;
}
.product-card__actions .btn--ghost { margin-right: -12px; }


/* ==========================================================================
   CTA
   ========================================================================== */
.cta {
  padding: 48px 16px 24px;
}

.cta__card {
  max-width: 1024px;
  margin: 24px auto 0;
  padding: 32px 32px 44px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "text   button"
    "terms  .";
  column-gap: 32px;
  row-gap: 20px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
}

.cta__text {
  grid-area: text;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: 0.1px;
  color: var(--text-neutral-1);
}
.cta__text--mobile { display: none; }

.cta__button { grid-area: button; margin-top: 4px; }

.cta__terms {
  grid-area: terms;
  justify-self: start;
  margin-left: 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.3px;
  color: var(--text-neutral-1);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cta__terms:hover { color: var(--primary); }


/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--surface);
  padding: 39px 16px 39px;
}

.footer-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 54px;
}

.footer-brand {
  width: 172px;
  text-align: center;
}
.logo--footer { justify-content: center; margin-bottom: 14px; }
.footer-brand p {
  font-size: 12px;
  line-height: 16px;
  color: var(--text-dark);
}

.footer-links {
  display: flex;
  gap: 24px;
  padding-top: 3px;
}
.footer-col { min-width: 104px; }
.footer-col:nth-child(2) { min-width: 114px; }
.footer-col--legal { min-width: 149px; }

.site-footer h4 {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.1px;
  line-height: 16px;
  text-transform: uppercase;
  color: var(--text-dark);
  margin-bottom: 13px;
}

.footer-col li { margin-bottom: 11px; font-size: 12px; line-height: 16px; }
.footer-col li:last-child { margin-bottom: 0; }
.footer-col a {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.3px;
  color: var(--text-neutral-1);
}
.footer-col a:hover { color: var(--primary); }

.footer-connect {
  padding-top: 3px;
  margin-left: -30px;
}

.footer-social {
  display: flex;
  gap: 24px;
}
.footer-social a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--social);
  color: #FFFFFF;
  transition: background-color .15s ease;
}
.footer-social a:hover { background: var(--secondary-border-hover); }
.footer-social a:active { background: var(--secondary-border-press); }

.footer-bottom {
  margin-top: 41px;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 0.2px;
  color: var(--text-dark);
}


/* ==========================================================================
   Below 1200px: hide hero arrows (the 834w hero has none)
   ========================================================================== */
@media (max-width: 1199px) {
  .hero-nav { display: none; }
}


/* ==========================================================================
   Tablet — compact header, stacked grids
   ========================================================================== */
/* Tablet header (834w frame): full menu stays inline, "Home" is dropped */
@media (min-width: 768px) and (max-width: 1023px) {
  .site-header__inner { padding: 0 20px 0 18px; }
  .logo svg { width: 117px; }
  .main-nav { left: calc(50% + 28px); }
  .main-nav__list { gap: 12px; }
  .main-nav__list > li:first-child { display: none; }
  .main-nav__link { padding: 0 10px; }
}

@media (max-width: 1023px) {
  .benefits__card { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }

  .products__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 664px;
  }
  .product-card { flex: 0 1 calc(50% - 12px); }

  .footer-grid { flex-wrap: wrap; row-gap: 40px; }
  .footer-connect { margin-left: 0; }
}

@media (max-width: 767px) {
  .site-header__inner { padding: 0 24px; gap: 12px; }

  .nav-toggle { display: inline-flex; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    transform: none;
    display: none;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(15, 15, 15, 0.08);
    padding: 12px 16px 16px;
  }
  .main-nav.is-open { display: block; }

  .main-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .main-nav__link {
    width: 100%;
    justify-content: space-between;
    height: 40px;
    font-size: 14px;
  }

  .has-dropdown:hover > .main-nav__link,
  .has-dropdown:focus-within > .main-nav__link { background: transparent; color: var(--text-dark); }
  .has-dropdown.is-open > .main-nav__link { background: var(--menu-selected); color: #FFFFFF; }

  .dropdown {
    position: static;
    display: none;
    box-shadow: none;
    background: transparent;
    padding: 4px 0 0 12px;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .dropdown::before { display: none; }
  .has-dropdown.is-open .dropdown { display: block; }
  .dropdown a { padding: 12px; font-size: 14px; }

}


/* ==========================================================================
   Mobile — 375w frame
   ========================================================================== */
@media (max-width: 767px) {

  /* Header: 54px, burger · logo · small buttons */
  .site-header__inner {
    height: 54px;
    padding: 0 16px 0 18px;
    gap: 10px;
  }
  .logo svg { width: 117px; }
  .header-actions .btn--sm { padding: 0 12px; }

  /* Hero: dark artwork, light text, 360px */
  .hero { height: 360px; background: #020D0B; }

  .hero-slide { align-items: flex-start; }

  .hero-slide__image { object-position: 72% center; }
  .hero-slide__image--right {
    left: 0;
    width: 100%;
    object-fit: cover;
    object-position: 60% center;
    -webkit-mask-image: none;
            mask-image: none;
  }

  .hero-slide__overlay {
    display: block;
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to bottom,
      rgba(2, 13, 11, 0.5) 0%,
      rgba(2, 13, 11, 0.88) 78%,
      rgba(2, 13, 11, 0.88) 100%
    );
  }

  .hero-slide__caption { padding: 6px 24px 0 40px; }

  .hero-slide__eyebrow,
  .hero-slide__figure { color: var(--primary-alert); }

  .hero-slide__title,
  .hero-slide__desc,
  .hero-slide__text { color: #FFFFFF; }

  .hero-slide__text { max-width: 295px; margin-bottom: 32px; }

  .hero-dots button.is-active {
    background: var(--primary-alert);
    box-shadow: 0 0 16px 0 var(--primary-alert);
  }

  /* Benefits strip is not part of the mobile design */
  .benefits { display: none; }

  /* Products */
  .products { padding: 26px 16px 0; }
  .section-title { font-size: 18px; line-height: 24px; }

  .products__grid {
    gap: 16px;
    margin-top: 16px;
  }
  .product-card { flex-basis: 100%; }

  .product-card { padding: 16px; border-radius: var(--radius-card); }
  .product-card__image {
    height: 96px;
    border-radius: 12px;
  }
  .product-card__body { padding: 16px 8px 0; }
  .product-card p { margin-bottom: 8px; }
  .product-card__actions { padding-right: 16px; }

  /* CTA: centred, stacked */
  .cta { padding: 24px 24px 24px; }
  .br-mobile { display: inline; }

  .cta__card {
    margin-top: 16px;
    padding: 32px 32px 44px;
    border-radius: 32px;
    row-gap: 24px;
    grid-template-columns: 1fr;
    grid-template-areas:
      "text"
      "button"
      "terms";
    justify-items: center;
    text-align: center;
  }
  .cta__text { font-size: 16px; line-height: 22px; }
  .cta__text--desktop { display: none; }
  .cta__text--mobile { display: block; }
  .cta__button { margin-top: 0; }
  .cta__terms { justify-self: center; margin: 3px 0 0; }

  /* Footer: stacked and centred */
  .site-footer { padding: 38px 16px 30px; }

  .footer-grid {
    flex-direction: column;
    align-items: center;
    gap: 34px;
  }

  .footer-brand { width: 172px; margin-bottom: 14px; }
  .logo--footer svg { width: 156px; }

  .footer-links {
    display: grid;
    grid-template-columns: 104px 104px;
    column-gap: 24px;
    row-gap: 35px;
    padding-top: 0;
  }
  .footer-col,
  .footer-col:nth-child(2),
  .footer-col--legal { min-width: 0; }
  .footer-col--legal {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .footer-connect { padding-top: 0; margin-left: 0; }
  .footer-connect h4 { margin-bottom: 14px; }

  .footer-bottom { margin-top: 31px; }
}


/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-slides,
  .dropdown,
  .btn { transition: none; }
}
