/* ==========================================================================
   RoyaVento Base Styles
   Modern, elegant, premium, bright, lifestyle, responsive
   ========================================================================== */

/* ==========================================================================
   1. CSS Custom Properties (Variables)
   ========================================================================== */

:root {
  /* Color Palette */
  --color-bg: #ffffff;
  --color-bg-alt: #f5f7fb;
  --color-surface: #ffffff;

  --color-text: #101322;
  --color-text-soft: #5b6272;
  --color-text-muted: #8c93a7;

  --color-primary: #0c7c6e; /* emerald */
  --color-primary-soft: rgba(12, 124, 110, 0.12);
  --color-primary-strong: #066054;

  --color-accent-gold: #d4a64b;
  --color-accent-gold-soft: rgba(212, 166, 75, 0.16);

  --color-navy: #08101f;
  --color-navy-soft: #111a2a;

  --color-success: #1f9d55;
  --color-warning: #f3a32b;
  --color-danger: #e63946;

  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font-display: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, 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.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;

  /* 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-7: 1.75rem;  /* 28px */
  --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.375rem;  /* 6px */
  --radius-md: 0.75rem;   /* 12px */
  --radius-lg: 1.25rem;   /* 20px */
  --radius-pill: 999px;

  /* Shadows */
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-medium: 0 18px 45px rgba(15, 23, 42, 0.16);
  --shadow-strong: 0 24px 70px rgba(8, 16, 31, 0.3);

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

  /* Layout */
  --layout-max-width: 1120px;
  --layout-gutter: var(--space-4);

  /* Z-index */
  --z-header: 40;
  --z-overlay: 50;
  --z-modal: 60;
}

@media (min-width: 768px) {
  :root {
    --layout-gutter: var(--space-6);
  }
}

/* ==========================================================================
   2. Reset / Normalize
   ========================================================================== */

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

html,
body {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
}

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

img {
  height: auto;
}

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

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

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

textarea {
  resize: vertical;
}

/* ==========================================================================
   3. Base Typography & Layout
   ========================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 60vh;
}

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

h1 {
  font-size: var(--font-size-3xl);
}

h2 {
  font-size: var(--font-size-2xl);
}

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

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

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

h6 {
  font-size: var(--font-size-sm);
}

@media (min-width: 768px) {
  h1 {
    font-size: var(--font-size-5xl);
  }
  h2 {
    font-size: var(--font-size-4xl);
  }
  h3 {
    font-size: var(--font-size-2xl);
  }
}

p {
  margin-top: 0;
  margin-bottom: var(--space-4);
  color: var(--color-text-soft);
}

strong {
  font-weight: 600;
}

small {
  font-size: 0.875em;
}

a {
  transition: color var(--transition-base),
    opacity var(--transition-base),
    text-decoration-color var(--transition-base);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

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

/* Accent link style for main navigation and CTAs */
.a-link {
  position: relative;
}

.a-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent-gold), var(--color-primary));
  border-radius: 999px;
  transition: width var(--transition-base);
}

.a-link:hover::after,
.a-link:focus-visible::after {
  width: 100%;
}

/* ==========================================================================
   4. Accessibility & Motion
   ========================================================================== */

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

:focus {
  outline: none;
}

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

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

/* ==========================================================================
   5. Utility Classes
   ========================================================================== */

/* Container */
.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--layout-gutter);
  max-width: calc(var(--layout-max-width) + (var(--layout-gutter) * 2));
}

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

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-16);
  }
}

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

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

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

.gap-sm {
  gap: var(--space-3);
}

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

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

/* Grid Utilities */
.grid {
  display: grid;
  gap: var(--space-6);
}

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

.grid-3 {
  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));
  }
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

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

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

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

/* Spacing utilities (margin-bottom) */
.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-10);
}

.mt-lg {
  margin-top: var(--space-6);
}

/* Background helpers */
.bg-light {
  background-color: var(--color-bg-alt);
}

