/* ========================================================================== *
   Variables
   ========================================================================== */

:root {
  /* Colors */
  --color-bg: #050814;
  --color-surface: #0b1020;
  --color-surface-soft: #121729;

  --color-text: #f9fafb;
  --color-text-muted: #9ca3af;
  --color-border-subtle: #1f2933;
  --color-border-strong: #374151;

  --color-primary: #3b82f6; /* event accent */
  --color-primary-soft: rgba(59, 130, 246, 0.12);
  --color-primary-strong: #2563eb;

  --color-success: #16a34a;
  --color-success-soft: rgba(22, 163, 74, 0.15);

  --color-warning: #fbbf24;
  --color-warning-soft: rgba(251, 191, 36, 0.15);

  --color-danger: #ef4444;
  --color-danger-soft: rgba(239, 68, 68, 0.15);

  --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, "SF Pro Text", "Segoe UI", sans-serif;
  --font-display: "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", 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 */
  --font-size-5xl: 3rem;     /* 48px */

  --line-height-tight: 1.15;
  --line-height-snug: 1.3;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (px) */
  --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-xs: 0.25rem;  /* 4px */
  --radius-sm: 0.375rem; /* 6px */
  --radius-md: 0.5rem;   /* 8px */
  --radius-lg: 0.75rem;  /* 12px */
  --radius-xl: 1rem;     /* 16px */
  --radius-full: 999px;

  /* Shadows - subtle, card, overlay (for offerwall modal) */
  --shadow-soft: 0 4px 12px rgba(15, 23, 42, 0.25);
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.45);
  --shadow-overlay: 0 30px 80px rgba(0, 0, 0, 0.7);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 180ms ease-out;
  --transition-slow: 260ms ease-out;

  /* Layout */
  --max-width-page: 1120px;
  --max-width-wide: 1360px;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-normal: 0ms;
    --transition-slow: 0ms;
  }
}

/* ========================================================================== *
   Reset / Normalize
   ========================================================================== */

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

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

ul {
  list-style: none !important;
}

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

body {
  min-height: 100vh;
}

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

a {
  text-decoration: none;
  color: inherit;
}

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

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

img {
  height: auto;
}

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

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
}

textarea {
  resize: vertical;
}

[hidden] {
  display: none !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-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  display: block;
}

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

h1 {
  font-size: clamp(var(--font-size-3xl), 3.3vw, var(--font-size-5xl));
}

h2 {
  font-size: clamp(var(--font-size-2xl), 2.4vw, var(--font-size-4xl));
}

h3 {
  font-size: clamp(var(--font-size-xl), 1.9vw, var(--font-size-3xl));
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-base);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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);
  transition: color var(--transition-fast);
}

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

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

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

/* ========================================================================== *
   Accessibility & Focus
   ========================================================================== */

:focus {
  outline: none;
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.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;
}

/* ========================================================================== *
   Layout Utilities
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--max-width-page);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.container-wide {
  width: 100%;
  max-width: var(--max-width-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

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

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

/* Flex utilities */

.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-2 {
  gap: var(--space-2);
}

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

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

/* Grid utilities */

.grid {
  display: grid;
}

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

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

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

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

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

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

/* ========================================================================== *
   Components
   ========================================================================== */

/* Buttons - primary action for booking / offerwall */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.btn--primary {
  background: radial-gradient(circle at 20% 0, rgba(59, 130, 246, 0.35), transparent 55%),
              linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: #f9fafb;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.55);
}

.btn--primary:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.7);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.6);
}

.btn--ghost {
  background-color: rgba(15, 23, 42, 0.7);
  border-color: var(--color-border-subtle);
  color: var(--color-text);
}

.btn--ghost:hover {
  background-color: rgba(31, 41, 55, 0.95);
  border-color: var(--color-border-strong);
}

.btn--secondary {
  background-color: var(--color-surface-soft);
  color: var(--color-text);
  border-color: var(--color-border-subtle);
}

.btn--secondary:hover {
  background-color: #181f35;
  border-color: var(--color-primary);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn--icon-left svg,
.btn--icon-right svg {
  width: 1rem;
  height: 1rem;
}

/* Form controls */

.input,
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(15, 23, 42, 0.85);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

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

.input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.6);
  background-color: rgba(15, 23, 42, 1);
}

.input[aria-invalid="true"],
.input--error {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.5);
}

label {
  display: inline-block;
  margin-bottom: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--gray-200);
}

.form-helper {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.form-error {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* Card - used for event tiles, poker highlights, and offerwall entries */

.card {
  position: relative;
  background: radial-gradient(circle at 0 0, rgba(59, 130, 246, 0.12), transparent 55%),
              linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.12);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.card--soft {
  background: linear-gradient(145deg, #0b1020, #111827);
  box-shadow: var(--shadow-soft);
}

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

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

.card-meta {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray-400);
}

.card-body {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ========================================================================== *
   Offerwall-Specific Shell (Homepage hero modal / panel)
   ========================================================================== */

.offerwall-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.18), transparent 55%),
              linear-gradient(135deg, rgba(3, 7, 18, 0.94), rgba(15, 23, 42, 0.98));
  backdrop-filter: blur(28px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  z-index: 40;
}

.offerwall-panel {
  width: 100%;
  max-width: 960px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 15% 0, rgba(59, 130, 246, 0.22), transparent 55%),
              linear-gradient(145deg, #020617, #020617 32%, #020617 45%, #020617);
  border-radius: 1.3rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--shadow-overlay);
  overflow: hidden;
}

.offerwall-header {
  padding: var(--space-4) var(--space-5) var(--space-3);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.offerwall-body {
  padding: var(--space-4) var(--space-5) var(--space-5);
  overflow-y: auto;
}

.offerwall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}

.offerwall-tagline {
  font-size: var(--font-size-sm);
  color: var(--gray-300);
}

.offerwall-close {
  border-radius: var(--radius-full);
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--gray-300);
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.offerwall-close:hover {
  background-color: rgba(15, 23, 42, 1);
  border-color: var(--color-primary);
  color: var(--color-text);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .offerwall-panel {
    border-radius: 1rem;
  }

  .offerwall-header,
  .offerwall-body {
    padding-inline: var(--space-4);
  }
}

/* ========================================================================== *
   Badges / Status (for event types: poker, teambuilding, oslavy)
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge--primary {
  background-color: var(--color-primary-soft);
  color: #dbeafe;
}

.badge--success {
  background-color: var(--color-success-soft);
  color: #bbf7d0;
}

.badge--warning {
  background-color: var(--color-warning-soft);
  color: #fef3c7;
}

.badge--danger {
  background-color: var(--color-danger-soft);
  color: #fee2e2;
}

.badge--outline {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--gray-200);
}

/* ========================================================================== *
   Helpers (color / background for poker vs general events)
   ========================================================================== */

.bg-surface {
  background-color: var(--color-surface);
}

.bg-surface-soft {
  background-color: var(--color-surface-soft);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-primary {
  color: var(--color-primary);
}

.bg-primary-soft {
  background-color: var(--color-primary-soft);
}

.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }

.shadow-soft { box-shadow: var(--shadow-soft); }

/* ========================================================================== *
   End base.css
   ========================================================================== */
