/**
 * Cloudsurfers — Concept C Partner Clarity (production)
 * Tokens: tokens.css · fonts: system stack
 */

:root {
  --font-display: var(--font-display-system);
  --font-sans: var(--font-sans-system);
}

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--surface-page);
  line-height: var(--leading-normal);
  font-size: 1.03125rem;
  min-height: 100vh;
}

[hidden] { display: none !important; }

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

a {
  color: var(--text-link);
  text-decoration: none;
}

a:hover {
  color: var(--text-link-hover);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  background: var(--action-cyan);
  color: var(--text-inverse);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-bold);
}

.skip-link:focus {
  top: var(--space-4);
  text-decoration: none;
  color: var(--text-inverse);
}

.wrap {
  max-width: var(--container-c);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Brand signal */
.brand-signal {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: var(--brand-signal-height);
}

.brand-signal span:nth-child(1) { background: var(--brand-signal-1); }
.brand-signal span:nth-child(2) { background: var(--brand-signal-2); }
.brand-signal span:nth-child(3) { background: var(--brand-signal-3); }
.brand-signal span:nth-child(4) { background: var(--brand-signal-4); }

/* Header */
.header {
  background: var(--surface-page);
  border-bottom: var(--border-width) solid var(--surface-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: 0.9rem;
}

.logo img {
  width: 150px;
  height: auto;
}

.nav {
  display: flex;
  gap: 1.35rem;
  list-style: none;
  padding: 0;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  align-items: center;
}

.nav a,
.nav-trigger {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  color: var(--text-primary);
  text-decoration: none;
  background: none;
  border: none;
  font: inherit;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  padding: 0;
}

.nav-trigger::after { content: ""; width: .4rem; height: .4rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: -.2rem 0 0 .55rem; }
.nav-trigger[aria-expanded="true"]::after { transform: rotate(225deg); margin-top: .2rem; }

.nav a:hover,
.nav-trigger:hover {
  color: var(--action-cyan);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--action-cyan);
}

.nav-item {
  position: relative;
}

.dropdown {
  position: static;
  list-style: none;
  padding: var(--space-2);
}

.nav-enhanced .nav-parent-link { display: none; }
html:not(.nav-enhanced) .header { position: static; }
html:not(.nav-enhanced) .header-inner { align-items: start; flex-wrap: wrap; }
html:not(.nav-enhanced) .nav { align-items: start; flex-wrap: wrap; }

.nav-enhanced .dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 14rem;
  background: var(--surface-elevated);
  border: var(--border-width) solid var(--surface-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  list-style: none;
  padding: var(--space-2);
  z-index: 30;
}

.dropdown a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

.dropdown a:hover {
  background: var(--neutral-50);
  text-decoration: none;
}

.header-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.header-actions--mobile {
  display: none;
  margin-top: var(--space-4);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-md);
  background: var(--neutral-0);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--neutral-800);
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--cta-primary-bg);
  color: var(--cta-primary-fg);
}
.btn-primary:hover {
  background: var(--cta-primary-bg-hover);
  color: var(--cta-primary-fg);
}

.btn-cyan {
  background: var(--cta-products-bg);
  color: var(--cta-products-fg);
}
.btn-cyan:hover {
  background: var(--cta-products-bg-hover);
  color: var(--cta-products-fg);
}

.btn-coral {
  background: var(--cta-contact-bg);
  color: var(--cta-contact-fg);
}
.btn-coral:hover {
  background: var(--cta-contact-bg-hover);
  color: var(--cta-contact-fg);
}

.btn-outline {
  background: var(--neutral-0);
  color: var(--action-green);
  border: 1.5px solid var(--action-green);
}
.btn-outline:hover {
  background: var(--accent-lime-soft);
  color: var(--action-green);
}

.btn-outline-cyan {
  background: var(--neutral-0);
  color: var(--cta-ghost-fg);
  border: 1.5px solid var(--cta-ghost-border);
}
.btn-outline-cyan:hover {
  background: var(--accent-cyan-soft);
  color: var(--cta-ghost-fg);
}

