/* ==========================================================================
   Dalman S.r.l. — foglio di stile unico / single stylesheet
   No framework, no build step. Mobile-first; breakpoints:
     600px  servizi a 2 colonne, footer a 2 colonne
     768px  sezioni immagine + testo affiancate, card "Un supporto completo" a 2 colonne
     810px  menu desktop (sotto: menu a tendina per telefono)
     960px  card "Un supporto completo" con le proporzioni desktop
     1000px servizi a 4 colonne, titoli alla misura desktop
   Touch screens (pointer: coarse) keep 44px+ tap targets at every width.
   ========================================================================== */

/* ---------- Font (self-hosted, OFL — see assets/fonts/OFL.txt) ---------- */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Metric-matched fallback: keeps the layout still while the font loads. */
@font-face {
  font-family: "Instrument Sans Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 103.4%;
  ascent-override: 93.8%;
  descent-override: 24.2%;
  line-gap-override: 0%;
}

/* ---------- Design tokens ---------- */
:root {
  color-scheme: light;

  --blue: #2763ab;
  --blue-light: #6f9ed7;
  --yellow: #fbb900;
  --yellow-hover: #ffc629;
  --yellow-active: #eaad00;
  --ink: #181818;
  --ink-muted: rgba(24, 24, 24, 0.8);
  --line: rgba(24, 24, 24, 0.08);
  --surface: #ffffff;
  --surface-alt: #f5f5f5;
  /* Button text: dark on yellow for readable contrast (10:1). */
  --btn-fg: #181818;

  --font: "Instrument Sans", "Instrument Sans Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --container: 1136px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
  --radius: 16px;
  --space-section: clamp(88px, 56px + 4.5vw, 120px);

  /* Fluid type: phone (390px) values of the original -> desktop values.
     Headings reach the desktop size at ~1000px (like the original, which is
     never smaller on tablets/laptops); the rest at 1400-1440px. */
  --fs-h1: clamp(2.0625rem, 1.183rem + 3.607vw, 3.4375rem);    /* 33 -> 55 @1000 */
  --fs-h2: clamp(2.0625rem, 1.623rem + 1.803vw, 2.75rem);      /* 33 -> 44 @1000 */
  --fs-h-detail: clamp(1.75rem, 1.6435rem + 0.952vw, 2.5rem);  /* 30 -> 40 @1440 */
  --fs-h3: clamp(1.125rem, 1.0767rem + 0.198vw, 1.25rem);      /* 18 -> 20 @1400 */
  --fs-lead: clamp(1rem, 0.9517rem + 0.198vw, 1.125rem);       /* 16 -> 18 @1400 */

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --focus: var(--blue);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Anchors land just under the fixed header (sections have their own top
     padding, so no extra gap is needed). */
  scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
figure,
address {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

address {
  font-style: normal;
}

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

img {
  height: auto;
}

a {
  color: inherit;
}

strong {
  font-weight: 600;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Focus target of the skip link: no ring on the whole page */
main:focus {
  outline: none;
}

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

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  box-shadow: 0 4px 16px rgba(0, 25, 54, 0.2);
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

/* ---------- Type helpers ---------- */
.h2 {
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.h-detail {
  font-size: var(--fs-h-detail);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

/* "• Cosa facciamo" label */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-muted);
  font-size: 0.875rem;
  line-height: 1.4;
  letter-spacing: -0.02em; /* -0.28px at 14px, as the original */
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 100px;
  background: var(--yellow);
  color: var(--btn-fg);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Hover effects only where a mouse can hover: on touch screens a tapped
   button or link would otherwise stay "hovered". */
@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    background: var(--yellow-hover);
    box-shadow: 0 6px 18px rgba(251, 185, 0, 0.35);
    transform: translateY(-1px);
  }
}

/* Press feedback (mouse and touch) */
.btn:active {
  background: var(--yellow-active);
  box-shadow: none;
  transform: none;
}

/* Desktop sizes of the original, only with a mouse: touch screens of any
   width (landscape phones, iPads) keep the 48px tap targets above. */
@media (min-width: 810px) and (hover: hover) and (pointer: fine) {
  .btn {
    min-height: 40px;
    padding: 10px 24px;
    font-size: 0.875rem;
  }

  .btn--sm {
    min-height: 33px;
    padding: 8px 16px;
  }
}

@media (min-width: 810px) and (pointer: coarse) {
  .btn--sm {
    min-height: 44px;
    padding: 10px 20px;
    font-size: 0.875rem;
  }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  /* Without JavaScript the header simply sits on top of the hero photo. */
  position: absolute;
  inset: 0 0 auto;
  z-index: 100;
  color: #fff;
  --focus: #fff;
  transition: box-shadow 0.3s ease, color 0.3s ease;
}

/* The white background (and its blur) lives on a pseudo-element, never on the
   header itself: a backdrop-filter on the header would make it the containing
   block of the fixed phone menu, squeezing the menu into the 64px bar. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: transparent;
  transition: background-color 0.3s ease;
  pointer-events: none;
}

.js .site-header {
  position: fixed;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

/* Solid state: once the page scrolls towards the hero text, on pages without
   a hero (404), or while the phone menu is open */
.site-header.is-solid,
.nav-open .site-header {
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(0, 25, 54, 0.06);
  --focus: var(--blue);
}

.site-header.is-solid::before {
  background-color: rgba(255, 255, 255, 0.94);
}

/* Light frost: white enough to stay near-white over the blue cards too. */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header.is-solid::before {
    background-color: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}

.nav-open .site-header::before {
  background-color: var(--surface);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.brand {
  position: relative;
  display: block;
  flex: none;
  width: 144px;
  border-radius: 4px;
}

.brand__logo {
  width: 144px;
  height: auto;
  transition: opacity 0.3s ease;
}

.brand__logo--dark {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.is-solid .brand__logo--light,
.nav-open .brand__logo--light {
  opacity: 0;
}

.is-solid .brand__logo--dark,
.nav-open .brand__logo--dark {
  opacity: 1;
}

/* Hamburger button (phones/tablets) */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease-out), opacity 0.2s ease;
}

.nav-toggle__bars {
  top: 21px;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  left: 0;
}

.nav-toggle__bars::before {
  transform: translateY(-7px);
}

.nav-toggle__bars::after {
  transform: translateY(7px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  background: currentColor;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  background: currentColor;
  transform: rotate(-45deg);
}

.site-nav__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.site-nav__quick {
  display: none;
}

/* ---- Phone / tablet navigation (< 810px) ---- */
@media (max-width: 809.98px) {
  .js .nav-toggle {
    display: block;
  }

  .js .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    display: flex;
    flex-direction: column;
    padding: 8px max(var(--gutter), env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--surface);
    color: var(--ink);
    border-top: 1px solid var(--line);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.25s var(--ease-out), visibility 0s linear 0.25s;
  }

  .nav-open .site-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.2s ease, transform 0.25s var(--ease-out), visibility 0s;
  }

  .js .site-nav__link {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.375rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
  }

  .js .site-nav__cta {
    width: 100%;
    min-height: 52px;
    margin-top: 28px;
    font-size: 1rem;
  }

  .js .site-nav__quick {
    display: grid;
    gap: 4px;
    margin-top: 28px;
  }

  .site-nav__quick a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    color: var(--blue);
    font-weight: 500;
    text-decoration: none;
  }

  /* No JavaScript: show the links in a simple row under the logo */
  html:not(.js) .site-header__inner {
    flex-wrap: wrap;
    padding-block: 10px;
  }

  html:not(.js) .site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    width: 100%;
  }

  html:not(.js) .site-nav__list {
    display: flex;
    gap: 20px;
  }

  html:not(.js) .site-nav__link {
    padding: 10px 0;
  }
}

