/* ── SELF-HOSTED FONTS ── */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-400.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-500.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/inter-700.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/inter-700.ttf') format('truetype'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/outfit-300.ttf') format('truetype'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/outfit-400.ttf') format('truetype'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/outfit-500.ttf') format('truetype'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/outfit-700.ttf') format('truetype'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/outfit-800.ttf') format('truetype'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/playfair-400.ttf') format('truetype'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/playfair-600.ttf') format('truetype'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/playfair-700.ttf') format('truetype'); }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/playfair-400i.ttf') format('truetype'); }

:root {
  --font-main: 'Outfit', sans-serif;
  --font-secondary: 'Outfit', sans-serif;
  --color-nav-bg: #ffffff;
  --color-nav-text: #1a2a40;
  --color-primary-blue: #0b2247;
  --color-primary-red: #d93838;
  --color-white: #ffffff;
  --color-text: #333333;
  --transition-standard: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  color: var(--color-text);
  line-height: 1.6;
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  padding-top: 90px;
}

a { text-decoration: none; color: inherit; transition: var(--transition-standard); }

/* ── PRELOADER & PAGE TRANSITIONS ── */
#preloader {
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
  background: var(--color-primary-blue); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  transform: translateY(0); /* Default state is covering the screen */
}
#preloader.slide-up { transform: translateY(-100%); }
#preloader.slide-down { transform: translateY(0); transition: transform 0.3s ease-in-out; }

/* Instantly hide the logo when transition starts */
#preloader.hide-logo .loader-logo { display: none !important; }

.loader-logo { 
  opacity: 0; 
  transform: scale(3); /* Start massive (zoomed in) */
  animation: logoZoom 0.6s cubic-bezier(0.175, 0.885, 0.32, 1) forwards;
  animation-delay: 0.1s;
}
@keyframes logoZoom {
  100% { opacity: 1; transform: scale(1.4); } /* Zoom out to normal size */
}

/* ── FLUID BACKGROUND WAVES ── */
.wave-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; opacity: 0.15;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%2300539C' fill-opacity='1' d='M0%2C128L48%2C149.3C96%2C171%2C192%2C213%2C288%2C213.3C384%2C213%2C480%2C171%2C576%2C144C672%2C117%2C768%2C107%2C864%2C122.7C960%2C139%2C1056%2C181%2C1152%2C181.3C1248%2C181%2C1344%2C139%2C1392%2C117.3L1440%2C96L1440%2C320L1392%2C320C1344%2C320%2C1248%2C320%2C1152%2C320C1056%2C320%2C960%2C320%2C864%2C320C768%2C320%2C672%2C320%2C576%2C320C480%2C320%2C384%2C320%2C288%2C320C192%2C320%2C96%2C320%2C48%2C320L0%2C320Z'%3E%3C%2Fpath%3E%3C%2Fsvg%3E");
  background-size: cover; background-position: center bottom;
  background-repeat: no-repeat;
}
section { padding: 100px 8%; position: relative; overflow: hidden; }
.section-content { position: relative; z-index: 2; }

/* ── NAVBAR ── */
nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  background: var(--color-nav-bg);
  height: 90px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-left { display: flex; align-items: center; gap: 60px; }

.logo-alcos { display: flex; align-items: stretch; height: 38px; }
.logo-box-blue {
  background: #00539C; color: #fff;
  font-weight: 800; font-size: 24px; padding: 0 14px;
  display: flex; align-items: center; letter-spacing: 1px;
}
.logo-text-blue {
  color: #00539C; font-weight: 800; font-size: 24px;
  padding: 0 10px 0 12px; display: flex; align-items: center;
  letter-spacing: 1px; position: relative;
}
.logo-underline {
  position: absolute; bottom: 0; left: 0; width: 100%; height: 2px;
  background: #00539C;
}

.nav-links { list-style: none; display: flex; gap: 30px; margin: 0; }
.nav-links li a {
  color: var(--color-nav-text);
  font-size: 14px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
}
.nav-links li a:hover { color: var(--color-primary-red); }

.nav-right { display: flex; align-items: center; gap: 15px; }

