/**
 * Orizzonti Italiani – Base CSS (v2)
 * Charte graphique partagée. Variables injectées par functions.php wp_head.
 */

/* Fallback vars (overridden by inline :root in wp_head) */
:root {
  --oi-terracotta:#C2703E;--oi-terracotta-dark:#A85A2A;--oi-terracotta-light:#D4915F;
  --oi-olive:#5A7A3A;--oi-olive-dark:#3E5A22;--oi-olive-light:#7A9E52;
  --oi-teal:#1E3A3A;--oi-teal-light:#2A4F4F;
  --oi-cream:#FDF6EE;--oi-peach:#F5E0CC;--oi-warm-bg:#FBE8D5;--oi-sand:#E8CEB0;
  --oi-text-dark:#3A2E1E;--oi-text-med:#6B5B4A;--oi-text-light:#8A7A68;--oi-white:#FFFCF8;
  --oi-radius:24px;--oi-radius-sm:14px;--oi-radius-pill:50px;
  --oi-shadow:0 10px 40px rgba(194,112,62,0.1);--oi-shadow-lg:0 25px 60px rgba(58,46,30,0.12);
  --oi-transition:0.4s cubic-bezier(0.22,1,0.36,1);
  --oi-logo-size:52px;--oi-hero-opacity:0.45;--oi-hero-overlay-color:#1E140A;
  --oi-typo-title-size:2.8rem;--oi-typo-body-size:0.95rem;--oi-typo-label-size:0.78rem;
  --oi-typo-title-color:#3A2E1E;--oi-typo-body-color:#6B5B4A;
}

.oi-wrap,.oi-wrap *,.oi-wrap *::before,.oi-wrap *::after{margin:0;padding:0;box-sizing:border-box}
.oi-wrap{font-family:'Lato',-apple-system,sans-serif;color:var(--oi-text-dark);background:var(--oi-cream);line-height:1.6;-webkit-font-smoothing:antialiased}
.oi-wrap img{max-width:100%;height:auto;display:block}
.oi-wrap a{color:inherit;text-decoration:none}
.oi-wrap ul,.oi-wrap ol{list-style:none}
.oi-wrap h1,.oi-wrap h2,.oi-wrap h3,.oi-wrap h4{font-family:'Cormorant Garamond',Georgia,serif;font-weight:500;line-height:1.15}
.oi-container{max-width:1200px;margin:0 auto;padding:0 2rem}

