/* Kusordu — foglio di stile principale */

:root {
  --bg: #f6f1e7;
  --bg-alt: #ece4d6;
  --bg-dark: #1a2340;
  --ink: #12182b;
  --ink-soft: #6b6858;
  --ink-invert: #f6f1e7;
  --accent: #e2a93b;
  --accent-2: #b4472f;
  --mono: ui-monospace, Consolas, 'Liberation Mono', monospace;
  --sans: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --rhythm: 76px;
  --gutter: 22px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

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

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { text-decoration-color: var(--accent-2); }

a:focus-visible,
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- griglia a 12 colonne ---------- */

.sheet {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
}

.spine {
  grid-column: 1 / 2;
  grid-row: 1 / -1;
  position: relative;
  padding-top: 10px;
}

.spine::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 6px;
  width: 1px;
  background: rgba(18, 24, 43, .25);
}

.spine .stitch {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 14px;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--accent) 0 10px,
    transparent 10px 30px
  );
  opacity: .85;
}

.folio {
  grid-column: 1 / 2;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-2);
  padding-top: 6px;
}

/* ---------- intestazione e navigazione ---------- */

.masthead {
  border-bottom: 1px solid rgba(18, 24, 43, .2);
  background: var(--bg);
}

.masthead .sheet {
  align-items: baseline;
  padding-top: 20px;
  padding-bottom: 18px;
  row-gap: 10px;
}

.wordmark {
  grid-column: 1 / 5;
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: .34em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 600;
}

.wordmark:hover { color: var(--accent-2); }

.masthead nav { grid-column: 5 / 13; }

.masthead ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  justify-content: flex-end;
}

.masthead a:not(.wordmark) {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
}

.masthead a:not(.wordmark):hover { color: var(--ink); }

.masthead a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
}

/* ---------- eroe ---------- */

.hero { padding: calc(var(--rhythm) * .8) 0 var(--rhythm); }

.hero h1 {
  grid-column: 2 / 11;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: clamp(27px, 4.4vw, 47px);
  line-height: 1.18;
  font-weight: 600;
  margin: 0 0 26px;
  max-width: 16ch;
}

.rule-double {
  grid-column: 2 / 11;
  border: 0;
  height: 5px;
  margin: 0 0 26px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid rgba(18, 24, 43, .35);
}

.hero .lede {
  grid-column: 2 / 9;
  font-size: 20px;
  line-height: 1.7;
  margin: 0;
}

.hero .kicker {
  grid-column: 2 / 11;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 18px;
}

/* ---------- figure ---------- */

.plate {
  grid-column: 7 / 13;
  margin: 44px 0 0;
}

.plate img { width: 100%; }

.plate figcaption,
figure figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-top: 12px;
  text-align: left;
}

/* ---------- sezioni ---------- */

.band { padding: var(--rhythm) 0; }
.band--alt { background: var(--bg-alt); }

.band--dark {
  background: var(--bg-dark);
  color: var(--ink-invert);
}

.band--dark a { color: var(--ink-invert); }
.band--dark .folio { color: var(--accent); }
.band--dark h2 { color: var(--ink-invert); }
.band--dark .folio::after { background: rgba(246, 241, 231, .3); }

.band > .sheet { row-gap: 0; }

h2 {
  grid-column: 2 / 10;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .07em;
  font-size: clamp(19px, 2.4vw, 25px);
  line-height: 1.35;
  font-weight: 600;
  margin: 0 0 22px;
}

h3 {
  grid-column: 2 / 8;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 14px;
  font-weight: 600;
  margin: 34px 0 10px;
  color: var(--accent-2);
}

.band--dark h3 { color: var(--accent); }

.head-line {
  grid-column: 2 / 13;
  border: 0;
  border-top: 1px solid rgba(18, 24, 43, .28);
  margin: 0 0 30px;
}

.band--dark .head-line { border-top-color: rgba(246, 241, 231, .3); }

.col { grid-column: 2 / 8; }
.col > p:first-child { margin-top: 0; }
.col > p { margin: 0 0 20px; }
.col > *:last-child { margin-bottom: 0; }

.col--wide { grid-column: 2 / 10; font-size: 19px; }
.col--right { grid-column: 7 / 13; }

.divider {
  grid-column: 1 / 13;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 46px 0;
}

.divider span {
  width: 22px;
  height: 2px;
  background: var(--accent);
}

.divider span:nth-child(2) { background: var(--accent-2); }

/* ---------- elenchi ---------- */

ul.marks, ol.steps {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

ul.marks li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
}

ul.marks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 14px;
  height: 2px;
  background: var(--accent);
}

ol.steps { counter-reset: step; }

ol.steps li {
  position: relative;
  padding-left: 42px;
  margin-bottom: 16px;
  counter-increment: step;
}

ol.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--accent-2);
}

.band--dark ol.steps li::before { color: var(--accent); }

.note {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: .04em;
  color: var(--ink-soft);
  border-left: 2px solid var(--accent);
  padding-left: 16px;
}

.band--dark .note { color: rgba(246, 241, 231, .82); }

/* ---------- sezione scura con dettaglio ---------- */

.detail-figure {
  grid-column: 2 / 6;
  margin: 0;
}

.detail-figure img { width: 100%; }
.band--dark figcaption { color: rgba(246, 241, 231, .68); }

.detail-text { grid-column: 7 / 13; }
.detail-text > p:first-child { margin-top: 0; }

/* ---------- pagine di testo ---------- */

.page-head { padding: calc(var(--rhythm) * .75) 0 8px; }

.page-head h1 {
  grid-column: 2 / 11;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 22px;
  max-width: 20ch;
}

.dropcap::first-letter {
  float: left;
  font-family: var(--mono);
  font-size: 62px;
  line-height: .82;
  padding: 6px 12px 0 0;
  color: var(--accent-2);
  font-weight: 700;
}

/* ---------- piè di pagina ---------- */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid rgba(18, 24, 43, .22);
  padding: 52px 0 46px;
  text-align: center;
}

.site-footer .inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-footer .name {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .34em;
  text-transform: uppercase;
  margin: 0 0 18px;
  font-weight: 600;
}

.site-footer ul {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.site-footer li { padding: 0 14px; border-right: 1px solid rgba(18, 24, 43, .3); }
.site-footer li:last-child { border-right: 0; }

.site-footer li a {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
}

.site-footer li a:hover { color: var(--ink); }

.site-footer .mail { margin: 0 0 14px; font-size: 15px; }

.site-footer .about-line {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: .06em;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- adattamento ---------- */

@media (max-width: 900px) {
  :root { --rhythm: 46px; --gutter: 16px; }

  .sheet { grid-template-columns: repeat(6, 1fr); padding: 0 20px; }
  .spine { display: none; }
  .folio { grid-column: 1 / 7; }

  .wordmark { grid-column: 1 / 7; }
  .masthead nav { grid-column: 1 / 7; }
  .masthead ul { justify-content: flex-start; }

  .hero h1, .page-head h1, .rule-double, .hero .lede, .hero .kicker,
  h2, h3, .head-line, .col, .col--wide, .col--right,
  .plate, .detail-figure, .detail-text {
    grid-column: 1 / 7;
  }

  .divider { grid-column: 1 / 7; margin: 32px 0; }
  .plate { margin-top: 30px; }
  .detail-text { margin-top: 28px; }
  .hero .lede { font-size: 18px; }
  .col--wide { font-size: 17.5px; }
  .dropcap::first-letter { font-size: 48px; }
}

@media (max-width: 520px) {
  body { font-size: 16.5px; }
  .site-footer li { padding: 2px 10px; }
}
