/* ==========================================================================
   iTecweb — Homepage hero slider (v2) + floating stats card
   Loaded only on index.html, after style.css / responsive.css.
   ========================================================================== */

/* ---------- Layout ---------- */
.hero-v2 {
  position: relative; overflow: hidden; isolation: isolate;
  background: #f6f8fc;
  padding-bottom: 40px;
}
/* fade the silky background into the white page below the stats card */
.hero-v2::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: -1; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 85%); }
.hv2-waves { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; max-width: none; }
.hv2-grid {
  display: grid; grid-template-columns: 46fr 54fr; align-items: center; gap: 10px;
  min-height: 590px; padding-top: 30px;
}

/* ---------- Copy slides (stacked in one grid cell → height = tallest slide) ---------- */
.hv2-copy { display: grid; position: relative; z-index: 3; }
.hero-slide {
  grid-area: 1 / 1; align-self: center;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease, visibility 0s linear .55s;
}
.hero-slide.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: .1s, .1s, 0s; }
.hero-v2 .badge {
  gap: 9px; padding: 8px 18px 8px 14px; font-size: 14.5px;
  background: #fff1e6; border: 1px solid #ffd9bf; color: var(--orange);
}
.hero-v2 .badge .icon { width: 17px; height: 17px; stroke-width: 2; }
.hero-title {
  margin-top: 26px; font-size: clamp(34px, 3.75vw, 56px); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; color: var(--navy);
}
.hero-v2 .lead { margin-top: 20px; max-width: 540px; font-size: 18px; line-height: 1.6; color: #1d2939; }
.hero-checks { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 26px; }
.hero-checks li { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; color: var(--navy); }
.checkc { width: 21px; height: 21px; color: var(--orange); stroke-width: 0; flex: none; }
.checkc path { stroke-width: 2.6; }
.hero-v2 .hero-actions { margin-top: 32px; gap: 22px; }
.hero-v2 .btn { height: 54px; padding: 0 30px; font-size: 16.5px; border-radius: 12px; }
.hero-v2 .btn-outline-dark { border-color: #c9d0db; box-shadow: var(--sh-sm); }
.hero-v2 .btn-outline-dark:hover { border-color: var(--navy); }

/* ---------- Visual ---------- */
.hv2-visual { position: relative; align-self: stretch; min-height: 560px; container-type: inline-size; z-index: 1; }
.hv2-alps { position: absolute; right: -15%; top: -34px; width: 120%; max-width: none; height: auto; pointer-events: none; filter: brightness(1.07) saturate(1.15); }
.hv2-flag { position: absolute; right: 4%; top: 3%; width: 34px; z-index: 1; }
.hv2-plant { position: absolute; right: -4%; bottom: 13%; width: 17%; z-index: 4; filter: drop-shadow(0 14px 14px rgba(16,27,50,.12)); }
.hv2-pencils { position: absolute; left: 2%; bottom: 21%; width: 11%; z-index: 1; }
.hero-v2 .float-chip { animation: float 6s ease-in-out infinite; }
.hero-v2 .float-chip.code { left: 4%; top: 7%; width: 80px; height: 68px; border-radius: 16px; z-index: 5; transform: rotate(-9deg); box-shadow: 0 16px 30px rgba(255, 84, 9, .3); }
.hero-v2 .float-chip.code .icon { width: 36px; height: 36px; }
.hero-v2 .float-chip.layers { right: 8%; bottom: 7%; width: 92px; height: 92px; border-radius: 20px; z-index: 6; box-shadow: 0 18px 40px rgba(16,27,50,.14); }
.hero-v2 .float-chip.layers .icon { width: 46px; height: 46px; stroke-width: 1.7; }

/* ---------- CSS 3D laptop (1em scales with the visual's width) ---------- */
.laptop3d {
  position: absolute; left: 13%; top: 17%; z-index: 3;
  font-size: calc(100cqw / 48);
  width: 36em; height: 23em;
  perspective: 160em; perspective-origin: 30% 10%;
}
.l3-scene {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(-12deg) rotateY(-17deg) rotateZ(-.8deg);
  transform-origin: 50% 100%;
}
.l3-lid {
  position: absolute; inset: 0; transform-origin: 50% 100%;
  transform: rotateX(6deg);
  background: linear-gradient(145deg, #2a303b, #0b0e14 60%);
  border-radius: 1.2em 1.2em .5em .5em;
  padding: .75em .75em 1.05em;
  box-shadow: inset 0 0 0 .12em #3b4250, 0 0 0 .08em #9aa3b0;
  backface-visibility: hidden;
}
.l3-base {
  position: absolute; left: -1.4em; right: -1.4em; top: 100%; height: 23.5em;
  transform-origin: 50% 0; transform: rotateX(90deg);
  background: linear-gradient(180deg, #c3c9d2 0%, #e4e8ed 18%, #eef1f4 70%, #f6f7f9 100%);
  border-radius: .5em .5em 1.6em 1.6em;
  box-shadow: inset 0 .15em .2em rgba(255,255,255,.7), inset 0 -.3em .4em rgba(0,0,0,.08);
}
.l3-front {
  position: absolute; left: -1.4em; right: -1.4em; top: 100%; height: .9em;
  transform-origin: 50% 0;
  transform: translateZ(23.5em);
  background: linear-gradient(180deg, #d5dae1, #8e97a4);
  border-radius: 0 0 1.2em 1.2em;
}
.l3-kb {
  position: absolute; left: 3.2em; right: 3.2em; top: 2.4em; height: 9.6em;
  display: grid; grid-template-columns: repeat(14, 1fr); gap: .35em;
  padding: .55em; border-radius: .6em; background: #d4d9e0;
  box-shadow: inset 0 .1em .3em rgba(0,0,0,.15);
}
.l3-kb i { background: linear-gradient(180deg, #2c323c, #1a1e25); border-radius: .25em; box-shadow: 0 .08em 0 #0b0d11; }
.l3-kb i.space { grid-column: 4 / span 8; }
.l3-pad { position: absolute; left: 50%; top: 13.4em; width: 12.5em; height: 7.6em; transform: translateX(-50%); border-radius: .7em; background: #e2e6eb; box-shadow: inset 0 0 0 .08em #c7cdd5; }

/* ---------- Screen UI (HTML, so it stays crisp) ---------- */
.l3-screen {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: .45em; background: #eef2f7;
  display: grid; grid-template-columns: 27% 73%;
  font-family: var(--font); color: var(--navy); line-height: 1.2;
}
.scr-side { background: linear-gradient(180deg, #13203a, #0d1729); color: #dfe5ef; padding: 1.3em .8em; }
.scr-brand { font-size: 1.05em; font-weight: 800; color: #fff; margin-bottom: 1.2em; letter-spacing: -.01em; padding-left: .35em; }
.scr-side ul { display: grid; gap: .25em; }
.scr-side li { display: flex; align-items: center; gap: .6em; font-size: .72em; font-weight: 600; padding: .62em .7em; border-radius: .5em; }
.scr-side li .icon { width: 1.25em; height: 1.25em; stroke-width: 2; }
.scr-side li.on { background: linear-gradient(90deg, #ff7a00, #ff5409); color: #fff; box-shadow: 0 .3em .8em rgba(255,84,9,.35); }
.scr-main { padding: .6em .8em .8em; display: flex; flex-direction: column; gap: .6em; }
.scr-top { display: flex; align-items: center; gap: .35em; height: 1.4em; }
.scr-top i { width: .45em; height: .45em; border-radius: 50%; background: #c8d0dc; }
.scr-top span { margin-left: auto; width: 45%; height: 1.1em; border-radius: 1em; background: #fff; box-shadow: inset 0 0 0 .06em #dbe1ea; }
.scr-grid { flex: 1; display: grid; grid-template-columns: 1.75fr 1fr; gap: .6em; min-height: 0; }
.scr-col { display: grid; grid-template-rows: auto 1fr; gap: .6em; }
.scr-card { background: #fff; border-radius: .6em; padding: .8em .85em; box-shadow: 0 .2em .6em rgba(16,27,50,.06); display: flex; flex-direction: column; gap: .45em; }
.scr-h { font-size: .95em; font-weight: 800; letter-spacing: -.01em; }
.scr-h.sm { font-size: .78em; }
.scr-editor small { font-size: .55em; color: #667085; margin-top: -.3em; }
.scr-tools { display: flex; gap: .3em; align-items: center; flex-wrap: nowrap; overflow: hidden; }
.scr-tools span, .scr-tools .icon { flex: none; width: 1.45em; height: 1.45em; display: grid; place-items: center; border-radius: .3em; background: #f2f4f8; font-size: .62em; font-weight: 800; color: #344054; font-family: Georgia, serif; }
.scr-tools .icon { padding: .28em; stroke-width: 2; }
.scr-img {
  position: relative; flex: 1; min-height: 7.5em; border-radius: .5em; overflow: hidden; padding: .9em;
  background:
    linear-gradient(90deg, rgba(14,40,90,.55), rgba(14,40,90,0) 70%),
    url("../images/hero-alps.webp") 70% 18% / 230% auto no-repeat,
    linear-gradient(180deg, #3e7ad1, #a9cbef 70%);
  color: #fff; display: flex; flex-direction: column; justify-content: center; gap: .55em;
}
.scr-img strong { font-size: 1.2em; font-weight: 800; line-height: 1.12; text-shadow: 0 .1em .4em rgba(0,0,0,.25); }
.scr-img em { align-self: flex-start; font-style: normal; font-size: .55em; font-weight: 700; padding: .45em .9em; border-radius: 1em; background: linear-gradient(90deg, #ff7a00, #ff5409); }
.scr-flag { position: absolute; right: .7em; top: .7em; width: 1.3em; height: 1.3em; border-radius: .15em; background: #e30613 url("../icons/swiss-flag.svg") center / 100% no-repeat; }
.scr-lines { display: grid; gap: .4em; }
.scr-lines i { height: .42em; border-radius: .3em; background: #e8ecf2; }
.scr-lines i:last-child { width: 70%; }
.scr-pub { display: inline-flex; align-items: center; gap: .45em; align-self: flex-start; font-size: .62em; font-weight: 700; color: #15803d; background: #dcf5e6; padding: .4em .8em; border-radius: 1em; }
.scr-pub i { width: .55em; height: .55em; border-radius: 50%; background: #22a45d; }
.scr-upd { display: grid; place-items: center; height: 2em; border-radius: .45em; font-size: .7em; font-weight: 800; color: #fff; background: linear-gradient(90deg, #ff7a00, #ff5409); box-shadow: 0 .3em .7em rgba(255,84,9,.3); }
.scr-set { display: grid; gap: .55em; }
.scr-set li { display: flex; align-items: center; gap: .5em; font-size: .6em; font-weight: 600; color: #344054; }
.scr-set .icon { width: 1.3em; height: 1.3em; stroke-width: 2; }
.scr-cursor { position: absolute; left: 51%; top: 64%; width: 1.25em; filter: drop-shadow(0 .1em .15em rgba(0,0,0,.3)); }
.scr-glare { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 38%); }

/* ---------- Arrows & dots ---------- */
.hv2-arrow {
  position: absolute; top: 46%; z-index: 8; width: 52px; height: 52px; border-radius: 50%;
  border: 0; background: #fff; color: var(--orange); cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 8px 22px rgba(16,27,50,.12);
  transition: transform .2s ease, box-shadow .2s ease, background .2s, color .2s;
}
.hv2-arrow .icon { width: 24px; height: 24px; stroke-width: 2.6; }
.hv2-arrow:hover { transform: scale(1.06); background: var(--orange); color: #fff; }
.hv2-arrow.prev { left: 16px; }
.hv2-arrow.next { right: 16px; }
.hv2-dots { position: absolute; left: 50%; bottom: 186px; transform: translateX(-50%); z-index: 8; display: flex; gap: 10px; }
.hv2-dots button { width: 13px; height: 13px; padding: 0; border-radius: 50%; border: 0; background: #c3c9d4; cursor: pointer; transition: background .2s, transform .2s, width .25s; }
.hv2-dots button[aria-current="true"] { background: var(--orange); }
.hv2-dots button:hover { transform: scale(1.15); }

/* ---------- Floating stats card ---------- */
.hv2-stats { position: relative; z-index: 7; margin-top: 46px; }
.stats-v2 {
  background: rgba(255,255,255,.96); border-radius: 22px; padding: 28px 24px;
  box-shadow: 0 24px 60px rgba(16,27,50,.10), 0 2px 6px rgba(16,27,50,.04), inset 0 0 0 1px #fff;
  backdrop-filter: blur(8px);
}
.stats-v2 .stat .icon { width: 50px; height: 50px; stroke-width: 1.6; }
.stats-v2 .stat strong { font-size: 30px; }
.stats-v2 .stat span { font-size: 16px; color: #1d2939; }
.stats-v2 .stat + .stat::before { background: #e3e7ee; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .hv2-grid { grid-template-columns: 1fr 1fr; }
  .hero-v2 .lead { font-size: 17px; }
}
@media (max-width: 1023px) {
  .hv2-grid { grid-template-columns: 1fr; min-height: 0; padding-top: 40px; gap: 0; }
  .hv2-copy { text-align: center; }
  .hero-v2 .lead { margin-inline: auto; }
  .hero-checks, .hero-v2 .hero-actions { justify-content: center; }
  .hv2-visual { min-height: 0; aspect-ratio: 1 / .78; width: 100%; max-width: 720px; margin: 10px auto 0; }
  .laptop3d { left: 12%; top: 24%; }
}
@media (max-width: 767px) {
  .hero-v2 { padding-bottom: 28px; }
  .hv2-grid { padding-top: 28px; }
  .hero-title { margin-top: 18px; }
  .hero-v2 .badge { font-size: 12.5px; }
  .hero-v2 .lead { font-size: 16px; }
  .hero-checks { flex-direction: column; align-items: center; gap: 8px; }
  .hero-v2 .hero-actions { flex-direction: column; gap: 12px; }
  .hero-v2 .btn { width: 100%; height: 52px; }
  .hv2-visual { aspect-ratio: 1 / .85; margin-top: 4px; }
  .hv2-plant { width: 19%; }
  .hero-v2 .float-chip.code { width: 50px; height: 44px; border-radius: 12px; top: 12%; left: 4%; }
  .hero-v2 .float-chip.code .icon { width: 24px; height: 24px; }
  .hero-v2 .float-chip.layers { width: 56px; height: 56px; border-radius: 14px; right: 4%; bottom: 6%; }
  .hero-v2 .float-chip.layers .icon { width: 28px; height: 28px; }
  .hv2-flag { width: 22px; }
  .hv2-stats { margin-top: 40px; }
  .stats-v2 { padding: 22px 12px; border-radius: 18px; }
  .stats-v2 .stat .icon { width: 38px; height: 38px; }
  .stats-v2 .stat strong { font-size: 23px; }
  .stats-v2 .stat span { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; transform: none; }
}

/* the stats wrapper must not inherit the legacy `.hero .container` grid */
.hero-v2 .container.hv2-stats { display: block; min-height: 0; padding-top: 0; padding-bottom: 0; }
.hero-v2 .container.hv2-grid { padding-bottom: 0; }
.hero-v2 { padding-bottom: 84px; }
.hero-v2::after { height: 190px; }
@media (max-width: 767px) { .hero-v2 { padding-bottom: 60px; } }

/* ---------- Slider nav: dots in flow; arrows at the edges on wide screens, beside the dots otherwise ---------- */
.hv2-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 4px; position: relative; z-index: 8; }
.hv2-dots, .hero-v2 .hv2-dots { position: static; transform: none; bottom: auto; left: auto; }
.hv2-stats { margin-top: 26px; }
@media (min-width: 1400px) {
  .hv2-arrow { position: absolute; top: 40%; }
  .hv2-arrow.prev { left: 16px; }
  .hv2-arrow.next { right: 16px; }
}
@media (max-width: 1399px) {
  .hv2-arrow { position: static; width: 40px; height: 40px; box-shadow: 0 4px 14px rgba(16,27,50,.12); }
  .hv2-arrow .icon { width: 20px; height: 20px; }
}
@media (max-width: 767px) {
  .hv2-arrow { display: grid; width: 36px; height: 36px; }
}
@media (min-width: 1024px) and (max-width: 1280px) {
  .hero-v2 .btn { padding: 0 22px; font-size: 15.5px; height: 50px; }
  .hero-v2 .hero-actions { gap: 14px; }
  .hv2-grid { grid-template-columns: 52fr 48fr; }
  .hero-checks li { font-size: 14px; }
}
@media (min-width: 1400px) {
  .hv2-nav { position: static; }
  .hv2-dots { position: relative; z-index: 8; }
  .hv2-arrow { top: 41%; z-index: 8; }
}
.hero-v2 { padding-bottom: 58px; }
.hero-v2::after { height: 150px; }
.services { padding-top: 34px; }
/* soft blue sky behind the peaks + stronger orange ribbon on the right, as in the mockup */
.hv2-visual::before {
  content: ""; position: absolute; right: -14%; top: -40px; width: 90%; height: 62%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 60% 70% at 62% 30%, #bcd6f5 0%, #d9e8fa 45%, rgba(230,240,252,0) 75%);
}
.hv2-visual::after {
  content: ""; position: absolute; right: -16%; top: 18%; width: 30%; height: 70%; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 45% 60% at 80% 50%, rgba(255,122,26,.75) 0%, rgba(255,150,70,.35) 45%, rgba(255,180,120,0) 75%);
  filter: blur(6px);
}
.hv2-alps { filter: brightness(1.08) saturate(1.3) contrast(1.06); }