.btn-outline-gold {
  background: var(--neutral-0);
  color: var(--cta-callback-fg);
  border: 1.5px solid var(--cta-callback-border);
}
.btn-outline-gold:hover {
  background: var(--cta-callback-bg-hover);
  color: var(--cta-callback-fg-hover);
}

/* Hero */
.hero {
  padding: clamp(2.75rem, 5vw, 3.5rem) 0 clamp(2.5rem, 4vw, 3rem);
  background: var(--surface-muted);
  border-bottom: var(--border-width) solid var(--surface-border);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  right: -4rem;
  top: 1.5rem;
  width: 11rem;
  height: 14rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-coral) 40%, transparent) 0 25%, transparent 25%),
    linear-gradient(135deg, color-mix(in srgb, var(--brand-cyan) 40%, transparent) 0 25%, transparent 25%),
    linear-gradient(135deg, color-mix(in srgb, var(--brand-gold) 45%, transparent) 0 25%, transparent 25%),
    linear-gradient(135deg, color-mix(in srgb, var(--brand-lime) 45%, transparent) 0 25%, transparent 25%);
  background-size: 100% 25%;
  background-position: 0 0, 0 25%, 0 50%, 0 75%;
  background-repeat: no-repeat;
  transform: skewY(-12deg);
  pointer-events: none;
  opacity: 0.95;
  z-index: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
  position: relative;
  z-index: 1;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-illustration,
.hero-illustration--dominant {
  position: relative;
  right: auto;
  top: auto;
  width: 100%;
  max-width: none;
  min-width: var(--hero-signal-min, 17.5rem);
  height: auto;
  opacity: 0.92;
  margin-top: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.hero-illustration img,
.hero-illustration--dominant img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
}

.hero-illustration--page {
  position: absolute;
  right: var(--gutter);
  top: 0.75rem;
  width: min(11rem, 28vw);
  min-width: 0;
  min-height: 0;
  opacity: 0.5;
}

.hero-copy,
.hero-card {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--action-coral);
  margin-bottom: 0.65rem;
}

.eyebrow-dots {
  display: inline-flex;
  gap: 4px;
}

.eyebrow-dots i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: block;
}

.eyebrow-dots i:nth-child(1) { background: var(--brand-coral); }
.eyebrow-dots i:nth-child(2) { background: var(--brand-cyan); }
.eyebrow-dots i:nth-child(3) { background: var(--brand-gold); }
.eyebrow-dots i:nth-child(4) { background: var(--brand-lime); }

.hero h1,
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: var(--display-h1, clamp(2rem, 4vw, 2.85rem));
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--text-heading);
  margin-bottom: 0.85rem;
}

.hero-lead,
.page-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 1.35rem;
  max-width: 42ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.trust-line {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
}

.trust-line span {
  color: var(--action-green);
  font-weight: var(--font-weight-bold);
}

.hero-card {
  background: var(--surface-elevated);
  border: var(--border-width) solid var(--surface-border);
  border-top: 4px solid var(--brand-cyan);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow-md);
}

.hero-card h2 {
  font-size: 0.95rem;
  font-weight: var(--font-weight-bold);
  color: var(--text-heading);
  margin-bottom: 0.85rem;
}

