/* ==========================================================================
   IT SQUARE — Redesign
   A clean, modern take on itsquare.pt ("Open Source Experts", since 2011)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink: #0b1120;
  --ink-soft: #1c2740;
  --body: #46536b;
  --muted: #7b869c;
  --line: #e6eaf2;
  --bg: #ffffff;
  --bg-soft: #f5f7fc;
  --bg-tint: #eef3ff;

  --brand: #2f4bff;
  --brand-dark: #1f34d6;
  --brand-soft: #e7ebff;
  --accent: #00c2b8;
  --accent-soft: #d9f7f4;
  --warn: #ffb020;

  --grad: linear-gradient(120deg, #2f4bff 0%, #6b5cff 55%, #00c2b8 100%);

  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(11, 17, 32, 0.06);
  --shadow: 0 12px 32px rgba(11, 17, 32, 0.1);
  --shadow-lg: 0 32px 64px rgba(11, 17, 32, 0.16);

  --container: 1180px;
  --header-h: 76px;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", "Segoe UI", system-ui, sans-serif;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.85rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

strong { color: var(--ink); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Never draw a focus box around the nav container itself */
.nav:focus,
.nav:focus-visible,
.nav__links:focus,
.nav__links:focus-visible { outline: none; }

.container {
  width: min(var(--container), 100% - 48px);
  margin-inline: auto;
}

.section { padding: clamp(64px, 9vw, 110px) 0; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding: clamp(44px, 6vw, 72px) 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.9em 1.7em;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    color 0.18s ease, border-color 0.18s ease;
  text-align: center;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 26px rgba(47, 75, 255, 0.32);
}
.btn--primary:hover { color: #fff; box-shadow: 0 14px 32px rgba(47, 75, 255, 0.42); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.btn--light { background: #fff; color: #0b1120; }
.btn--light:hover { color: var(--brand); }

.btn--outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.btn--outline-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: #fff; }

.btn--sm { padding: 0.62em 1.2em; font-size: 0.88rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 42px; width: auto; }
.brand__tag {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  border-left: 1px solid var(--line);
  padding-left: 12px;
  display: none;
  white-space: nowrap;
}
@media (min-width: 1100px) { .brand__tag { display: block; } }

.nav { display: flex; align-items: center; gap: 6px; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  display: block;
  padding: 10px 15px;
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav__links a:hover { background: var(--bg-soft); color: var(--brand); }
.nav__links a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }

.nav__cta { margin-left: 10px; }

.nav__toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}
.nav__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 940px) {
  .nav__toggle { display: flex; }
  .nav {
    position: fixed;
    top: calc(var(--header-h) + 8px);
    left: 12px;
    right: 12px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    max-height: calc(100vh - var(--header-h) - 24px);
    overflow-y: auto;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.24s ease, opacity 0.2s ease, visibility 0.2s ease;
    z-index: 70;
  }
  .nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav__links { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav__links a { padding: 13px 16px; font-size: 1.05rem; }
  .nav__cta { margin: 8px 0 0; }
  .nav__cta .btn { width: 100%; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 82% -10%, rgba(47, 75, 255, 0.16), transparent 60%),
    radial-gradient(700px 460px at -5% 110%, rgba(0, 194, 184, 0.14), transparent 60%),
    linear-gradient(180deg, #fbfcff 0%, #f2f5ff 100%);
  padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 7vw, 88px);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
.hero__eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero h1 { margin-bottom: 18px; }
.hero h1 em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--body);
  max-width: 34ch;
  margin-bottom: 30px;
}

.hero__media { position: relative; }
.hero__art {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  transform: rotate(-1.2deg);
  background: #fff;
}
.hero__art img { width: 100%; }

.hero__badge {
  position: absolute;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  animation: float 5s ease-in-out infinite;
}
.hero__badge strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  display: block;
  line-height: 1;
  color: var(--ink);
}
.hero__badge span { font-size: 0.75rem; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }
.hero__badge--a { left: -18px; bottom: 46px; }
.hero__badge--b { right: -10px; top: 40px; animation-delay: 1.6s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__lead { max-width: none; }
  .hero__badge--a { left: 8px; }
  .hero__badge--b { right: 8px; }
}

/* ---------- Trust bar ---------- */
.trust {
  background: #fff;
  border-block: 1px solid var(--line);
  padding: 38px 0;
}
.trust__label {
  text-align: center;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 18px;
}
.trust__img {
  display: block;
  margin-inline: auto;
  width: 100%;
  max-width: 1024px;
  height: auto;
  padding: 14px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  filter: none;
  opacity: 1;
}

/* ---------- Section headers ---------- */
.sec-head { max-width: 720px; margin-bottom: clamp(34px, 5vw, 56px); }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head p { font-size: 1.08rem; color: var(--body); margin-bottom: 0; }

