/* ==========================================================================
   meOpera.com Design System
   Base reset, typography, CSS variables, and utility classes
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Montserrat:wght@300;400;500;600&display=swap');

/* --------------------------------------------------------------------------
   CSS Custom Properties (Brand Tokens)
   -------------------------------------------------------------------------- */

:root {
  /* Colors */
  --color-red: #cc1300;
  --color-red-dark: #a00f00;
  --color-red-light: #e63520;
  --color-blue: #407ec9;
  --color-blue-dark: #2a5a9f;
  --color-blue-deeper: #1a3d7a;
  --color-blue-pale: #d4e5f7;
  --color-white: #ffffff;
  --color-off-white: #f6f8fc;
  --color-light-grey: #e4e8f0;
  --color-mid-grey: #6b7280;
  --color-dark: #0d1117;
  --color-footer: #1a1a2e;

  /* Elite / Frusoni Signature Theme */
  --elite-bg: #0a1628;
  --elite-red: #e01500;

  /* Typography */
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Libre Baskerville', serif;
  --font-ui: 'Montserrat', sans-serif;

  /* Layout */
  --max-width: 1280px;
  --nav-height: 72px;

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 32px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.3);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* --------------------------------------------------------------------------
   Modern CSS Reset
   -------------------------------------------------------------------------- */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  hanging-punctuation: first last;
}

body {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1vw + 0.5rem, 1.05rem);
  line-height: 1.7;
  color: var(--color-dark);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Base Typography
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--color-dark);
}

h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 5rem);
  font-weight: 300;
}

h2 {
  font-size: clamp(1.8rem, 3vw + 0.8rem, 3.2rem);
}

h3 {
  font-size: clamp(1.4rem, 2vw + 0.6rem, 2.2rem);
}

h4 {
  font-size: clamp(1.1rem, 1.5vw + 0.4rem, 1.5rem);
}

h5 {
  font-size: clamp(1rem, 1.2vw + 0.3rem, 1.25rem);
}

h6 {
  font-size: 1rem;
  font-family: var(--font-ui);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

p {
  font-family: var(--font-body);
  line-height: 1.75;
  margin-bottom: 1em;
  max-width: 70ch;
}

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

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

a:hover {
  color: var(--color-blue-dark);
}

a:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

strong,
b {
  font-weight: 700;
}

em,
i {
  font-style: italic;
}

ul,
ol {
  list-style: none;
}

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

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

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

blockquote {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.15em;
  line-height: 1.7;
  border-left: 3px solid var(--color-red);
  padding-left: var(--space-lg);
  margin: var(--space-xl) 0;
  color: var(--color-mid-grey);
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* UI elements — labels, captions, nav links, buttons */
label,
caption,
figcaption,
small {
  font-family: var(--font-ui);
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */

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

.container-narrow {
  width: 100%;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

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

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

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

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

.not-sr-only {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Display */
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }

/* Flex utilities */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.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; }
.justify-end { justify-content: flex-end; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Spacing */
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.pt-0 { padding-top: 0; }
.pt-sm { padding-top: var(--space-sm); }
.pt-md { padding-top: var(--space-md); }
.pt-lg { padding-top: var(--space-lg); }
.pt-xl { padding-top: var(--space-xl); }
.pb-0 { padding-bottom: 0; }
.pb-sm { padding-bottom: var(--space-sm); }
.pb-md { padding-bottom: var(--space-md); }
.pb-lg { padding-bottom: var(--space-lg); }
.pb-xl { padding-bottom: var(--space-xl); }

/* Color utilities */
.text-red { color: var(--color-red); }
.text-blue { color: var(--color-blue); }
.text-white { color: var(--color-white); }
.text-dark { color: var(--color-dark); }
.text-grey { color: var(--color-mid-grey); }

.bg-red { background-color: var(--color-red); }
.bg-blue { background-color: var(--color-blue); }
.bg-blue-dark { background-color: var(--color-blue-dark); }
.bg-white { background-color: var(--color-white); }
.bg-off-white { background-color: var(--color-off-white); }
.bg-dark { background-color: var(--color-dark); }

/* Width utilities */
.w-full { width: 100%; }
.w-auto { width: auto; }
.max-w-full { max-width: 100%; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Z-index */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }
.z-100 { z-index: 100; }

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   Mobile: 640px | Tablet: 768px | Desktop: 1024px
   -------------------------------------------------------------------------- */

/* Mobile-only */
@media (max-width: 639px) {
  .hide-mobile { display: none !important; }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Tablet and up */
@media (min-width: 640px) {
  .show-mobile-only { display: none !important; }
}

/* Tablet range */
@media (min-width: 640px) and (max-width: 1023px) {
  .hide-tablet { display: none !important; }
}

/* Desktop and up */
@media (min-width: 1024px) {
  .hide-desktop { display: none !important; }
  .show-mobile { display: none !important; }
}

/* Below desktop */
@media (max-width: 1023px) {
  .show-desktop-only { display: none !important; }
}

/* --------------------------------------------------------------------------
   Focus and Accessibility
   -------------------------------------------------------------------------- */

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

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

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  .navbar,
  .sticky-cta-mobile,
  .mobile-overlay {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  a::after {
    content: ' (' attr(href) ')';
    font-size: 0.75em;
    color: var(--color-mid-grey);
  }
}
