@font-face {
  font-family: Archivo;
  src: url("/caratteri/archivo.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f7f5ef;
  --ink: #191a1c;
  --blue: #2547bf;
  --muted: #535760;
  --rule: #c7c6bf;
  color: var(--ink);
  background: var(--paper);
  font: 400 16px/1.5 Archivo, Arial, sans-serif;
}

* { box-sizing: border-box; }
body, h1, h2, p, figure { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
a[href], button:not(:disabled), select:not(:disabled) { cursor: pointer; }

.wrap {
  width: min(100%, 1360px);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 70px);
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip {
  position: fixed;
  z-index: 5;
  left: 8px;
  top: -100px;
  padding: 10px;
  background: var(--paper);
}
.skip:focus { top: 4px; }
.skip:hover { color: var(--blue); text-underline-offset: 4px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 3;
}
#apertura, #contenuto { scroll-margin-top: 70px; }
.bar {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding-inline: max(clamp(20px, 5vw, 70px), calc((100% - 1360px) / 2 + 70px));
  transition: transform 340ms cubic-bezier(.22, 1, .36, 1), padding-inline 340ms cubic-bezier(.22, 1, .36, 1);
}
.bar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--paper);
  box-shadow: inset 0 -1px var(--rule);
  transform: scaleX(1);
  transition: transform 340ms cubic-bezier(.22, 1, .36, 1), border-radius 340ms cubic-bezier(.22, 1, .36, 1), box-shadow 340ms ease;
}
.site-header.is-compact .bar {
  transform: translateY(8px);
  padding-inline: max(32px, clamp(20px, 5vw, 70px), calc((100% - 1040px) / 2 + 32px));
}
.site-header.is-compact .bar::before {
  transform: scaleX(var(--bar-compact-scale, 1));
  border-radius: 20px;
  box-shadow: 0 8px 28px #191a1c16, 0 0 0 1px #191a1c0d;
}
.bar a, .bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  color: inherit;
  font: 650 .875rem/1.2 Archivo, sans-serif;
  text-decoration: none;
}
.bar button {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}
.bar .home-link {
  width: fit-content;
  min-width: 44px;
  color: var(--blue);
}
.logo {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 180ms ease-out;
}
.home-link:active .logo { transform: scale(.94); }
.bar #menu { padding-inline: 10px; border-radius: 24px; }
.bar #menu[aria-expanded="true"] { background: #e8e6df; }
.bar a, .bar button { transition: background-color 140ms ease-out, color 140ms ease-out; }
.bar a:active, .bar button:active { color: var(--blue); }
.bar #menu:active { background: #e8e6df; }
.desktop-links, .desktop-tools { display: none; }
body:has(#menu-drawer[open]) { overflow: hidden; }

#menu-drawer {
  inset: 0 0 0 auto;
  width: min(440px, calc(100% - 24px));
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 18px clamp(24px, 5vw, 44px) 32px;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  overscroll-behavior: contain;
  --drawer-fade: 300ms;
  box-shadow: -16px 0 60px #191a1c00;
  transition: box-shadow var(--drawer-fade) ease-out;
}
#menu-drawer[data-closing] { --drawer-fade: 240ms; }
#menu-drawer[data-presented] { box-shadow: -16px 0 60px #191a1c28; }
#menu-drawer::backdrop {
  background: #191a1c;
  opacity: 0;
  transition: opacity 300ms ease-out;
}
#menu-drawer[data-closing]::backdrop { transition-duration: 240ms; }
#menu-drawer[data-presented]::backdrop { opacity: .38; }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 25px;
}
.drawer-header h2 {
  font-size: 1rem;
  font-weight: 750;
}
#close-menu {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
#close-menu:hover, #close-menu:active { background: #e8e6df; }
#close-menu { transition: background-color 160ms ease-out; }

