/* IuriSign – sito di presentazione.
   Motif: il foglio uso bollo (righe, margine) e il sigillo in ceralacca. */

@font-face { font-family: "Bodoni Moda"; src: url("../fonts/bodoni-moda-opsz-normal.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("../fonts/bodoni-moda-opsz-italic.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --inchiostro: #14213D;
  --inchiostro-2: #24365E;
  --inchiostro-3: #3B5183;
  --carta: #F6F7F9;
  --bianco: #FFFFFF;
  --grafite: #4A5160;
  --grafite-2: #6B7280;
  --linea: #D9DEE6;
  --linea-2: #E9ECF1;
  --ceralacca: #9B1C2E;
  --ceralacca-tenue: #F7E9EB;
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 66ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--inchiostro); background: var(--carta); }
img, svg { display: block; max-width: 100%; }
a { color: var(--inchiostro-3); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--inchiostro); }
:focus-visible { outline: 3px solid rgba(59, 81, 131, .5); outline-offset: 2px; border-radius: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; top: 8px; }

h1, h2, h3 { text-wrap: balance; font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0 0 .55em; font-optical-sizing: auto; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); font-weight: 400; }
h2 { font-size: clamp(1.75rem, 3vw, 2.45rem); max-width: 24ch; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 .98rem/1 var(--sans); padding: 12px 18px; border-radius: 6px; border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn--large { padding: 15px 24px; font-size: 1.02rem; }
.btn--ink { background: var(--inchiostro); color: #fff; }
.btn--ink:hover { background: var(--inchiostro-2); color: #fff; }
.btn--line { border-color: #BCC4D1; color: var(--inchiostro); background: transparent; }
.btn--line:hover { border-color: var(--inchiostro); color: var(--inchiostro); }
.btn--paper { background: #fff; color: var(--inchiostro); }
.btn--paper:hover { background: #E8ECF4; color: var(--inchiostro); }
.btn--ghost-light { border-color: rgba(255, 255, 255, .4); color: #fff; }
.btn--ghost-light:hover { border-color: #fff; color: #fff; }

/* Masthead */
.masthead { position: sticky; top: 0; z-index: 20; background: rgba(246, 247, 249, .92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--linea); }
.masthead__inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--inchiostro); text-decoration: none; font-family: var(--serif); font-size: 1.45rem; }
.logo svg { width: 30px; height: 30px; }
.mainnav { display: flex; gap: 22px; margin-left: auto; }
.mainnav a { color: var(--grafite); text-decoration: none; font-size: .95rem; }
.mainnav a:hover, .mainnav a[aria-current] { color: var(--inchiostro); text-decoration: underline; }
.masthead__cta { padding: 10px 16px; font-size: .93rem; }

/* Hero */
.hero { padding: 72px 0 84px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 64px; align-items: center; }
.hero h1 { max-width: 15ch; }
.lede { font-size: 1.2rem; color: var(--grafite); max-width: 52ch; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 18px; }
.hero__note { font-size: .9rem; color: var(--grafite-2); max-width: 48ch; }

.sheet { margin: 0; position: relative; }
.sheet__svg { width: 100%; height: auto; box-shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 30px 60px -30px rgba(20, 33, 61, .35); border-radius: 2px; transform: rotate(1.2deg); }
.sheet__title { font-family: var(--serif); font-size: 19px; fill: var(--inchiostro); font-weight: 600; }
.sheet__field { font-family: var(--sans); font-size: 8.5px; fill: var(--inchiostro-2); }
.sheet__label { font-family: var(--sans); font-size: 10px; fill: var(--grafite-2); }
.sheet__meta { font-family: var(--sans); font-size: 9px; fill: var(--grafite-2); }
.sheet__sig { fill: none; stroke: #0F1A33; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.2s .5s cubic-bezier(.5, .1, .3, 1) forwards; }
.sheet__seal { transform-origin: 342px 438px; opacity: 0; animation: press .45s 2.75s cubic-bezier(.2, .9, .3, 1.35) forwards; }
.sheet__seal-t { font-family: var(--serif); font-size: 19px; font-weight: 600; fill: #fff; letter-spacing: .06em; }
.sheet__seal-s { font-family: var(--sans); font-size: 8px; fill: #fff; opacity: .85; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes press { from { opacity: 0; transform: scale(1.6) rotate(-14deg); } to { opacity: 1; transform: scale(1) rotate(-8deg); } }

/* Sections: a left margin column carries the section name, like a note in the margin of a legal sheet */
.section, .band { padding: 92px 0; }
.band { background: var(--bianco); border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
.section--paper { background: var(--bianco); border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
.section--ink { background: var(--inchiostro); color: #DCE3F0; }
.section--ink h2 { color: #fff; }
.section--ink .marginal { color: #9FB0CF; border-color: rgba(255, 255, 255, .2); }
.margin-grid { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 48px; }
.marginal { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ceralacca); margin: 8px 0 0; padding-right: 18px; border-right: 1px solid rgba(155, 28, 46, .3); text-align: right; align-self: start; }
.intro { font-size: 1.1rem; color: var(--grafite); max-width: var(--measure); }
.section--ink .intro { color: #B9C5DC; }
.fine { font-size: .92rem; color: var(--grafite-2); max-width: var(--measure); margin-top: 22px; }

.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 34px 48px; margin: 34px 0 0; }
.reasons dt { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; margin-bottom: 8px; }
.reasons dd { margin: 0; color: var(--grafite); max-width: 46ch; }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.steps li { counter-increment: s; border-top: 1px solid var(--inchiostro); padding-top: 18px; }
.steps li::before { content: counter(s); display: block; font-family: var(--serif); font-size: 2.6rem; line-height: 1; margin-bottom: 14px; color: var(--inchiostro); }
.steps p { color: var(--grafite); }

.table-scroll { overflow-x: auto; margin-top: 30px; }
.compare { width: 100%; border-collapse: collapse; font-size: .98rem; min-width: 620px; }
.compare th, .compare td { text-align: left; padding: 15px 18px 15px 0; border-bottom: 1px solid var(--linea); vertical-align: top; }
.compare thead th { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; border-bottom: 1px solid var(--inchiostro); }
.compare tbody th { font-weight: 500; color: var(--grafite); width: 24%; }
.compare--check td:nth-child(2) { color: var(--inchiostro); font-weight: 500; }
.compare--check td:nth-child(3) { color: var(--grafite-2); }

.annotated { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0; margin: 34px 0; background: var(--bianco); border: 1px solid var(--linea); box-shadow: 0 24px 48px -32px rgba(20, 33, 61, .3); }
.annotated__text { padding: 34px 36px; font-family: var(--serif); font-size: 1.15rem; line-height: 1.75; border-right: 1px solid rgba(155, 28, 46, .3); }
.annotated__text p:last-child { margin: 0; }
.annotated mark { background: none; color: inherit; text-decoration: underline wavy #C89A3A; text-decoration-thickness: 1.5px; text-underline-offset: .22em; }
.annotated mark::after { content: attr(data-n); font-family: var(--sans); font-size: .62em; vertical-align: super; color: var(--ceralacca); margin-left: 2px; text-decoration: none; display: inline-block; }
.annotated__notes { margin: 0; padding: 34px 30px 34px 50px; font-size: .95rem; color: var(--grafite); display: flex; flex-direction: column; gap: 14px; background: #FBFCFD; }
.annotated__notes li::marker { color: var(--ceralacca); font-family: var(--serif); }
.annotated__notes strong { color: var(--inchiostro); font-weight: 600; }
.reasons--two { margin-top: 10px; }

.facts { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 0; max-width: 820px; }
.facts li { padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .14); color: #C9D3E6; }
.facts strong { color: #fff; font-weight: 600; }

.pricelist { display: grid; grid-template-columns: 1fr 1fr; margin: 34px 0 6px; max-width: 760px; border-top: 1px solid var(--inchiostro); }
.price { padding: 26px 28px 26px 0; }
.price + .price { padding-left: 28px; border-left: 1px solid var(--linea); }
.price__name { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--grafite); margin-bottom: 6px; }
.price__amount { margin: 0 0 8px; color: var(--grafite); }
.price__amount span { font-family: var(--serif); font-size: 3.4rem; line-height: 1; color: var(--inchiostro); margin-right: 6px; }
.price--main .price__amount span { color: var(--inchiostro); }
.price__detail { font-size: .93rem; color: var(--grafite-2); margin: 0; }
#prezzi .btn { margin-top: 12px; }

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--linea); }
.faq summary { cursor: pointer; padding: 18px 0; font-family: var(--serif); font-size: 1.22rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); color: var(--grafite-2); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--grafite); margin: 0 0 20px; max-width: var(--measure); }

.closing { background: var(--inchiostro); color: #fff; padding: 84px 0; }
.closing h2 { color: #fff; max-width: 22ch; font-weight: 400; }

.colophon { background: #0E182D; color: #9FB0CF; padding: 48px 0; font-size: .92rem; }
.colophon__inner { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.colophon__brand { font-family: var(--serif); font-size: 1.4rem; color: #fff; margin-bottom: 6px; }
.colophon nav { display: flex; flex-direction: column; gap: 6px; }
.colophon a { color: #C9D3E6; }
.colophon__legal { margin: 0; }

/* Inner pages */
.page { padding: 64px 0 90px; }
.page .margin-grid > div { max-width: 760px; }
.page h1 { font-size: clamp(2rem, 4vw, 3rem); }
.prose h2 { font-size: 1.45rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--grafite); }
.prose ul { padding-left: 1.2em; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; background: var(--bianco); border: 1px solid var(--linea); padding: 28px; border-radius: 6px; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-weight: 500; font-size: .93rem; margin-bottom: 6px; }
.form input, .form select, .form textarea { width: 100%; font: inherit; font-size: 1rem; padding: 11px 13px; border: 1px solid #C9D0DB; border-radius: 6px; background: #fff; color: var(--inchiostro); }
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--inchiostro-3); box-shadow: 0 0 0 3px rgba(59, 81, 131, .3); }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .92rem; color: var(--grafite); }
.form .check input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--inchiostro); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 18px; border-radius: 6px; margin-top: 22px; }
.alert--ok { background: #E6F1EB; border: 1px solid #BFDCCB; color: #1F4B37; }
.alert--err { background: var(--ceralacca-tenue); border: 1px solid #E5BCC2; color: #6E1320; }
.contact-aside { font-size: .95rem; color: var(--grafite); }

@media (max-width: 980px) {
  .mainnav { display: none; }
  .masthead__cta { margin-left: auto; }
  .hero { padding: 44px 0 60px; }
  .hero__grid { grid-template-columns: 1fr; gap: 44px; }
  .sheet { max-width: 420px; }
  .margin-grid { grid-template-columns: 1fr; gap: 14px; }
  .marginal { text-align: left; border-right: 0; border-bottom: 1px solid rgba(155, 28, 46, .3); padding: 0 0 8px; justify-self: start; }
  .section, .band { padding: 64px 0; }
  .reasons, .steps, .annotated, .pricelist, .colophon__inner { grid-template-columns: 1fr; }
  .annotated__text { border-right: 0; border-bottom: 1px solid rgba(155, 28, 46, .3); padding: 24px; }
  .annotated__notes { padding: 22px 22px 22px 40px; }
  .price + .price { padding-left: 0; border-left: 0; border-top: 1px solid var(--linea); }
  .form { grid-template-columns: 1fr; padding: 20px; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 18px; }
  body { font-size: 16px; }
  .masthead__cta { padding: 9px 12px; font-size: .88rem; }
  .logo { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sheet__sig { animation: none; stroke-dashoffset: 0; }
  .sheet__seal { animation: none; opacity: 1; transform: rotate(-8deg); }
}