/* ---- Desktop navigation (>= 810px) ---- */
@media (min-width: 810px) {
  .site-nav {
    display: flex;
    align-items: center;
    gap: 30px;
  }

  .site-nav__list {
    display: flex;
    gap: 30px;
  }

  .site-nav__link {
    position: relative;
    padding: 6px 0;
    font-size: 0.875rem;
    line-height: 1.5;
    letter-spacing: 0;
  }

  .site-nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s var(--ease-out);
  }

}

@media (min-width: 810px) and (hover: hover) and (pointer: fine) {
  .site-nav__link:hover::after {
    transform: scaleX(1);
  }
}

/* Touch screens wide enough for the desktop menu: 44px tall links */
@media (min-width: 810px) and (pointer: coarse) {
  .site-nav__link {
    padding-block: 12px;
  }

  .site-nav__link::after {
    bottom: 8px;
  }
}

/* Lock page scroll while the phone menu is open */
.nav-open,
.nav-open body {
  overflow: hidden;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 560px;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #1f4f8c; /* shown for a split second while the photo loads */
  color: #fff;
  --focus: #fff;
}

.hero__media,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero__media img {
  object-fit: cover;
  object-position: 50% 50%;
}

/* Same top shade as the original + a soft shade behind the text. On phones
   and tablets the text spans the whole width, so the shade does too. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 25, 54, 0.35) 0%, rgba(0, 104, 222, 0) 60%),
    linear-gradient(0deg, rgba(0, 22, 50, 0.5) 0%, rgba(0, 22, 50, 0.18) 38%, rgba(0, 22, 50, 0) 62%);
}

/* Wide screens: the shade stays in the bottom-left corner behind the text
   block, so the rest of the photo keeps its bright blue sky. */