.bg-navy {
  background: radial-gradient(circle at top, #18243a 0, #060b16 55%, #020308 100%);
  color: #ffffff;
}

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

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

/* ==========================================================================
   6. Components
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent-gold), var(--color-primary));
  color: #0b101b;
  box-shadow: 0 12px 30px rgba(8, 17, 31, 0.32);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 45px rgba(8, 17, 31, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 22px rgba(8, 17, 31, 0.4);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-navy);
  border-color: rgba(212, 166, 75, 0.6);
  box-shadow: 0 0 0 1px rgba(212, 166, 75, 0.25);
}

.btn-outline:hover {
  background: rgba(212, 166, 75, 0.04);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.5);
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.22);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.8);
}

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

.btn-icon {
  padding-inline: 0.9rem;
}

/* Inputs & Form Controls */
.form-control {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  background-color: rgba(255, 255, 255, 0.96);
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.4;
  transition: border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

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

.form-control:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary-soft), 0 10px 25px rgba(15, 23, 42, 0.08);
}

.form-control[aria-invalid="true"],
.form-control--error {
  border-color: var(--color-danger);
}

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

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

/* Cards */
.card {
  position: relative;
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(212, 166, 75, 0.12) 0, transparent 55%);
  opacity: 0.7;
  pointer-events: none;
}

.card--overlay-dark {
  background: linear-gradient(135deg, rgba(8, 16, 31, 0.98), rgba(9, 34, 41, 0.98));
  color: #ffffff;
}

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

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

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

.card-subtitle {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent-gold);
}

/* Hero-specific helpers (for large lifestyle imagery) */
.hero {
  position: relative;
  color: #ffffff;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(8, 16, 31, 0.88) 0%, rgba(8, 16, 31, 0.2) 55%, rgba(8, 16, 31, 0.7) 100%);
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(212, 166, 75, 0.7);
  color: #fefce8;
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero-title {
  font-size: var(--font-size-3xl);
  line-height: 1.1;
  margin-top: var(--space-4);
  margin-bottom: var(--space-3);
  color: #fff;
}

.hero-subtitle {
  max-width: 32rem;
  color: rgba(226, 232, 240, 0.9);
  margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .hero {
    min-height: 80vh;
  }
  .hero-title {
    font-size: 3.2rem;
  }
}

/* Simple badge variations for events / games */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-gold {
  background: rgba(212, 166, 75, 0.12);
  color: var(--color-accent-gold);
}

.badge-emerald {
  background: rgba(12, 124, 110, 0.12);
  color: var(--color-primary);
}

/* Navigation (basic shell; fine-tune in page-specific CSS) */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: 0.7rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  position: relative;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-700);
  padding-block: 0.35rem;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent-gold), var(--color-primary));
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  width: 100%;
}

.nav-link[aria-current="page"] {
  color: var(--color-navy);
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  background: radial-gradient(circle at top, rgba(12, 124, 110, 0.06) 0, #020617 70%);
  color: rgba(241, 245, 249, 0.9);
}

.site-footer a {
  color: inherit;
}

.site-footer a:hover {
  color: var(--color-accent-gold);
}

.footer-top {
  padding-block: var(--space-10);
}

.footer-bottom {
  padding-block: var(--space-4);
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  font-size: var(--font-size-xs);
  color: rgba(148, 163, 184, 0.85);
}

.footer-legal-note {
  max-width: 44rem;
}

/* ==========================================================================
   7. Media helpers (hero sliders, galleries)
   ========================================================================== */

.media-cover {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.media-cover img,
.media-cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

/* Carousel dot baseline (for hero sliders) */
.slider-dots {
  display: flex;
  gap: 0.4rem;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.6);
  transition: background-color var(--transition-base), width var(--transition-base);
}

.slider-dot--active {
  width: 18px;
  background: linear-gradient(90deg, var(--color-accent-gold), var(--color-primary));
}
