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

:root {
  /* Colors */
  --color-background: #050812; /* deep, cinematic backdrop */
  --color-surface: #0d101c;
  --color-surface-alt: #181c2b;
  --color-text: #f8f3eb;
  --color-text-muted: #b0a8c0;
  --color-primary: #d9a441; /* deep, elegant gold */
  --color-primary-soft: rgba(217, 164, 65, 0.14);
  --color-primary-dark: #b8862e;
  --color-accent: #9a1432; /* rich burgundy */
  --color-accent-soft: rgba(154, 20, 50, 0.16);
  --color-hero: #0a1226; /* midnight blue tone */

  --color-success: #37c988;
  --color-warning: #ffb648;
  --color-danger: #ff4f5e;

  --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: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Playfair Display", "Times New Roman", serif;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-md: 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.1;
  --line-height-snug: 1.3;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (0–96px) */
  --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 */

  /* Radii */
  --radius-xs: 0.125rem;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 999px;

  /* Shadows (soft, glamorous glow) */
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-elevated: 0 18px 45px rgba(0, 0, 0, 0.55);
  --shadow-gold-glow: 0 0 0 1px rgba(217, 164, 65, 0.16), 0 12px 40px rgba(0, 0, 0, 0.6);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-slow: 320ms ease;

  /* Container */
  --container-max-width: 1120px;
  --container-gutter: 1.25rem;
}

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

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

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
}

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

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

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

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

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

a {
  color: inherit;
}

/* Remove animations and transitions for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================================================== 
   Base Styles
   ========================================================================== */

body {
  min-height: 100vh;
  background: radial-gradient(circle at top left, #151b33 0, var(--color-background) 55%),
              radial-gradient(circle at bottom right, #201020 0, var(--color-background) 50%);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

/* Headings */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: 1.5rem;
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-2);
}

h4 {
  font-size: 1.25rem;
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-2);
}

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

strong,
b {
  font-weight: 600;
}

/* Links */

a {
  text-decoration: none;
  color: var(--color-primary);
  transition: color var(--transition-normal),
              text-shadow var(--transition-normal);
}

a:hover {
  color: var(--color-primary-dark);
  text-shadow: 0 0 16px rgba(217, 164, 65, 0.6);
}

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

/* Lists */

ul,
ol {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.25rem;
}

/* Horizontal rule */

hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: var(--space-6) 0;
}

/* ========================================================================== 
   Accessibility
   ========================================================================== */

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

/* Screen reader only */

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

.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

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

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

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

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

/* Flex utilities */

.flex {
  display: flex;
}

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

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

.gap-xs { gap: var(--space-2); }
.gap-sm { gap: var(--space-3); }
.gap-md { gap: var(--space-4); }
.gap-lg { gap: var(--space-6); }
.gap-xl { gap: var(--space-8); }

/* 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);
  }
}

/* Spacing utilities (margins & paddings, minimal set) */

.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--space-2); }
.mt-sm { margin-top: var(--space-3); }
.mt-md { margin-top: var(--space-4); }
.mt-lg { margin-top: var(--space-6); }
.mt-xl { margin-top: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--space-2); }
.mb-sm { margin-bottom: var(--space-3); }
.mb-md { margin-bottom: var(--space-4); }
.mb-lg { margin-bottom: var(--space-6); }
.mb-xl { margin-bottom: var(--space-8); }

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

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

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-normal),
              color var(--transition-normal),
              box-shadow var(--transition-normal),
              border-color var(--transition-normal),
              transform var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #f0d179, var(--color-primary));
  color: #1b1308;
  box-shadow: var(--shadow-gold-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f8e3a7, #f0c35b);
  transform: translateY(-1px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.7);
}

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

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: rgba(217, 164, 65, 0.7);
  box-shadow: 0 0 0 1px rgba(217, 164, 65, 0.28);
}

.btn-outline:hover {
  background: rgba(217, 164, 65, 0.08);
  box-shadow: var(--shadow-gold-glow);
}

.btn-ghost {
  background: rgba(8, 8, 16, 0.7);
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
}

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

.btn:focus-visible {
  outline: 2px solid #f9e2a0;
  outline-offset: 3px;
}

/* Inputs & form controls */

.input,
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: rgba(7, 10, 20, 0.88);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  outline: none;
  transition: border-color var(--transition-normal),
              box-shadow var(--transition-normal),
              background-color var(--transition-normal);
}

.input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.input:focus,
select:focus,
textarea:focus {
  border-color: rgba(217, 164, 65, 0.9);
  box-shadow: 0 0 0 1px rgba(217, 164, 65, 0.6), 0 0 30px rgba(217, 164, 65, 0.3);
  background-color: rgba(10, 14, 28, 0.98);
}

.input[disabled],
select[disabled],
textarea[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: var(--font-size-sm);
  color: var(--gray-200);
}

.form-field {
  margin-bottom: var(--space-4);
}

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

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

/* Cards */

.card {
  position: relative;
  background: radial-gradient(circle at top left, rgba(217, 164, 65, 0.06), transparent 55%),
              linear-gradient(145deg, rgba(10, 12, 28, 0.96), rgba(5, 8, 18, 0.98));
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(217, 164, 65, 0.12), transparent 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.card:hover::before {
  opacity: 1;
}

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

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

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

.card-body {
  position: relative;
  z-index: 1;
}

/* Tag / pill component (for event types, etc.) */

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(217, 164, 65, 0.45);
  background: rgba(5, 8, 18, 0.85);
  color: var(--color-primary);
}

/* Hero overlay utility for glamorous top sections */

.hero-overlay {
  position: relative;
  overflow: hidden;
}

.hero-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top center, rgba(217, 164, 65, 0.18), transparent 55%),
    linear-gradient(to bottom, rgba(5, 8, 18, 0.1), rgba(5, 8, 18, 0.98));
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* Toast-like message (success / error) */

.notice {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  border: 1px solid transparent;
}

.notice--success {
  background: rgba(55, 201, 136, 0.08);
  border-color: rgba(55, 201, 136, 0.5);
  color: #d6ffee;
}

.notice--danger {
  background: rgba(255, 79, 94, 0.08);
  border-color: rgba(255, 79, 94, 0.6);
  color: #ffe6ea;
}

/* ========================================================================== 
   Media Helpers
   ========================================================================== */

.responsive-media {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.responsive-media > iframe,
.responsive-media > video,
.responsive-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
