:root {
  --nav-height-full: 90px;
  --nav-height-shrink: 60px;
  --logo-height-full: 50px;
  --logo-height-shrink: 38px;
  --transition-speed: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

:root,
[data-bs-theme=light] {
  --bs-primary: #cea53d;
  --bs-primary-rgb: 206, 165, 61;
  --bs-link-color-rgb: 206, 165, 61;
  --bs-dark-rgb: 28, 28, 28;
  --bs-body-color: #1c1c1c;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height-shrink); 
}

/* --- FONTS --- */

@font-face {
    font-family: 'Korataki Regular';
    src: url('../fonts/korataki_regular-webfont.woff2') format('woff2'),
         url('../fonts/korataki_regular-webfont.woff') format('woff');
    font-weight: normal; font-style: normal;
}
@font-face {
    font-family: 'Korataki Book';
    src: url('../fonts/korataki_book-webfont.woff2') format('woff2'),
         url('../fonts/korataki_book-webfont.woff') format('woff');
    font-weight: normal; font-style: normal;
}
@font-face {
    font-family: 'Korataki Light';
    src: url('../fonts/korataki_light-webfont.woff2') format('woff2'),
         url('../fonts/korataki_light-webfont.woff') format('woff');
    font-weight: normal; font-style: normal;
}
@font-face {
    font-family: 'Korataki Bold';
    src: url('../fonts/korataki_bold-webfont.woff2') format('woff2'),
         url('../fonts/korataki_bold-webfont.woff') format('woff');
    font-weight: normal; font-style: normal;
}

.wf-loading h1, .wf-loading h2, .wf-loading h3, .wf-loading h4, .wf-loading #mainNav a, .wf-loading .btn {
	display: none;
}

/* --- PRELOADER --- */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000; /* Matches your header bg */
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s ease, visibility 0.6s;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader {
  text-align: center;
}

body {
	font-family: 'Cairo', sans-serif;
	font-weight: 300;
}

/* --- TYPOGRAPHY --- */

h1, h2, h3 {
    font-family: 'Korataki Regular', sans-serif;
	text-transform: uppercase;
	margin-bottom: 1rem;
}

h4, h5, h6 {
    font-family: 'Cairo', sans-serif;
	margin-bottom: 0.4rem;
	font-weight: 400;
}

p {
    line-height: 1.5;  
    margin-bottom: 1.5rem; 
}

@media (max-width: 575.98px) {
    .display-6 {
        font-size: 1.5rem; /* Fixed smaller size for consistency */
    }
}

/* --- NAVIGATION CORE --- */

#mainNav {
  height: var(--nav-height-full);
  transition: height var(--transition-speed), background-color var(--transition-speed);
  background-color: transparent;
  border-bottom: 1px solid #666;
  display: flex;
  align-items: center;
}

#mainNav.is-scrolled {
  height: var(--nav-height-shrink);
  background-color: rgba(21, 21, 21, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  border-bottom: none;
}

#mainNav .navbar-brand img {
  height: var(--logo-height-full);
  transition: height var(--transition-speed);
}

#mainNav.is-scrolled .navbar-brand img {
  height: var(--logo-height-shrink);
}

#mainNav .navbar-nav .nav-link {
    font-family: 'Korataki Light', sans-serif;
	text-transform: uppercase;
	font-size: 0.6rem;
	letter-spacing: 1px;
	line-height: 0.8rem;
    color: rgba(255, 255, 255, 1);
}

#mainNav .navbar-nav .nav-link.active {
    color: var(--bs-primary);
}

/* --- MOBILE MENU  --- */

@media (max-width: 991.98px) {
    .navbar-toggler {
        border: none !important;
        box-shadow: none !important;
    }

    .navbar-toggler-icon {
        filter: invert(1) brightness(200%);
    }

    #navbarResponsive {
        background-color: #151515 !important;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%; 
        width: 100vw;
        padding: 2rem 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        max-height: 90vh;
        overflow-y: auto;
    }

    #navbarResponsive .navbar-nav .nav-link {
        font-size: 0.9rem;
        padding-top: 1.2rem;
        padding-bottom: 1.2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        width: 100%;
        text-align: center;
    }
	
	#mainNav .navbar-brand img {
		height: var(--logo-height-shrink);
}
}


/* --- BUTTONS --- */

.btn {
    font-family: 'Korataki Light', sans-serif;
	text-transform: uppercase;
	border-radius: 0 !important;
}

.btn-primary {
  --bs-btn-bg: #cea53d;
  --bs-btn-border-color: #cea53d;
  --bs-btn-hover-bg: #b38d30;
  --bs-btn-hover-border-color: #a6822d;
  --bs-btn-active-bg: #a6822d;
  --bs-btn-active-border-color: #a6822d;
  --bs-btn-disabled-bg: #cea53d;
  --bs-btn-disabled-border-color: #cea53d;
  
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
}

header {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: #000; 
}

header video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
}

.header-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5; 
  width: 100%;
  text-align: center;
}

header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.15) 40%, rgba(0,0,0,0.75) 100%);
  z-index: 2; 
}

/* --- SECTIONS --- */


/* --- Philosophy --- */

#philosophy {	
    padding-top: 12rem;
    padding-bottom: 12rem;
	background-image: url(../images/tracks.jpg);
	background-color: rgba(28,28,28,0.95);
	background-blend-mode: overlay;
	background-attachment: fixed;
    background-size: cover;
	
}