@media (min-width: 810px) {
  .hero::before {
    background:
      linear-gradient(180deg, rgba(0, 25, 54, 0.35) 0%, rgba(0, 104, 222, 0) 60%),
      radial-gradient(110% 85% at 0% 100%, rgba(0, 22, 50, 0.5) 0%, rgba(0, 22, 50, 0.22) 45%, rgba(0, 22, 50, 0) 75%);
  }
}

.hero__content {
  padding-top: calc(var(--header-h) + 32px);
  padding-bottom: clamp(48px, 9vh, 80px);
}

.hero__title {
  max-width: 14em;
  font-size: var(--fs-h1);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero__lead {
  max-width: 34.5rem;
  margin-top: 16px;
  text-wrap: pretty;
  font-size: var(--fs-lead);
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.hero__cta {
  margin-top: 24px;
}

@media (max-width: 599.98px) {
  .hero__cta {
    width: 100%;
  }
}

@media (min-width: 810px) {
  .hero__title {
    letter-spacing: -0.04em;
    text-wrap: wrap;
  }
}

/* Phones held sideways: the screen is only ~375-430px tall, so the hero
   grows with its text instead of pushing the button below the fold. */
@media (orientation: landscape) and (max-height: 520px) {
  .hero {
    min-height: 100vh;
    min-height: 100svh;
    height: auto;
  }

  .hero__content {
    padding-top: calc(var(--header-h) + 16px);
    padding-bottom: 24px;
  }

  .hero__title {
    font-size: min(var(--fs-h1), 2.75rem);
  }

  .hero__lead {
    margin-top: 12px;
  }

  .hero__cta {
    margin-top: 18px;
  }
}

/* Page-load entrance (CSS only: content is always visible in the end).
   Fill mode "backwards" only: once finished, the elements go back to their
   normal style with no leftover transform. A leftover transform keeps the
   photo on its own GPU layer, which Chrome scales with a softer filter. */
@media (prefers-reduced-motion: no-preference) {
  .hero__title,
  .hero__lead,
  .hero__cta {
    animation: rise 0.9s var(--ease-out) backwards;
  }

  .hero__title {
    animation-delay: 0.1s;
  }

  .hero__lead {
    animation-delay: 0.22s;
  }

  .hero__cta {
    animation-delay: 0.34s;
  }

  .hero__media img {
    animation: settle 1.6s var(--ease-out) backwards;
  }
}

@keyframes rise {
  from {
    /* 0.01, not 0: invisible to the eye, but browsers then count the
       headline as painted right away (faster Largest Contentful Paint). */
    opacity: 0.01;
    transform: translate3d(0, 24px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes settle {
  from {
    transform: scale(1.06);
  }
  to {
    transform: none;
  }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding-top: var(--space-section);
}

/* Menu jumps to "Benefit" and "About": land on the content itself, 16px under
   the header, instead of on the empty top padding of the section. */
#benefit,
#about {
  scroll-margin-top: calc(16px - var(--space-section));
}

/* ---------- Servizi ---------- */
.services {
  padding-top: 60px;
}

.services__title {
  max-width: 13em;
  margin-top: 16px;
}

.services__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px 30px;
  margin-top: 48px;
}

.service__icon {
  width: 30px;
  height: 30px;
}

.service__title {
  margin-top: 24px;
  font-size: var(--fs-h3);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: normal;
}

.service__text {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 0.875rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

@media (min-width: 600px) {
  .services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px 30px;
  }
}

@media (min-width: 1000px) {
  .services {
    padding-bottom: 20px; /* same 140px gap above "Contattaci ora" as the original */
  }

  .services__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 60px;
  }
}

/* ---------- Blue cards (shared) ---------- */
.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius);
  color: #fff;
  --focus: #fff;
}

