/* ============================================================
   Horus Raw Materials Srl — style.css
   Palette derived from the company logo (green leaf / blue wave)
   ============================================================ */
:root {
  --green: #76b043;
  --green-dark: #5c8f31;
  --blue: #2d7bb5;
  --blue-dark: #1b5b8c;
  --navy: #0e2a3f;
  --navy-2: #123a52;
  --ink: #16303f;
  --paper: #f7f9fa;
  --white: #ffffff;
  --line: #e3e9ed;
  --muted: #5b7181;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(14, 42, 63, .12);
  --shadow-lg: 0 24px 60px rgba(14, 42, 63, .22);
  --grad: linear-gradient(120deg, var(--blue) 0%, var(--blue-dark) 55%, var(--navy) 100%);
  --grad-accent: linear-gradient(90deg, var(--green) 0%, var(--blue) 100%);
  --font: "Inter", "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { color: var(--blue); }

.container { width: min(1160px, 92%); margin-inline: auto; }

h1, h2, h3 { line-height: 1.18; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: .8em;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 26px; height: 3px;
  background: var(--grad-accent);
  border-radius: 2px;
  margin-right: .6em;
  vertical-align: middle;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(90deg, rgba(118,176,67,.38) 0%, rgba(45,123,181,.38) 100%), rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(14,42,63,.08); }
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 0;
}

.brand {
  font-weight: 800; color: var(--green); text-decoration: none;
  font-size: 1.7rem; line-height: 1.1; letter-spacing: .005em; white-space: nowrap;
}

.main-nav { display: flex; align-items: center; gap: 1.4rem; }
.main-nav a {
  font-weight: 600; font-size: .92rem; color: var(--ink);
  padding: .35rem 0; position: relative; white-space: nowrap;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--grad-accent);
  transition: width .28s ease;
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--blue-dark); }

.nav-dropdown { position: relative; }
.nav-dropdown > a { display: inline-flex; align-items: center; gap: .3rem; }
.nav-dropdown .caret { font-size: .6rem; translate: 0 1px; }
.dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: -14px;
  min-width: 300px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: .5rem; display: none; z-index: 60;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block; padding: .55rem .8rem; border-radius: 8px; font-size: .9rem;
}
.dropdown-menu a:hover { background: var(--paper); }
.dropdown-menu a::after { display: none; }

.lang-switch { display: flex; gap: .15rem; align-items: center; }
.lang-switch a {
  font-size: .74rem; font-weight: 700; padding: .3rem .45rem;
  border-radius: 7px; color: var(--muted); letter-spacing: .03em;
}
.lang-switch a.active { background: var(--navy); color: #fff; }
.lang-switch a:hover:not(.active) { background: var(--paper); color: var(--navy); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 42px; height: 42px; border-radius: 9px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; margin: 5px auto;
  background: var(--navy); border-radius: 2px; transition: .3s;
}

/* ---------- Hero (video-like Ken Burns crossfade) ---------- */
.hero {
  position: relative; min-height: min(88vh, 780px);
  display: grid; place-items: center; overflow: hidden;
  color: #fff; isolation: isolate;
}
.hero-slides, .hero-slides .slide { position: absolute; inset: 0; }
.hero-slides .slide {
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.6s ease-in-out;
  will-change: transform, opacity;
}
.hero-slides .slide.on { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .hero-slides .slide.on { animation: kenburns 9s ease-out forwards; }
  @keyframes kenburns {
    from { transform: scale(1.02) translate(0, 0); }
    to   { transform: scale(1.14) translate(-1.5%, -1.5%); }
  }
}
.hero video.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -1;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10,32,48,.88) 0%, rgba(16,52,78,.62) 48%, rgba(18,64,96,.28) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 7rem 0 6rem; width: min(1160px, 92%); }
.hero .eyebrow { color: #a8d97c; }
.hero h1 { color: #fff; max-width: 15em; text-wrap: balance; }
.hero p.lead { font-size: clamp(1rem, 1.6vw, 1.25rem); max-width: 44em; color: #dbe8f2; }
.hero-cta { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 1.8rem; }

.hero-progress { position: absolute; bottom: 1.4rem; left: 50%; translate: -50% 0; display: flex; gap: .5rem; z-index: 3; }
.hero-progress button {
  width: 34px; height: 4px; border: 0; border-radius: 2px; cursor: pointer;
  background: rgba(255,255,255,.35); transition: background .3s;
}
.hero-progress button.on { background: var(--green); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .78rem 1.5rem; border-radius: 999px;
  font-weight: 700; font-size: .95rem; border: 2px solid transparent;
  cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s;
  position: relative; overflow: hidden;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(118,176,67,.4); }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; transform: translateY(-2px); }
.btn-outline { border-color: var(--blue); color: var(--blue-dark); }
.btn-outline:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }
@media (prefers-reduced-motion: no-preference) {
  .btn-primary::after {
    content: ""; position: absolute; top: 0; left: -80%;
    width: 50%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,.45), transparent);
    animation: sheen 4.5s ease-in-out infinite;
  }
  @keyframes sheen { 0%, 70% { left: -80%; } 100% { left: 130%; } }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.4rem, 7vw, 5.6rem) 0; }
