/**
 * Centralized Font Definitions for Liberis Olivenöl
 * This file contains all font-face declarations and font-related variables
 */

/* Font Face Definitions - Fixed paths to match your file structure */
@font-face {
  font-family: "Voltaire";
  src:
    url("../fonts/Voltaire-Regular.woff2") format("woff2"),
    url("../fonts/Voltaire-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hind";
  src:
    url("../fonts/Hind-Light.woff2") format("woff2"),
    url("../fonts/Hind-Light.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hind";
  src:
    url("../fonts/Hind-Regular.woff2") format("woff2"),
    url("../fonts/Hind-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hind";
  src:
    url("../fonts/Hind-Medium.woff2") format("woff2"),
    url("../fonts/Hind-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hind";
  src:
    url("../fonts/Hind-SemiBold.woff2") format("woff2"),
    url("../fonts/Hind-SemiBold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hind";
  src:
    url("../fonts/Hind-Bold.woff2") format("woff2"),
    url("../fonts/Hind-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Font Assignments for Key Elements */
:root {
  /* Font families with better fallbacks */
  --font-primary:
    "Hind", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-headings:
    "Voltaire", "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode",
    "Lucida Sans", Tahoma, sans-serif;
  --font-nav:
    "Voltaire", "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode",
    "Lucida Sans", Tahoma, sans-serif;

  /* Font weights */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
}

/* Global Font Settings with better fallbacks */
body {
  font-family: var(--font-primary);
  font-weight: var(--weight-regular);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headings);
  font-weight: var(--weight-regular);
}

/* Navigation Specific - Enhanced with better fallbacks */
.site-header,
.main-navigation,
.main-navigation ul,
.main-navigation li,
.main-navigation a,
.site-header nav,
.menu-item,
.nav-menu,
#site-navigation {
  font-family: var(--font-nav) !important;
  font-weight: var(--weight-regular);
}

/* Force font loading for critical elements - helps with Safari/Firefox issues */
.fonts-loading .main-navigation,
.fonts-loading h1,
.fonts-loading h2,
.fonts-loading h3 {
  visibility: hidden;
}

.fonts-loaded .main-navigation,
.fonts-loaded h1,
.fonts-loaded h2,
.fonts-loaded h3 {
  visibility: visible;
}
