/* aswell.eu — portale
   Vanilla CSS, mobile-first. */

@view-transition { navigation: auto; }

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --brand-blue: #2893c2;
  --brand-orange: #d4881e;
  --brand-purple: #7b3fb0;
  --brand-red: #c8102e;
  --brand-yellow: #f2c500;
  --brand-navy: #1c1f4a;

  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --surface: rgba(255, 255, 255, .72);
  --surface-solid: #ffffff;
  --surface-border: rgba(0, 0, 0, .07);
  --text: #3d4456;
  --heading: #343b4f;
  --muted: #697083;
  --accent: #136f99;
  --accent-contrast: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px -12px rgba(16, 24, 40, .14);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .04), 0 30px 60px -20px rgba(16, 24, 40, .22);
  --orb-opacity: .55;

  --grad: linear-gradient(100deg, var(--brand-blue) 0%, var(--brand-purple) 52%, var(--brand-orange) 100%);

  --radius-s: 14px;
  --radius: 22px;
  --radius-l: 32px;
  --gutter: clamp(20px, 5vw, 40px);
  --maxw: 1120px;
  --nav-h: 56px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1f2a;
    --bg-alt: #222735;
    --surface: rgba(44, 50, 66, .66);
    --surface-solid: #2a3041;
    --surface-border: rgba(255, 255, 255, .09);
    --text: #e6e8ee;
    --heading: #f0f1f5;
    --muted: #a3a7b3;
    --accent: #6cc4ee;
    --accent-contrast: #001a26;
    --shadow: 0 1px 2px rgba(8, 11, 20, .25), 0 12px 32px -12px rgba(8, 11, 20, .45);
    --shadow-lg: 0 2px 6px rgba(8, 11, 20, .25), 0 30px 60px -20px rgba(8, 11, 20, .55);
    --orb-opacity: .32;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #1b1f2a;
  --bg-alt: #222735;
  --surface: rgba(44, 50, 66, .66);
  --surface-solid: #2a3041;
  --surface-border: rgba(255, 255, 255, .09);
  --text: #e6e8ee;
  --heading: #f0f1f5;
  --muted: #a3a7b3;
  --accent: #6cc4ee;
  --accent-contrast: #001a26;
  --shadow: 0 1px 2px rgba(8, 11, 20, .25), 0 12px 32px -12px rgba(8, 11, 20, .45);
  --shadow-lg: 0 2px 6px rgba(8, 11, 20, .25), 0 30px 60px -20px rgba(8, 11, 20, .55);
  --orb-opacity: .32;
  color-scheme: dark;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--safe-t) + 24px);
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -.011em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
h1, h2, h3, h4 { color: var(--heading); }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

main:focus { outline: none; }

::selection { background: color-mix(in srgb, var(--brand-blue) 28%, transparent); }

.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-left: max(var(--gutter), var(--safe-l));
  padding-right: max(var(--gutter), var(--safe-r));
}
.container.narrow { max-width: calc(860px + var(--gutter) * 2); }

.skip-link {
  position: fixed;
  top: calc(var(--safe-t) + 10px);
  left: calc(var(--safe-l) + 10px);
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform .25s var(--ease);
}
.skip-link:focus { transform: none; text-decoration: none; }

.muted { color: var(--muted); }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.eyebrow.light { color: rgba(255, 255, 255, .85); }

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Glass ---------- */

.glass {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.glass-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font: 600 17px/1 var(--font);
  letter-spacing: -.01em;
  border: 1px solid transparent;
  transition: transform .25s var(--ease-spring), background-color .2s, box-shadow .25s, color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: var(--shadow);
}
.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--surface-border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover { background: var(--surface-solid); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background-color .2s;
}
.icon-btn:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Scroll progress ---------- */

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 60;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(0);
  display: none;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: calc(var(--safe-t) + 10px) max(12px, var(--safe-r)) 0 max(12px, var(--safe-l));
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--maxw);
  min-height: var(--nav-h);
  margin-inline: auto;
  padding: 0 10px 0 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: box-shadow .3s, background-color .3s;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.03em;
}
.brand:hover { text-decoration: none; }
.brand { position: relative; z-index: 0; }
@property --mark-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes mark-ring { to { --mark-angle: 360deg; } }

