/* Halden Outerwear, the 404 page: the address bar that corrects itself, the big 404 and the pages you meant */
:root {
  --carta: #f6f3ee;            /* warm white page */
  --carta-alta: #fbfaf7;       /* the address bar and the fields, a touch lighter */
  --inchiostro: #1a1816;       /* type and the lit pill */
  --grigio: #8d877e;           /* small type and the domain */
  --filo: rgba(26, 24, 22, 0.12); /* hairlines and borders */
  --accento: #d1452c;          /* the one accent: the red of a typo */
  --tessuto-a: #d9d1c4;        /* the three coat swatches in the preview */
  --tessuto-b: #b9b3a8;
  --tessuto-c: #cfc6b4;
  --mono: 'Geist Mono Variable', ui-monospace, monospace;
  --serif: 'Fraunces Variable', Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--carta);
  color: var(--inchiostro);
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
  overflow: hidden;
}
p, h1, h2, ul { margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.solo-lettore { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.pagina {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(12px, 3.4vh, 34px) clamp(12px, 3vw, 40px) clamp(12px, 3vh, 30px);
  gap: clamp(10px, 3vh, 34px);
}

/* ---- the address bar ---- */
.barra {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(560px, 100%);
  height: clamp(32px, 5.6vh, 42px);
  padding: 0 14px;
  border-radius: 999px;
  background: var(--carta-alta);
  border: 1px solid var(--filo);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 1px 2px rgba(26, 24, 22, 0.05), 0 8px 24px -14px rgba(26, 24, 22, 0.25);
}
.barra svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.barra__lucchetto { width: 14px; height: 14px; color: var(--grigio); }
.barra__ricarica { width: 14px; height: 14px; color: var(--grigio); margin-left: auto; }
.barra__indirizzo {
  min-width: 0;
  font-family: var(--mono);
  font-size: clamp(11.5px, 1.1vw + 6px, 14px);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
}
.barra__dominio { color: var(--grigio); }
.barra__via { color: var(--inchiostro); }
.onda {
  position: absolute;
  left: 0;
  top: 0;
  height: 8px;
  overflow: visible;
  pointer-events: none;
}
.onda path { fill: none; stroke: var(--accento); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.barra__caret {
  position: absolute;
  left: 0;
  top: 50%;
  width: 1.5px;
  height: 15px;
  margin-top: -7.5px;
  border-radius: 1px;
  background: var(--accento);
  opacity: 0;
}

/* ---- the scene under the bar ---- */
.scena {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
}
.errore {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(560px, 100%);
}

.numero {
  display: flex;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(80px, min(24vw, 26vh), 230px);
  line-height: 0.8;
  letter-spacing: -0.04em;
  padding-bottom: 0.06em;
}
.cifra {
  display: inline-block;
  --w: 560;
  --p: 0;
  --s: 0;
  font-variation-settings: "wght" calc(var(--w) + var(--p)), "opsz" 144, "SOFT" var(--s), "WONK" 0;
  will-change: transform;
}
.frase {
  margin-top: clamp(8px, 2.2vh, 20px);
  font-size: clamp(14px, 1vw + 9px, 19px);
  font-variation-settings: "wdth" 100;
  letter-spacing: -0.01em;
  font-weight: 450;
}

.consigli { margin-top: clamp(14px, 4.4vh, 44px); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.etichetta { font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grigio); font-weight: 500; }
.consigli__fila { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.consiglio {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: clamp(30px, 4.8vh, 36px);
  padding: 0 12px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--filo);
  background: var(--carta-alta);
  font-family: var(--mono);
  font-size: clamp(11.5px, 0.4vw + 9px, 13px);
  letter-spacing: -0.01em;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 1px 2px rgba(26, 24, 22, 0.04);
}
.consiglio__fondo {
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, #2a2724, var(--inchiostro));
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.consiglio__freccia { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; }
.consiglio:focus-visible { outline: 2px solid var(--accento); outline-offset: 3px; }

.cerca {
  position: relative;
  margin-top: clamp(12px, 3.4vh, 32px);
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(340px, 100%);
  height: clamp(34px, 5.4vh, 42px);
  padding: 0 10px 0 14px;
  border-radius: 12px;
  background: var(--carta-alta);
  border: 1px solid var(--filo);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  cursor: text;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.cerca:focus-within { border-color: rgba(26, 24, 22, 0.3); box-shadow: 0 0 0 4px rgba(26, 24, 22, 0.05); }
.cerca__lente { flex: none; width: 15px; height: 15px; fill: none; stroke: var(--grigio); stroke-width: 1.4; stroke-linecap: round; }
.cerca__input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  border: 0;
  font-size: 16px;
  cursor: text;
}
.cerca__vista { flex: 1; min-width: 0; display: flex; align-items: center; font-size: 14px; white-space: nowrap; overflow: hidden; pointer-events: none; }
.cerca__segnaposto { color: var(--grigio); margin-left: 1px; }
.cerca__caret { flex: none; width: 1.5px; height: 16px; border-radius: 1px; background: var(--inchiostro); }
.cerca__tasto {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1px solid var(--filo);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--grigio);
  pointer-events: none;
}

/* ---- the previews of the right pages ---- */
.anteprima {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
  position: relative;
  width: min(560px, 100%);
  max-height: 100%;
  padding: clamp(14px, 3vh, 28px) clamp(14px, 2.4vw, 28px);
  border-radius: 18px;
  background: var(--carta-alta);
  border: 1px solid var(--filo);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 30px 60px -36px rgba(26, 24, 22, 0.35);
  overflow: hidden;
}
.anteprima[hidden] { display: none; }
.indietro {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px 0 7px;
  border-radius: 999px;
  border: 1px solid var(--filo);
  font-size: 12px;
  color: var(--grigio);
}
.indietro svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.vista { display: none; margin-top: clamp(10px, 2.6vh, 24px); }
.vista.attiva { display: block; }
.vista__testa { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: clamp(8px, 2vh, 16px); border-bottom: 1px solid var(--filo); }
.vista__testa h2 { font-family: var(--serif); font-variation-settings: "opsz" 72, "SOFT" 30; font-weight: 420; font-size: clamp(22px, min(4vw, 5vh), 34px); letter-spacing: -0.02em; line-height: 1; }
.vista__testa p { font-size: 12.5px; color: var(--grigio); white-space: nowrap; }
.cappotti { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 1.4vw, 14px); margin-top: clamp(10px, 2.4vh, 20px); }
.capo p { font-size: clamp(11px, 0.5vw + 8.5px, 13px); margin-top: 7px; line-height: 1.2; }
.capo .capo__prezzo { margin-top: 2px; color: var(--grigio); }
.capo__foto {
  display: block;
  height: clamp(64px, 20vh, 190px);
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
.capo__foto--a { background: radial-gradient(120% 80% at 30% 20%, #e6dfd3, var(--tessuto-a) 60%, #c9c0b1); }
.capo__foto--b { background: radial-gradient(120% 80% at 30% 20%, #cdc8bf, var(--tessuto-b) 60%, #a59f93); }
.capo__foto--c { background: radial-gradient(120% 80% at 30% 20%, #e0d8c8, var(--tessuto-c) 60%, #bdb39f); }
.elenco { list-style: none; margin-top: clamp(4px, 1vh, 8px); }
.elenco li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: clamp(8px, 1.9vh, 14px) 0;
  border-bottom: 1px solid var(--filo);
  font-size: clamp(13px, 0.6vw + 9px, 15px);
}
.elenco li span:last-child { font-family: var(--mono); font-size: 12px; color: var(--grigio); white-space: nowrap; }

@media (max-height: 470px) {
  .cerca__tasto { display: none; }
}
@media (max-width: 420px) {
  .consiglio { padding: 0 10px 0 12px; gap: 6px; }
}