.kicker {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}
.kicker--accent { color: #008079; background: var(--accent-soft); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 980px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.card p:last-child { margin-bottom: 0; }

.card__icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
  background: var(--brand-soft);
  color: var(--brand);
}
.card__icon--accent { background: var(--accent-soft); color: #008079; }
.card__icon--warn { background: #fff3dc; color: #b57400; }

.card h3 { margin-bottom: 8px; }
.card p { color: var(--body); font-size: 0.97rem; }

/* Solution cards with logo */
.solutions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 860px) { .solutions-grid { grid-template-columns: 1fr; } }

.solution {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.solution::after {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--brand-soft);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 0;
}
.solution:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.solution:hover::after { opacity: 0.6; }
.solution > * { position: relative; z-index: 1; }

.solution__logo {
  height: 56px;
  display: flex;
  align-items: center;
}
.solution__logo img { max-height: 52px; width: auto; max-width: 210px; object-fit: contain; }
.solution__logo--svg img { max-height: 40px; }

.solution__tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: #008079;
}
.solution h3 { margin: 0; }
.solution p { margin: 0; flex: 1; }

.solution .link {
  font-weight: 700;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.solution .link::after { content: "→"; transition: transform 0.18s ease; }
.solution .link:hover::after { transform: translateX(4px); }

/* ---------- Stats band ---------- */
.stats {
  background:
    radial-gradient(700px 320px at 15% 0%, rgba(107, 92, 255, 0.35), transparent 60%),
    radial-gradient(700px 320px at 90% 100%, rgba(0, 194, 184, 0.28), transparent 60%),
    #0b1120;
  color: #fff;
}
.stats h2 { color: #fff; }
.stats .sec-head p { color: rgba(255, 255, 255, 0.72); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats-grid { grid-template-columns: 1fr; } }

.stat {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  backdrop-filter: blur(6px);
}
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(120deg, #fff 20%, #9db4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.stat__label { font-size: 0.88rem; color: rgba(255, 255, 255, 0.66); font-weight: 500; }

/* ---------- Steps (methodology) ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.step:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.step__n {
  counter-increment: step;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--brand-soft);
  -webkit-text-stroke: 1.4px var(--brand);
  margin-bottom: 14px;
  display: block;
}
.step__n::before { content: counter(step, decimal-leading-zero); }
.step h3 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.step p { font-size: 0.94rem; margin: 0; }

/* ---------- Sectors ---------- */
.sector {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
  font-weight: 600;
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.sector:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.sector__ico {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--bg-tint);
  font-size: 1.5rem;
}

/* ---------- Split / about ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.split--reverse .split__media { order: 2; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
}

.split__media img {
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  width: 100%;
}

.check-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.check-list li {
  position: relative;
  padding-left: 38px;
  color: var(--ink-soft);
  font-weight: 500;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: #008079;
  font-size: 0.8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.quote {
  border-left: 4px solid var(--brand);
  background: var(--bg-soft);
  padding: 22px 26px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.04rem;
  color: var(--ink-soft);
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background:
    radial-gradient(700px 400px at 85% -20%, rgba(47, 75, 255, 0.18), transparent 60%),
    linear-gradient(180deg, #f7f9ff, #eef2ff);
  border-bottom: 1px solid var(--line);
  padding: clamp(52px, 7vw, 88px) 0;
}
.page-hero h1 { max-width: 20ch; }
.page-hero p { font-size: 1.12rem; max-width: 58ch; margin-bottom: 0; }
.page-hero .btn-row { margin-top: 28px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--grad);
  color: #fff;
  border-radius: 26px;
  padding: clamp(38px, 5vw, 60px);
  display: grid;
  grid-template-columns: 1.3fr auto;
  gap: 28px;
  align-items: center;
  box-shadow: 0 30px 60px rgba(47, 75, 255, 0.32);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  right: -120px;
  top: -160px;
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: rgba(255, 255, 255, 0.85); margin: 0; }
@media (max-width: 800px) { .cta-band { grid-template-columns: 1fr; text-align: center; } .cta-band .btn-row { justify-content: center; } }

/* ---------- Services page rows ---------- */
.service-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding: clamp(36px, 5vw, 58px) 0;
  border-bottom: 1px solid var(--line);
}
.service-row:last-child { border-bottom: 0; }
.service-row:nth-child(even) .service-row__media { order: 2; }
@media (max-width: 880px) {
  .service-row { grid-template-columns: 1fr; }
  .service-row:nth-child(even) .service-row__media { order: 0; }
}
.service-row__media img {
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  width: 100%;
}
.service-row h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.tag-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; padding: 0; list-style: none; }
.tag-list li {
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 60px);
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(26px, 4vw, 40px);
  box-shadow: var(--shadow);
}

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fbfcfe;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.field textarea { min-height: 140px; resize: vertical; }