/* Stesso anello conico di savignano.aswell.eu/links */
.brand-mark {
  --ring: conic-gradient(from var(--mark-angle), #262a5e, #d1087a, #b3a414, #1a8f3e, #2a74c0, #9fd6d8, #262a5e);
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 2.5px solid transparent;
  border-radius: 10px;
  background:
    linear-gradient(#262a5e, #171a3f) padding-box,
    var(--ring) border-box;
  box-shadow: inset 0 0 0 1.5px #fff;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  animation: mark-ring 6s linear infinite;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: -1;
  border-radius: 14px;
  background: var(--ring);
  filter: blur(7px);
  opacity: .45;
}
.brand-tld { color: var(--muted); font-weight: 500; }

.nav-toggle {
  display: inline-grid;
  place-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.7px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.85px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.85px) rotate(-45deg); }

.nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-solid);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.98);
  transform-origin: top center;
  transition: opacity .25s var(--ease), transform .3s var(--ease), visibility 0s .3s;
}
.nav-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .25s var(--ease), transform .3s var(--ease), visibility 0s;
}
.nav-links { display: grid; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
}
.nav-links a:hover { text-decoration: none; background: var(--bg-alt); }
.nav-links a[aria-current="true"] { color: var(--accent); }

.nav-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 6px 2px;
  border-top: 1px solid var(--surface-border);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 7%, transparent);
}
.segmented button {
  min-width: 40px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 600 13px/1 var(--font);
  letter-spacing: .02em;
  cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.segmented button[aria-pressed="true"] {
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .theme-toggle .i-sun { display: none; }
  :root[data-theme="auto"] .theme-toggle .i-moon { display: block; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav-menu {
    position: static;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-links { display: flex; gap: 2px; }
  .nav-links a { padding: 8px 12px; font-size: 14px; border-radius: 999px; color: color-mix(in srgb, var(--text) 82%, transparent); }
  .nav-links a:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
  .nav-tools { padding: 0; border: 0; gap: 6px; }
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding-block: clamp(72px, 10vw, 128px);
}

.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.06;
  letter-spacing: -.035em;
  font-weight: 700;
  text-wrap: balance;
}

.section-lead {
  margin-top: 18px;
  font-size: clamp(19px, 2.2vw, 22px);
  line-height: 1.4;
  color: var(--muted);
  text-wrap: pretty;
}

.big-copy {
  font-size: clamp(20px, 2.5vw, 26px);
  line-height: 1.38;
  letter-spacing: -.02em;
  font-weight: 500;
  text-wrap: pretty;
}
.big-copy.muted strong, .big-copy strong { font-weight: 650; }

.fineprint { margin-top: 20px; font-size: 13px; color: var(--muted); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--nav-h) + var(--safe-t) + 72px) 0 calc(96px + var(--safe-b));
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

.hero-aura {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--brand-blue) 10%, transparent) 0%, transparent 60%),
    linear-gradient(to bottom, transparent 70%, var(--bg) 100%);
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: var(--orb-opacity);
  will-change: transform;
}
.orb-1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -10vmax; background: radial-gradient(circle, var(--brand-blue), transparent 68%); }
.orb-2 { width: 40vmax; height: 40vmax; right: -14vmax; top: 4vmax; background: radial-gradient(circle, var(--brand-purple), transparent 68%); }
.orb-3 { width: 36vmax; height: 36vmax; left: 22vmax; bottom: -18vmax; background: radial-gradient(circle, var(--brand-orange), transparent 68%); }

.hero-inner { display: grid; justify-items: center; }

.hero-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: .28em;
  font-family: var(--font-display);
  font-size: clamp(48px, 11vw, 112px);
  line-height: 1;
  letter-spacing: -.045em;
  font-weight: 800;
  max-width: 14ch;
}
.hero-title .gradient-text { padding-bottom: .08em; }