/* --- Operations --- */

#about {	
	padding-top: 10rem;
    padding-bottom: 10rem;
	background-size: cover;	
	background-position: center center;
	background-image: url(../images/map.jpg);
}

.featured h2 {
	font-family: 'Korataki Regular', sans-serif;
}


/* --- Manufacturing --- */

.feature-card {
    position: relative;
    padding-top: 40px;
}

.feature-bg-number {
    font-family: 'Korataki Bold', sans-serif;
    font-size: 8rem;
    color: #ccc;
    opacity: 0.15;
    position: absolute;
    top: -20px;
    left: -10px;
    line-height: 1;
    z-index: 1;
    user-select: none;
}

.feature-content {
    position: relative;
    z-index: 2;
    padding-left: 10px;
}

.hot-iron-glow {
    animation: glow-pulse 3s infinite ease-in-out;
}

@keyframes glow-pulse {
    0% { filter: brightness(1) drop-shadow(0 5px 15px rgba(255, 120, 0, 0.3)); }
    50% { filter: brightness(1.2) drop-shadow(0 30px 40px rgba(255, 195, 69, 0.7)); }
    100% { filter: brightness(1) drop-shadow(0 5px 15px rgba(255, 120, 0, 0.3)); }
}


/* --- Engineering --- */

#engineering {	
	padding-top: 3rem;
    padding-bottom: 3rem;
}

.engineering-visual-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible; 
}

.blueprint-ghost {
    position: absolute;
	top: -3%;
    z-index: 1;
    width: 100%; 
    height: auto;
    pointer-events: none;
    animation: 
        float-drift 12s infinite ease-in-out,
        blueprint-breathe 8s infinite ease-in-out;
}

.product-physical {
    position: relative;
	top: 2%;
    z-index: 2;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 50px rgba(0,0,0,0.15));
}

@keyframes float-drift {
    0%, 100% { transform: translate(-1%, -1%); }
    50% { transform: translate(1%, 1%); }
}

@keyframes blueprint-breathe {
    0%, 100% { scale: 1; opacity: 1; }
    50% { scale: 0.92; opacity: 0.5; }
}

@media (max-width: 991.98px) {
    #engineering {	
    padding-bottom: 0;
}
}


/* --- System Control --- */

#systemcontrol {
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.systemcontrol-text {
    padding: 6rem 0 6rem 4rem;
}

.systemcontrol-feature {
    margin-bottom: 1.8rem;
    padding-bottom: 1.8rem;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
}

.systemcontrol-feature:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.systemcontrol-img-col {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    min-height: 100%;
}

.systemcontrol-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: bottom center;
}

@media (max-width: 991.98px) {
    .systemcontrol-text {
        padding: 4rem 1rem 2rem 1rem;
    }
    .systemcontrol-img-col {
        padding: 0 2rem;
    }
}


/* --- Products --- */

#products {
	background-image: url(../images/brush.jpg);
	background-size: cover;
	background-attachment: fixed;
}

.product-item {
    transition: all 0.4s ease-in-out;
    padding: 1rem;
}

.product-image-box {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
	border-bottom: 1px solid #1c1c1c;
    transition: all 0.4s ease;
    padding: 30px;
}

.product-image-box img {
    max-height: 100%;
    width: auto;
    filter: grayscale(1) contrast(1.1); 
    transition: all 0.4s ease;
}

/* Hover States */
.product-item:hover .product-image-box {
    transform: translateY(-5px);
}

.product-item:hover img {
    filter: grayscale(0) contrast(1);
    transform: scale(1.05);
}

.product-item h5 {
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: #1c1c1c;
    transition: color 0.4s ease;
    margin-top: 1.5rem;
}

.product-item:hover h5 {
    color: #cea53d; 
}


/* --- Certificates --- */

#certificates {	
	padding-top: 3rem;
    padding-bottom: 3rem;
}

.cert-card-new {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    border: 0.5px solid rgba(206, 165, 61, 0.2);
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--bs-primary);
    transition: background 0.3s ease, transform 0.3s ease;
    position: relative;
    width: 100%;
}

.cert-card-new:hover {
    background: rgba(206, 165, 61, 0.05);
    transform: translateY(-4px);
}

.cert-card-logo {
    flex-shrink: 0;
    width: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-logo-new {
    max-height: 100px;
    width: auto;
    filter: grayscale(1) brightness(2);
    opacity: 0.7;
    transition: all 0.4s ease;
}

.cert-card-new:hover .cert-logo-new {
    filter: grayscale(0) brightness(1) drop-shadow(0 0 12px rgba(206, 165, 61, 0.5));
    opacity: 1;
}

.cert-card-body {
    flex: 1;
}

.cert-active-badge {
    font-family: 'Korataki Light', sans-serif;
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--bs-primary);
    border: 0.5px solid rgba(206, 165, 61, 0.4);
    padding: 4px 10px;
    flex-shrink: 0;
}


/* --- Contact --- */

.contact-box {
    padding: 2rem;
    transition: all 0.3s ease;
}

.contact-box a {
    display: block;
    transition: color 0.3s ease;
}

.contact-box a:hover {
    color: #cea53d !important; 
}


footer {
    background-color:  var(--bs-primary);
}
