/* =====================================================================
   Ital Global — landing page styles
   Light, professional, responsive. Italian tricolore as a subtle accent.
   ===================================================================== */

:root {
  --green: #008c45;
  --red: #cd212a;
  --offwhite: #f4f5f0;

  --ink: #15233b;          /* headings */
  --body: #41506a;         /* body text */
  --muted: #71809a;        /* secondary text */
  --line: #e7ecf3;         /* hairlines / borders */
  --surface: #ffffff;      /* cards */
  --bg: #f5f8fc;           /* page background */
  --bg-2: #eef3f9;

  --shadow-sm: 0 1px 2px rgba(20, 35, 60, .06), 0 1px 3px rgba(20, 35, 60, .04);
  --shadow-md: 0 6px 18px rgba(20, 35, 60, .08), 0 2px 6px rgba(20, 35, 60, .05);
  --shadow-lg: 0 22px 48px rgba(20, 35, 60, .14), 0 8px 18px rgba(20, 35, 60, .07);

  --radius: 18px;
  --radius-sm: 12px;
  --container: 1240px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ------------------------------ reset ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(60% 50% at 12% 0%, rgba(0, 140, 69, .06), transparent 60%),
    radial-gradient(55% 45% at 100% 6%, rgba(205, 33, 42, .05), transparent 60%),
    radial-gradient(1100px 520px at 50% -8%, #ffffff 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 30%);
  background-attachment: fixed;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }

::selection { background: rgba(0, 140, 69, .16); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 40px);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: 10px; z-index: 200; transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* tricolore accent line */
.tricolore { height: 4px; width: 84px; border-radius: 4px; overflow: hidden; display: flex; }
.tricolore i { flex: 1; }
.tricolore i:nth-child(1) { background: var(--green); }
.tricolore i:nth-child(2) { background: var(--offwhite); }
.tricolore i:nth-child(3) { background: var(--red); }

/* ------------------------------ topbar ----------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 70px;
}
.brand-mini { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mini img { height: 44px; width: auto; }

/* primary nav + language switcher */
.flag {
  width: 24px; height: 18px; border-radius: 3px; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(20, 35, 60, .08) inset; background: #fff;
}

.topbar__menu { display: flex; align-items: center; gap: clamp(6px, 1.4vw, 20px); }
.mainnav { display: flex; align-items: center; gap: 2px; }
.mainnav a {
  padding: 8px 12px; border-radius: 9px; font-weight: 600; font-size: .92rem;
  color: var(--body); border: 1px solid transparent; transition: .16s; white-space: nowrap;
}
.mainnav a:hover, .mainnav a:focus-visible { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); outline: none; }

.lang { display: flex; }
.lang__list { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.lang__link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 999px; font-size: .86rem; font-weight: 600;
  color: var(--muted); border: 1px solid transparent; transition: .16s;
}
.lang__link .label { display: none; }
.lang__link:hover { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.lang__link.is-active { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }

.nav-toggle {
  display: none; width: 44px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  align-items: center; justify-content: center; box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .ic-close { display: none; }
.topbar.is-open .nav-toggle .ic-open { display: none; }
.topbar.is-open .nav-toggle .ic-close { display: block; }

@media (max-width: 879px) {
  .nav-toggle { display: inline-flex; }
  .topbar__menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 8px;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg); padding: 14px clamp(18px, 4vw, 40px) 20px;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .2s; z-index: 90;
  }
  .topbar.is-open .topbar__menu { opacity: 1; visibility: visible; transform: none; }
  .mainnav { flex-direction: column; align-items: stretch; gap: 0; }
  .mainnav a { padding: 12px 8px; border-radius: 8px; border-bottom: 1px solid #f1f4f9; font-size: 1rem; }
  .mainnav a:last-child { border-bottom: 0; }
  .lang { width: 100%; }
  .lang__list { gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); width: 100%; }
  .lang__link { padding: 9px 11px; }
  .lang__link .label { display: inline; }
}

/* ------------------------------ hero ------------------------------- */
.hero { position: relative; overflow: hidden; text-align: center; padding: clamp(52px, 8vw, 104px) 0 clamp(30px, 4vw, 48px); }
.hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: .6; pointer-events: none; z-index: 0;
}
.hero__inner { position: relative; z-index: 1; }
.hero__logo { margin-inline: auto; margin-bottom: 28px; width: min(440px, 78vw); }
.hero__logo img { width: 100%; height: auto; }
.hero__tagline {
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  font-weight: 700; color: var(--ink); letter-spacing: .12em; text-transform: uppercase;
}
.hero .tricolore { margin: 20px auto; width: 120px; height: 5px; }
.hero__intro {
  max-width: 720px; margin: 0 auto; color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
}

/* ---------------------- generic section header --------------------- */
.section { padding: clamp(40px, 6vw, 84px) 0; scroll-margin-top: 84px; }
.section--alt { background: rgba(255, 255, 255, .62); border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto clamp(26px, 4vw, 46px); }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.section-head p { color: var(--muted); margin-top: 10px; font-size: 1.05rem; }
.section-head .tricolore { margin: 16px auto 0; }