.lead {
  max-width: 640px;
  margin-top: 28px;
  font-size: clamp(19px, 2.4vw, 23px);
  line-height: 1.45;
  color: var(--muted);
  text-wrap: pretty;
}
.lead em { color: var(--text); font-style: normal; font-weight: 600; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: calc(28px + var(--safe-b));
  translate: -50% 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 48px;
  border-radius: 999px;
  border: 1.6px solid color-mix(in srgb, var(--text) 30%, transparent);
}
.scroll-hint span {
  width: 4px;
  height: 9px;
  border-radius: 4px;
  background: var(--text);
  opacity: .6;
}

/* ---------- Philosophy ---------- */

.philosophy { background: var(--bg); }
.philo-grid { display: grid; gap: 28px; margin-top: 40px; }
.philo-grid em { font-style: normal; color: var(--accent); }

.subdomain-figure {
  margin-top: clamp(56px, 8vw, 88px);
  padding: clamp(28px, 5vw, 48px) clamp(20px, 4vw, 40px);
  border-radius: var(--radius-l);
  background: var(--bg-alt);
  text-align: center;
  overflow: hidden;
}
.subdomain-line {
  font-family: var(--mono);
  font-size: clamp(22px, 5.4vw, 52px);
  font-weight: 600;
  letter-spacing: -.03em;
  white-space: nowrap;
}
.sd-name { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sd-dot, .sd-root { color: var(--text); }
.subdomain-figure figcaption { margin-top: 14px; color: var(--muted); font-size: 15px; }

/* ---------- Values ---------- */

.mission { background: var(--bg-alt); }

.values-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .values-grid { grid-template-columns: repeat(4, 1fr); } }

.value-card { padding: 28px 26px 30px; background: var(--surface-solid); }
.value-card h3 { margin-top: 22px; font-size: 21px; letter-spacing: -.02em; }
.value-card p { margin-top: 8px; color: var(--muted); font-size: 16px; }

.value-icon, .card-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #fff;
}
.value-icon svg, .card-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-icon svg.fill { fill: currentColor; stroke: none; }

