@font-face { font-family: "Bodoni Moda"; src: url("/assets/fonts/bodoni-moda.woff2") format("woff2"); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
:root {
  --stone: #ECEBE7;
  --paper: #F6F5F2;
  --ink: #172440;
  --graphite: #4A5263;
  --rule: #C9C7C0;
  --leather: #8A5A34;
  --leather-soft: #E3D6C9;
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --stone: #111A2C; --paper: #16213A; --ink: #ECE9E3; --graphite: #AEB4C2;
    --rule: #2E3A55; --leather: #D39A68; --leather-soft: #3A2E27;
  }
}
:root[data-theme="dark"] {
  --stone: #111A2C; --paper: #16213A; --ink: #ECE9E3; --graphite: #AEB4C2;
  --rule: #2E3A55; --leather: #D39A68; --leather-soft: #3A2E27;
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: calc(4.5rem + env(safe-area-inset-top, 0px)); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--stone); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--leather); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--leather); }
:focus-visible { outline: 2px solid var(--leather); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--stone); padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; top: 1rem; }
h1, h2, h3 { font-family: var(--serif); font-optical-sizing: none; font-variation-settings: "opsz" 11; font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h3 { font-size: 1.45rem; font-weight: 500; }
p { margin: 0 0 1em; }
.lede { color: var(--graphite); max-width: 38rem; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--stone) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.top.scrolled { border-bottom-color: var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1rem; }
.brand { font-family: var(--serif); font-variation-settings: "opsz" 11; font-size: 1.2rem; text-decoration: none; white-space: nowrap; }
.top nav { display: flex; align-items: center; gap: 1.25rem; font-size: .95rem; }
.top nav a { text-decoration: none; }
.lang { display: flex; gap: .15rem; border: 1px solid var(--rule); border-radius: 2rem; padding: .15rem; }
.lang a, .lang span { padding: .15rem .6rem; border-radius: 2rem; font-size: .85rem; }
.lang span { background: var(--ink); color: var(--stone); }
.nav-links { display: none; gap: 1.25rem; }
@media (min-width: 60rem) { .nav-links { display: flex; } }

/* Hero */
.hero { padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero .wrap { display: grid; gap: 2.5rem; align-items: end; }
@media (min-width: 52rem) { .hero .wrap { grid-template-columns: 1.35fr 1fr; gap: 4rem; } }
.hero h1 {
  font-size: clamp(2.6rem, 6.2vw, 5rem); line-height: 1.02; letter-spacing: -0.02em;
  margin-bottom: 1.6rem; max-width: 13ch; text-wrap: balance;
}
.hero .who { font-size: 1.15rem; max-width: 34rem; color: var(--graphite); margin-bottom: 2rem; }
.hero .who strong { color: var(--ink); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem;
  padding: .7rem 1.4rem; border-radius: 2rem; font-weight: 500; text-decoration: none;
  border: 1px solid var(--ink); transition: background-color .2s, color .2s;
}
.btn-primary { background: var(--ink); color: var(--stone); }
.btn-primary:hover { background: var(--leather); border-color: var(--leather); color: var(--paper); }
.btn-ghost:hover { border-color: var(--leather); }
.portrait { margin: 0; position: relative; max-width: 26rem; justify-self: end; width: 100%; }
.portrait img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; }
.portrait::after {
  content: ""; position: absolute; inset: auto -0.9rem -0.9rem auto; width: 45%; height: 45%;
  border-right: 1px solid var(--leather); border-bottom: 1px solid var(--leather); pointer-events: none;
}
@media (max-width: 51.99rem) { .portrait { justify-self: start; max-width: 12.5rem; order: -1; } .portrait::after { inset: auto -0.6rem -0.6rem auto; } }

/* Sections */
section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-head { display: grid; gap: .8rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
@media (min-width: 52rem) { .section-head { grid-template-columns: 1fr 1.4fr; align-items: end; gap: 4rem; } }
.band { background: var(--paper); }

/* Misure: the tailor's card */
.measures { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.measures .dots { display: none; }
.measures li {
  display: grid; grid-template-columns: 1fr; gap: .25rem;
  padding: 1.15rem 0; border-bottom: 1px solid var(--rule);
}
@media (min-width: 40rem) {
  .measures li { grid-template-columns: auto 1fr auto; align-items: baseline; gap: 1rem; }
  .measures li::after { content: none; }
  .measures .dots { display: block; border-bottom: 1px dotted var(--graphite); opacity: .55; transform: translateY(-.3em); }
}
.measures .what { color: var(--graphite); }
.measures .value { font-family: var(--serif); font-variation-settings: "opsz" 11; font-size: clamp(1.6rem, 3.2vw, 2.2rem); line-height: 1.1; font-weight: 500; }
@media (min-width: 40rem) { .measures .value { text-align: right; } }
.measures-note { font-size: .9rem; color: var(--graphite); margin-top: 1rem; }

/* Approach */
.principles { display: grid; gap: 2rem; }
@media (min-width: 52rem) { .principles { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }
.principles h3 { margin-bottom: .7rem; padding-top: 1rem; border-top: 2px solid var(--leather); display: inline-block; }
.principles p { color: var(--graphite); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { display: grid; gap: .5rem 3rem; padding: 2rem 0; border-top: 1px solid var(--rule); }
.timeline > li:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 52rem) { .timeline > li { grid-template-columns: 10rem 1fr; } }
.timeline .when { font-variant-numeric: tabular-nums; color: var(--leather); font-weight: 500; }
.timeline h3 { margin-bottom: .2rem; }
.timeline .sector { color: var(--graphite); font-size: .95rem; margin-bottom: .9rem; }
.role { font-weight: 600; margin: 0 0 .35rem; }
.role span { font-weight: 400; color: var(--graphite); }
.timeline .body { max-width: 44rem; }
.timeline .body p:last-child { margin-bottom: 0; }
.source { font-size: .9rem; }
.timeline > li.compact { padding: 1.15rem 0; }
.timeline .compact h3 { font-size: 1.2rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .8rem; margin-bottom: .35rem; }
.sector-inline { font-family: var(--sans); font-size: .9rem; color: var(--graphite); font-weight: 400; letter-spacing: 0; }
.role-inline { font-weight: 600; }
.compact p { margin: 0; color: var(--graphite); }
.compact .role-inline { color: var(--ink); }

/* Skills */
.skills { display: grid; gap: 3rem; }
@media (min-width: 52rem) { .skills { grid-template-columns: 1.2fr 1fr; gap: 5rem; } }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: .85rem 0; border-top: 1px solid var(--rule); }
.plain li strong { display: block; font-weight: 600; }
.plain li span { color: var(--graphite); }
.stack h3 { font-size: 1.15rem; margin: 1.6rem 0 .6rem; }
.stack h3:first-child { margin-top: 0; }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.tags li { border: 1px solid var(--rule); border-radius: 2rem; padding: .3rem .8rem; font-size: .92rem; background: var(--paper); }
.band .tags li { background: var(--stone); }

/* Year lists */
.years { list-style: none; margin: 0; padding: 0; }
.years li { display: grid; gap: .2rem 2rem; padding: 1.1rem 0; border-top: 1px solid var(--rule); }
@media (min-width: 40rem) { .years li { grid-template-columns: 7rem 1fr; } }
.years .when { color: var(--leather); font-variant-numeric: tabular-nums; font-weight: 500; }
.years .what span { display: block; color: var(--graphite); font-size: .96rem; }
.twocol { display: grid; gap: 3.5rem; }
@media (min-width: 60rem) { .twocol { grid-template-columns: 1fr 1fr; gap: 5rem; } }
.twocol h2 { margin-bottom: 1.5rem; }

/* FAQ */
.faq { max-width: 50rem; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.2rem 2.5rem 1.2rem 0; position: relative;
  font-family: var(--serif); font-variation-settings: "opsz" 11; font-size: 1.3rem; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .4rem; top: 50%; width: .7rem; height: .7rem;
  border-right: 1.5px solid var(--leather); border-bottom: 1.5px solid var(--leather);
  transform: translateY(-70%) rotate(45deg); transition: transform .25s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: var(--graphite); padding-bottom: 1.2rem; margin: 0; max-width: 42rem; }

/* Contact */
.contact { background: var(--ink); color: var(--stone); }
.contact h2 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin-bottom: 1rem; max-width: 14ch; }
.contact p { color: color-mix(in srgb, var(--stone) 78%, var(--ink)); max-width: 34rem; margin-bottom: 2rem; }
.contact .btn { border-color: var(--stone); }
.contact .btn-primary { background: var(--stone); color: var(--ink); }
.contact .btn-primary:hover { background: var(--leather); border-color: var(--leather); color: #fff; }
.contact a:hover { color: inherit; }

/* Footer */
footer { padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom, 0px)); font-size: .9rem; color: var(--graphite); }
footer .wrap { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--leather); text-underline-offset: .2em; }