.hero-card ol {
  margin: 0 0 1rem 1.1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.hero-card li {
  margin-bottom: 0.45rem;
}

.hero-card .btn {
  width: 100%;
}

/* Skills */
.skills {
  padding: var(--section-y) 0;
}

.skills-lead {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: -0.35rem 0 1.15rem;
}

.skills h2,
.products-head h2,
.section-title,
.prose h2,
.cta-box h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  color: var(--text-heading);
  margin-bottom: 1rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.skill-card {
  border: var(--border-width) solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  background: var(--surface-elevated);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.skill-card:hover {
  border-color: var(--brand-cyan);
  text-decoration: none;
  color: inherit;
}

.skill-card .bar {
  width: 4px;
  min-height: 2.5rem;
  border-radius: 2px;
  flex-shrink: 0;
}

.skill-card--sviluppo .bar { background: var(--brand-lime); }
.hub-card--sviluppo { border-top-color: var(--brand-lime); }
.skill-card--bc365 .bar { background: var(--brand-cyan); }
.hub-card--bc365 { border-top-color: var(--brand-cyan); }
.skill-card--iiot .bar { background: var(--brand-gold); }
.hub-card--iiot { border-top-color: var(--brand-gold); }
.skill-card--sql .bar { background: var(--brand-gold); }
.hub-card--sql { border-top-color: var(--brand-gold); }
.skill-card--cloud .bar { background: var(--brand-cyan); }
.hub-card--cloud { border-top-color: var(--brand-cyan); }
.skill-card--managed .bar { background: var(--brand-lime); }
.hub-card--managed { border-top-color: var(--brand-lime); }
.skill-card--cyber .bar { background: var(--brand-coral); }
.hub-card--cyber { border-top-color: var(--brand-coral); }

.solution-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
}

.solution-icon--hero {
  width: 64px;
  height: 64px;
  margin-bottom: 0.85rem;
}

.solution-icon--inline {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.35rem;
}

.skill-card strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text-heading);
  margin-bottom: 0.2rem;
}

.skill-card p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Products */
.products {
  padding: 2.25rem 0 0;
  background: var(--surface-muted);
  border-top: var(--border-width) solid var(--surface-border);
  position: relative;
  overflow: hidden;
}

.products .wrap {
  padding-bottom: 2.75rem;
}

.products-band {
  display: flex;
  justify-content: center;
  opacity: 0.45;
  margin-top: -0.5rem;
  padding-bottom: 0.5rem;
}

.products-band img {
  width: min(720px, 100%);
  height: auto;
}

.products-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.products-head p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 40ch;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

.product {
  background: var(--surface-elevated);
  border: var(--border-width) solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 22rem;
  position: relative;
  overflow: hidden;
}

.product-logo {
  height: 52px;
  display: flex;
  align-items: center;
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 1;
}

.product-logo img {
  max-height: 48px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.product-preview {
  margin: 0 0 0.85rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--surface-border);
  background: var(--neutral-50);
  aspect-ratio: 16 / 9;
  position: relative;
  z-index: 1;
}

.product-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  display: block;
}

.product-motif--saga {
  height: 4.5rem;
  margin: -1.35rem -1.35rem 1rem;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--brand-cyan) 22%, var(--neutral-50)) 0%,
      color-mix(in srgb, var(--brand-cyan) 8%, transparent) 100%),
    repeating-linear-gradient(
      -28deg,
      transparent,
      transparent 12px,
      color-mix(in srgb, var(--brand-cyan) 18%, transparent) 12px,
      color-mix(in srgb, var(--brand-cyan) 18%, transparent) 14px
    );
}

.product-motif--shaka {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 7.5rem;
  margin: -1.35rem -1.35rem 1rem;
  background:
    linear-gradient(160deg,
      color-mix(in srgb, var(--brand-coral) 18%, var(--neutral-50)),
      color-mix(in srgb, var(--brand-gold) 14%, var(--neutral-0)));
  border-bottom: 1px dashed color-mix(in srgb, var(--brand-coral) 45%, var(--surface-border));
}

.shaka-mark--panel {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 2.5vw, 2.15rem);
  letter-spacing: -0.03em;
  color: var(--text-heading);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.shaka-mark--panel em {
  width: 1rem;
  height: 1rem;
  border-radius: 3px;
  background: var(--brand-gold);
  font-style: normal;
  display: inline-block;
}

.product.shaka .product-logo {
  display: none;
}