.form-note {
  background: var(--accent-soft);
  color: #00675f;
  border: 1px solid #9fe6e0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 16px;
}
.form-note--error {
  background: rgba(255, 80, 80, 0.1);
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.35);
}
[data-theme="dark"] .form-note--error {
  background: rgba(255, 80, 80, 0.14);
  color: #ff9d9d;
  border-color: rgba(255, 80, 80, 0.35);
}
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-aside { display: grid; gap: 20px; }
.contact-aside img { border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); }

.info-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.info-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.info-card p { margin: 0; font-size: 0.95rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.66);
  padding: clamp(52px, 7vw, 76px) 0 30px;
  font-size: 0.94rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer h4 {
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 16px;
}
.site-footer a { color: rgba(255, 255, 255, 0.66); }
.site-footer a:hover { color: #fff; }

.footer-brand img { height: 46px; width: auto; margin-bottom: 16px; filter: brightness(1.6); }
.footer-brand p { max-width: 34ch; }

.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.45);
}

.footer-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-badges span {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- Cookie bar ---------- */
.cookie-bar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 160%);
  width: min(760px, calc(100% - 32px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  z-index: 90;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cookie-bar.is-visible { transform: translate(-50%, 0); }
.cookie-bar p { margin: 0; font-size: 0.9rem; flex: 1; }
.cookie-bar a { font-weight: 600; }
@media (max-width: 620px) { .cookie-bar { flex-direction: column; align-items: stretch; text-align: center; } }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-0 { margin-bottom: 0; }
.lead { font-size: 1.14rem; color: var(--body); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }


/* ==========================================================================
   Header tools: language switch + theme toggle
   ========================================================================== */
.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch { position: relative; }

.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 8px 12px 8px 13px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  line-height: 1;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.lang-switch__btn:hover { border-color: var(--brand); }
.lang-switch__btn:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.lang-switch__globe { font-size: 0.95rem; line-height: 1; }
.lang-switch__chevron { color: var(--muted); transition: transform 0.15s ease; flex: none; }
.lang-switch__btn[aria-expanded="true"] .lang-switch__chevron { transform: rotate(180deg); }

.lang-switch__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 100%;
  width: max-content;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 120;
}
.lang-switch.is-open .lang-switch__menu { opacity: 1; visibility: visible; transform: translateY(0); }

.lang-switch__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.lang-switch__option:hover,
.lang-switch__option:focus-visible { background: var(--bg-soft); color: var(--ink); outline: none; }
.lang-switch__option[aria-selected="true"] { background: var(--brand-soft); color: var(--brand); }
.lang-switch__tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.lang-switch__option[aria-selected="true"] .lang-switch__tag { color: var(--brand); }

/* Hidden native select kept for the i18n engine */
.lang-switch__native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  padding: 0;
}
.theme-toggle:hover { border-color: var(--brand); transform: rotate(15deg); }
.theme-toggle__icon--sun { display: none; }
[data-theme="dark"] .theme-toggle__icon--moon { display: none; }
[data-theme="dark"] .theme-toggle__icon--sun { display: block; }