.v-seed, .c-green { background: linear-gradient(135deg, #34c759, #1f9d55); }
.v-grow, .c-blue { background: linear-gradient(135deg, #3fb0e0, var(--brand-blue)); }
.v-include, .c-purple { background: linear-gradient(135deg, #a56be0, var(--brand-purple)); }
.v-share, .c-orange { background: linear-gradient(135deg, #f0a540, var(--brand-orange)); }
.c-dark { background: linear-gradient(135deg, #6b7387, #454c60); }
.c-plus { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }

/* ---------- Initiatives ---------- */

.cards-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
.cards-grid > li { display: grid; }
@media (min-width: 640px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .cards-grid > li:first-child, .cards-grid > li:last-child { grid-column: span 2; }
}

.init-card {
  --mx: 50%;
  --my: 50%;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 28px 26px;
  color: var(--text);
  overflow: hidden;
  transition: transform .45s var(--ease-spring), box-shadow .35s var(--ease), border-color .3s;
}
.init-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--brand-blue) 12%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.init-card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.init-card:hover::before { opacity: 1; }
a.init-card:active { transform: scale(.985); }

.card-url {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.init-card h3 { margin-top: 6px; font-size: 24px; letter-spacing: -.025em; line-height: 1.15; }
.init-card p { margin-top: 10px; color: var(--muted); font-size: 16px; max-width: 46ch; }
.card-arrow {
  margin-top: auto;
  align-self: flex-end;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 7%, transparent);
  font-size: 17px;
  transition: transform .35s var(--ease-spring), background-color .25s, color .25s;
}
.init-card:hover .card-arrow { transform: translateX(3px); background: var(--accent); color: var(--accent-contrast); }
.init-card > p { margin-bottom: 22px; }

.card-links { position: relative; display: grid; gap: 8px; margin-top: auto; }
.card-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 16px;
  border-radius: var(--radius-s);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  color: var(--text);
  transition: background-color .25s, transform .35s var(--ease-spring);
}
.card-links a:hover { text-decoration: none; background: color-mix(in srgb, var(--brand-purple) 12%, transparent); transform: translateX(2px); }
.cl-text { display: grid; gap: 1px; }
.cl-label { font-size: 15px; font-weight: 600; color: var(--heading); }
.cl-url { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.cl-arrow {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-solid);
  font-size: 15px;
  transition: background-color .25s, color .25s;
}
.card-links a:hover .cl-arrow { background: var(--brand-purple); color: #fff; }

.card-featured {
  background:
    linear-gradient(140deg, color-mix(in srgb, var(--brand-blue) 14%, var(--surface-solid)) 0%, var(--surface-solid) 55%, color-mix(in srgb, var(--brand-orange) 10%, var(--surface-solid)) 100%);
}
.card-featured h3 { font-size: clamp(26px, 3.4vw, 34px); }

.card-next {
  background: transparent;
  border: 1.5px dashed color-mix(in srgb, var(--text) 22%, transparent);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* ---------- Savignano ---------- */

.savignano { background: var(--bg); }

.sav-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-l);
  aspect-ratio: 4 / 5;
  clip-path: inset(0 round var(--radius-l));
  isolation: isolate;
  box-shadow: var(--shadow-lg);
  background: var(--bg-alt);
}
@media (min-width: 640px) { .sav-media { aspect-ratio: 16 / 10; } }
@media (min-width: 1000px) { .sav-media { aspect-ratio: 2 / 1; } }

.sav-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 50%;
  transform-origin: 50% 60%;
}
.sav-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: clamp(24px, 5vw, 48px);
  padding-top: 120px;
  background: linear-gradient(to top, rgba(0, 0, 0, .62), rgba(0, 0, 0, .25) 55%, transparent);
  color: #fff;
}
.sav-title {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 88px);
  line-height: 1;
  letter-spacing: -.045em;
  font-weight: 800;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}

.sav-body { display: grid; gap: 40px; margin-top: clamp(40px, 6vw, 64px); max-width: 980px; }
.sav-points { display: grid; gap: 24px; }
@media (min-width: 760px) { .sav-points { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.sav-points li { padding-top: 18px; border-top: 1px solid var(--surface-border); }
.sav-points h3 { font-size: 19px; letter-spacing: -.02em; }
.sav-points p { margin-top: 6px; color: var(--muted); font-size: 16px; }

.projects { margin-top: clamp(64px, 9vw, 104px); }
.projects-head { margin-bottom: 28px; }
.projects-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 36px);
  line-height: 1.1;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.projects-grid { display: grid; gap: 16px; }
.projects-grid > li { display: grid; }
@media (min-width: 760px) { .projects-grid { grid-template-columns: repeat(3, 1fr); } }
.project-card { min-height: 0; }
.project-card h4 { margin-top: 6px; font-size: 22px; letter-spacing: -.025em; line-height: 1.15; }
.project-card p { font-size: 15.5px; }

/* ---------- LoopTech ---------- */

.looptech {
  background:
    radial-gradient(60% 80% at 15% 50%, color-mix(in srgb, var(--brand-purple) 9%, transparent), transparent 70%),
    radial-gradient(50% 70% at 90% 30%, color-mix(in srgb, var(--brand-yellow) 10%, transparent), transparent 70%),
    var(--bg-alt);
  overflow: hidden;
}
.looptech-grid { display: grid; gap: clamp(40px, 6vw, 80px); align-items: center; }
@media (min-width: 900px) { .looptech-grid { grid-template-columns: 1.05fr 1fr; } }

.logo-plate {
  display: grid;
  place-items: center;
  padding: clamp(32px, 6vw, 64px);
  border-radius: var(--radius-l);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .06);
  box-shadow: var(--shadow-lg);
}
.logo-plate img { width: min(100%, 420px); }

.looptech-copy .big-copy { margin-top: 20px; }
.looptech-copy .muted { margin-top: 16px; font-size: 18px; }
.looptech-copy em { font-style: normal; color: var(--text); font-weight: 600; }

/* ---------- Join ---------- */

.join { background: var(--bg); }

.steps { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 28px 26px; background: var(--surface-solid); }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}
.step h3 { margin-top: 18px; font-size: 21px; letter-spacing: -.02em; }
.step p { margin-top: 8px; color: var(--muted); font-size: 16px; }

.contact-panel {
  display: grid;
  gap: 28px;
  margin-top: 40px;
  padding: clamp(28px, 5vw, 48px);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-blue) 9%, transparent), color-mix(in srgb, var(--brand-orange) 8%, transparent)),
    var(--surface);
}
@media (min-width: 900px) {
  .contact-panel { grid-template-columns: 1fr 1.3fr; grid-template-areas: "copy card" "list list"; align-items: center; column-gap: 40px; }
  .contact-copy { grid-area: copy; }
  .email-card { grid-area: card; }
  .contact-list { grid-area: list; }
}

/* Biglietto da visita: email annotata */
.email-card {
  --ink: #3d4456;
  --hand: "Bradley Hand", "Segoe Print", "Comic Neue", "Chalkboard SE", "Marker Felt", cursive;
  --bracket: 1.4px solid color-mix(in srgb, var(--ink) 70%, transparent);
  position: relative;
  display: grid;
  justify-items: center;
  padding: clamp(58px, 9vw, 72px) clamp(16px, 4vw, 40px) clamp(30px, 5vw, 38px);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f7f7f5);
  color: var(--ink);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 18px 40px -18px rgba(16, 24, 40, .35);
  rotate: -1.2deg;
  transition: rotate .5s var(--ease-spring), box-shadow .3s, transform .5s var(--ease-spring);
}
.email-card:hover { text-decoration: none; rotate: 0deg; transform: translateY(-3px); }
.email-card:hover .ec-seg::before, .email-card:hover .ec-line::after { border-color: var(--brand-blue); }