.product .tag {
  font-size: 0.68rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.product.saga .tag { color: var(--action-cyan); }
.product.sqldog .tag { color: var(--action-gold); }
.product.shaka .tag { color: var(--action-coral); }
.product.saga { border-top: 3px solid var(--brand-cyan); }
.product.sqldog { border-top: 3px solid var(--brand-gold); }
.product.shaka {
  border-top: 3px dashed var(--brand-coral);
}

.product .tag,
.product h3,
.product > p,
.product-actions {
  position: relative;
  z-index: 1;
}

.product h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.45rem;
  color: var(--text-heading);
}

.product p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.95rem;
  flex: 1;
}

.product-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* CTA band */
.cta-band {
  padding: var(--section-y) 0;
}

.cta-box {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  align-items: center;
  background: var(--surface-elevated);
  border: var(--border-width) solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.85rem;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(
    180deg,
    var(--brand-coral),
    var(--brand-cyan),
    var(--brand-gold),
    var(--brand-lime)
  );
}

.cta-box h2 {
  margin-bottom: 0.4rem;
}

.cta-box p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.cta-contact-line {
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.cta-btns {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Page chrome */
.page-hero {
  padding: var(--section-y) 0 calc(var(--section-y) * 0.65);
  background: var(--surface-muted);
  border-bottom: var(--border-width) solid var(--surface-border);
  position: relative;
  overflow: hidden;
}

.page-hero--visual .page-hero-inner {
  position: relative;
}

.page-hero .page-lead {
  max-width: 48ch;
}

.page-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 48rem;
}

.page-hero-product {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.product-brand--hero img {
  max-height: 64px;
  width: auto;
  margin-bottom: 1rem;
}

.product-hero-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--surface-border);
  box-shadow: 0 12px 40px rgba(26, 26, 28, 0.08);
  background: var(--neutral-0);
}
.product-hero-figure img {
  width: 100%;
  height: auto;
  display: block;
}
.role-grid--media {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.role-card-media {
  margin: 0 0 0.85rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--surface-border);
  background: var(--neutral-50);
}
.role-card-media img {
  width: 100%;
  height: auto;
  display: block;
}
.section-intro {
  color: var(--neutral-600);
  max-width: 52ch;
  margin: 0 0 1.25rem;
}
@media (max-width: 768px) {
  .role-grid--media { grid-template-columns: 1fr; }
  .page-hero-product { grid-template-columns: 1fr; }
}
.product-hero-motif--saga {
  min-height: 16rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg,
      color-mix(in srgb, var(--brand-cyan) 28%, var(--neutral-50)),
      var(--neutral-0));
  border: 1px solid var(--surface-border);
}

.product-hero-motif--shaka {
  min-height: 16rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg,
      color-mix(in srgb, var(--brand-coral) 18%, var(--neutral-50)),
      color-mix(in srgb, var(--brand-gold) 14%, var(--neutral-0)));
  border: 1px dashed color-mix(in srgb, var(--brand-coral) 45%, var(--surface-border));
}

.page-hero--azienda .page-hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.azienda-brand--hero {
  margin: 0 0 1rem;
  padding: 0;
}

.azienda-brand--hero img {
  max-height: 72px;
  width: auto;
}

.product-brand {
  margin: 0 0 1.5rem;
}

.product-brand img {
  max-height: 56px;
  width: auto;
}

.product-brand--shaka {
  margin-bottom: 1.25rem;
}

.shaka-mark--hero {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: 2rem;
  color: var(--text-heading);
  letter-spacing: var(--tracking-tight);
}

.shaka-mark--hero em {
  font-style: normal;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: var(--brand-gold);
  display: inline-block;
}

.azienda-brand {
  margin: 0 0 1.5rem;
  padding: 1rem 0;
}

.azienda-brand img {
  max-width: 220px;
  height: auto;
}

.product-media {
  margin: 1.25rem 0 1.75rem;
  border: var(--border-width) solid var(--surface-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--neutral-50);
}

.product-media img {
  width: 100%;
  height: auto;
  display: block;
}

.product-media figcaption {
  padding: 0.65rem 1rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border-top: var(--border-width) solid var(--surface-border);
  background: var(--surface-elevated);
}

.product-media--hero {
  margin-top: 0.5rem;
}

