/* =========================================================
   Variables
   ========================================================= */
:root {
  /* Color Palette - AU Lucky Lotto (clean, trust-focused) */
  --color-background: #f5f7fb;
  --color-surface: #ffffff;
  --color-text: #1b2430;
  --color-text-muted: #6b7280;
  --color-primary: #006ac3; /* lotto blue */
  --color-primary-soft: #e0efff;
  --color-success: #0e9f6e;
  --color-warning: #fbbf24;
  --color-danger: #ef4444;
  --color-border-subtle: #e5e7eb;
  --color-border-strong: #cbd5e1;

  /* Neutral grays */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-heading: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
    Roboto, "Helvetica Neue", Arial, sans-serif;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (px converted to rem, base 16px) */
  --space-0: 0;
  --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 */

  /* Radius */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-full: 9999px;

  /* Shadows (soft, trust-focused) */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08),
    0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px rgba(15, 23, 42, 0.08),
    0 2px 4px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px rgba(15, 23, 42, 0.10),
    0 4px 6px rgba(15, 23, 42, 0.05);

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-slow: 300ms ease-out;
}

/* =========================================================
   Reset / Normalize
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

body {
  min-height: 100vh;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Remove default link underlines; handled in base styles */
a {
  text-decoration: none;
  color: inherit;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   Base Styles
   ========================================================= */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background-color: var(--color-background);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

h1 {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-2);
}

h4 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-3);
  color: var(--color-text-muted);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 600;
}

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

a:hover {
  color: #004f96;
}

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

hr {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-6) 0;
}

/* =========================================================
   Accessibility: Focus Styles
   ========================================================= */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Hide focus rings when using mouse, show when keyboard navigating */
:focus:not(:focus-visible) {
  outline: none;
}

/* =========================================================
   Layout Utilities & Container
   ========================================================= */

.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--space-4);
  max-width: 1120px;
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-6);
  }
}

/* Spacing utility helpers (minimal set) */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }
.pt-6 { padding-top: var(--space-6) !important; }
.pb-6 { padding-bottom: var(--space-6) !important; }
.pt-10 { padding-top: var(--space-10) !important; }
.pb-10 { padding-bottom: var(--space-10) !important; }

/* Flexbox helpers */
.flex {
  display: flex;
}

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

.flex-col {
  flex-direction: column;
}

.flex-row {
  flex-direction: row;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

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

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

/* Grid helpers */
.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Text alignment */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

/* Width helpers */
.w-full {
  width: 100%;
}

/* =========================================================
   Screen Reader Only Utility
   ========================================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   Components: Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--font-size-sm);
  line-height: 1;
  border: 1px solid transparent;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    box-shadow var(--transition-normal),
    border-color var(--transition-normal),
    transform var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #0073d6, #005aa3);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #005aa3, #00457e);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--color-primary);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-primary);
}

.btn[disabled],
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(0, 115, 214, 0.6);
}

/* =========================================================
   Components: Form Inputs
   ========================================================= */
.input,
select,
textarea {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  padding: 0.6rem 0.75rem;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  background-color: #ffffff;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

.input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

.input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-sm);
}

.input[disabled],
select[disabled],
textarea[disabled] {
  background-color: var(--gray-100);
  cursor: not-allowed;
}

label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--gray-700);
}

.form-helper-text {
  font-size: var(--font-size-xs);
  color: var(--gray-500);
  margin-top: 0.25rem;
}

.form-error-text {
  font-size: var(--font-size-xs);
  color: var(--color-danger);
  margin-top: 0.25rem;
}

/* =========================================================
   Components: Cards (for sections, testimonials, winners)
   ========================================================= */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.card-header {
  margin-bottom: var(--space-3);
}

.card-title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-1);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
}

/* Lotto-specific subtle highlight (for recent winners, CTA blocks) */
.card-highlight {
  border: 1px solid rgba(0, 115, 214, 0.16);
  background: linear-gradient(135deg, #ffffff, #f1f6ff);
}

/* =========================================================
   Lotto Site / Section Helpers (Hero, FAQ, Legal)
   ========================================================= */

.section {
  padding-top: var(--space-10);
  padding-bottom: var(--space-10);
}

.section--light {
  background-color: #ffffff;
}

.section--muted {
  background-color: var(--gray-50);
}

.section-header {
  margin-bottom: var(--space-6);
  text-align: center;
}

.section-eyebrow {
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.section-title {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-2);
}

.section-description {
  max-width: 42rem;
  margin-inline: auto;
}

/* Hero section for "Start Playing Now" */
.hero {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr);
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

.hero-heading {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: var(--space-3);
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-4);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background-color: var(--color-primary-soft);
  color: #00457e;
  font-size: var(--font-size-xs);
  font-weight: 600;
}

.badge-outline {
  background-color: transparent;
  border: 1px solid var(--color-border-subtle);
  color: var(--gray-600);
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid var(--color-border-subtle);
}

.faq-button {
  width: 100%;
  padding: var(--space-4) 0;
  text-align: left;
  background: transparent;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--gray-800);
}

.faq-icon {
  flex-shrink: 0;
  margin-left: var(--space-3);
}

.faq-panel {
  padding-bottom: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

/* Legal / Disclaimer block, above footer & in footer */
.legal-block {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-relaxed);
  color: var(--gray-600);
  background-color: #fff7ed;
  border-top: 1px solid #fed7aa;
  border-bottom: 1px solid #fed7aa;
  padding: var(--space-4) 0;
}

.legal-block strong {
  color: var(--gray-800);
}

.footer-legal {
  font-size: var(--font-size-xs);
  color: var(--gray-500);
}

/* Responsible gaming & security icon strip */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-4);
}

.trust-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--font-size-xs);
  color: var(--gray-500);
}

/* 18+ badge */
.badge-18 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 2px solid #ef4444;
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Recent winners & testimonials layout helpers */
.winners-list {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .winners-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Popup / modal base for registration form if needed */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  z-index: 40;
}

.modal {
  width: 100%;
  max-width: 480px;
  background-color: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.modal-title {
  font-size: var(--font-size-xl);
}

.modal-close {
  background: transparent;
  border: none;
  line-height: 0;
  color: var(--gray-500);
}

.modal-close:hover {
  color: var(--gray-700);
}