/* Hexagon network pattern (same drawing as the original), two corners */
.card::before,
.card::after {
  content: "";
  position: absolute;
  z-index: -1;
  aspect-ratio: 596 / 297;
  background: url("../img/hex-pattern.svg?v=6e1d07a1") center / 100% 100% no-repeat;
  pointer-events: none;
}

.card::before {
  top: 0;
  right: 0;
  width: min(531px, 92%);
}

.card::after {
  bottom: 0;
  left: 0;
  width: min(363px, 75%);
  transform: rotate(180deg);
}

/* Pattern strength per card, as in the original page */
.card--cta::before {
  opacity: 0.09;
}

.card--cta::after {
  opacity: 0.2;
}

.card--about::before {
  opacity: 0.08;
}

.card--about::after {
  opacity: 0.12;
}

.card__text {
  margin-top: 12px;
  font-size: 1rem;
  line-height: 1.5;
  text-wrap: pretty;
}

/* ---------- "Contattaci ora" ---------- */
.card--cta {
  display: grid;
  place-items: center;
  min-height: 336px;
  padding: 64px 24px;
  /* Original: #2763AB 35.6% -> #6F9ED7 97.7%. On phones and tablets the text
     covers most of the card, so the light corner is a touch darker there to
     keep white text >= 4.5:1 (WCAG AA). */
  background: linear-gradient(229deg, var(--blue) 60%, #5f8fcd 100%);
  text-align: center;
}

.card--cta .card__body {
  max-width: 27rem;
}

.card--cta .card__text {
  margin-top: 10px;
  text-wrap: balance; /* short centred text: even lines, no lone "24 ore." */
}

.card--cta .btn {
  margin-top: 24px;
}

@media (min-width: 810px) {
  .card--cta {
    padding: 80px 40px;
  }
}

@media (min-width: 1024px) {
  .card--cta {
    /* Wide card: stops nudged so the text area keeps >= 4.5:1; the light
       corner of the original stays. */
    background: linear-gradient(229deg, var(--blue) 50%, #6b9ad5 100%);
  }
}

/* ---------- Image + text sections ("Benefit") ---------- */
.split__inner {
  display: grid;
  gap: 36px;
}

.split__media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.split__text .h-detail {
  margin-top: 16px;
}

.split__lead {
  max-width: 36rem;
  margin-top: 18px;
  color: var(--ink-muted);
  text-wrap: pretty;
}

.checklist {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.checklist li {
  min-height: 24px;
  padding-left: 34px;
  background: url("../img/check.svg?v=4abac5f2") 0 0 / 24px 24px no-repeat;
  color: var(--ink-muted);
}

@media (min-width: 560px) and (max-width: 767.98px) {
  .split__media img {
    aspect-ratio: 4 / 3;
  }
}

@media (min-width: 768px) {
  .split__inner {
    grid-template-columns: minmax(0, 44fr) minmax(0, 50fr);
    column-gap: 6%;
    align-items: center;
  }

  .split--reverse .split__inner {
    grid-template-columns: minmax(0, 50fr) minmax(0, 44fr);
  }

  .split--reverse .split__media {
    order: 2;
  }
}

/* Phones held sideways (560-767px wide, ~375px tall): a full-width photo
   would fill the whole screen, so use the side-by-side layout with a square
   photo, like on computers. */
@media (orientation: landscape) and (max-height: 520px) and (min-width: 560px) and (max-width: 767.98px) {
  /* Top-aligned: the text is taller than the screen, so a centred photo
     would start below the fold. */
  .split__inner {
    grid-template-columns: minmax(0, 44fr) minmax(0, 50fr);
    column-gap: 6%;
    align-items: start;
  }

  .split--reverse .split__inner {
    grid-template-columns: minmax(0, 50fr) minmax(0, 44fr);
  }

  .split--reverse .split__media {
    order: 2;
  }

  .split__media img {
    aspect-ratio: 1 / 1;
  }
}

/* ---------- "Un supporto completo" ---------- */
.about {
  padding-bottom: var(--space-section);
}

.card--about {
  display: grid;
  gap: 40px;
  padding: 56px 24px 40px;
  /* Original: #6F9ED7 15% -> #2763AB 88% (stops nudged for text contrast) */
  background: linear-gradient(322deg, var(--blue-light) 0%, var(--blue) 58%);
}

.card--about .card__text {
  max-width: 33rem;
}

.card--about .btn {
  margin-top: 24px;
}

/* Two overlapping photos; left-aligned with the text on phones/small tablets */
.about__photos {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 350 / 275;
}

.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.about__photo--main {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 74.9%;
  aspect-ratio: 4 / 3;
}

.about__photo--small {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  width: 53.4%;
  aspect-ratio: 3 / 2;
}

.about__photo--small img {
  box-shadow: 0 12px 32px rgba(0, 25, 54, 0.28);
}

@media (max-width: 599.98px) {
  .card--about .btn {
    width: 100%;
  }
}

/* Tablets: text left, photos right (like the desktop layout) */
@media (min-width: 768px) {
  .card--about {
    grid-template-columns: minmax(0, 1fr) minmax(0, 290px);
    align-items: center;
    gap: 32px;
    padding: 56px 32px;
    /* Original: #6F9ED7 23% -> #2763AB 72.2% (stops nudged for text contrast) */
    background: linear-gradient(229deg, var(--blue-light) 14%, var(--blue) 58%);
  }

  .card--about .card__text {
    margin-top: 13px;
  }

  .card--about .btn {
    margin-top: 20px;
  }
}

/* Desktop: same proportions as the original (text 528px, photos 350px) */
@media (min-width: 960px) {
  .card--about {
    grid-template-columns: minmax(0, 528px) minmax(300px, 1fr);
    gap: 40px;
    min-height: 428px;
    padding: 64px 40px;
  }

  .about__photos {
    max-width: 350px;
    margin-inline: auto 0;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding-top: clamp(56px, 4rem + 1.5vw, 80px);
  background: var(--surface-alt);
  color: var(--ink);
}

.site-footer__logo {
  width: 144px;
  height: auto;
}

.site-footer__grid {
  display: grid;
  gap: 28px;
  margin-top: 24px;
}

.site-footer__title {
  font-size: var(--fs-h3);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: normal;
}

.info-list {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 0.875rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.info-list strong {
  color: var(--ink);
}

.info-list a {
  text-decoration: underline;
  text-decoration-color: rgba(24, 24, 24, 0.28);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .info-list a:hover {
    color: var(--blue);
    text-decoration-color: currentColor;
  }
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding: 20px 0 calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.site-footer__top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .site-footer__top:hover {
    color: var(--blue);
  }
}

/* Phones and any touch screen (tablets too): taller, well-spaced footer
   links, easy to tap (WCAG 2.5.8 target size). */
@media (max-width: 599.98px) {
  .info-list {
    font-size: 0.9375rem;
  }
}

@media (max-width: 599.98px), (pointer: coarse) {
  /* Each link is a 44px-tall tap area; the negative margin keeps the lines
     close together, and the gap keeps neighbouring tap areas apart. */
  .info-list li + li {
    margin-top: 16px;
  }

  .info-list a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-block: -8px;
  }

  .site-footer__top,
  .link-arrow {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

@media (min-width: 600px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0;
  }

  .site-footer__col:first-child {
    padding-right: 24px;
  }
}

/* ==========================================================================
   Scroll-in animation (added by main.js; content is visible without JS)
   ========================================================================== */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.js .services__grid > :nth-child(2) { transition-delay: 0.08s; }
.js .services__grid > :nth-child(3) { transition-delay: 0.16s; }
.js .services__grid > :nth-child(4) { transition-delay: 0.24s; }

@media (min-width: 768px) {
  .js .split__text[data-reveal] {
    transition-delay: 0.12s;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   404 page
   ========================================================================== */
.notfound {
  display: grid;
  align-items: center;
  min-height: calc(100vh - 220px);
  min-height: calc(100svh - 220px);
  padding-top: calc(var(--header-h) + 64px);
  padding-bottom: var(--space-section);
}

.notfound__code {
  color: var(--blue);
  font-size: clamp(4.5rem, 3rem + 7vw, 8rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
}

.notfound .h2 {
  margin-top: 16px;
}

.notfound__text {
  max-width: 34rem;
  margin-top: 16px;
  color: var(--ink-muted);
}

.notfound__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  margin-top: 32px;
}

.link-arrow {
  color: var(--blue);
  font-weight: 500;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .link-arrow:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
  .site-header {
    position: static;
    color: var(--ink);
  }

  .brand__logo--light {
    opacity: 0;
  }

  .brand__logo--dark {
    opacity: 1;
  }

  .nav-toggle,
  .site-nav,
  .skip-link,
  .hero__media,
  .hero::before,
  .card::before,
  .card::after {
    display: none !important;
  }

  .hero {
    height: auto;
    min-height: 0;
    background: none;
    color: var(--ink);
  }

  .card {
    color: var(--ink);
    background: none !important;
    border: 1px solid var(--line);
  }

  .js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