.product-media-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 2rem 0;
}

.product-media-strip .product-media {
  margin: 0;
  box-shadow: var(--shadow-sm);
}

.product-media-strip img {
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
  object-position: top;
}

.product-media-strip figcaption {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-heading);
  padding: 0.75rem 1rem;
}

.section-feature-strip {
  padding: var(--section-y) 0;
  background: var(--surface-muted);
  border-block: 1px solid var(--surface-border);
}

.product-grid--hub {
  margin: 1.5rem 0 2rem;
}

.page-body {
  padding: var(--section-y) 0;
}

.breadcrumb {
  padding: var(--space-4) var(--gutter) 0;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--neutral-400);
}

/* Editorial chapter + narrative path (home / leaf soluzioni) */
.chapter {
  padding: var(--section-y) 0;
}

.chapter + .chapter {
  padding-top: 0;
}

.chapter-lead {
  max-width: 65ch;
  margin: -0.35rem 0 1.5rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.path-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 52rem;
}

.path-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  align-items: start;
  padding: 1.15rem 1.25rem;
  border-left: 3px solid var(--brand-cyan);
  background: var(--surface-elevated);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-top: var(--border-width) solid var(--surface-border);
  border-right: var(--border-width) solid var(--surface-border);
  border-bottom: var(--border-width) solid var(--surface-border);
}

.path-step:nth-child(2) { border-left-color: var(--brand-gold); }
.path-step:nth-child(3) { border-left-color: var(--brand-lime); }
.path-step:nth-child(4) { border-left-color: var(--brand-coral); }
.path-step:nth-child(5) { border-left-color: var(--brand-cyan); }

.path-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: 0.95rem;
  color: var(--text-heading);
  background: var(--neutral-50);
  border: var(--border-width) solid var(--surface-border);
  flex-shrink: 0;
}

.path-step-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-heading);
  margin: 0.15rem 0 0.5rem;
}

.path-step-body p {
  margin: 0;
  max-width: 65ch;
  line-height: 1.65;
  color: var(--text-primary);
}

.hub-card-step {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.prose {
  max-width: 65ch;
  line-height: 1.65;
}

.prose h2 {
  margin: 1.75rem 0 0.85rem;
  line-height: 1.25;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose--narrow {
  max-width: 65ch;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-heading);
  margin: 1.35rem 0 0.5rem;
}

.prose p,
.prose li {
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.65;
}

.prose p + p {
  margin-top: 0.15rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem 1.2rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
}

.prose th,
.prose td {
  border: var(--border-width) solid var(--surface-border);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--neutral-50);
  font-weight: var(--font-weight-bold);
}

.prose .callout,
.legal-notice {
  border: 1px dashed var(--surface-border);
  background: var(--neutral-50);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}

.hub-card {
  border: var(--border-width) solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.3rem 1.15rem;
  background: var(--surface-elevated);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 13.5rem;
  border-top: 3px solid var(--brand-cyan);
}

.hub-card .solution-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0.75rem;
}

.hub-card:hover {
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
}

.hub-card:hover .hub-card-cta {
  text-decoration: underline;
}

.hub-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
  color: var(--text-heading);
}

.hub-card p {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-secondary);
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hub-card-cta {
  margin-top: 0.85rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--action-cyan);
  letter-spacing: 0.02em;
}

/* Brochure sections — features / approach / roles / pillars */
.section-features,
.section-approach,
.section-roles,
.section-pillars,
.section-home-approach {
  padding: var(--section-y) 0;
}

.section-features {
  background: var(--surface-page);
}

.section-approach,
.section-home-approach {
  background: var(--surface-muted);
  border-block: 1px solid var(--surface-border);
}