.ec-line {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  font-family: ui-serif, "New York", Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 6.4vw, 44px);
  letter-spacing: -.01em;
  white-space: nowrap;
  padding-bottom: 34px;
}
.ec-seg { position: relative; }
.ec-seg::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: calc(100% + 2px);
  height: 10px;
  border: var(--bracket);
  border-bottom: 0;
  transition: border-color .3s;
}
.ec-seg::after, .ec-line::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 0;
  border-left: var(--bracket);
}
.ec-seg::after { bottom: calc(100% + 12px); height: 8px; }

.ec-line::after {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  bottom: 8px;
  height: 22px;
  border: var(--bracket);
  border-top: 0;
  transition: border-color .3s;
}
.ec-line::before { bottom: 0; height: 8px; }

.ec-tag {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 18px);
  translate: -50% 0;
  font-family: var(--hand);
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
}
.ec-tag-bottom { position: static; translate: none; margin-top: 4px; }
.contact-copy h3 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.03em; line-height: 1.1; }
.contact-copy p { margin-top: 10px; color: var(--muted); }

.contact-list { display: grid; gap: 10px; }
@media (min-width: 560px) {
  .contact-list { grid-template-columns: repeat(2, 1fr); }
  .contact-list > li:last-child:nth-child(odd) { grid-column: span 2; }
}
@media (min-width: 760px) {
  .contact-list { grid-template-columns: repeat(6, 1fr); }
  .contact-list > li { grid-column: span 2; }
  .contact-list > li:nth-last-child(-n+2):nth-child(3n+1),
  .contact-list > li:nth-last-child(-n+2):nth-child(3n+1) ~ li { grid-column: span 3; }
  .contact-list > li:last-child:nth-child(3n+1) { grid-column: span 6; }
}
.contact-item {
  display: grid;
  align-content: start;
  gap: 2px;
  height: 100%;
  padding: 16px 18px;
  border-radius: var(--radius-s);
  background: var(--surface-solid);
  border: 1px solid var(--surface-border);
  color: var(--text);
  transition: transform .3s var(--ease-spring), box-shadow .3s;
}
a.contact-item:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.ci-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.ci-value { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 64px 0 calc(28px + var(--safe-b));
  background: var(--bg-alt);
  border-top: 1px solid var(--surface-border);
  font-size: 14px;
}
.footer-grid { display: grid; gap: 36px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand p { margin-top: 14px; max-width: 42ch; }
.footer-h { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.footer-nav ul { display: grid; gap: 8px; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--surface-border);
  color: var(--muted);
  font-size: 12.5px;
}
.to-top { color: var(--muted); }

/* ---------- Motion ---------- */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(.94); }
  to { opacity: 1; transform: none; }
}
@keyframes orb-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(4vmax, 3vmax, 0) scale(1.06); }
  66% { transform: translate3d(-3vmax, 2vmax, 0) scale(.96); }
}
@keyframes scroll-dot {
  0% { transform: translateY(-8px); opacity: 0; }
  40% { opacity: .7; }
  100% { transform: translateY(10px); opacity: 0; }
}
@keyframes progress { to { transform: scaleX(1); } }
@keyframes hero-out { to { opacity: 0; transform: translateY(-40px) scale(.97); } }
@keyframes img-zoom { from { transform: scale(1.14); } to { transform: scale(1); } }

