/* Ilion Holding
   Layout: "opera quadrata". La pagina è costruita a corsi, come un muro di blocchi squadrati:
   le sezioni sono filari separati da giunti sottili, le aree d'investimento sono conci sfalsati
   di una griglia a 12 colonne con il giunto (gap) in colore malta. */

@font-face {
  font-family: "Marcellus";
  src: url("../fonts/marcellus-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* colore */
  --bg: #ecece7;          /* pietra calcarea */
  --surface: #f6f6f2;
  --ink: #10201f;         /* inchiostro verde-nero */
  --muted: #4f5c59;
  --line: #c9cec8;        /* giunto */
  --mortar: #d6d9d3;
  --sea: #1f4a4c;         /* Adriatico */
  --bronze: #8a5f25;      /* bronzo, scurito per il contrasto su pietra */
  --on-sea: #eef1ec;
  --focus: #a0712f;

  /* tipografia */
  --font-display: "Marcellus", "Trajan Pro", "Cinzel", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.86rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --step-3: clamp(2rem, 1.6rem + 1.9vw, 3.1rem);
  --step-4: clamp(2.6rem, 1.8rem + 3.8vw, 5rem);

  /* spazi */
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --course: clamp(3.5rem, 2.5rem + 5vw, 7rem);
  --max: 76rem;
  --measure: 65ch;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1817;
    --surface: #132321;
    --ink: #e4e7e1;
    --muted: #a0aca8;
    --line: #2a3b39;
    --mortar: #1f302e;
    --sea: #183b3d;
    --bronze: #cf9d57;
    --on-sea: #e9ede7;
    --focus: #cf9d57;
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "ss01", "kern";
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }

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

a { color: inherit; text-decoration-color: var(--bronze); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--bronze); }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: var(--gutter); top: -4rem;
  background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; z-index: 50;
}
.skip:focus { top: 0.75rem; }

.eyebrow {
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--bronze);
}

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: 4.25rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand svg { height: 2.1rem; width: auto; flex: none; }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name b { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; letter-spacing: 0.2em; }
.brand-name small { font-size: 0.62rem; letter-spacing: 0.42em; text-transform: uppercase; color: var(--muted); margin-top: 0.3rem; font-weight: 500; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(1rem, 2vw, 2rem); }
.nav a {
  text-decoration: none; font-size: 0.92rem; font-weight: 500; letter-spacing: 0.02em;
  padding-block: 0.4rem; border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--bronze); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--ink);
  font: 500 0.85rem var(--font-body); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.5rem 0.8rem; cursor: pointer;
}

@media (max-width: 52rem) {
  .nav-toggle { display: inline-block; }
  .nav { position: absolute; inset: 100% 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav[data-open="false"] { display: none; }
  .nav ul { flex-direction: column; gap: 0; padding: 0.5rem var(--gutter) 1rem; }
  .nav a { display: block; padding-block: 0.8rem; border-bottom: 1px solid var(--line); }
  .nav li:last-child a { border-bottom: 0; }
}

/* ------------------------------------------------------------ hero */

.hero { padding-block: clamp(2.5rem, 2rem + 4vw, 5.5rem) var(--course); }
.hero .wrap {
  display: grid; gap: clamp(2rem, 4vw, 4rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: end;
}
.hero-text { display: grid; gap: 1.5rem; min-width: 0; }
.hero h1 { font-size: var(--step-4); letter-spacing: 0.005em; }
.hero h1 span { color: var(--bronze); }
.hero .lede { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 34ch; }
.hero-figure { margin: 0; min-width: 0; }
.hero-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 78% 50%; background: var(--mortar); }

.course-line {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem;
  font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 1.1rem; margin-top: 0.5rem;
}

@media (max-width: 52rem) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-figure { order: -1; }
  .hero-figure img { aspect-ratio: 16 / 10; object-position: 70% 50%; }
}