.btn-solid-blue, .btn-outline-blue {
  padding: 12px 24px; font-size: 13px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; border-radius: 2px; display: inline-block;
  border: 2px solid transparent; transition: var(--transition-standard);
}
.btn-solid-blue { background: #00539C; color: var(--color-white); }
.btn-solid-blue:hover { background: #003d73; color: var(--color-white); }
.btn-outline-blue { background: var(--color-white); color: #00539C; border-color: #00539C; }
.btn-outline-blue:hover { background: #00539C; color: var(--color-white); }

.lang-switcher { position: relative; }
.lang-current {
  display: flex; align-items: center; gap: 7px;
  background: none; border: 2px solid #00539C; color: #00539C;
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
  padding: 8px 13px; cursor: pointer; border-radius: 2px;
  transition: var(--transition-standard); font-family: var(--font-main);
  white-space: nowrap;
}
.lang-current:hover, .lang-switcher.open .lang-current { background: #00539C; color: var(--color-white); }
.lang-flag { width: 20px; height: 15px; object-fit: cover; border-radius: 2px; display: inline-block; vertical-align: middle; }
.lang-arrow { font-size: 9px; transition: transform 0.25s ease; opacity: 0.7; }
.lang-switcher.open .lang-arrow { transform: rotate(180deg); }
.lang-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: #fff; border: 1px solid rgba(0,0,0,0.1);
  border-radius: 6px; box-shadow: 0 12px 32px rgba(0,0,0,0.13);
  overflow: hidden; opacity: 0; visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  min-width: 130px; z-index: 200;
}
.lang-switcher.open .lang-dropdown { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.lang-option {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 11px 16px;
  background: none; border: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: #333;
  transition: background 0.15s ease; font-family: var(--font-main);
  letter-spacing: 0.3px;
}
.lang-option:hover { background: #f4f7fb; color: #00539C; }
.lang-option.active { color: #00539C; background: #eef3fb; }
.lang-option .lang-flag { font-size: 18px; }
.mobile-lang-row { display: flex; gap: 8px; padding: 8px 0; }
.mobile-lang-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; background: none; border: 2px solid #ddd;
  border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 700;
  color: #333; font-family: var(--font-main); transition: var(--transition-standard);
}
.mobile-lang-btn:hover, .mobile-lang-btn.active { border-color: #00539C; color: #00539C; background: #eef3fb; }

/* ── HERO ── */
#home {
  height: calc(100vh - 90px);
  position: relative; background: #000;
  display: flex; align-items: center; justify-content: flex-start;
  padding: 0 8%;
}

.hero-video {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}

.hero-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to right, rgba(11,34,71,0.8) 0%, rgba(11,34,71,0.3) 60%);
  z-index: 1;
}

.hero-content {
  position: relative; z-index: 2; max-width: 650px; color: var(--color-white);
}
.hero-content h1 {
  font-family: var(--font-secondary);
  font-size: 64px; line-height: 1.1; margin-bottom: 24px; font-weight: 600; letter-spacing: -0.5px;
}
.hero-content p {
  font-size: 20px; font-weight: 300; opacity: 0.95; line-height: 1.7;
}

/* ── TEXT REVEAL ANIMATIONS ── */
.reveal-text, .reveal-subtext {
  text-transform: uppercase;
}
.reveal-line {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.line-inner {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
}

body.loaded .line-inner {
  animation: slideUpReveal 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

h1 .reveal-line:nth-child(1) .line-inner { animation-delay: 0.2s; }
h1 .reveal-line:nth-child(3) .line-inner { animation-delay: 0.3s; }
p .reveal-line:nth-child(1) .line-inner { animation-delay: 0.4s; }
p .reveal-line:nth-child(3) .line-inner { animation-delay: 0.5s; }
p .reveal-line:nth-child(5) .line-inner { animation-delay: 0.6s; }

@keyframes slideUpReveal {
  0% { transform: translateY(100%); opacity: 0; }
  100% { transform: translateY(0%); opacity: 1; }
}

/* ── SECTIONS ── */
.section-header { margin-bottom: 50px; }
h2 { font-family: var(--font-secondary); font-size: 42px; font-weight: 600; color: var(--color-primary-blue); margin-bottom: 20px; }

/* ── ABOUT / STATS ── */
#about { background: var(--color-white); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text p { font-size: 16px; margin-bottom: 20px; color: #444; }

/* ── PARALLAX HERITAGE ── */
.parallax-bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background-image: url('../images/wheat-bg.png'); /* Default fallback */
  background-attachment: fixed; /* This native CSS rule creates the scroll effect! */
  background-position: center; background-repeat: no-repeat; background-size: cover;
  z-index: 1; filter: brightness(0.4);
}
.heritage-content {
  position: relative; z-index: 2; color: var(--color-white);
  padding: 140px 8%; max-width: 900px;
}
.heritage-content p {
  font-size: 21px; margin-bottom: 35px; line-height: 1.8; opacity: 0.9; letter-spacing: 0.2px;
}

/* ── SERVICES ── */
#services { background: #f4f6f8; }
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px;
}
.service-card {
  background: var(--color-white); padding: 40px;
  border-top: 4px solid var(--color-primary-blue); box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.service-card h3 { font-size: 20px; margin-bottom: 15px; color: var(--color-primary-blue); font-weight: 700; }
.service-card p { font-size: 15px; color: #555; }

/* ── NEWS & INSIGHTS ── */
#news { background: #f9fafb; }
.news-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px;
}
.news-card {
  background: var(--color-white); border: 1px solid #eaeaea; 
  transition: var(--transition-standard); position: relative;
  display: flex; flex-direction: column; overflow: hidden;
}
.news-card img { width: 100%; height: 200px; object-fit: cover; }
.news-card-content { padding: 30px 40px; flex-grow: 1; display: flex; flex-direction: column; }
.news-card:hover { border-color: var(--color-primary-blue); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.04); }
.news-category { font-size: 11px; font-weight: 700; color: var(--color-primary-red); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; display: inline-block; }
.news-card h3 { font-family: var(--font-secondary); font-size: 26px; color: var(--color-primary-blue); font-weight: 600; margin-bottom: 15px; line-height: 1.3; }
.news-card p { font-size: 15px; color: #555; line-height: 1.6; margin-bottom: 25px; flex-grow: 1; }
.news-meta { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #eee; padding-top: 20px; font-size: 13px; color: #888; font-weight: 500; margin-top: auto;}

/* ── ARTICLE PAGE ── */
.article-header { padding: 80px 8% 40px; background: var(--color-white); text-align: center; }
.article-header h1 { font-size: 42px; color: var(--color-primary-blue); margin-bottom: 20px; max-width: 900px; margin-left: auto; margin-right: auto;}
.article-header .news-meta { justify-content: center; gap: 20px; border: none; padding-top: 0;}
.article-hero-image { width: 100%; max-height: 500px; object-fit: cover; }
.article-body { max-width: 800px; margin: 0 auto; padding: 60px 20px; font-size: 18px; line-height: 1.8; color: #444; }
.article-body p { margin-bottom: 24px; }
.article-body h2 { font-size: 28px; margin-top: 40px; margin-bottom: 15px; }

/* ── CONTACT ── */
#contact { background: var(--color-white); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.contact-form input, .contact-form textarea {
  width: 100%; border: 1px solid #ccc; padding: 14px; margin-bottom: 20px; font-size: 15px; font-family: var(--font-main);
}
.contact-form textarea { height: 120px; resize: none; }
.contact-form button {
  background: var(--color-primary-red); color: var(--color-white);
  border: none; padding: 14px 30px; font-size: 14px; font-weight: 700; cursor: pointer;
}

/* ── FOOTER ── */
footer {
  background: var(--color-primary-blue); color: #fff; padding: 60px 8%;
  display: flex; justify-content: space-between; align-items: center; font-size: 14px;
}
footer a { color: #aaa; margin-left: 20px; }

/* ── HAMBURGER & MOBILE MENU ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1100;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--color-primary-blue);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--color-primary-blue);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}
.mobile-menu ul {
  list-style: none;
  text-align: center;
  padding: 0;
  margin: 0;
}
.mobile-menu ul li { margin-bottom: 36px; }
.mobile-menu ul li:last-child { margin-bottom: 0; }
.mobile-menu ul li a {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}
.mobile-menu ul li a:hover { opacity: 0.5; }
.mobile-menu .mobile-linkedin {
  font-size: 16px !important;
  letter-spacing: 2px !important;
  opacity: 0.55 !important;
  margin-top: 10px;
  display: inline-block;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-right .btn-solid-blue,
  .nav-right .btn-outline-blue { display: none; }
  .nav-right a[target="_blank"] { display: none; }
  .nav-hamburger { display: flex; }
  nav { padding: 0 20px; }
  .hero-content h1 { font-size: 48px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  body { padding-top: 70px; }
  nav { height: 70px; padding: 0 16px; }
  .logo-box-blue { font-size: 20px; padding: 0 10px; }
  .logo-text-blue { font-size: 20px; padding: 0 8px 0 10px; }
  .logo-alcos { height: 32px; }

  section { padding: 60px 5%; }
  h2 { font-size: 30px; }

  #home { padding: 0 6%; }
  .hero-content h1 { font-size: 34px; line-height: 1.2; }
  .hero-content p { font-size: 15px; }

  /* About/Stats — override inline styles */
  #about { flex-direction: column !important; }
  #about > div:first-child {
    flex: none !important;
    width: 100% !important;
    min-height: 240px !important;
  }
  #about > div:nth-child(2) {
    flex: none !important;
    width: 100% !important;
    padding: 50px 6% !important;
  }
  #about .section-content > div {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
  }

  /* Heritage — disable fixed parallax (broken on iOS), show only first 2 paragraphs */
  #heritage { min-height: auto !important; }
  .parallax-bg { background-attachment: scroll; background-position: center center; filter: brightness(0.5) !important; }
  .heritage-content { padding: 50px 6%; max-width: 100%; }
  .heritage-content h2 { font-size: 30px !important; margin-bottom: 20px !important; line-height: 1.2 !important; }
  .heritage-content p { font-size: 15px !important; line-height: 1.65 !important; margin-bottom: 18px !important; }
  .heritage-content p:nth-of-type(n+3) { display: none; }

  .services-grid { gap: 20px; }
  .service-card { padding: 28px; }

  .news-grid { gap: 24px; }

  .article-header { padding: 50px 6% 30px; }
  .article-header h1 { font-size: 28px; }
  .article-body { font-size: 16px; padding: 40px 6%; }

  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  footer {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    padding: 40px 6%;
  }
  footer a { margin-left: 10px; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 26px; }
  .hero-content p { font-size: 14px; }
  .news-grid { grid-template-columns: 1fr; }
  #about .section-content > div { grid-template-columns: 1fr !important; }
  .heritage-content h2 { font-size: 26px !important; }
  .heritage-content p { font-size: 14px !important; }
  .article-header h1 { font-size: 24px; }
}