@media (prefers-reduced-motion: no-preference) {
  .orb { animation: orb-float 22s ease-in-out infinite; }
  .orb-2 { animation-duration: 26s; animation-delay: -6s; }
  .orb-3 { animation-duration: 30s; animation-delay: -12s; }
  .scroll-hint span { animation: scroll-dot 2s var(--ease) infinite; }

  /* Fallback: IntersectionObserver (classe .is-visible aggiunta via JS) */
  .js .reveal, .js .reveal-scale {
    opacity: 0;
    transition: opacity .9s var(--ease), transform .9s var(--ease);
  }
  .js .reveal { transform: translateY(28px); }
  .js .reveal-scale { transform: scale(.94); }
  .js .reveal.is-visible, .js .reveal-scale.is-visible { opacity: 1; transform: none; }

  .hero .reveal:nth-child(2) { transition-delay: .08s; }
  .hero .reveal:nth-child(3) { transition-delay: .16s; }
  .hero .reveal:nth-child(4) { transition-delay: .24s; }
  .values-grid > :nth-child(2), .cards-grid > :nth-child(2), .steps > :nth-child(2), .sav-points > :nth-child(2) { transition-delay: .08s; }
  .values-grid > :nth-child(3), .cards-grid > :nth-child(3), .steps > :nth-child(3), .sav-points > :nth-child(3) { transition-delay: .16s; }
  .values-grid > :nth-child(4), .cards-grid > :nth-child(4) { transition-delay: .24s; }
  .cards-grid > :nth-child(5) { transition-delay: .32s; }

  /* Scroll-driven animations (CSS nativo) dove supportate */
  @supports (animation-timeline: view()) {
    .scroll-progress {
      display: block;
      animation: progress linear both;
      animation-timeline: scroll(root block);
    }

    .js .reveal, .js .reveal-scale {
      opacity: 1;
      transform: none;
      transition: none;
      animation: fade-up linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }
    .js .reveal-scale { animation-name: scale-in; animation-range: entry 0% cover 35%; }
    .js .hero .reveal { animation: fade-up .9s var(--ease) both; animation-timeline: auto; }
    .js .hero .reveal:nth-child(2) { animation-delay: .08s; }
    .js .hero .reveal:nth-child(3) { animation-delay: .16s; }
    .js .hero .reveal:nth-child(4) { animation-delay: .24s; }

    .hero-inner {
      animation: hero-out linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 85vh;
    }
    .sav-media img {
      animation: img-zoom linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 60%;
    }
  }

  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: var(--ease); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Contrast / Fallbacks ---------- */

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .glass-card { background: var(--surface-solid); }
}

@media (prefers-contrast: more) {
  :root { --muted: var(--text); --surface-border: currentColor; }
  .glass, .glass-card { background: var(--surface-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (forced-colors: active) {
  .gradient-text, .sd-name { background: none; color: CanvasText; }
  .btn, .glass-card, .nav { border: 1px solid CanvasText; }
}

@media print {
  .site-header, .scroll-progress, .scroll-hint, .hero-aura { display: none; }
  .hero { min-height: auto; padding-top: 24px; }
  .js .reveal, .js .reveal-scale { opacity: 1 !important; transform: none !important; animation: none !important; }
}
