/* ============================================================================
 * EcoTech Styria — site stylesheet (PHP port).
 * Tailwind utility classes are provided via Play CDN in _layout_head.php.
 * This file owns: Rouben @font-face, brand tokens, glass-card, btn-primary/
 * btn-secondary, section-container/section-inner, animate-neon-flow(-reverse),
 * fade-in-up, mobile-overflow-guard for German compound words, scrollbar +
 * selection. Mirrors Ecotech_Website/src/index.css (verified 2026-04-28).
 * ========================================================================= */

/* --- Rouben font (TrueType via /assets/fonts/) --- */
@font-face {
  font-family: 'Rouben';
  src: url('/assets/fonts/Rouben-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Rouben';
  src: url('/assets/fonts/Rouben-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Rouben';
  src: url('/assets/fonts/Rouben-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
/* Rouben-Light intentionally omitted (CSP blocks external font CDNs).
   Browser will fall back to Regular for font-weight: 300. */

:root {
  --ecotech-green: #62a731;
  --ecotech-green-dark: #4d8226;
  --ecotech-grey: #3d4543;
  --ecotech-grey-light: #D9D9D6;
  --ecotech-grey-lighter: #E8E8E8;
  --ecotech-white: #FFFFFF;
  --ecotech-black: #000000;
  --shadow-glass: 0 8px 32px 0 rgba(61,69,67,0.15);
  --shadow-glass-lg: 0 16px 48px 0 rgba(61,69,67,0.2);
}

/* --- Mobile overflow guard for DACH compound words (Filterschneckenpresse,
 *     Förderschnecken, Anlageneffizienz). Pflicht laut CLAUDE.md. --- */
html, body { overflow-x: hidden; max-width: 100%; }
html { scroll-behavior: smooth; }
body {
  background: #ffffff;
  color: var(--ecotech-grey);
  font-family: 'Rouben', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video, iframe { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6, p, span, li, a {
  overflow-wrap: anywhere;
  word-wrap: break-word;
}
html[lang="de"] h1, html[lang="de"] h2, html[lang="de"] h3 { hyphens: auto; -webkit-hyphens: auto; }
h1, h2, h3 { font-weight: 700; }
h4, h5, h6 { font-weight: 500; }

/* --- Section container (matches Tailwind sm:px-6 lg:px-8 xl:px-12 2xl:px-16) --- */
.section-container { width: 100%; padding-left: 1rem; padding-right: 1rem; }
@media (min-width: 640px)  { .section-container { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .section-container { padding-left: 2rem;   padding-right: 2rem; } }
@media (min-width: 1280px) { .section-container { padding-left: 3rem;   padding-right: 3rem; } }
@media (min-width: 1536px) { .section-container { padding-left: 4rem;   padding-right: 4rem; } }
.section-inner { max-width: 80rem; margin-left: auto; margin-right: auto; }

/* --- Glass card --- */
.glass-card {
  background: #ffffff;
  border: 1px solid rgba(217, 217, 214, 0.5);
  border-radius: 0.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,0.06);
}
.glass-card-dark {
  background: #2a2f2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,0.2);
}
.card-hover { transition: transform .5s ease, box-shadow .5s ease; }
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(61,69,67,0.1);
}

/* --- Buttons --- */
.btn-primary {
  background: var(--ecotech-green);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all .3s ease;
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--ecotech-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(98,167,49,0.35);
}
.btn-secondary {
  background: var(--ecotech-grey);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all .3s ease;
  text-decoration: none;
}
.btn-secondary:hover {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(61,69,67,0.35);
}

/* --- Language switcher pill --- */
.lang-switch {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.25rem;
  transition: all .3s ease;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  color: var(--ecotech-grey);
}
.lang-switch.active { background: var(--ecotech-green); color: #fff; }
.lang-switch:not(.active):hover { background: var(--ecotech-grey-light); }

/* --- Backdrop blur custom (used by mobile menu sheet) --- */
.backdrop-blur-glass {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* --- Fade-in-up entrance --- */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fade-in-up .8s cubic-bezier(0.16,1,0.3,1) both; }

/* --- Scroll-reveal helper (vanilla replacement for useScrollAnimation) --- */
.reveal {
  opacity: 0;
  transform: translateY(2.5rem);
  transition: opacity 1s ease-out, transform 1s ease-out;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* --- Neon green flow (Pauger diagonal accent) --- */
@keyframes neon-blitz {
  0%   { background-position: -200% 0; filter: brightness(1)   drop-shadow(0 0 0 rgba(98,167,49,0));    opacity: 0; }
  5%   { opacity: 1;                   filter: brightness(2.8) drop-shadow(0 0 18px rgba(98,167,49,1)); }
  35%  { background-position: 200% 0;  filter: brightness(1.8) drop-shadow(0 0 10px rgba(98,167,49,0.8)); opacity: 1; }
  50%  { opacity: 0;                   filter: brightness(1)   drop-shadow(0 0 0 rgba(98,167,49,0)); }
  100% { background-position: 200% 0;                                                                    opacity: 0; }
}
@keyframes neon-blitz-reverse {
  0%   { background-position: 200% 0;  filter: brightness(1)   drop-shadow(0 0 0 rgba(98,167,49,0));    opacity: 0; }
  5%   { opacity: 1;                   filter: brightness(2.8) drop-shadow(0 0 18px rgba(98,167,49,1)); }
  35%  { background-position: -200% 0; filter: brightness(1.8) drop-shadow(0 0 10px rgba(98,167,49,0.8)); opacity: 1; }
  50%  { opacity: 0;                   filter: brightness(1)   drop-shadow(0 0 0 rgba(98,167,49,0)); }
  100% { background-position: -200% 0;                                                                   opacity: 0; }
}
.animate-neon-flow,
.animate-neon-flow-reverse {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(98,167,49,0)  5%,
    rgba(98,167,49,0.1) 15%,
    rgba(150,255,100,0.3) 30%,
    rgba(98,167,49,0.6)  45%,
    rgba(255,255,255,1)  50%,
    rgba(98,167,49,0.8)  55%,
    rgba(98,167,49,0)    75%,
    transparent 100%);
  background-size: 200% 100%;
  background-repeat: no-repeat;
}
.animate-neon-flow         { animation: neon-blitz 3s cubic-bezier(0.45,0,0.55,1) infinite; }
.animate-neon-flow-reverse { animation: neon-blitz-reverse 3s cubic-bezier(0.45,0,0.55,1) infinite; }

/* --- Hero slideshow (vanilla port of HeroSection.tsx crossfade) --- */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }

/* --- Indicators --- */
.hero-indicator {
  height: 3px;
  border-radius: 9999px;
  border: 0;
  cursor: pointer;
  transition: all .5s ease;
  width: 1.5rem;
  background: rgba(255,255,255,0.7);
}
.hero-indicator.is-active { width: 2rem; background: var(--ecotech-green); }
.hero-indicator:not(.is-active):hover { background: #fff; }

/* --- Scrollbar styling --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--ecotech-grey-light); }
::-webkit-scrollbar-thumb { background: var(--ecotech-green); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ecotech-green-dark); }

/* --- Selection --- */
::selection { background: rgba(98,167,49,0.3); color: var(--ecotech-grey); }

/* --- Text shadow utilities --- */
.text-shadow    { text-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.text-shadow-lg { text-shadow: 0 4px 8px rgba(0,0,0,0.15); }
