@font-face {
  font-family: "Italiana";
  src: url("fonts/italiana.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/sourceserif4.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/sourceserif4-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --ground: oklch(94.5% 0.002 330);
  --ground-deep: oklch(90% 0.003 330);
  --ink: oklch(17% 0.003 330);
  --ink-soft: oklch(40% 0.004 330);
  --rule: oklch(74% 0.003 330);
  --accent: oklch(50% 0.17 12);

  --display: "Italiana", "Didot", "Bodoni 72", serif;
  --text: "Source Serif 4", Georgia, serif;

  --col: 62rem;
  --rail: 14rem;
  --gap: clamp(1.5rem, 4vw, 3rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
  scrollbar-color: var(--ink) var(--ground);
  scrollbar-width: thin;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  caret-color: var(--accent);
  text-rendering: optimizeLegibility;
}

::selection { background: var(--ink); color: var(--ground); }

html[lang="it"] [lang="en"],
html[lang="en"] [lang="it"] { display: none; }

img, svg { display: block; max-width: 100%; }

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

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--ground);
  padding: 0.5rem 1rem;
  z-index: 20;
}
.skip:focus { top: 0.75rem; }

/* ---------- navigation ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ground);
  border-bottom: 1px solid var(--rule);
}
.bar-inner {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0.7rem var(--gap);
  display: flex;
  align-items: baseline;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
}
.bar .name {
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
  white-space: nowrap;
}
.bar nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-size: 0.9375rem;
}
.bar nav a { color: var(--ink); }
.bar nav a:hover { color: var(--accent); }

.lang { display: flex; gap: 0.25rem; font-size: 0.875rem; }
.lang button {
  font: inherit;
  background: none;
  border: 0;
  padding: 0.1rem 0.35rem;
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: transparent;
}
.lang button[aria-pressed="true"] {
  color: var(--ink);
  text-decoration-color: var(--ink);
}
.lang button:hover { color: var(--accent); }

/* ---------- structure ---------- */
main { max-width: var(--col); margin: 0 auto; padding: 0 var(--gap); }

section { padding: clamp(4rem, 9vw, 7.5rem) 0 0; }

.split {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}
.split > .rail { position: sticky; top: 5rem; }

h1, h2, h3 { font-weight: 400; margin: 0; }