/* --------------------------- companies ----------------------------- */
.companies { scroll-margin-top: 84px; padding: clamp(24px, 4vw, 48px) 0 clamp(56px, 8vw, 96px); }

.grid {
  display: grid; gap: clamp(16px, 1.8vw, 26px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
@media (max-width: 430px) { .grid { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .grid { grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); } }

/* card */
.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s, border-color .3s;
  height: 100%;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: var(--accent, var(--ink));
  transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
  opacity: .9;
}
.card:hover, .card:focus-visible { transform: translateY(-7px); box-shadow: var(--shadow-lg); border-color: #dde4ee; outline: none; }
.card:hover::before, .card:focus-visible::before { transform: scaleX(1); }

.card__logo { position: relative; display: grid; place-items: center; height: 116px; margin-bottom: 16px; }
.card__logo img {
  max-height: 100%; max-width: 92%; width: auto; height: auto; object-fit: contain;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), opacity .35s;
  filter: drop-shadow(0 1px 1px rgba(20,35,60,.04));
}
.card__logo .logo-hover { position: absolute; inset: 0; margin: auto; opacity: 0; }
.card:hover .card__logo .logo-base { transform: scale(1.07); }
.card:hover .card__logo .has-hover.logo-base { opacity: 0; }
.card:hover .card__logo .logo-hover { opacity: 1; transform: scale(1.07); }

.card__body { display: flex; flex-direction: column; gap: 6px; text-align: center; margin-top: auto; }
.card__name { font-size: 1.06rem; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.card__tag { font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent, var(--muted)); }

.card__reveal { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .35s ease; }
.card__reveal > div { overflow: hidden; }
.card__desc { color: var(--body); font-size: .92rem; margin-top: 10px; }
.card__cta { display: inline-flex; align-items: center; gap: 6px; align-self: center; margin-top: 12px; font-weight: 700; font-size: .86rem; color: var(--ink); }
.card__cta svg { width: 15px; height: 15px; transition: transform .25s; }
.card:hover .card__cta svg { transform: translateX(3px); }

@media (hover: hover) and (pointer: fine) {
  .card__reveal { grid-template-rows: 0fr; }
  .card__reveal > div { opacity: 0; transition: opacity .3s; }
  .card:hover .card__reveal, .card:focus-within .card__reveal { grid-template-rows: 1fr; }
  .card:hover .card__reveal > div, .card:focus-within .card__reveal > div { opacity: 1; }
}

/* --------------------------- buttons ------------------------------- */
.btn-cta {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--ink); color: #fff; font-weight: 700; font-size: .98rem;
  padding: 13px 24px; border-radius: 12px; box-shadow: var(--shadow-md); transition: .18s;
}
.btn-cta:hover { background: #1d2f4d; transform: translateY(-2px); }
.btn-cta svg { width: 18px; height: 18px; }

/* --------------------------- about us ------------------------------ */
.about { max-width: 760px; margin-inline: auto; text-align: center; }
.about p { color: var(--body); font-size: clamp(1rem, 1.5vw, 1.08rem); margin-bottom: 16px; }
.about p:last-child { margin-bottom: 0; }

/* ----------------------------- news -------------------------------- */
.news { max-width: 640px; margin-inline: auto; text-align: center; }
.news__soon {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 12px 20px; color: var(--body); font-weight: 600; box-shadow: var(--shadow-sm);
}
.news__soon .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(0,140,69,.2); }

.news-grid {
  display: grid; gap: clamp(16px, 2vw, 26px);
  grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
  justify-content: center; max-width: 1160px; margin-inline: auto;
}
.news-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s; text-align: left;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-card__img { aspect-ratio: 16 / 9; background: var(--bg-2); }
.news-card__img img { width: 100%; height: 100%; object-fit: cover; }
.news-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.news-card__date { font-size: .76rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--green); }
.news-card__title { font-size: 1.1rem; color: var(--ink); line-height: 1.3; }
.news-card__text { color: var(--body); font-size: .94rem; }
.news-card__link { margin-top: 4px; font-weight: 700; color: var(--ink); font-size: .9rem; align-self: flex-start; }
.news-card__link:hover { color: var(--green); }

/* ---------------------------- contact ------------------------------ */
.contact { max-width: 620px; margin-inline: auto; text-align: center; }
.contact__email { font-size: clamp(1.1rem, 2.2vw, 1.45rem); font-weight: 800; color: var(--ink); margin-bottom: 22px; }
.contact__email a:hover { color: var(--green); }

/* ------------------------------ footer ----------------------------- */
.footer { border-top: 1px solid var(--line); background: rgba(255,255,255,.6); padding: clamp(36px, 5vw, 60px) 0; }
.footer__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.footer__logo img { height: 44px; width: auto; opacity: .92; }
.footer__tag { color: var(--muted); font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.footer__copy { color: var(--muted); font-size: .86rem; }
.footer__copy a { color: var(--ink); font-weight: 600; }
.footer .tricolore { margin: 4px auto; }

/* back to top */
.totop {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: #fff; border: none; display: grid; place-items: center;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: .25s;
}
.totop.is-visible { opacity: 1; visibility: visible; transform: none; }
.totop svg { width: 20px; height: 20px; }

/* --------------------------- motion prefs -------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