/* HEADER */
.oi-header{position:fixed;top:0;left:0;width:100%;z-index:5000;padding:0.85rem 2rem;display:flex;align-items:center;justify-content:space-between;background:transparent;transition:background 0.35s ease,padding 0.3s,box-shadow 0.35s ease}
.oi-header--scrolled{padding-top:0.6rem;padding-bottom:0.6rem}
.oi-header__logo-link{display:flex;align-items:center;flex-shrink:0}
.oi-header__logo-link img,
.oi-header__logo-link .oi-header__logo-img{width:auto;transition:height 0.3s}
.oi-header__logo-text{font-family:'Cormorant Garamond',serif;font-size:1.5rem;font-weight:600;color:var(--oi-terracotta);transition:color 0.3s}
.oi-header__logo-text i{font-style:italic;color:var(--oi-olive);transition:color 0.3s}
/* Logo text on dark bg without scrolled bar */
.oi-header--on-dark:not(.oi-header--scrolled) .oi-header__logo-text{color:#F5E0CC}
.oi-header--on-dark:not(.oi-header--scrolled) .oi-header__logo-text i{color:#A8C882}
/* Logo text on dark scrolled bar */
.oi-header--scrolled.oi-header--on-dark .oi-header__logo-text{color:var(--oi-terracotta-light)}
.oi-header--scrolled.oi-header--on-dark .oi-header__logo-text i{color:var(--oi-olive-light)}
.oi-header__nav{display:flex;gap:2rem;align-items:center}
.oi-header__nav li{list-style:none}
.oi-header__nav a{font-size:var(--oi-menu-font-size, 0.9rem);font-weight:400;position:relative;transition:color 0.3s,text-shadow 0.3s}
/* ── Smart color: not scrolled ── */
.oi-header--on-dark:not(.oi-header--scrolled) .oi-header__nav a{color:rgba(255,255,255,0.95);text-shadow:0 1px 3px rgba(0,0,0,0.3)}
.oi-header--on-light:not(.oi-header--scrolled) .oi-header__nav a{color:var(--oi-text-dark);text-shadow:none}
/* ── Smart color: scrolled ── */
.oi-header--scrolled.oi-header--on-light{background:rgba(253,246,238,0.95);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 2px 30px rgba(194,112,62,0.08)}
.oi-header--scrolled.oi-header--on-dark{background:rgba(42,38,30,0.88);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 2px 30px rgba(0,0,0,0.15)}
.oi-header--scrolled.oi-header--on-light .oi-header__nav a{color:var(--oi-text-dark);text-shadow:none}
.oi-header--scrolled.oi-header--on-dark .oi-header__nav a{color:rgba(255,255,255,0.92);text-shadow:none}
.oi-header__nav a::after{content:'';position:absolute;bottom:-3px;left:0;width:0;height:1.5px;background:var(--oi-terracotta);transition:width 0.3s}
.oi-header--on-dark:not(.oi-header--scrolled) .oi-header__nav a::after{background:var(--oi-terracotta-light)}
.oi-header--scrolled.oi-header--on-dark .oi-header__nav a::after{background:var(--oi-terracotta-light)}
.oi-header__nav a:hover{color:var(--oi-terracotta)!important}
.oi-header--on-dark .oi-header__nav a:hover{color:var(--oi-terracotta-light)!important}
.oi-header__nav a:hover::after{width:100%}
.oi-header__social{display:flex;gap:0.8rem;align-items:center}
.oi-header__social a{display:flex;align-items:center;opacity:0.7;transition:all 0.3s}
.oi-header--on-dark:not(.oi-header--scrolled) .oi-header__social a{color:rgba(255,255,255,0.9)}
.oi-header--on-light:not(.oi-header--scrolled) .oi-header__social a{color:var(--oi-text-dark)}
.oi-header--scrolled.oi-header--on-light .oi-header__social a{color:var(--oi-text-dark)}
.oi-header--scrolled.oi-header--on-dark .oi-header__social a{color:rgba(255,255,255,0.85)}
.oi-header__social a:hover{opacity:1;color:var(--oi-terracotta)}
.oi-hamburger{display:none;flex-direction:column;gap:5px;cursor:pointer;padding:8px;background:none;border:none;z-index:5001}
.oi-hamburger span{width:24px;height:2px;background:var(--oi-text-dark);border-radius:2px;transition:0.3s}
.oi-header--on-dark:not(.oi-header--scrolled) .oi-hamburger span{background:white}
.oi-header--scrolled.oi-header--on-dark .oi-hamburger span{background:white}
.oi-header--scrolled.oi-header--on-light .oi-hamburger span{background:var(--oi-text-dark)}

/* BUTTONS */
.oi-btn{display:inline-flex;align-items:center;gap:0.6rem;padding:1rem 2.2rem;border-radius:var(--oi-radius-pill);font-weight:700;font-size:1rem;font-family:'Lato',sans-serif;border:none;cursor:pointer;transition:all 0.35s;text-decoration:none;line-height:1}
.oi-btn--primary{background:var(--oi-cta-bg, var(--oi-terracotta));color:var(--oi-white);box-shadow:0 6px 25px rgba(194,112,62,0.3)}
.oi-btn--primary:hover{background:var(--oi-cta-hover, var(--oi-terracotta-dark));transform:translateY(-3px);box-shadow:0 10px 35px rgba(194,112,62,0.4)}
.oi-btn svg{transition:transform 0.3s}
.oi-btn:hover svg{transform:translateX(3px)}

/* SECTIONS */
.oi-section{padding:6rem 2rem;position:relative}
.oi-section__label{font-size:var(--oi-typo-label-size);text-transform:uppercase;letter-spacing:0.12em;font-weight:700;color:var(--oi-terracotta);margin-bottom:0.6rem;display:flex;align-items:center;gap:0.5rem}
.oi-section__label::before{content:'';width:24px;height:1.5px;background:var(--oi-terracotta-light)}
.oi-section__label--center{justify-content:center}
.oi-section__label--center::after{content:'';width:24px;height:1.5px;background:var(--oi-terracotta-light)}
.oi-section__title{font-size:var(--oi-typo-title-size);color:var(--oi-typo-title-color);margin-bottom:1rem}

/* STICKY CTA */
.oi-sticky-cta{position:fixed;bottom:24px;right:24px;z-index:9999;background:var(--oi-cta-bg, var(--oi-terracotta));color:white;padding:0.85rem 1.8rem;border-radius:var(--oi-radius-pill);font-weight:700;font-size:0.92rem;box-shadow:0 6px 25px rgba(194,112,62,0.4);transition:all 0.3s;display:flex;align-items:center;gap:0.5rem;text-decoration:none}
.oi-sticky-cta:hover{transform:translateY(-3px);box-shadow:0 10px 35px rgba(194,112,62,0.5);background:var(--oi-cta-hover, var(--oi-terracotta-dark));color:white}

/* FOOTER */
.oi-footer{background:var(--oi-footer-bg, var(--oi-text-dark));color:var(--oi-footer-text, rgba(255,255,255,0.6));padding:4rem 2rem 1.5rem}
.oi-footer__grid{max-width:1100px;margin:0 auto 3rem;display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:3rem}
.oi-footer__brand{font-family:'Cormorant Garamond',serif;font-size:1.5rem;color:var(--oi-terracotta-light);font-weight:600;margin-bottom:0.8rem}
.oi-footer__brand i{color:var(--oi-olive-light)}
.oi-footer__tagline{font-size:0.88rem;line-height:1.6;color:var(--oi-footer-text, rgba(255,255,255,0.4))}
.oi-footer__col h5{font-family:'Cormorant Garamond',serif;font-size:1.05rem;color:var(--oi-footer-heading, rgba(255,255,255,0.85));margin-bottom:1rem;font-weight:500}
.oi-footer__col a{display:block;color:var(--oi-footer-link, rgba(255,255,255,0.45));font-size:0.86rem;margin-bottom:0.5rem;transition:color 0.3s}
.oi-footer__col a:hover{color:var(--oi-terracotta-light)}
.oi-footer__bottom{max-width:1100px;margin:0 auto;border-top:1px solid rgba(255,255,255,0.07);padding-top:1.5rem;display:flex;justify-content:center;font-size:0.8rem;color:var(--oi-footer-text, rgba(255,255,255,0.35))}

/* HEADER: pages intérieures — fond visible dès le haut */
.oi-header--page-top{background:rgba(253,246,238,0.92);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 1px 15px rgba(194,112,62,0.06)}
.oi-header--page-top .oi-header__nav a{color:var(--oi-text-dark)!important;text-shadow:none!important}
.oi-header--page-top .oi-header__social a{color:var(--oi-text-dark)!important}
.oi-header--page-top .oi-hamburger span{background:var(--oi-text-dark)!important}

/* REVEAL */
.oi-reveal{opacity:0;transform:translateY(30px);transition:all 0.8s cubic-bezier(0.22,1,0.36,1)}
.oi-reveal--visible{opacity:1;transform:translateY(0)}

/* RESPONSIVE */
@media(max-width:1024px){
  .oi-footer__grid{grid-template-columns:1fr 1fr}
}
@media(max-width:768px){
  .oi-header__nav{display:none}
  .oi-hamburger{display:flex}
  .oi-header__nav--open{display:flex!important;flex-direction:column;position:fixed;inset:0;background:var(--oi-cream);justify-content:center;align-items:center;gap:2rem;z-index:5000}
  .oi-header__nav--open a{color:var(--oi-text-dark)!important;font-size:1.3rem!important;text-shadow:none!important}
  .oi-section{padding:4rem 1.5rem}
  .oi-footer__grid{grid-template-columns:1fr}
  .oi-sticky-cta{right:16px;bottom:16px;font-size:0.82rem;padding:0.75rem 1.4rem}
}
