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

/* Remove default margin and padding */
* {
  margin: 0;
  padding: 0;
}

/* Remove list styles on ul, ol elements with a list role */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  background-color: #000000;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #000000;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Remove default button styles */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Remove default fieldset styles */
fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

/* Remove default legend styles */
legend {
  padding: 0;
}

/* Remove default table spacing */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Remove default form element styles */
input,
textarea {
  border: none;
  outline: none;
}

/* Remove default select arrow in IE */
select::-ms-expand {
  display: none;
}

/* Remove default details marker */
details > summary {
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

/* Ensure consistent font rendering */
body,
button,
input,
select,
textarea {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Remove default focus outline and add custom one */
:focus {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

/* Ensure proper display for hidden elements */
[hidden] {
  display: none !important;
}

/* Remove default text decoration on links */
a {
  text-decoration: none;
  color: inherit;
}

/* Ensure proper vertical alignment for inline elements */
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  vertical-align: middle;
}

/* Remove default border on iframes */
iframe {
  border: 0;
}

/* Ensure proper display for pre and code elements */
pre,
code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* Remove default margin on paragraphs */
p {
  margin: 0;
}

/* Remove default margin on headings */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: inherit;
  font-size: inherit;
}

/* Remove default list styles */
ul, ol {
  list-style: none;
}

/* Remove default blockquote styles */
blockquote {
  margin: 0;
  padding: 0;
}

/* Remove default hr styles */
hr {
  border: none;
  height: 1px;
  background-color: currentColor;
  opacity: 0.2;
}

/* Ensure proper display for small elements */
small {
  font-size: inherit;
}

/* Remove default sub and sup styles */
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/* ===== HERO SECTION STYLES ===== */

.hero-section {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* Parallax effect */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Responsive background sizing to prevent cutoff */
@media (max-width: 1200px) {
  .hero-section {
    background-size: contain;
    background-position: center;
    background-attachment: scroll; /* Better performance on smaller screens */
  }
}

/* For very small screens, ensure image fits */
@media (max-width: 480px) {
  .hero-section {
    background-size: contain;
    background-position: center;
    min-height: 100vh;
  }
}

/* For landscape mobile, use cover to fill width */
@media (max-width: 768px) and (orientation: landscape) {
  .hero-section {
    background-size: cover;
    background-position: center;
  }
}

/* For larger screens, use cover but ensure proper positioning */
@media (min-width: 1201px) {
  .hero-section {
    background-size: cover;
    background-position: center;
  }
}

/* For ultra-wide screens, ensure image covers properly */
@media (min-width: 1920px) {
  .hero-section {
    background-size: cover;
    background-position: center;
  }
}

/* ===== RESPONSIVE BACKGROUND IMAGES ===== */

/* Mobile default (768px and below) */
.hero-section {
  background-image: url('/brb/static/assets/img/hero-mobile.png');
}

/* Tablet (768px - 1200px) */
@media (min-width: 768px) {
  .hero-section {
    background-image: url('/brb/static/assets/img/hero-tablet.png');
  }
}

/* Desktop (1200px and above) */
@media (min-width: 1200px) {
  .hero-section {
    background-image: url('/brb/static/assets/img/hero-desktop.png');
  }
}

/* High-DPI displays (2x) */
@media (min-width: 1200px) and (-webkit-min-device-pixel-ratio: 2),
       (min-width: 1200px) and (min-resolution: 192dpi) {
  .hero-section {
    background-image: url('/brb/static/assets/img/hero-desktop@2x.png');
  }
}

/* ===== WEBP SUPPORT WITH FALLBACKS ===== */

/* WebP support for mobile */
@supports (background-image: url('/brb/static/assets/img/hero-mobile.webp')) {
  .hero-section {
    background-image: url('/brb/static/assets/img/hero-mobile.webp');
  }
}

/* WebP support for tablet */
@supports (background-image: url('/brb/static/assets/img/hero-tablet.webp')) {
  @media (min-width: 768px) {
    .hero-section {
      background-image: url('/brb/static/assets/img/hero-tablet.webp');
    }
  }
}

/* WebP support for desktop */
@supports (background-image: url('/brb/static/assets/img/hero-desktop.webp')) {
  @media (min-width: 1200px) {
    .hero-section {
      background-image: url('/brb/static/assets/img/hero-desktop.webp');
    }
  }
}

/* WebP support for high-DPI desktop */
@supports (background-image: url('/brb/static/assets/img/hero-desktop@2x.webp')) {
  @media (min-width: 1200px) and (-webkit-min-device-pixel-ratio: 2),
         (min-width: 1200px) and (min-resolution: 192dpi) {
    .hero-section {
      background-image: url('/brb/static/assets/img/hero-desktop@2x.webp');
    }
  }
}

/* ===== MOBILE PERFORMANCE OPTIMIZATIONS ===== */

/* Disable parallax on mobile for better performance */
@media (max-width: 768px) {
  .hero-section {
    background-attachment: scroll;
  }
}

/* ===== ACCESSIBILITY ===== */

/* Ensure sufficient contrast for any potential content */
.hero-section {
  color: #ffffff;
}

/* ===== LOADING STATES ===== */

/* Optional: Add a subtle loading animation */
.hero-section {
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

/* ===== PRINT STYLES ===== */

@media print {
  .hero-section {
    background-image: none !important;
    background-color: #f0f0f0;
    min-height: auto;
    page-break-inside: avoid;
  }
}