.section-roles,
.section-pillars {
  background: var(--surface-page);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-grid--spaced {
  margin-bottom: 2rem;
}

.feature-card {
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.3rem;
  border-top: 3px solid var(--brand-lime);
}

.section-features--sviluppo .feature-card,
.feature-card--accent-lime { border-top-color: var(--brand-lime); }
.section-features--bc365 .feature-card,
.feature-card--accent-cyan { border-top-color: var(--brand-cyan); }
.section-features--iiot .feature-card,
.section-features--sql .feature-card,
.feature-card--accent-gold { border-top-color: var(--brand-gold); }
.section-features--cloud .feature-card { border-top-color: var(--brand-cyan); }
.section-features--managed .feature-card { border-top-color: var(--brand-lime); }
.section-features--cyber .feature-card,
.feature-card--accent-coral { border-top-color: var(--brand-coral); }

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
  color: var(--text-heading);
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.approach-visual,
.roles-visual,
.pillars-visual {
  display: block;
  width: min(720px, 100%);
  margin: 0 auto 1.5rem;
  opacity: 0.95;
  height: auto;
}

.roles-visual,
.pillars-visual {
  width: min(640px, 100%);
}

.approach-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: approach;
}

.approach-steps li {
  counter-increment: approach;
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.2rem 1.25rem;
  position: relative;
}

.approach-steps li::before {
  content: counter(approach);
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.65rem;
  color: var(--text-heading);
  border: 2px solid var(--brand-cyan);
}

.approach-steps li:nth-child(1)::before { border-color: var(--brand-coral); }
.approach-steps li:nth-child(2)::before { border-color: var(--brand-cyan); }
.approach-steps li:nth-child(3)::before { border-color: var(--brand-lime); }

.approach-steps strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  color: var(--text-heading);
}

.approach-steps span {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.role-card {
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.2rem;
  border-top: 4px solid var(--brand-cyan);
}

.role-card--fornitori { border-top-color: var(--brand-gold); }
.role-card--agenti { border-top-color: var(--brand-lime); }
.role-card--admin { border-top-color: var(--brand-coral); }
.role-card--clienti { border-top-color: var(--brand-cyan); }

.role-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--text-heading);
}

.role-card ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.role-card li {
  margin-bottom: 0.35rem;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.pillar-card {
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.3rem;
  border-top: 4px solid var(--brand-cyan);
}

.pillar-card:nth-child(2) { border-top-color: var(--brand-gold); }
.pillar-card:nth-child(3) { border-top-color: var(--brand-lime); }

.pillar-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0.75rem;
  display: block;
}

.pillar-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
  color: var(--text-heading);
}

.pillar-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.contact-block {
  background: var(--neutral-50);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.85rem;
  position: relative;
  overflow: hidden;
  margin: 1.5rem 0;
}

.contact-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(
    180deg,
    var(--brand-coral),
    var(--brand-cyan),
    var(--brand-gold),
    var(--brand-lime)
  );
}

.contact-block-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  margin: 1rem 0 1.25rem;
}

.contact-block dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.contact-block dd {
  margin: 0.2rem 0 0;
  color: var(--text-heading);
}

.chip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.chip-grid li {
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-heading);
}

.section-prose-extra {
  padding: 0 0 var(--section-y);
}

.section-prose-extra .wrap {
  max-width: var(--container-c);
}

.related-section {
  padding: 0 0 var(--section-y);
}

.related {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: var(--border-width) solid var(--surface-border);
}

.related-section .related {
  margin-top: 0;
}

.related ul {
  list-style: none;
  margin-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.related a {
  display: inline-flex;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}

.related a:hover {
  border-color: var(--action-cyan);
}

/* Insights list */
.insights-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.insights-list li {
  border-bottom: var(--border-width) solid var(--surface-border);
  padding: 1rem 0;
}

.insights-list time {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.insights-list a {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: 1.05rem;
  color: var(--text-heading);
  text-decoration: none;
}

.insights-list a:hover {
  color: var(--action-cyan);
}

.insights-list p {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Contact form */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.form-panel {
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem 1.65rem;
  box-shadow: var(--shadow-sm);
}

.form-panel-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 1rem;
  color: var(--text-heading);
}

.form-stack {
  display: grid;
  gap: 0.9rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.form-stack label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-heading);
}

.form-stack input,
.form-stack select,
.form-stack textarea {
  font: inherit;
  padding: 0.7rem 0.8rem;
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-md);
  background: var(--neutral-0);
  color: var(--text-primary);
}

