/* Font ospitati in locale (vedi LEGGIMI.txt per scaricare i file .woff2) */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/cormorant-garamond-600.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/cormorant-garamond-700.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("/fonts/cormorant-garamond-italic-500.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/hanken-grotesk-400.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/hanken-grotesk-500.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/hanken-grotesk-700.woff2") format("woff2"); }

  :root {
    --sky: #F4F1EA;
    --paper: #F4F1EA;
    --s1: #ECE2CA;
    --s2: #E2CDA6;
    --s3: #D6B785;
    --s4: #C79B6C;
    --s5: #7B5F47;
    --s6: #5C5346;
    --s7: #2E484B;
    --s8: #00404F;
    --brand: #00404F;
    --ink: #002B36;
    --ink-on-dark: #F4F1EA;
    --copper: #C47F3B;
    --accent: #9A5A1C;
    --accent-on-dark: #E3A866;
    --line: rgba(0,43,54,.28);
    --line-dark: rgba(244,241,234,.3);
    --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
    --text: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
    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"]) {
      --sky: #0D181B; --paper: #0D181B; --s1: #27271F; --s2: #24241D; --s3: #202019; --s4: #1D1D17; --s5: #1A1B16; --s6: #171A16; --s7: #131A1A; --s8: #0A1417;
      --brand: #F4F1EA; --ink: #EDE6D6; --ink-on-dark: #EDE6D6; --accent: #E3A866; --accent-on-dark: #E3A866;
      --line: rgba(237,230,214,.25); --line-dark: rgba(237,230,214,.25);
    }
  }
  :root[data-theme="dark"] {
    --sky: #0D181B; --paper: #0D181B; --s1: #27271F; --s2: #24241D; --s3: #202019; --s4: #1D1D17; --s5: #1A1B16; --s6: #171A16; --s7: #131A1A; --s8: #0A1417;
    --brand: #F4F1EA; --ink: #EDE6D6; --ink-on-dark: #EDE6D6; --accent: #E3A866; --accent-on-dark: #E3A866;
    --line: rgba(237,230,214,.25); --line-dark: rgba(237,230,214,.25);
  }
  html { scroll-padding-top: env(safe-area-inset-top, 0px); scroll-behavior: smooth; }
  * { box-sizing: border-box; }
  body { margin: 0; background: var(--sky); color: var(--ink); font-family: var(--text); font-size: 1.0625rem; line-height: 1.7; }
  a { color: inherit; text-underline-offset: 3px; }
  :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
    .wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

  /* Logo */
  .logo { display: inline-flex; align-items: center; gap: 16px; color: var(--brand); text-decoration: none; }
  .logo svg { width: 72px; height: 48px; flex: none; }
  .logo .word { display: flex; flex-direction: column; align-items: center; line-height: 1; }
  .logo .a { font-family: var(--display); font-weight: 600; font-size: 1.3rem; letter-spacing: .3em; margin-right: -.3em; }
  .logo .b { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 1.05rem; letter-spacing: .2em; margin: 6px -.2em 0 0; }
  footer .logo { color: var(--ink-on-dark); }

  /* Header */
  header .bar { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; justify-content: space-between; padding: 22px 24px; }
  nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-weight: 500; font-size: 1rem; }
  nav a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
  nav a:hover { border-bottom-color: var(--accent); }

  /* Hero (home) */
  .hero { padding: 56px 0 80px; }
  .hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(3.4rem, 10vw, 7.4rem); line-height: .92; letter-spacing: -.015em; margin: 0 0 28px; color: var(--brand); }
  .hero .lead { max-width: 48ch; margin: 0 0 36px; font-size: 1.25rem; line-height: 1.6; }
  .btn { display: inline-block; font-weight: 700; font-size: 1rem; text-decoration: none; background: var(--brand); color: var(--sky); padding: 14px 26px; border-radius: 2px; }
  .btn:hover { background: var(--accent); color: #fff; }
  :root[data-theme="dark"] .btn:hover { color: #0D181B; }

  /* Strata */
  .edge { display: block; width: 100%; height: 56px; background: var(--from); color: var(--to); }
  .edge path { fill: currentColor; }
  .band { background: var(--c); color: var(--ink); padding: 44px 0 64px; }
  .band.dark { color: var(--ink-on-dark); }
  .grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px 56px; align-items: start; }
  .band h2 { font-family: var(--display); font-weight: 700; font-size: clamp(2.1rem, 4.4vw, 3.1rem); line-height: 1.02; letter-spacing: -.01em; margin: 0; }
  .summary { margin: 0 0 16px; max-width: 52ch; font-size: 1.125rem; line-height: 1.6; }
  .go { display: inline-block; font-weight: 700; font-size: .98rem; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--accent); }
  .dark .go { text-decoration-color: var(--accent-on-dark); }

  .go:hover { text-decoration-thickness: 4px; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

  /* Contact (home) */
  .contact a.mail { font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 5vw, 3rem); line-height: 1.1; text-decoration-thickness: 3px; text-underline-offset: 8px; text-decoration-color: var(--accent-on-dark); word-break: break-word; }
  .contact dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 28px; margin: 32px 0 0; }
  .contact dt { opacity: .8; }
  .contact dd { margin: 0; word-break: break-word; }

  /* Detail pages */
  .pagehead { padding: 36px 0 64px; }
  .back { display: inline-block; font-weight: 500; font-size: .98rem; margin-bottom: 40px; text-decoration: underline; text-underline-offset: 4px; }
  .pagehead h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.8rem, 8vw, 5.6rem); line-height: .96; letter-spacing: -.015em; margin: 0 0 20px; max-width: 14ch; }
  .pagehead h1:focus { outline: none; }
  .pagehead .lead { margin: 0; max-width: 46ch; font-size: 1.2rem; line-height: 1.55; }
  .paper { background: var(--paper); padding: 40px 0 72px; }
  .body { max-width: 64ch; }
  .body h3 { font-family: var(--display); font-weight: 700; font-size: 1.7rem; line-height: 1.1; letter-spacing: -.005em; margin: 2em 0 .5em; color: var(--brand); }
  .body h3:first-child { margin-top: 0; }
  .body p { margin: 0 0 1em; }
  .body ul, .body ol { margin: 0 0 1em; padding-left: 1.3em; }
  .body li { margin-bottom: .6em; }
  .body li::marker { color: var(--accent); }
  .body a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
  .body dl { margin: 0 0 1em; }
  .body dt { font-weight: 700; margin-top: 1em; }
  .body dd { margin: 0; }
  .ask { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 3.4vw, 2.4rem); line-height: 1.1; margin: 0 0 .7em; padding-left: 20px; border-left: 4px solid var(--copper); color: var(--brand); }
  blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 4px solid var(--copper); font-family: var(--display); font-size: 1.3rem; line-height: 1.45; font-style: italic; }
  .role { font-weight: 500; margin: 0 0 1em; }

  .next { padding: 36px 0 56px; }
  .next .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; justify-content: space-between; }
  .next small { font-size: .95rem; opacity: .85; }
  .next a { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.05; text-decoration-thickness: 3px; text-underline-offset: 7px; text-decoration-color: var(--accent); }
  .next.dark a { text-decoration-color: var(--accent-on-dark); }

  footer { background: var(--s8); color: var(--ink-on-dark); padding: 0 0 calc(40px + env(safe-area-inset-bottom, 0px)); font-size: .95rem; }
  footer .wrap { border-top: 1px solid var(--line-dark); padding-top: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 24px 40px; }
  footer p { margin: 0; line-height: 1.6; }
  footer .links a { margin-right: 18px; }
  footer .links { margin-top: 10px !important; }

  @media (max-width: 760px) {
    .grid { grid-template-columns: 1fr; gap: 14px; }
    .hero { padding: 32px 0 60px; }
    .edge { height: 36px; }
    .band { padding: 32px 0 48px; }
    .contact dl { grid-template-columns: 1fr; gap: 0; }
    .contact dd { margin-bottom: 14px; }
    .logo .a { font-size: 1.05rem; }
    .logo .b { font-size: .9rem; }
    .logo svg { width: 48px; height: 32px; }
  }

.skip { position: absolute; left: -9999px; top: 0; background: var(--brand); color: var(--sky); padding: 10px 16px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
nav a[aria-current="page"] { border-bottom-color: var(--copper); }
.contact-list { max-width: 64ch; }
.contact-list a.mail { font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 5vw, 2.8rem); line-height: 1.1; color: var(--brand); text-decoration-thickness: 3px; text-underline-offset: 8px; text-decoration-color: var(--copper); word-break: break-word; }
.contact-list dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; margin: 32px 0 0; }
.contact-list dt { font-weight: 700; margin: 0; }
.contact-list dd { margin: 0; word-break: break-word; }
@media (max-width: 760px) { .contact-list dl { grid-template-columns: 1fr; gap: 0; } .contact-list dd { margin-bottom: 12px; } }