/* Dark theme */
[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eaf0ff;
  --ink-soft: #c4cee6;
  --body: #aab6cf;
  --muted: #8591a9;
  --line: #26314d;
  --bg: #0b1120;
  --bg-soft: #111a2e;
  --bg-tint: #17223c;
  --brand-soft: rgba(77, 103, 255, 0.22);
  --accent-soft: rgba(0, 194, 184, 0.18);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 32px 64px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .site-header { background: rgba(11, 17, 32, 0.88); }
[data-theme="dark"] .nav__toggle,
[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .lang-switch__btn { background: var(--bg-soft); color: var(--ink); }
[data-theme="dark"] .lang-switch__menu { background: var(--bg-soft); border-color: var(--line); }
[data-theme="dark"] .lang-switch__option { color: var(--ink-soft); }
[data-theme="dark"] .lang-switch__option:hover { background: var(--bg-tint); color: var(--ink); }
[data-theme="dark"] .nav__toggle span { background: var(--ink); }
@media (max-width: 940px) {
  [data-theme="dark"] .nav { background: var(--bg-soft); }
}
[data-theme="dark"] .nav__links a { color: var(--ink-soft); }
[data-theme="dark"] .nav__links a:hover { background: var(--bg-tint); color: #8fa4ff; }

[data-theme="dark"] .brand img { content: url("../img/itsq-logo-white.png"); }

[data-theme="dark"] .hero {
  background:
    radial-gradient(900px 520px at 82% -10%, rgba(77, 103, 255, 0.28), transparent 60%),
    radial-gradient(700px 460px at -5% 110%, rgba(0, 194, 184, 0.18), transparent 60%),
    linear-gradient(180deg, #0b1120 0%, #0f1730 100%);
}
[data-theme="dark"] .page-hero {
  background:
    radial-gradient(700px 400px at 85% -20%, rgba(77, 103, 255, 0.3), transparent 60%),
    linear-gradient(180deg, #0d1426, #101a33);
  border-bottom-color: var(--line);
}
[data-theme="dark"] .hero__eyebrow { background: var(--bg-soft); color: var(--ink-soft); border-color: var(--line); }
[data-theme="dark"] .hero__badge,
[data-theme="dark"] .card,
[data-theme="dark"] .solution,
[data-theme="dark"] .step,
[data-theme="dark"] .sector,
[data-theme="dark"] .form-card,
[data-theme="dark"] .cookie-bar,
[data-theme="dark"] .trust { background: var(--bg-soft); border-color: var(--line); }
[data-theme="dark"] .hero__art { background: var(--bg-soft); border-color: var(--line); }
[data-theme="dark"] .trust { background: var(--bg); }
[data-theme="dark"] .field input,
[data-theme="dark"] .field textarea,
[data-theme="dark"] .field select { background: var(--bg-tint); color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .field input::placeholder,
[data-theme="dark"] .field textarea::placeholder { color: var(--muted); }
[data-theme="dark"] .card__icon--warn { background: rgba(255, 176, 32, 0.16); color: #ffce6a; }
[data-theme="dark"] .kicker--accent,
[data-theme="dark"] .solution__tag,
[data-theme="dark"] .card__icon--accent,
[data-theme="dark"] .check-list li::before { color: #4fe3d8; }
[data-theme="dark"] .step__n { color: #6d84ff; -webkit-text-stroke-color: #6d84ff; }
[data-theme="dark"] .form-note { background: var(--accent-soft); color: #4fe3d8; border-color: rgba(0, 194, 184, 0.4); }
[data-theme="dark"] .quote { background: var(--bg-tint); color: var(--ink-soft); }
[data-theme="dark"] .sector__ico { background: var(--bg-tint); }
[data-theme="dark"] .btn--ghost { color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .btn--ghost:hover { background: var(--brand-soft); color: #8fa4ff; border-color: #4d67ff; }
[data-theme="dark"] .site-footer { background: #070b16; border-top: 1px solid var(--line); }
[data-theme="dark"] .trust__img { background: #fff; border-color: rgba(255, 255, 255, 0.14); }
[data-theme="dark"] .cookie-bar a { color: #8fa4ff; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, background 0.15s ease;
  z-index: 80;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.back-to-top:hover { background: var(--brand-dark); transform: translateY(-2px); }
.back-to-top:active { transform: translateY(0) scale(0.96); }
.back-to-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 50%; }
.back-to-top svg { display: block; }

@media (max-width: 640px) {
  .back-to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}
@media print {
  .back-to-top { display: none; }
}

/* WordPress admin bar offset */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

/* ---------- News ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .news-grid { grid-template-columns: 1fr; } }

.entry-content > .news-grid {
  width: min(1120px, calc(100vw - 48px));
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .news-card { background: var(--bg-tint); }

.news-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background: var(--grad);
  color: #fff;
  overflow: hidden;
  text-decoration: none;
}
.news-card__media img { width: 100%; height: 100%; object-fit: cover; }
.news-card__placeholder {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.92;
}

.news-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 24px;
  flex: 1;
}
.news-card__date {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.news-card__title { font-size: 1.15rem; line-height: 1.35; margin: 0; }
.news-card__title a { color: var(--ink); }
.news-card__title a:hover { color: var(--brand); }
.news-card__body p { margin: 0; color: var(--body); font-size: 0.95rem; }
.news-card__body .link { margin-top: auto; }

.news-pagination { margin-top: 34px; }
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font-weight: 600;
}
.pagination .page-numbers.current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--brand); color: var(--brand); }

.post-meta { color: var(--muted); font-size: 0.9rem; margin-top: 10px; }
.post-cover { margin-bottom: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.post-cover img { display: block; width: 100%; height: auto; }

.entry-content { color: var(--body); }
.entry-content h2 { margin-top: 34px; color: var(--ink); }
.entry-content h3 { margin-top: 28px; color: var(--ink); }
.entry-content p, .entry-content li { color: var(--body); }
.entry-content ul, .entry-content ol { padding-left: 1.2em; }
.entry-content a { text-decoration: underline; }
.entry-content blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  border-left: 3px solid var(--brand);
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
}

/* Keep news card links clean inside post content */
.entry-content .news-card a { text-decoration: none; }
.entry-content .news-card__title a:hover { text-decoration: underline; }
/* Long stat number */
.stat__num--long {
  font-size: clamp(1.4rem, 2.7vw, 2rem);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