/* mark animation: i conci si posano uno dopo l'altro */
.mark-anim .stone { animation: lay 0.9s cubic-bezier(.2,.7,.2,1) both; }
.mark-anim .stone:nth-child(2) { animation-delay: .08s; }
.mark-anim .stone:nth-child(3) { animation-delay: .16s; }
.mark-anim .stone:nth-child(4) { animation-delay: .24s; }
.mark-anim .stone:nth-child(5) { animation-delay: .32s; }
.mark-anim .stone:nth-child(6) { animation-delay: .40s; }
.mark-anim .stone:nth-child(7) { animation-delay: .48s; }
@keyframes lay { from { transform: translateY(-18px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mark-anim .stone { animation: none; } }

/* ------------------------------------------------------------ sezioni (filari) */

.course { padding-block: var(--course); border-top: 1px solid var(--line); }
.course-head {
  display: grid; gap: 1rem 3rem;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
.course-head h2 { font-size: var(--step-3); }
.course-head .intro { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 46ch; }
.course-head .eyebrow { grid-column: 1 / -1; }
@media (max-width: 52rem) { .course-head { grid-template-columns: minmax(0, 1fr); } }

.prose { max-width: var(--measure); display: grid; gap: 1.1rem; }
.prose p { color: var(--ink); }

.two-col { display: grid; gap: 2rem 4rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 52rem) { .two-col { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ aree: muro a conci sfalsati */

.wall {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 3px;
  background: var(--mortar);
  border: 3px solid var(--mortar);
}
.ashlar { background: var(--surface); display: flex; flex-direction: column; min-width: 0; }
.ashlar:nth-child(1) { grid-column: span 7; }
.ashlar:nth-child(2) { grid-column: span 5; }
.ashlar:nth-child(3) { grid-column: span 5; }
.ashlar:nth-child(4) { grid-column: span 7; }
.ashlar figure { margin: 0; overflow: hidden; }
.ashlar img { width: 100%; aspect-ratio: 7 / 5; object-fit: cover; background: var(--mortar); transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.ashlar:nth-child(2) img, .ashlar:nth-child(3) img { aspect-ratio: 1 / 1; }
.ashlar:hover img { transform: scale(1.025); }
@media (prefers-reduced-motion: reduce) { .ashlar img { transition: none; } .ashlar:hover img { transform: none; } }
.ashlar-body { padding: clamp(1.25rem, 1rem + 1.2vw, 2.25rem); display: grid; gap: 0.75rem; align-content: start; }
.ashlar h3 { font-size: var(--step-2); }
.ashlar p { color: var(--muted); max-width: 52ch; }

@media (max-width: 52rem) {
  .ashlar:nth-child(n) { grid-column: 1 / -1; }
  .ashlar:nth-child(n) img { aspect-ratio: 4 / 3; }
}

/* ------------------------------------------------------------ principi */

.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; }
.principles > div { padding: 1.75rem 0; border-top: 1px solid var(--line); display: grid; gap: 0.5rem; padding-right: 2rem; min-width: 0; }
.principles dt { font-family: var(--font-display); font-size: var(--step-2); }
.principles dd { margin: 0; color: var(--muted); max-width: 48ch; }
@media (max-width: 52rem) { .principles { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ banda governance */

.band { background: var(--sea); color: var(--on-sea); border-top: 0; }
.band .eyebrow { color: color-mix(in srgb, var(--on-sea) 70%, var(--bronze)); }
.band .course-head .intro, .band .prose p { color: color-mix(in srgb, var(--on-sea) 82%, transparent); }
.band a { color: var(--on-sea); }
.band a:hover { color: #fff; }

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font: 600 0.9rem var(--font-body); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.85rem 1.3rem; text-decoration: none; cursor: pointer;
  border: 1px solid currentColor; background: transparent; color: inherit;
}
.btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.band .btn:hover { background: var(--on-sea); color: var(--sea); border-color: var(--on-sea); }
.btn-solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-solid:hover { background: var(--bronze); border-color: var(--bronze); color: var(--bg); }

/* ------------------------------------------------------------ contatti */

.contacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.contacts > div { border-top: 1px solid var(--ink); padding-top: 1rem; padding-right: 1.5rem; display: grid; gap: 0.35rem; align-content: start; min-width: 0; }
.contacts h3 { font-family: var(--font-body); font-size: var(--step--1); font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.contacts p, .contacts a { font-size: var(--step-1); overflow-wrap: anywhere; }
@media (max-width: 52rem) { .contacts { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }

/* ------------------------------------------------------------ pagine legali */

.doc { padding-block: clamp(2.5rem, 2rem + 3vw, 5rem) var(--course); }
.doc-head { display: grid; gap: 1rem; margin-bottom: 2.5rem; max-width: var(--measure); }
.doc-head h1 { font-size: var(--step-3); }
.doc-head p { color: var(--muted); }
.doc-body { max-width: var(--measure); }
.doc-body h2 { font-size: var(--step-2); margin: 2.5rem 0 0.9rem; }
.doc-body h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--step-0); margin: 1.6rem 0 0.5rem; }
.doc-body p, .doc-body ul, .doc-body ol { margin: 0 0 1rem; }
.doc-body ul, .doc-body ol { padding-left: 1.2rem; }
.doc-body li { margin-bottom: 0.4rem; }
.doc-body li::marker { color: var(--bronze); }
.doc-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.table-scroll { overflow-x: auto; margin: 0 0 1.5rem; }
.doc-body table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.doc-body th, .doc-body td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem 0.7rem 0; border-bottom: 1px solid var(--line); }
.doc-body th { font-weight: 600; font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.doc-body dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.55rem 1.5rem; margin: 0 0 1.5rem; }
.doc-body dl.facts dt { color: var(--muted); }
.doc-body dl.facts dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 32rem) { .doc-body dl.facts { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; } .doc-body dl.facts dd { margin-bottom: 0.6rem; } }

/* ------------------------------------------------------------ footer */

.site-footer { background: var(--ink); color: var(--bg); padding-block: 3.5rem 2.5rem; }
.site-footer a { color: var(--bg); text-decoration-color: color-mix(in srgb, var(--bg) 40%, transparent); }
.site-footer a:hover { color: var(--bg); text-decoration-color: var(--bg); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.footer-brand { display: flex; align-items: center; gap: 0.8rem; }
.footer-brand svg { height: 2.6rem; width: auto; }
.footer-brand b { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; letter-spacing: 0.2em; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 0.6rem 2.5rem; justify-content: end; }
.footer-links button { all: unset; cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--bg) 40%, transparent); text-underline-offset: 0.2em; }
.footer-links button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.legal {
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid color-mix(in srgb, var(--bg) 18%, transparent);
  font-size: 0.8rem; line-height: 1.7; color: color-mix(in srgb, var(--bg) 70%, transparent);
  font-variant-numeric: tabular-nums;
}
@media (prefers-color-scheme: dark) {
  .site-footer { background: #071010; color: var(--ink); }
  .site-footer a, .footer-links button { color: var(--ink); }
  .legal { color: var(--muted); border-top-color: var(--line); }
}
@media (max-width: 52rem) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-links { justify-content: start; }
}

/* ------------------------------------------------------------ banner cookie */

.consent {
  position: fixed; z-index: 40;
  left: max(var(--gutter), env(safe-area-inset-left, 0px));
  right: max(var(--gutter), env(safe-area-inset-right, 0px));
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
  max-width: 34rem;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px -20px rgb(0 0 0 / 0.35);
  padding: 1.4rem 1.4rem 1.2rem;
  display: grid; gap: 0.9rem;
}
.consent h2 { font-size: 1.25rem; }
.consent p { font-size: 0.92rem; color: var(--muted); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.consent-actions .btn { padding: 0.65rem 1rem; font-size: 0.78rem; flex: 1 1 auto; justify-content: center; }
.consent fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.consent label { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.2rem 0.7rem; font-size: 0.92rem; align-items: start; }
.consent label span { font-weight: 600; }
.consent label small { grid-column: 2; color: var(--muted); font-size: 0.85rem; }
.consent input[type="checkbox"] { width: 1.1rem; height: 1.1rem; margin: 0.2rem 0 0; accent-color: var(--sea); }