.form-stack textarea {
  min-height: 8rem;
  resize: vertical;
}

.checkbox-row {
  display: flex !important;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: var(--font-weight-regular) !important;
}

.checkbox-row input {
  margin-top: 0.2rem;
}

.field-hint {
  font-size: 0.75rem;
  font-weight: var(--font-weight-regular);
  color: var(--text-secondary);
}

.form-note {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
}

.contact-aside {
  background: var(--neutral-50);
  border: var(--border-width) solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.55rem;
  position: relative;
  overflow: hidden;
}

.contact-aside::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(
    180deg,
    var(--brand-coral),
    var(--brand-cyan),
    var(--brand-gold),
    var(--brand-lime)
  );
}

.contact-aside h2 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.contact-aside dl {
  display: grid;
  gap: 0.75rem;
}

.contact-aside dt {
  font-size: 0.72rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
}

.contact-aside dd {
  margin: 0.15rem 0 0;
}

/* Footer */
.site-footer {
  border-top: var(--border-width) solid var(--surface-border);
  padding: clamp(2.25rem, 4vw, 3rem) 0 1.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--surface-page);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 0.9fr 1.1fr;
  gap: 1.75rem;
  margin-bottom: 1.5rem;
}

.site-footer .footer-heading {
  font-size: 0.85rem;
  line-height: 1.4;
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-heading);
  margin: 0 0 0.75rem;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.footer-list li {
  margin-bottom: 0.35rem;
}

.footer-list a {
  display: inline-block;
  min-height: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-list a:hover {
  color: var(--action-cyan);
}

.footer-brand img {
  margin-bottom: 0.75rem;
}

.footer-brand p {
  margin-bottom: 0.45rem;
}

.footer-brand a[href^="mailto:"],
.footer-brand a[href^="tel:"] {
  display: inline-block;
  min-height: 24px;
  padding: 0.25rem 0;
  line-height: 1.5;
}

.footer-meta {
  margin-top: 0.5rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: var(--border-width) solid var(--surface-border);
}

/* 404 */
.error-page {
  padding: 4rem 0;
  text-align: center;
}

.error-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.75rem;
}

/* Responsive */
@media (max-width: 900px) {
  .product-grid,
  .footer-grid,
  .contact-grid,
  .page-hero-product,
  .page-hero--azienda .page-hero-inner,
  .role-grid,
  .pillar-grid,
  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .role-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-enhanced .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    flex-basis: 100%;
  }

  .nav-enhanced .primary-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--surface-page);
    border-bottom: var(--border-width) solid var(--surface-border);
    padding: 1rem var(--gutter) 1.25rem;
    box-shadow: var(--shadow-md);
    max-height: calc(100dvh - 5.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav-enhanced .primary-nav.is-open {
    display: block;
  }

  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .nav-enhanced .dropdown {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 0.75rem;
    margin-top: 0.25rem;
  }

  .header-actions--desktop {
    display: none;
  }

  .header-actions--mobile {
    display: block;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .hero-grid,
  .skills-grid,
  .cta-box,
  .product-media-strip,
  .feature-grid,
  .approach-steps,
  .contact-block-grid,
  .chip-grid {
    grid-template-columns: 1fr;
  }

  .hero-illustration,
  .hero-illustration--dominant {
    order: -1;
    min-width: 0;
    width: min(100%, 20rem);
    opacity: 0.85;
    margin-inline: auto;
  }

  .hero::before {
    width: 8rem;
    height: 10rem;
    opacity: 0.7;
  }

  .hero-illustration--page {
    display: none;
  }

  .approach-visual,
  .roles-visual,
  .pillars-visual {
    display: none;
  }
}

@media (max-width: 560px) {
  .card-grid,
  .role-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

main :is(p, li, figcaption, dd) a:not([class*="btn"]) {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}