.display {
  font-family: var(--display);
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h2.display { font-size: clamp(2.75rem, 8vw, 5.5rem); margin-bottom: 0.5em; }
h3 {
  font-family: var(--text);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  line-height: 1.2;
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
}

p { margin: 0 0 1.1em; max-width: 68ch; }
.lede { font-size: 1.25rem; line-height: 1.55; }
.soft { color: var(--ink-soft); }

/* ---------- placeholder frames ---------- */
.ph { margin: 0; }
.ph .box {
  aspect-ratio: var(--ratio, 4 / 5);
  background: var(--ground-deep);
  border: 1px dashed var(--ink-soft);
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.ph figcaption {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin-top: 0.4rem;
  font-style: italic;
}

/* ---------- hero ---------- */
.hero { padding-top: clamp(1.25rem, 3vw, 2rem); }
.hero .split { align-items: end; }
.hero h1 { font-size: clamp(2.6rem, 7.4vw, 5.4rem); }
.hero h1 .ln { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero h1 .ln > span {
  display: block;
  animation: rise 1.1s var(--ease) both;
  animation-delay: calc(var(--i) * 110ms + 120ms);
}
@keyframes rise {
  from { transform: translateY(105%); }
  to { transform: translateY(0); }
}
.hero-sub { margin-top: 1.25rem; font-size: 1.2rem; line-height: 1.5; max-width: 34em; }
.hero-links { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; margin-top: 1rem; }

.rank {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.seal { width: 9.5rem; height: 9.5rem; color: var(--accent); }
.seal text { font-family: var(--text); font-size: 10.5px; letter-spacing: 0.17em; text-transform: uppercase; fill: currentColor; }
.seal .centre { font-family: var(--display); font-size: 34px; letter-spacing: 0; text-transform: none; }
.seal .sub { font-size: 9px; letter-spacing: 0.2em; }
.badges { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; margin-top: 1.25rem; }
.badges svg { width: 7rem; height: 7rem; color: var(--accent); }
.badges text { font-family: var(--text); font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; fill: currentColor; }
.badges .c1 { font-family: var(--display); font-size: 28px; letter-spacing: 0; text-transform: none; }
.badges .c2 { font-size: 9px; letter-spacing: 0.12em; }
.rank > div > p { margin: 0; font-size: clamp(1.25rem, 2.6vw, 1.65rem); line-height: 1.35; max-width: 32em; }
.rank strong { font-weight: 600; }

p.jump a { display: block; margin-bottom: 0.6rem; }

/* ---------- Chi sono ---------- */
blockquote {
  margin: 2.5rem 0;
  padding: 0;
  font-family: var(--text);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.2;
  max-width: 22em;
}
blockquote small {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--text);
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.plain-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.plain-list li { padding: 0.55rem 0; border-top: 1px solid var(--rule); }
.plain-list li:last-child { border-bottom: 1px solid var(--rule); }

table { border-collapse: collapse; width: 100%; max-width: 46rem; font-size: 1rem; }
th, td { text-align: left; padding: 0.7rem 1rem 0.7rem 0; border-top: 1px solid var(--rule); vertical-align: top; }
tr:last-child td, tr:last-child th { border-bottom: 1px solid var(--rule); }
th { font-weight: 600; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; width: 5rem; }
td:last-child { color: var(--ink-soft); }

/* ---------- Icelab ---------- */
ol.steps { list-style: none; counter-reset: step; margin: 1.5rem 0 2rem; padding: 0; max-width: 46rem; }
ol.steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0.5rem; padding: 0.9rem 0; border-top: 1px solid var(--rule); }
ol.steps li:last-child { border-bottom: 1px solid var(--rule); }
ol.steps li::before { content: counter(step); font-weight: 600; font-variant-numeric: lining-nums; font-size: 1.25rem; line-height: 1.5; }
ol.steps strong { font-weight: 600; }

.focus { margin: 2.5rem 0; display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.focus h3 { margin-top: 0; }

dl.defs { margin: 0 0 1rem; max-width: 46rem; }
dl.defs > div { padding: 1rem 0; border-top: 1px solid var(--rule); }
dl.defs > div:last-child { border-bottom: 1px solid var(--rule); }
dl.defs dt { font-weight: 600; font-size: 1.2rem; line-height: 1.3; margin-bottom: 0.25rem; }
dl.defs dd { margin: 0; max-width: 60ch; }

/* ---------- Creazioni ---------- */
.flavours { list-style: none; margin: 2rem 0 0; padding: 0; }
.flavours li {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) minmax(0, 9rem);
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.flavours li:last-child { border-bottom: 1px solid var(--rule); }
.flavours li:nth-child(even) .ph { --ratio: 1 / 1; }
.flavours li:nth-child(odd) .ph { --ratio: 4 / 5; }
.flavours h3 { margin-top: 0; }
.flavours p { margin: 0; }
.flavours .prize { color: var(--ink-soft); font-style: italic; font-size: 0.9375rem; text-align: right; }

/* ---------- Formazione ---------- */
.soon {
  margin: 2.5rem 0 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  max-width: 46rem;
}
.soon p { margin: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }

/* ---------- Contatti ---------- */
form { max-width: 34rem; display: grid; gap: 1.1rem; }
label { display: grid; gap: 0.3rem; font-size: 0.9375rem; }
input, select, textarea {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.5rem 0;
  caret-color: var(--accent);
}
textarea { min-height: 7rem; resize: vertical; border: 1px solid var(--ink); padding: 0.6rem; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 3px; }
input:user-invalid, textarea:user-invalid, select:user-invalid { border-color: var(--accent); }
button.send {
  justify-self: start;
  font: inherit;
  color: var(--ground);
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 0.7rem 1.75rem;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
button.send:hover { background: transparent; color: var(--ink); }
.status { margin: 0; min-height: 1.65em; }
.status[data-state="ok"] { color: var(--ink); }
.status[data-state="error"] { color: var(--accent); }
.side { font-size: 1rem; }
.side p { margin-bottom: 0.6rem; }

footer {
  max-width: calc(var(--col) - 2 * var(--gap));
  width: calc(100% - 2 * var(--gap));
  margin: clamp(4rem, 9vw, 7rem) auto 0;
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
footer p { margin: 0; max-width: none; }

/* ---------- small screens ---------- */
@media (max-width: 52rem) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > .rail { position: static; max-width: 15rem; }
  .hero .split { align-items: start; }
  .focus { grid-template-columns: minmax(0, 1fr); }
  .focus .ph { max-width: 13rem; }
  .rank { grid-template-columns: minmax(0, 1fr); }
  .seal { width: 7.5rem; height: 7.5rem; }
  .badges { flex-wrap: nowrap; gap: 0.5rem; }
  .badges svg { width: calc((100vw - 3rem - 1rem) / 3); height: auto; max-width: 7rem; }
  .bar { position: static; }
  html { scroll-padding-top: 1rem; }
  .bar nav { order: 3; width: 100%; }
  .flavours li { grid-template-columns: 6rem minmax(0, 1fr); }
  .flavours .prize { grid-column: 2; text-align: left; }
  .hero .split > .rail { order: 2; max-width: 11rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero h1 .ln > span { animation: none; }
  button.send { transition: none; }
}