/* Cookie banner */
.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 0 var(--gutter) calc(1rem + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}
.consent[hidden] { display: none; }
.consent .box {
  pointer-events: auto; max-width: 44rem; margin: 0 auto; background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 12px; padding: 1.25rem 1.4rem;
  box-shadow: 0 18px 40px -20px rgba(23, 36, 64, .45); position: relative;
}
.consent h2 { font-size: 1.3rem; margin-bottom: .5rem; padding-right: 2rem; }
.consent p { font-size: .95rem; color: var(--graphite); margin-bottom: 1rem; }
.consent .row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.consent .btn { width: 100%; min-height: 2.75rem; cursor: pointer; font: inherit; font-weight: 500; }
.consent .btn-ghost { background: transparent; color: var(--ink); }
.consent .close {
  position: absolute; top: .7rem; right: .7rem; width: 2.25rem; height: 2.25rem; border: 0; background: none;
  color: var(--graphite); font-size: 1.4rem; line-height: 1; cursor: pointer; border-radius: 50%;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Legal and utility pages */
.legal { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3.5rem, 8vw, 6rem); }
.legal .wrap > * { max-width: 46rem; }
.legal h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); margin-bottom: .8rem; }
.legal h2 { font-size: 1.6rem; margin: 2.6rem 0 .8rem; }
.legal h3 { font-size: 1.2rem; margin: 1.6rem 0 .5rem; }
.legal p, .legal li { color: var(--graphite); }
.legal strong { color: var(--ink); }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .4rem; }
.updated { font-size: .95rem; color: var(--graphite); }
.table-scroll { overflow-x: auto; margin: 1rem 0 1.5rem; max-width: 46rem; }
.legal table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: .95rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: .7rem .8rem .7rem 0; border-top: 1px solid var(--rule); }
.legal th { font-weight: 600; color: var(--ink); }
.legal td { color: var(--graphite); }
.notfound { min-height: 60vh; display: flex; align-items: center; }

.noscript-mail { margin-top: 1.5rem; }
.actions-spaced { margin-top: 1.5rem; }

/* Schermi molto stretti (320px, zoom 400%) */
@media (max-width: 23rem) {
  .brand { font-size: 1.02rem; }
  .top .wrap { gap: .5rem; }
  .top nav { gap: .7rem; font-size: .9rem; }
  .lang a, .lang span { padding: .2rem .45rem; }
}