[data-hover-nav] { position: relative; isolation: isolate; }
.nav-highlight {
  position: absolute;
  inset: 0 auto auto 0;
  z-index: -1;
  border-radius: 8px;
  background: #e8e6df;
  opacity: 0;
  pointer-events: none;
}
.highlight-visible .nav-highlight { opacity: 1; }
.nav-items, .profile-nav [data-hover-nav] { display: grid; gap: 2px; }
.nav-items a, .profile-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  width: 100%;
  border-radius: 8px;
  padding-inline: 11px;
  color: inherit;
  text-decoration: none;
  font: 650 1.04rem/1.25 Archivo, sans-serif;
}
.nav-items a:hover, .profile-nav a:hover, .nav-items a[aria-current="page"] { color: var(--blue); }
.nav-items a[aria-current="page"] { text-decoration: underline; text-underline-offset: .27em; }
.drawer-divider { height: 1px; border: 0; margin: 18px 0; background: var(--rule); }
.profile-nav h3 { margin: 0 0 3px 11px; font-size: .88rem; color: var(--muted); }
#account-actions { margin-top: 18px; }
.header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.header-tools .cart-link { width: 44px; border-radius: 50%; }
.language-field { display: grid; gap: 6px; font: 650 .84rem Archivo, sans-serif; }
.language-control { display: block; position: relative; width: fit-content; }
.language-control select {
  appearance: none;
  min-height: 44px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 7px 30px 7px 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out;
}
.language-control .icon {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  pointer-events: none;
  transition: transform 160ms ease-out;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

main:has(.hero:not([hidden])) {
  min-height: calc(100svh - 65px);
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
}
.hero {
  display: grid;
  gap: 18px;
  align-items: center;
  padding-block: clamp(46px, 8vh, 100px) 30px;
}

.copy { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(34px, 9.6vw, 62px);
  font-weight: 820;
  line-height: .99;
  letter-spacing: -.06em;
}
.hero h1 span { display: block; }
.hero h1 span + span { color: var(--blue); margin-top: 7px; }

.copy p {
  max-width: 41ch;
  margin: 18px 0 26px;
  color: var(--muted);
  font-size: 1rem;
}

.actions { display: flex; gap: 8px; width: min(100%, 475px); }
.cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: inherit;
  font: 700 clamp(.78rem, 3.2vw, .98rem)/1.25 Archivo, sans-serif;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease-out;
}
.actions .cta { flex: 1 1 0; min-width: 0; }
.cta.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.hero .cta:active { background: #ebe7dc; }
.hero .cta.primary:active { background: #1b358d; }
.cta .icon { width: 15px; height: 15px; }
.cta:active .arrow-tip { transform: translateX(2px); }

.fitting {
  min-width: 0;
  position: relative;
  isolation: isolate;
}
.fitting::before {
  content: '';
  position: absolute;
  inset: -26% -24%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 48%, #e6ded0 0%, #ece6da 25%, transparent 65%);
}
.photo {
  position: relative;
  height: clamp(220px, 69vw, 390px);
  overflow: hidden;

}
.photo::before {
  content: '';
  position: absolute;
  inset: 78% 19% 4%;
  background: radial-gradient(ellipse, #64534228, transparent 69%);
}
.photo img, .photo canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 240ms ease-out;
}
.photo img { display: block; object-fit: contain; padding: 5% 8%; filter: grayscale(1) brightness(1.08); }
.photo canvas, .photo.is-3d img { opacity: 0; }
.photo.is-3d canvas { opacity: 1; }

.categories { padding-block: 24px 64px; scroll-margin-top: 88px; }
.category-section { position: relative; border-top: 1px solid var(--rule); padding-top: 30px; }
.category-section h2 {
  margin: 0 0 23px;
  font-size: clamp(28px, 8.5vw, 50px);
  font-weight: 820;
  line-height: 1.02;
  letter-spacing: -.059em;
}
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
.category-link, .category-result { min-width: 0; color: inherit; text-decoration: none; }
[data-category="videogiochi"] { --surface: #cfdbe5; }
[data-category="anime"] { --surface: #e8d8dc; }
[data-category="orientale"] { --surface: #d4dbcb; }
[data-category="meme"] { --surface: #e8d6ba; }
.category-visual {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  isolation: isolate;
  border-radius: 8px;
  background: radial-gradient(ellipse at 42% 25%, #ffffff62, transparent 74%), var(--surface);
}
.category-visual::before {
  content: '';
  position: absolute;
  inset: 79% 13% 5%;
  background: radial-gradient(ellipse, #191a1c28, transparent 67%);
}
.category-clothes {
  position: absolute;
  inset: 0;
  isolation: isolate;
}
.category-clothes img {
  position: absolute;
  left: 0;
  width: 100%;
  height: auto;
  /* Complementary opacity on an isolated layer avoids a dip in brightness. */
  mix-blend-mode: plus-lighter;
  transition: opacity 900ms ease-in-out;
}
.category-shirt { top: 4%; }
.category-hoodie { top: 0; opacity: 0; }
.is-hoodie [data-print-ready] .category-hoodie { opacity: 1; }
.is-hoodie [data-print-ready] .category-shirt { opacity: 0; }
.category-link:active .category-visual { filter: brightness(.93); }
.category-visual { transition: filter 100ms ease-out; }
.category-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: 7px;
  min-height: 28px;
  font-size: clamp(.93rem, 4.35vw, 1.1rem);
  font-weight: 765;
  letter-spacing: -.022em;
}
.category-name .icon, .category-all .icon { width: 16px; height: 16px; color: var(--blue); transition: transform 180ms ease-out; }
.category-link:focus-visible .category-name .icon, .category-all:focus-visible .icon { transform: translateX(2px); }
.category-all { display: inline-flex; align-items: center; gap: 9px; min-height: 48px; margin-top: 17px; font-weight: 735; color: var(--blue); text-underline-offset: 4px; }
#catalogo-risultati { max-width: 750px; margin-top: 24px; }

@media (min-width: 760px) {
  .categories { padding-block: 45px 90px; }
  .category-section { padding-top: 39px; }
  .category-grid { gap: 22px; }
}
@media (min-width: 880px) { .category-section .category-grid, #catalogo-risultati { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (hover: hover) and (pointer: fine) {
  .category-link:hover .category-name .icon, .category-all:hover .icon { transform: translateX(2px); }
  .category-link:hover .category-name span { text-decoration: underline; text-underline-offset: 4px; }
  .category-link:hover .category-visual { filter: brightness(.975); }
}
@media (prefers-reduced-motion: reduce) {
  .category-clothes img, .category-visual, .category-name .icon, .category-all .icon { transition: none; }
}

.menu-icon use, .bag-handle, .arrow-tip, .back .icon {
  transform-box: view-box;
  transform-origin: center;
  transition: transform 180ms ease-out, opacity 150ms ease-out;
}
#menu[aria-expanded="true"] .menu-top { transform: rotate(45deg) translateY(6px); }
#menu[aria-expanded="true"] .menu-middle { opacity: 0; }
#menu[aria-expanded="true"] .menu-bottom { transform: rotate(-45deg) translateY(-6px); }
.cart-link:active .bag-handle { transform: translateY(1px) scaleX(.85); }

.destination { max-width: 620px; padding-block: 48px; }
.destination a { color: var(--blue); }
.destination h2 { font-size: 32px; line-height: 1.12; margin: 22px 0 8px; }
.destination .cta { margin-top: 18px; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; }

@media (min-width: 760px) {
  main:has(.hero:not([hidden])) { min-height: calc(100svh - 71px); }
  .bar { min-height: 70px; }
  .hero {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    gap: clamp(25px, 5vw, 64px);
    min-height: calc(100svh - 71px);
    padding-block: 60px 74px;
  }
  .hero h1 { font-size: clamp(40px, 5vw, 76px); }
  .copy p { margin: 24px 0 34px; }
  .photo { height: clamp(350px, 43vw, 595px); }
}

@media (min-width: 960px) {
  .bar { grid-template-columns: minmax(60px, 1fr) auto minmax(max-content, 1fr); gap: 14px; }
  .bar #menu { display: none; }
  .desktop-links, .desktop-tools, .desktop-account {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .desktop-links a { padding-inline: clamp(8px, 1.15vw, 17px); border-radius: 24px; }
  .desktop-tools { justify-self: end; }
  .desktop-tools a { padding-inline: 10px; border-radius: 20px; }
  .desktop-account a { white-space: nowrap; }
  .desktop-links a[aria-current="page"], .desktop-tools a[aria-current="page"] {
    color: var(--blue);
    background: #edf1ff;
  }
}

@media (hover: hover) and (pointer: fine) {
  .bar a:hover { color: var(--blue); }
  .home-link:hover .logo { transform: scale(1.06); }
  .language-control:hover select { background: #e8e6df; border-color: #a5a69e; color: var(--blue); }
  .language-control:hover .icon { color: var(--blue); transform: translateY(calc(-50% + 2px)); }

  .bar #menu:hover { background: #e8e6df; }
  .desktop-tools a:hover, .header-tools .cart-link:hover { background: #e8e6df; }
  #menu[aria-expanded="false"]:hover .menu-top { transform: translateY(-1.5px); }
  #menu[aria-expanded="false"]:hover .menu-bottom { transform: translateY(1.5px); }
  .cart-link:hover .bag-handle { transform: translateY(-1.5px) scaleX(1.08); }
  .hero .cta:hover { background: #ebe7dc; }
  .hero .cta.primary:hover { background: #1b358d; }
  .cta:hover .arrow-tip { transform: translateX(2px); }
  .back:hover .icon { transform: translateX(-3px); }
  .destination .cta:hover { background: #e8e6df; }
}

@media (prefers-reduced-motion: no-preference) {
  #menu-drawer[open] .nav-items > a {
    animation: drawer-link 320ms cubic-bezier(.22,1,.36,1) backwards;
    animation-delay: calc(90ms + var(--index, 0) * 42ms);
  }
  .nav-items > a:nth-of-type(2) { --index: 1; }
  .nav-items > a:nth-of-type(3) { --index: 2; }
  .nav-highlight {
    transition: opacity 150ms ease, transform 240ms cubic-bezier(.22,1,.36,1), width 240ms ease, height 240ms ease;
  }
  .copy h1 span { animation: title-reveal 650ms cubic-bezier(.22,1,.36,1) both; }
  .copy h1 span + span { animation-delay: 105ms; }
  .copy p, .actions, .fitting { animation: arrive 680ms cubic-bezier(.19, 1, .22, 1) backwards; }
  .copy p { animation-delay: 160ms; }
  .actions { animation-delay: 210ms; }
  .fitting { animation-delay: 160ms; }
}
@media (prefers-reduced-motion: reduce) {
  .cta, .photo canvas, .photo img, .bar, .bar::before, .bar a, .bar button,
  .menu-icon use, .bag-handle, .arrow-tip, .back .icon, .logo,
  .language-control select, .language-control .icon, #close-menu { transition: none; }
  .cart-link .bag-handle, .cta .arrow-tip, .back .icon { transform: none !important; }
  .home-link:hover .logo, .home-link:active .logo { transform: none; }
  .language-control:hover .icon { transform: translateY(-50%); }
  #menu-drawer, #menu-drawer::backdrop { transition: none; }
}
@keyframes arrive {
  from { opacity: .7; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes drawer-link {
  from { opacity: .1; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes title-reveal {
  from { clip-path: inset(0 0 100% 0); opacity: .56; transform: translateY(10px); }
  to { clip-path: inset(-10% -4% -16%); opacity: 1; transform: translateY(0); }
}