.section.alt { background: var(--paper); }
.section-head { max-width: 46em; margin-bottom: 2.6rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }

/* Stats band */
.stats-band { background: var(--grad); color: #fff; padding: 2.6rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.6rem; text-align: center; }
.stat b { display: block; font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 800; color: #b8e08c; }
.stat span { font-size: .86rem; color: #d7e6f2; letter-spacing: .02em; }

/* Cards grid */
.grid { display: grid; gap: 1.6rem; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 4px 16px rgba(14,42,63,.06);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card .card-media { position: relative; overflow: hidden; aspect-ratio: 16/10; }
.card .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-media img { transform: scale(1.07); }
.card .card-media .tag {
  position: absolute; top: .9rem; left: .9rem;
  background: rgba(14,42,63,.82); color: #fff;
  padding: .28rem .7rem; font-size: .72rem; font-weight: 700;
  border-radius: 999px; letter-spacing: .05em; backdrop-filter: blur(4px);
}
.card .card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card .card-body p { color: var(--muted); font-size: .93rem; flex: 1; }
.card .card-link { font-weight: 700; font-size: .9rem; color: var(--green-dark); }
.card .card-link::after { content: " →"; transition: margin .2s; }
.card:hover .card-link::after { margin-left: .3em; }

/* Split section (text + image) */
.split { display: grid; gap: 3rem; align-items: center; grid-template-columns: 1.05fr .95fr; }
.split.rev { grid-template-columns: .95fr 1.05fr; }
.split-media { position: relative; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.split-media .badge-float {
  position: absolute; bottom: -1.2rem; left: -1.2rem;
  background: var(--white); border-radius: 12px; box-shadow: var(--shadow);
  padding: .9rem 1.2rem; font-size: .85rem; font-weight: 700; color: var(--navy);
  border-left: 4px solid var(--green);
}
.check-list { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .65rem; }
.check-list li { padding-left: 1.9em; position: relative; color: var(--ink); }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 1.35em; height: 1.35em; border-radius: 50%;
  background: rgba(118,176,67,.16); color: var(--green-dark);
  font-weight: 800; font-size: .85em; display: grid; place-items: center;
}

/* Image mosaic */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.mosaic img { border-radius: 10px; aspect-ratio: 1; object-fit: cover; width: 100%; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  position: relative; color: #fff; overflow: hidden; isolation: isolate;
  padding: clamp(5rem, 11vw, 8.5rem) 0 clamp(3rem, 7vw, 5rem);
}
.page-hero .bg {
  position: absolute; inset: 0; z-index: -1;
  background-size: cover; background-position: center;
}
@media (prefers-reduced-motion: no-preference) {
  .page-hero .bg { animation: slowzoom 16s ease-out forwards; }
  @keyframes slowzoom { from { transform: scale(1); } to { transform: scale(1.12); } }
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(10,32,48,.9), rgba(18,64,96,.55));
}
.page-hero h1 { color: #fff; }
.page-hero p { color: #d8e6f1; max-width: 46em; font-size: 1.05rem; }
.breadcrumb { font-size: .8rem; color: #9fc0d8; margin-bottom: 1rem; }
.breadcrumb a { color: #cfe3f2; }

/* ---------- Locations ---------- */
.loc-card { border-left: 5px solid var(--blue); }
.loc-card.primary { border-left-color: var(--green); }
.loc-card .card-body h3 { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pill {
  font-size: .68rem; font-weight: 800; letter-spacing: .06em;
  padding: .22rem .65rem; border-radius: 999px; text-transform: uppercase;
}
.pill.green { background: rgba(118,176,67,.15); color: var(--green-dark); }
.pill.blue  { background: rgba(45,123,181,.13); color: var(--blue-dark); }
.pill.amber { background: rgba(240,173,52,.16); color: #a8720a; }
.loc-addr { font-size: .92rem; color: var(--muted); font-style: normal; }

/* Timeline (investments) */
.timeline { border-left: 3px solid var(--line); margin-left: .4rem; padding-left: 1.6rem; display: grid; gap: 1.6rem; }
.timeline .t-item { position: relative; }
.timeline .t-item::before {
  content: ""; position: absolute; left: -2.22rem; top: .35rem;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 4px rgba(118,176,67,.2);
}

/* ---------- Patent page ---------- */
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin: 1.6rem 0; }
.spec {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.1rem 1.2rem;
}
.spec b { display: block; color: var(--blue-dark); font-size: 1.05rem; }
.spec span { font-size: .82rem; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: start; }
.contact-info .item { display: flex; gap: .9rem; margin-bottom: 1.3rem; align-items: flex-start; }
.contact-info .ico {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 11px;
  background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 1.1rem;
}
.contact-info b { display: block; color: var(--navy); }
.contact-info span, .contact-info a { font-size: .93rem; color: var(--muted); }

form.contact-form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { font-size: .82rem; font-weight: 700; color: var(--navy); display: block; margin-bottom: .3rem; }
input, textarea, select {
  width: 100%; padding: .75rem .9rem; border: 1.5px solid var(--line);
  border-radius: 9px; font: inherit; font-size: .93rem; color: var(--ink);
  background: var(--paper); transition: border .2s, background .2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
input:user-invalid, textarea:user-invalid { border-color: #d64545; background: #fdf3f3; }
input:user-valid, textarea:user-valid { border-color: var(--green); }
.field .hint { display: none; font-size: .76rem; color: #c03434; margin-top: .25rem; }
.field:has(:user-invalid) .hint { display: block; }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .8rem; color: var(--muted); }
.consent input { width: auto; margin-top: .2rem; }
.form-note { font-size: .8rem; color: var(--muted); }
.form-status { display: none; padding: .9rem 1.1rem; border-radius: 9px; font-size: .9rem; font-weight: 600; }
.form-status.ok { display: block; background: rgba(118,176,67,.14); color: var(--green-dark); }
.form-status.err { display: block; background: #fdf0f0; color: #c03434; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--grad); color: #fff; text-align: center; padding: clamp(3rem, 6vw, 4.6rem) 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #d7e6f2; max-width: 40em; margin-inline: auto; }
.cta-band::before {
  content: ""; position: absolute; inset: -40%;
  background: radial-gradient(circle at 30% 40%, rgba(118,176,67,.35), transparent 45%),
              radial-gradient(circle at 75% 65%, rgba(255,255,255,.12), transparent 40%);
}
@media (prefers-reduced-motion: no-preference) {
  .cta-band::before { animation: drift 14s ease-in-out infinite alternate; }
  @keyframes drift { to { transform: translate(6%, 4%) scale(1.08); } }
}
.cta-band .container { position: relative; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #b8cbd9; font-size: .88rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 2.4rem; padding: 3.4rem 0 2.4rem; }
.site-footer h4 { color: #fff; font-size: .95rem; margin: 0 0 .9rem; }
.site-footer a { color: #b8cbd9; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer-brand img { height: 56px; margin-bottom: .8rem; background: #fff; padding: 6px 10px; border-radius: 10px; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.12); padding: 1.2rem 0; font-size: .78rem; color: #8aa4b6; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- Reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .reveal {
      animation: rise-in auto linear backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
    @keyframes rise-in {
      from { opacity: 0; transform: translateY(38px); }
      to   { opacity: 1; transform: none; }
    }
  }
  @supports not ((animation-timeline: view()) and (animation-range: entry)) {
    .reveal { opacity: 0; transform: translateY(38px); transition: opacity .8s ease, transform .8s ease; }
    .reveal.in { opacity: 1; transform: none; }
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .split, .split.rev, .contact-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split-media .badge-float { left: .8rem; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: flex-start;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 1.2rem 5%; gap: .9rem; box-shadow: var(--shadow-lg);
    transform: translateY(-130%); transition: transform .35s ease; z-index: 90;
  }
  .main-nav.open { transform: none; }
  .dropdown-menu { position: static; display: block; box-shadow: none; border: 0; padding: .2rem 0 0 .9rem; min-width: 0; }
  .form-row { grid-template-columns: 1fr; }
  .mosaic { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .brand { font-size: 1.15rem; white-space: normal; }
}

/* Fascia punti di forza (sostituisce i contatori numerici) */
.stats-grid.pillars { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.8rem; }
.pillars .stat b { font-size: clamp(1.02rem, 1.5vw, 1.22rem); font-weight: 700; line-height: 1.3; margin-bottom: .4rem; }
.pillars .stat span { display: block; line-height: 1.5; max-width: 26ch; margin: 0 auto; }
