/*
Theme Name: Etroplast
Theme URI: https://etroplast.bg/
Author: Etroplast OOD
Author URI: https://etroplast.bg/
Description: Едностраничен корпоративен сайт за Етропласт ООД — преработка на пластмаси от 1999 г. Двуезичен (BG/EN), еко/индустриален стил. One-page corporate theme for Etroplast.
Version: 3.0
Requires at least: 5.5
Tested up to: 6.5
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: etroplast
*/

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: oklch(0.975 0.008 120);
  color: oklch(0.255 0.02 155);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: oklch(0.62 0.12 150); color: #fff; }
img { max-width: 100%; height: auto; }

/* ---- design tokens ---- */
.etro-root {
  --paper: oklch(0.975 0.008 120);
  --ink: oklch(0.255 0.02 155);
  --green: oklch(0.42 0.07 152);
  --green-deep: oklch(0.33 0.05 153);
  --accent: oklch(0.6 0.12 150);
  --sage: oklch(0.93 0.022 138);
  --surface: oklch(0.955 0.012 128);
  --line: oklch(0.87 0.016 138);
  --muted: oklch(0.47 0.022 150);
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --display: 'Archivo', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  background: var(--paper);
  color: var(--ink);
}

/* ---- hover states (replace inline style-hover) ---- */
.nav-desktop a { transition: color .2s; }
.nav-desktop a:hover { color: var(--green); }
.header-cta { transition: background .2s; }
.header-cta:hover { background: var(--ink) !important; }
.hero-cta a { transition: background .2s, border-color .2s; }
.hero-cta a:first-child:hover { background: #0f1c16 !important; }
.hero-cta a:last-child:hover { background: rgba(255,255,255,0.12) !important; }
.etro-form button[type="submit"] { transition: background .2s; }
.etro-form button[type="submit"]:hover { background: var(--ink) !important; }
#contacts a[href*="maps"] { transition: color .2s, border-color .2s; }
#contacts a[href*="maps"]:hover { color: var(--green) !important; border-bottom-color: var(--green) !important; }

/* ---- motion ---- */
.logo-mark { transition: transform .2s; }
.lift { transition: transform .25s cubic-bezier(.22,.61,.36,1), box-shadow .25s; }
.lift:hover { transform: translateY(-5px); box-shadow: 0 12px 28px -12px oklch(0.33 0.05 153 / 0.4); }
a:hover .logo-mark, .foot-logo:hover .logo-mark, .contact-logo:hover .logo-mark { animation: etro-spin 1.1s cubic-bezier(.45,.05,.25,1); }
@keyframes etro-spin { to { transform: rotate(360deg); } }

/* ---- logo intro animation on load ---- */
.logo-mark { animation: etro-intro-mark 1s cubic-bezier(.34,1.25,.4,1) both; }
.logo-w1 { display: inline-block; animation: etro-intro-left .65s cubic-bezier(.22,.61,.36,1) .12s both; }
.logo-w2 { display: inline-block; animation: etro-intro-right .65s cubic-bezier(.22,.61,.36,1) .28s both; }
.header-logo-sub { animation: etro-intro-sub .6s ease .44s both; }
@keyframes etro-intro-mark {
  0% { transform: rotate(-360deg) scale(0); opacity: 0; }
  55% { opacity: 1; }
  100% { transform: rotate(0) scale(1); opacity: 1; }
}
@keyframes etro-intro-left { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes etro-intro-right { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes etro-intro-sub { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---- hero sizing (in CSS + !important so it always overrides any stale inline HTML from PHP/OPcache) ---- */
.hero-media { min-height: 640px !important; }
.hero-wrap { min-height: 640px !important; display: flex !important; flex-direction: column !important; justify-content: center !important; }
.hero-content h1 { font-size: clamp(36px, 5vw, 64px) !important; line-height: 1.03 !important; }

/* ---- scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---- hero image slow zoom on hover ---- */
.hero-media img { transition: transform 1.4s cubic-bezier(.22,.61,.36,1); will-change: transform; }
.hero-media:hover img { transform: scale(1.055); }

/* ---- active nav link (scrollspy) ---- */
.nav-desktop a { position: relative; }
.nav-desktop a.is-active { color: var(--green-deep) !important; }
.nav-desktop a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px; border-radius: 2px; background: var(--green-deep); }

/* ---- logo spin triggered on investment scroll-in ---- */
.logo-mark.etro-trigger { animation: etro-spin 1.1s cubic-bezier(.45,.05,.25,1); }

/* ---- contact logo converge (words slide to center) ---- */
@keyframes etro-converge-left { from { opacity: 0; transform: translateX(-38px); } to { opacity: 1; transform: none; } }
@keyframes etro-converge-right { from { opacity: 0; transform: translateX(38px); } to { opacity: 1; transform: none; } }

/* ---- floating mobile enquiry button ---- */
.fab-cta { display: none; }
@media (max-width: 880px) {
  .fab-cta { display: inline-flex !important; align-items: center; gap: 8px; position: fixed; right: 16px; bottom: 16px; z-index: 60; text-decoration: none; background: var(--green-deep); color: var(--paper); font-family: var(--display); font-weight: 700; font-size: 15px; padding: 14px 20px; border-radius: 999px; box-shadow: 0 10px 26px -8px oklch(0.33 0.05 153 / 0.6); }
}

/* ---- responsive + mobile menu ---- */
.nav-toggle { display: none; }
.mobile-menu { display: none; }
@media (max-width: 880px) {
  .nav-desktop { display: none !important; }
  .header-cta { display: none !important; }
  .nav-toggle { display: flex !important; }
  .g-split { grid-template-columns: 1fr !important; }
  .g-stats { grid-template-columns: repeat(2,1fr) !important; }
  .g-cards4 { grid-template-columns: repeat(2,1fr) !important; }
  .header-bar { padding: 12px 18px !important; }
}
@media (max-width: 600px) {
  .g-cards4 { grid-template-columns: 1fr !important; }
  .g-cards3 { grid-template-columns: 1fr !important; }
  .g-cards2 { grid-template-columns: 1fr !important; }
  .g-form2 { grid-template-columns: 1fr !important; }
  .header-logo-sub { display: none !important; }
  .hero-cta { width: 100%; }
  .hero-cta a { flex: 1 1 auto; text-align: center; }
  .hero-media { min-height: 520px !important; }
  .hero-wrap { min-height: 520px !important; }
  .hero-content h1 { font-size: 33px !important; line-height: 1.07 !important; }
  .hero-content p { font-size: 15.5px !important; }
  .hero-eyebrow { font-size: 11px !important; letter-spacing: 0.08em !important; margin-bottom: 12px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .logo-mark, a:hover .logo-mark, .foot-logo:hover .logo-mark, .logo-mark.etro-trigger { animation: none !important; }
  .logo-w1, .logo-w2, .header-logo-sub { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-media img { transition: none !important; }
}
