/* ============================================================
   BASE.CSS — Reset, CSS Variables, Typography
   elook.org | Casino Affiliate | Production v1.0
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Serif+Display&family=Noto+Sans+Bengali:wght@400;500;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Colors — Primary (Indigo/Violet digital) */
  --color-primary:        #4F46E5;
  --color-primary-dark:   #3730A3;
  --color-primary-light:  #EEF2FF;
  --color-primary-mid:    #6366F1;

  /* Colors — Accent (CTA — vivid orange-red) */
  --color-accent:         #F97316;
  --color-accent-dark:    #EA580C;
  --color-accent-light:   #FFF7ED;

  /* Colors — Neutrals */
  --color-bg:             #FFFFFF;
  --color-bg-soft:        #F5F5FF;
  --color-bg-muted:       #EBEBF8;
  --color-bg-dark:        #0F0C29;

  /* Colors — Text */
  --color-text:           #0F0E1A;
  --color-text-secondary: #4B5563;
  --color-text-muted:     #9CA3AF;
  --color-text-inverse:   #FFFFFF;

  /* Colors — Semantic */
  --color-success:        #059669;
  --color-success-light:  #ECFDF5;
  --color-warning:        #D97706;
  --color-warning-light:  #FFFBEB;
  --color-danger:         #DC2626;
  --color-danger-light:   #FEF2F2;
  --color-info:           #2563EB;
  --color-info-light:     #EFF6FF;

  /* Colors — Border */
  --color-border:         #E0E0F0;
  --color-border-strong:  #C7C7E0;

  /* Colors — Star rating */
  --color-star:           #F59E0B;
  --color-star-empty:     #D1D5DB;

  /* Typography */
  --font-sans:    'DM Sans', 'Noto Sans Bengali', system-ui, sans-serif;
  --font-serif:   'DM Serif Display', Georgia, serif;
  --font-mono:    'Courier New', monospace;

  /* Font sizes */
  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-md:   1.0625rem; /* 17px */
  --text-lg:   1.125rem;  /* 18px */
  --text-xl:   1.25rem;   /* 20px */
  --text-2xl:  1.375rem;  /* 22px */
  --text-3xl:  1.75rem;   /* 28px */
  --text-4xl:  2rem;      /* 32px */
  --text-5xl:  2.5rem;    /* 40px */
  --text-6xl:  3rem;      /* 48px */

  /* Font weights */
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semi:    600;
  --weight-bold:    700;

  /* Line heights */
  --leading-tight:  1.2;
  --leading-snug:   1.35;
  --leading-normal: 1.6;
  --leading-loose:  1.8;

  /* Spacing (8px base) */
  --space-1:   0.25rem;  /* 4px */
  --space-2:   0.5rem;   /* 8px */
  --space-3:   0.75rem;  /* 12px */
  --space-4:   1rem;     /* 16px */
  --space-5:   1.25rem;  /* 20px */
  --space-6:   1.5rem;   /* 24px */
  --space-8:   2rem;     /* 32px */
  --space-10:  2.5rem;   /* 40px */
  --space-12:  3rem;     /* 48px */
  --space-16:  4rem;     /* 64px */
  --space-20:  5rem;     /* 80px */
  --space-24:  6rem;     /* 96px */

  /* Border radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-xl:  0 16px 40px rgba(0,0,0,0.12);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   200ms ease;
  --transition-slow:   350ms ease;

  /* Container */
  --container-max:  1200px;
  --container-pad:  1.5rem;
}

/* ── CSS Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Bengali language overrides via :lang() selector */
:lang(bn) {
  font-family: 'Noto Sans Bengali', 'DM Sans', system-ui, sans-serif;
  line-height: var(--leading-loose);
}

:lang(bn) h1,
:lang(bn) h2,
:lang(bn) h3,
:lang(bn) h4 {
  line-height: 1.4;
}

:lang(bn) .btn {
  font-size: calc(var(--text-base) + 1px);
}

/* ── Images & Media ── */
img, video, svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

/* ── Links ── */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

a:focus-visible {
  outline: 3px solid var(--color-info);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Lists ── */
ul, ol {
  list-style: none;
}

/* ── Tables ── */
table {
  border-collapse: collapse;
  width: 100%;
}

/* ── Forms ── */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  line-height: var(--leading-normal);
  max-width: 68ch;
}

p + p {
  margin-top: var(--space-4);
}

strong { font-weight: var(--weight-semi); }
em { font-style: italic; }

small {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ── Horizontal rule ── */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-8) 0;
}

/* ── Skip link (accessibility) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-weight: var(--weight-semi);
  border-radius: var(--radius-md);
  z-index: 9999;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

/* ── Responsive font scaling ── */
@media (max-width: 767px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
}

@media (max-width: 480px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
}
