:root {
  --red: #e3000f;
  --red-dark: #b8000c;
  --blue: #0046ad;
  --green: #009b48;
  --yellow: #ffd500;
  --orange: #ff5800;
  --white: #ffffff;
  --ink: #141414;
  --muted: #5b5b5b;
  --paper: #ffffff;
  --soft: #f5f4f0;
  --line: #141414;
  --radius: 14px;
  --shadow: 5px 5px 0 var(--line);
  --display: "Archivo Black", "Arial Black", sans-serif;
  --body: "Rubik", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; letter-spacing: 0.01em; }

/* ---------- Buttons & tags ---------- */
.btn {
  display: inline-block;
  font-family: var(--display);
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.85em 1.4em;
  background: var(--red);
  color: var(--white);
  border: 2.5px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--line); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--line); }
.btn--ghost { background: var(--white); color: var(--ink); }
.btn--light { background: var(--yellow); color: var(--ink); }
.btn--small { padding: 0.5em 1em; font-size: 0.8rem; box-shadow: 3px 3px 0 var(--line); }

.tag {
  display: inline-grid;
  place-items: center;
  width: 3rem; height: 3rem;
  font-family: var(--display);
  border: 2.5px solid var(--line);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--line);
}
.tag--red { background: var(--red); color: var(--white); }
.tag--blue { background: var(--blue); color: var(--white); }
.tag--green { background: var(--green); color: var(--white); }
.tag--yellow { background: var(--yellow); }
.tag--orange { background: var(--orange); color: var(--white); }

.eyebrow {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--red);
  margin: 0 0 0.8rem;
}

/* ---------- Mini cube logo ---------- */
.mini-cube {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  width: 26px; height: 26px;
  padding: 2px;
  background: var(--ink);
  border-radius: 5px;
}
.mini-cube i { border-radius: 2px; background: var(--white); }
.mini-cube i:nth-child(1), .mini-cube i:nth-child(9) { background: var(--red); }
.mini-cube i:nth-child(2), .mini-cube i:nth-child(7) { background: var(--yellow); }
.mini-cube i:nth-child(3), .mini-cube i:nth-child(8) { background: var(--green); }
.mini-cube i:nth-child(5) { background: var(--blue); }
.mini-cube i:nth-child(6) { background: var(--orange); }
.mini-cube--big { width: 110px; height: 110px; gap: 5px; padding: 5px; border-radius: 12px; }
.mini-cube--big i { border-radius: 5px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 2.5px solid var(--line);
}
.nav__logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--display); font-size: 1.25rem;
  text-transform: uppercase; color: var(--red); text-decoration: none;
}
.nav__logo-img { width: 40px; height: 40px; transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.nav__logo:hover .nav__logo-img { transform: rotate(-12deg) scale(1.12); }
.nav__links { display: flex; align-items: center; gap: 1.4rem; }
.nav__links a:not(.btn) { text-decoration: none; font-weight: 700; font-size: 0.95rem; position: relative; }
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px;
  background: var(--red); transform: scaleX(0); transition: transform 0.2s;
}
.nav__links a:not(.btn):hover::after { transform: scaleX(1); }
.nav__toggle { display: none; font-size: 1.6rem; background: none; border: 0; cursor: pointer; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 3rem;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(16px, 5vw, 72px);
  max-width: 1280px; margin: 0 auto;
}
.h1__name {
  display: block;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}
.h1__brand {
  display: block;
  font-size: clamp(3rem, 8.5vw, 6.6rem);
  text-transform: uppercase;
  color: var(--red);
  text-shadow: 4px 4px 0 var(--line);
  -webkit-text-stroke: 2px var(--line);
}
.hero__lead { font-size: 1.15rem; max-width: 34rem; margin: 1.5rem 0 2rem; color: #2b2b2b; }
.hero__lead--wide { max-width: none; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero__visual { position: relative; justify-self: center; width: min(100%, 440px); }
.photo-frame {
  aspect-ratio: 1;
  border: 3px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 10px 10px 0 var(--line);
  transform: rotate(2deg);
  background: var(--red);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }


/* 3D cube */
.scene {
  position: absolute; bottom: -40px; left: -50px;
  width: 130px; height: 130px;
  perspective: 600px;
}
.cube3d {
  --s: 130px;
  width: var(--s); height: var(--s);
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-25deg) rotateY(35deg);
  animation: tumble 10s linear infinite;
  cursor: grab;
}
@keyframes tumble {
  from { transform: rotateX(-25deg) rotateY(35deg); }
  to { transform: rotateX(-25deg) rotateY(395deg); }
}
.face {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 5px; padding: 5px;
  background: var(--ink);
  border-radius: 10px;
  backface-visibility: hidden;
}
.face span { border-radius: 6px; transition: background 0.12s; }
.f-front  { transform: translateZ(calc(var(--s) / 2)); }
.f-back   { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.f-right  { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.f-left   { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.f-top    { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.f-bottom { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 2.5px solid var(--line);
  border-bottom: 2.5px solid var(--line);
  margin-top: 2rem;
}
.stat { display: block; padding: 2rem 1.5rem; text-align: center; text-decoration: none; border-right: 2.5px solid var(--line); transition: filter 0.2s; }
.stat:hover { filter: brightness(1.08); }
.stat:focus-visible { outline: 3px solid var(--ink); outline-offset: -6px; }
.stat__icon { display: block; width: 2.2rem; height: 2.2rem; margin: 0 auto 0.8rem; font-size: 2.2rem; line-height: 1; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.stat__icon.cubing-icon::before { vertical-align: 0 !important; }
.stat:hover .stat__icon { transform: translateY(-4px) rotate(-10deg) scale(1.12); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-family: var(--display); font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1; }
.stat > span:not(.stat__icon) { font-weight: 500; }
.stat--red { background: var(--red); color: var(--white); }
.stat--blue { background: var(--blue); color: var(--white); }
.stat--yellow { background: var(--yellow); }
.stat--green { background: var(--green); color: var(--white); }

/* ---------- Sections ---------- */
.section {
  max-width: 1200px; margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) clamp(16px, 5vw, 48px) 0;
}
.section__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 2.5rem; }
.section__head h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); text-transform: uppercase; }
.section__intro { max-width: 46rem; margin: -1.2rem 0 2rem; color: var(--muted); }
.sub { font-size: 1.5rem; text-transform: uppercase; margin: 4rem 0 1.5rem; }

/* Bio */
.bio__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3.5rem; }
.bio__story p { font-size: 1.08rem; }
.big { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.1rem) !important; line-height: 1.2; margin-top: 0; }
mark { background: var(--yellow); padding: 0 0.2em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
blockquote {
  margin: 2rem 0 0; padding: 1.4rem 1.6rem;
  background: var(--soft); border-left: 8px solid var(--red); border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--display); font-size: 1.5rem;
}
blockquote cite { display: block; font-family: var(--body); font-style: normal; font-size: 0.9rem; color: var(--muted); margin-top: 0.4rem; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 1.6rem; border-left: 4px dashed var(--line); }
.timeline li { position: relative; padding: 0 0 1.4rem 0.6rem; }
.timeline li::before {
  content: ""; position: absolute; left: -2.35rem; top: 0.3rem;
  width: 1.1rem; height: 1.1rem; border: 2.5px solid var(--line); border-radius: 4px;
  background: var(--c, var(--red));
}
.timeline li:nth-child(6n+2) { --c: var(--blue); }
.timeline li:nth-child(6n+3) { --c: var(--yellow); }
.timeline li:nth-child(6n+4) { --c: var(--green); }
.timeline li:nth-child(6n+5) { --c: var(--orange); }
.timeline li:nth-child(6n+6) { --c: var(--white); }
.timeline b { display: block; font-family: var(--display); color: var(--red); }

/* Project cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
/* A lone card on the last row stretches to fill it */
.cards .card:last-child:nth-child(3n + 2) { grid-column: span 2; }
.card {
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --tilt: -1deg;
  position: relative;
  overflow: hidden;
  padding: 1.8rem;
  border: 2.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--white);
  transition: transform 0.35s var(--spring), box-shadow 0.35s var(--spring);
}
.card:nth-child(even) { --tilt: 1deg; }
.cards .card:hover,
.cards .card:has(a:focus-visible) {
  transform: translate(-5px, -8px) rotate(var(--tilt));
  box-shadow: 11px 13px 0 var(--line);
}
.cards .card:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--line); transition-duration: 0.1s; }

/* Faint 3x3 cube face in the corner that turns in on hover */
.card::before {
  content: "";
  position: absolute; top: -18px; right: -18px;
  width: 96px; height: 96px;
  background: repeating-linear-gradient(90deg, currentColor 0 28px, transparent 28px 34px);
  -webkit-mask: repeating-linear-gradient(0deg, #000 0 28px, transparent 28px 34px);
          mask: repeating-linear-gradient(0deg, #000 0 28px, transparent 28px 34px);
  opacity: 0.1;
  border-radius: 8px;
  transform: rotate(-12deg) translate(30px, -30px) scale(0.7);
  transition: transform 0.6s var(--spring), opacity 0.4s;
  pointer-events: none;
}
.card:hover::before { opacity: 0.22; transform: rotate(78deg) translate(0, 0) scale(1); }

.card h3 { font-size: 1.35rem; text-transform: uppercase; margin-bottom: 0.6rem; transition: letter-spacing 0.35s var(--spring); }
.card:hover h3 { letter-spacing: 0.03em; }
.card p { margin: 0 0 1rem; }
.card a {
  font-weight: 700; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2.5px no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.3s var(--spring);
}
.card:hover a { background-size: 100% 5px; }

/* Staggered pop-in when the grid scrolls into view */
.cards .card.pop { opacity: 0; transform: translateY(40px) scale(0.92) rotate(var(--tilt)); }
.cards .card.pop.is-in {
  opacity: 1; transform: none;
  animation: card-in 0.7s var(--spring) backwards;
  animation-delay: calc(var(--i, 0) * 90ms);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(40px) scale(0.92) rotate(calc(var(--tilt) * 4)); }
  to { opacity: 1; transform: none; }
}
.cards .card.pop.is-in:hover,
.cards .card.pop.is-in:has(a:focus-visible) { transform: translate(-5px, -8px) rotate(var(--tilt)); }
.cards .card.pop.is-in:active { transform: translate(2px, 2px); }
/* Stretch the card's link over the whole box */
.card a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card:has(a) { cursor: pointer; }
.card:has(a:focus-visible) { outline: 3px solid var(--ink); outline-offset: 4px; }
.card a:focus-visible { outline: none; }
.card__icon {
  display: grid; place-items: center;
  width: 3rem; height: 3rem; margin-bottom: 1rem;
  font-size: 1.4rem;
  background: var(--white); color: var(--ink);
  border: 2.5px solid var(--line); border-radius: 10px;
  box-shadow: 0 0 0 var(--line);
  transition: box-shadow 0.3s var(--spring);
}
.card:hover .card__icon { animation: face-turn 0.6s var(--spring); box-shadow: 3px 3px 0 var(--line); }
@keyframes face-turn {
  0% { transform: rotate(0) scale(1); }
  45% { transform: rotate(-90deg) scale(1.15); }
  100% { transform: rotate(0) scale(1); }
}
.card--red { background: var(--red); color: var(--white); }
.card--blue { background: var(--blue); color: var(--white); }
.card--green { background: var(--green); color: var(--white); }
.card--yellow { background: var(--yellow); }
.card--orange { background: var(--orange); color: var(--white); }

/* Videos */
.videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.video {
  display: block; text-decoration: none;
  border: 2.5px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.video:hover { transform: translate(-3px, -3px); }
.video__thumb { position: relative; aspect-ratio: 16 / 9; background: var(--ink); }
.video__thumb img { width: 100%; height: 100%; object-fit: cover; }
.video__thumb::after {
  content: "▶"; position: absolute; inset: 0; margin: auto;
  width: 3.4rem; height: 3.4rem; display: grid; place-items: center;
  background: var(--red); color: var(--white); border: 2.5px solid var(--line); border-radius: 50%;
  font-size: 1.1rem; opacity: 0; transition: opacity 0.2s;
}
.video:hover .video__thumb::after { opacity: 1; }
.video__title { padding: 0.9rem 1rem 1.1rem; font-weight: 700; line-height: 1.3; border-top: 2.5px solid var(--line); }
/* Brands strip */
.brands__viewport {
  overflow-x: auto; overflow-y: hidden; padding: 0.4rem 0 1.2rem;
  scrollbar-width: none; cursor: grab; touch-action: pan-x pan-y;
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.brands__track {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 1.2rem; width: max-content;
}
.brands__viewport::-webkit-scrollbar { display: none; }
.brands__viewport.is-dragging { cursor: grabbing; }
.brands__viewport.is-dragging .brand { pointer-events: none; }
.brand img { -webkit-user-drag: none; user-select: none; }
.brand {
  flex: none; width: 190px; height: 110px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.55rem;
  background: var(--white); border: 2.5px solid var(--line); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--line);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand:hover { transform: translateY(-4px) rotate(-1.5deg); }
/* Logos rest in black & white, colour comes back on hover */
.brand img, .brand__word { filter: grayscale(1); opacity: 0.5; transition: filter 0.3s, opacity 0.3s; }
.brand:hover img, .brand:hover .brand__word { filter: none; opacity: 1; }
.brand--label { flex-direction: row; gap: 0.6rem; padding: 0 0.9rem; }
.brand--label img { height: 46px; max-width: 46px; }
.brand--label .brand__word { font-family: var(--body); font-weight: 700; font-size: 1.3rem; text-transform: none; letter-spacing: 0; line-height: 1.05; max-width: 110px; }
.brand img { max-width: 140px; height: 66px; object-fit: contain; }
.brand__word { font-family: var(--display); font-size: 1.45rem; line-height: 66px; text-transform: uppercase; letter-spacing: 0.02em; }
@media (max-width: 600px) {
  .brand { width: 140px; height: 84px; }
  .brand img { max-width: 104px; height: 50px; }
  .brand__word { font-size: 1.1rem; line-height: 50px; }
  .brand--label img { height: 34px; max-width: 34px; }
  .brand--label .brand__word { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .brands__track { width: auto; flex-wrap: wrap; justify-content: center; }
  .brand[aria-hidden="true"] { display: none; }
  .brands__viewport { -webkit-mask: none; mask: none; }
}

/* Featured tutorial */
.video--feature { display: grid; grid-template-columns: 1.4fr 1fr; align-items: stretch; box-shadow: 10px 10px 0 var(--red); }
.video--feature .video__thumb, .video--feature iframe { height: 100%; }
.video--feature .video__title {
  display: flex; flex-direction: column; justify-content: center; gap: 0.9rem;
  padding: clamp(1.4rem, 3vw, 2.4rem); border-top: 0; border-left: 2.5px solid var(--line);
  font-family: var(--display); font-weight: 400; font-size: clamp(1.3rem, 2.4vw, 1.9rem); line-height: 1.15; text-transform: uppercase;
}
.video__badge {
  align-self: flex-start; padding: 0.3rem 0.8rem;
  font-family: var(--body); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  background: var(--yellow); border: 2px solid var(--line); border-radius: 999px;
}
.video__desc { margin: 0; font-family: var(--body); font-size: 1.02rem; font-weight: 400; line-height: 1.55; text-transform: none; color: var(--muted); }
.video--feature .video__thumb::after { opacity: 1; width: 4.6rem; height: 4.6rem; font-size: 1.5rem; }
@media (max-width: 760px) {
  .video--feature { grid-template-columns: 1fr; }
  .video--feature .video__title { border-left: 0; border-top: 2.5px solid var(--line); }
  .video--feature .video__thumb { aspect-ratio: 16 / 9; height: auto; }
}

.videos__more { text-align: center; margin: 2.5rem 0 0; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }

/* Book */
.book__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 4rem; align-items: center; }
.book__cover { perspective: 1000px; }
.book__cover img, .cover-placeholder {
  width: 100%; max-width: 340px; aspect-ratio: 2 / 3; margin: 0 auto;
  border: 3px solid var(--line); border-radius: 6px 16px 16px 6px;
  box-shadow: 14px 14px 0 var(--line);
  transform: rotateY(-14deg);
  transition: transform 0.4s;
}
.book__cover:hover img, .book__cover:hover .cover-placeholder { transform: rotateY(0); }
.cover-placeholder {
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  padding: 2.2rem 1.5rem; text-align: center;
  background: var(--red); color: var(--white);
  background-image: linear-gradient(90deg, rgba(0,0,0,0.18) 0 14px, transparent 14px);
}
.cover-placeholder__brand { font-family: var(--display); font-size: 2.4rem; line-height: 1; text-transform: uppercase; text-shadow: 3px 3px 0 var(--line); }
.cover-placeholder__author { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.1em; }
.book__info h3 { font-size: clamp(2rem, 4vw, 3rem); text-transform: uppercase; color: var(--red); }
.book__subtitle { font-size: 1.3rem; font-weight: 700; margin: 0.5rem 0 1.2rem; }
.book__cover img { aspect-ratio: auto; max-width: 380px; border-radius: 6px; }
.book__info p { font-size: 1.08rem; }
.book__info h3 { color: var(--blue); }
.book__features { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: 0.55rem; }
.book__features li { position: relative; padding-left: 2rem; font-weight: 500; }
.book__features li::before {
  content: "✓"; position: absolute; left: 0; top: 0.1rem;
  width: 1.35rem; height: 1.35rem; display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 900; color: var(--white);
  background: var(--green); border: 2px solid var(--line); border-radius: 5px;
}
.book__buy { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }
.book__buy .btn:nth-child(2) { background: var(--blue); }
.book__buy .btn:nth-child(3) { background: var(--yellow); color: var(--ink); }
.book__note { margin-top: 0.8rem; font-size: 0.78rem; opacity: 0.6; }

/* Events */
.events__tabs { display: inline-flex; border: 2.5px solid var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 2rem; }
.events__tabs[hidden] { display: none; }
.events__tabs button {
  font: 700 0.95rem var(--body); padding: 0.7rem 1.5rem;
  background: var(--white); border: 0; cursor: pointer;
}
.events__tabs button[aria-selected="true"] { background: var(--ink); color: var(--white); }
.event-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.event {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.6rem; align-items: center;
  padding: 1.2rem 1.4rem;
  border: 2.5px solid var(--line); border-radius: var(--radius);
  background: var(--white);
  position: relative;
}
/* Whole box is clickable when the event has a link */
.event-list .event { transition: opacity 0.6s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s, background 0.2s; }
.event-list .event:has(a) { cursor: pointer; }
.event-list .event:has(a):hover,
.event-list .event:has(a:focus-visible) { transform: translate(-3px, -4px); box-shadow: var(--shadow); background: var(--soft); }
.event-list .event:has(a):active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.event-list .event:has(a:focus-visible) { outline: 3px solid var(--ink); outline-offset: 4px; }
.event__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.event__link:focus-visible { outline: none; }
.event:hover .event__link { color: var(--red); }
.event__date {
  width: 5rem; text-align: center;
  border: 2.5px solid var(--line); border-radius: 10px; overflow: hidden;
}
.event__date small { display: block; background: var(--red); color: var(--white); font-weight: 700; text-transform: uppercase; font-size: 0.75rem; padding: 0.2rem; }
.event__date strong { display: block; font-family: var(--display); font-size: 1.8rem; line-height: 1.3; }
.event__date em { display: block; font-style: normal; font-size: 0.75rem; padding-bottom: 0.25rem; }
.event h3 { font-size: 1.25rem; text-transform: uppercase; }
.event p { margin: 0.2rem 0 0; color: var(--muted); }
.event__type {
  display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.15rem 0.6rem; border: 2px solid var(--line); border-radius: 999px; margin-bottom: 0.4rem;
}
.event__type--gara { background: var(--yellow); }
.event__type--workshop { background: var(--green); color: var(--white); }
.event__type--evento { background: var(--blue); color: var(--white); }
.event__type--tv { background: var(--orange); color: var(--white); }
.event__type--tbc { background: var(--white); border-style: dashed; margin-left: 0.3rem; }
.event__link { font-weight: 700; text-decoration: none; white-space: nowrap; }
.event-empty { padding: 2rem; text-align: center; border: 2.5px dashed var(--line); border-radius: var(--radius); }

/* Records */
.records__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
/* Main event gets a double-width card */
.record--hl { grid-column: span 2; }
.records__grid .record--hl h3 { font-size: 1.3rem; }
.records__grid .record--hl dd { font-size: 1.6rem; }
.records__grid .record--hl .record__back strong { font-size: 1.5rem; }
.record { perspective: 900px; }
.record__face {
  height: 100%;
  padding: 1.2rem 1rem; text-align: center;
  border: 2.5px solid var(--line); border-radius: var(--radius); background: var(--white);
}
.record--hl .record__front, .record--hl > .record__face { background: var(--red); color: var(--white); box-shadow: var(--shadow); }
.record h3 { font-size: 1rem; text-transform: uppercase; margin-bottom: 0.6rem; }
.record__icon { display: block; font-size: 2rem; line-height: 1; margin: 0 auto 0.5rem; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.record__icon::before { vertical-align: 0 !important; }
.records__grid .record--hl .record__icon { font-size: 2.6rem; }
.record:hover .record__icon { transform: rotate(-12deg) scale(1.1); }
.record dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.6rem; text-align: left; }
.record dt { font-size: 0.78rem; text-transform: uppercase; opacity: 0.75; align-self: center; }
.record dd { margin: 0; font-family: var(--display); text-align: right; font-size: 1.1rem; white-space: nowrap; }
.record__unit { margin: 0.5rem 0 0; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7; }

/* Flip cards */
.record--flip { cursor: pointer; }
.record--flip:focus-visible { outline: none; }
.record--flip:focus-visible .record__face { outline: 3px solid var(--ink); outline-offset: 3px; }
.record__inner {
  display: grid; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.record__inner > .record__face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; position: relative; }
.record__back {
  transform: rotateY(180deg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem;
  background: var(--ink); color: var(--white);
}
.record--hl .record__back { background: var(--yellow); color: var(--ink); box-shadow: var(--shadow); }
.record__back strong { font-family: var(--display); font-size: 1.05rem; line-height: 1.15; text-transform: uppercase; }
.record__back small { font-size: 0.8rem; opacity: 0.8; }
.record__label {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--red); color: var(--white);
}
.record--hl .record__label { background: var(--ink); }
.record__hint { position: absolute; top: 0.45rem; right: 0.6rem; font-size: 0.9rem; opacity: 0.45; transition: transform 0.4s; }
.record--flip:hover .record__hint { transform: rotate(-180deg); }
@media (hover: hover) {
  .record--flip:hover .record__inner { transform: rotateY(180deg); }
}
.record--flip:focus-visible .record__inner,
.record--flip.is-flipped .record__inner { transform: rotateY(180deg); }

/* Timer */
.timer__box {
  text-align: center; padding: 2.5rem 1.5rem;
  background: var(--ink); color: var(--white);
  border-radius: 24px; border: 3px solid var(--line);
  box-shadow: 10px 10px 0 var(--red);
}
.timer__scramble { font-family: ui-monospace, Menlo, monospace; font-size: clamp(1rem, 2.4vw, 1.35rem); letter-spacing: 0.06em; margin: 0 0 1.5rem; color: var(--yellow); word-spacing: 0.3em; }
.timer__display {
  font-family: var(--display);
  font-size: clamp(4rem, 15vw, 9rem); line-height: 1;
  background: none; border: 0; color: var(--white); cursor: pointer;
  font-variant-numeric: tabular-nums;
  padding: 0.5rem 1rem; border-radius: 16px;
  -webkit-tap-highlight-color: transparent;
}
.timer__display.is-running { color: var(--green); }
.timer__hint { color: #bbb; }
.timer__hint kbd { background: var(--white); color: var(--ink); border-radius: 5px; padding: 0.1em 0.5em; font-family: var(--body); font-weight: 700; }
.timer__result { font-family: var(--display); font-size: 1.4rem; min-height: 1.6em; margin: 0.8rem 0 0; }

/* Contact */
.contact { padding-bottom: clamp(4rem, 8vw, 7rem); }
.contact__box {
  text-align: center; padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem;
  background: var(--red); color: var(--white);
  border: 3px solid var(--line); border-radius: 28px; box-shadow: 10px 10px 0 var(--line);
}
.contact__box h2 { font-size: clamp(2.2rem, 6vw, 4rem); text-transform: uppercase; text-shadow: 3px 3px 0 var(--line); }
.contact__box p { font-size: 1.15rem; max-width: 36rem; margin: 1rem auto 2rem; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-top: 2rem; }
.socials a {
  font-weight: 700; text-decoration: none; padding: 0.5rem 1.1rem;
  border: 2.5px solid var(--white); border-radius: 999px; transition: background 0.2s, color 0.2s;
}
.socials a:hover { background: var(--white); color: var(--red); }

/* Footer */
.footer { font-weight: 500; padding-bottom: 1.5rem; }
.footer__links {
  max-width: 1200px; margin: 0 auto; padding: 1.5rem clamp(16px, 5vw, 48px) 2rem;
  display: grid; grid-template-columns: 1.1fr 1.2fr 1fr 1.2fr; gap: 2rem;
}
.footer__col h2 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.9rem; color: var(--red); }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer__col a { text-decoration: none; }
.footer__col li a:hover, .footer__col p a:hover, .footer__all:hover { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.footer__col p { margin: 0; word-break: break-all; }
.footer__pages { grid-template-columns: 1fr 1fr; column-gap: 1rem; }
.footer__social { display: flex; gap: 0.6rem; margin-bottom: 1rem; }
.footer__social a {
  display: grid; place-items: center; width: 2.8rem; height: 2.8rem;
  border: 2.5px solid var(--line); border-radius: 12px; box-shadow: 3px 3px 0 var(--line);
  background: var(--white); transition: transform 0.2s, background 0.2s, color 0.2s;
}
.footer__social a:nth-child(1):hover { background: var(--red); color: var(--white); }
.footer__social a:nth-child(2):hover { background: var(--ink); color: var(--white); }
.footer__social a:nth-child(3):hover { background: var(--yellow); }
.footer__social a:hover { transform: translate(-2px, -2px) rotate(-6deg); }
.footer__social svg { width: 1.3rem; height: 1.3rem; }
.footer__all { font-weight: 700; }
.footer__legal { text-align: center; margin: 0; padding: 1.2rem 16px 0; border-top: 2px dashed #d8d6cf; max-width: 1200px; margin-inline: auto; }
.footer__legal small { color: var(--muted); font-weight: 400; }
@media (max-width: 860px) { .footer__links { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer__links { grid-template-columns: 1fr; } }

/* ---------- Links page (link in bio) ---------- */
.links-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 213, 0, 0.35) 0 18%, transparent 19%),
    radial-gradient(circle at 90% 85%, rgba(0, 70, 173, 0.18) 0 20%, transparent 21%),
    var(--white);
}
.linktree { max-width: 520px; margin: 0 auto; padding: 3rem 16px 2.5rem; text-align: center; }
.linktree__avatar { position: relative; display: inline-block; margin-bottom: 1rem; }
.linktree__avatar > img:first-child {
  width: 140px; height: 140px; object-fit: cover; border-radius: 28px;
  border: 3px solid var(--line); box-shadow: 6px 6px 0 var(--line); background: var(--red);
  transform: rotate(-3deg);
}
.linktree__logo { position: absolute; right: -22px; bottom: -14px; width: 56px; height: 56px; animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(8deg); } }
.linktree h1 { font-size: clamp(1.9rem, 7vw, 2.4rem); text-transform: uppercase; }
.linktree__brand { margin: 0.3rem 0 0; font-family: var(--display); color: var(--red); text-transform: uppercase; letter-spacing: 0.04em; }
.linktree__bio { margin: 0.5rem 0 1.8rem; color: var(--muted); font-weight: 500; }
.linktree__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; text-align: left; }
.linktree__list li { animation: link-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards; animation-delay: calc(var(--i) * 60ms); }
@keyframes link-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
.linktree__link {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.75rem 1rem 0.75rem 0.75rem; text-decoration: none;
  background: var(--white); border: 2.5px solid var(--line); border-radius: 16px; box-shadow: 4px 4px 0 var(--line);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}
.linktree__link:hover { transform: translate(-2px, -3px); box-shadow: 7px 7px 0 var(--line); }
.linktree__link:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.linktree__link:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.linktree__link--hl { background: var(--red); color: var(--white); }
.linktree__icon, .linktree__thumb {
  flex: none; width: 3rem; height: 3rem; border-radius: 12px; border: 2.5px solid var(--line);
}
.linktree__icon { display: grid; place-items: center; background: var(--soft); color: var(--ink); }
.linktree__icon svg { width: 1.45rem; height: 1.45rem; }
.linktree__icon--youtube { background: var(--white); color: var(--red); }
.linktree__icon--tiktok { background: var(--ink); color: var(--white); }
.linktree__icon--instagram { background: var(--yellow); }
.linktree__icon--calendar { background: var(--green); color: var(--white); }
.linktree__icon--web { background: var(--blue); color: var(--white); }
.linktree__icon--mail { background: var(--orange); color: var(--white); }
.linktree__thumb { object-fit: contain; background: var(--white); padding: 2px; }
.linktree__text { flex: 1; min-width: 0; display: grid; }
.linktree__text strong { font-weight: 700; font-size: 1.05rem; line-height: 1.25; }
.linktree__text small { font-size: 0.85rem; opacity: 0.75; }
.linktree__arrow { font-family: var(--display); font-size: 1.2rem; transition: transform 0.2s; }
.linktree__link:hover .linktree__arrow { transform: translateX(3px); }
.linktree__legal { margin: 2rem 0 0; color: var(--muted); }


.footer__tiles {
  height: 22px; margin-bottom: 1.5rem;
  background: repeating-linear-gradient(90deg,
    var(--red) 0 60px, var(--yellow) 60px 120px, var(--green) 120px 180px,
    var(--blue) 180px 240px, var(--orange) 240px 300px, var(--white) 300px 360px);
  border-top: 2.5px solid var(--line); border-bottom: 2.5px solid var(--line);
}

/* ---------- Media page ---------- */
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.media-hero {
  max-width: 1200px; margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(16px, 5vw, 48px) 0;
}
.back-link { display: inline-block; font-weight: 700; text-decoration: none; margin-bottom: 1.6rem; }
.back-link:hover { color: var(--red); }
.media-hero h1 {
  font-size: clamp(3rem, 9vw, 6.4rem); text-transform: uppercase;
  color: var(--red); text-shadow: 4px 4px 0 var(--line); -webkit-text-stroke: 2px var(--line);
}
.media-hero h1 span { color: var(--yellow); }
.media-counts { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.media-count {
  padding: 0.45rem 1rem; font-weight: 500;
  border: 2.5px solid var(--line); border-radius: 999px; box-shadow: 3px 3px 0 var(--line);
}
.media-count b { font-family: var(--display); }
.media-count--tv, .media-item--tv .media-item__icon { background: var(--red); color: var(--white); }
.media-count--stampa, .media-item--stampa .media-item__icon { background: var(--yellow); }
.media-count--radio, .media-item--radio .media-item__icon { background: var(--orange); color: var(--white); }
.media-count--podcast, .media-item--podcast .media-item__icon { background: var(--green); color: var(--white); }
.media-count--web, .media-item--web .media-item__icon { background: var(--blue); color: var(--white); }

.media { padding-top: 3rem; }
.media-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2.5rem; }
.media-filters button {
  font: 700 0.95rem var(--body); padding: 0.6rem 1.2rem; cursor: pointer;
  background: var(--white); border: 2.5px solid var(--line); border-radius: 999px;
  transition: transform 0.15s;
}
.media-filters button:hover { transform: translateY(-2px); }
.media-filters button[aria-selected="true"] { background: var(--ink); color: var(--white); }
.media-filters small { opacity: 0.7; margin-left: 0.2rem; }

.media-year { display: grid; grid-template-columns: 8rem 1fr; gap: 2rem; padding: 2rem 0; border-top: 2.5px solid var(--line); }
.media-year__title { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--red); position: sticky; top: 90px; align-self: start; }
.media-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.media-item {
  position: relative;
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center;
  padding: 1.1rem 1.3rem;
  background: var(--white); border: 2.5px solid var(--line); border-radius: var(--radius);
  transition: transform 0.15s, box-shadow 0.15s;
}
.media-item:has(a):hover { transform: translate(-3px, -3px); box-shadow: var(--shadow); }
.media-item:has(a:focus-visible) { outline: 3px solid var(--ink); outline-offset: 4px; }
.media-item__icon {
  display: grid; place-items: center; width: 3rem; height: 3rem; font-size: 1.3rem;
  border: 2.5px solid var(--line); border-radius: 10px;
}
.media-item__meta { margin: 0 0 0.25rem; font-size: 0.88rem; color: var(--muted); font-weight: 500; }
.media-item__type {
  display: inline-block; margin-right: 0.6rem; padding: 0.05rem 0.55rem;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  border: 2px solid var(--line); border-radius: 999px; color: var(--ink);
}
.media-item h3 { font-family: var(--body); font-weight: 700; font-size: 1.08rem; line-height: 1.35; }
.media-item h3 a { text-decoration: none; }
.media-item h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.media-item h3 a:focus-visible { outline: none; }
.media-item__arrow { font-family: var(--display); font-size: 1.4rem; }
.media-item:has(a):hover .media-item__arrow { color: var(--red); }

@media (max-width: 760px) {
  .media-year { grid-template-columns: 1fr; gap: 1rem; }
  .media-year__title { position: static; }
  .media-item { grid-template-columns: auto 1fr; }
  .media-item__arrow { display: none; }
}

/* ---------- Event gallery page ---------- */
.gallery { display: grid; gap: clamp(3rem, 7vw, 5rem); padding-top: 3rem; }
.story { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.story--flip .story__cover { order: 2; }
.story__cover {
  position: relative; display: block; width: 100%; padding: 0;
  aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--soft); border: 3px solid var(--line); border-radius: 22px;
  box-shadow: 10px 10px 0 var(--line); cursor: zoom-in;
  transform: rotate(-1deg);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s;
}
.story--flip .story__cover { transform: rotate(1deg); }
.story__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
button.story__cover:hover { transform: rotate(0) translate(-3px, -3px); box-shadow: 14px 14px 0 var(--line); }
button.story__cover:hover img { transform: scale(1.04); }
button.story__cover:focus-visible { outline: 3px solid var(--red); outline-offset: 5px; }
.story__cover--empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  cursor: default; font-family: var(--display); text-transform: uppercase; color: var(--muted);
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 18px 18px; background-color: var(--soft);
}
.story__count {
  position: absolute; right: 0.8rem; bottom: 0.8rem;
  padding: 0.3rem 0.8rem; font-weight: 700; font-size: 0.85rem;
  background: var(--yellow); color: var(--ink); border: 2px solid var(--line); border-radius: 999px;
}
.story__body { position: relative; }
.story__date {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin-bottom: 1rem; padding: 0.4rem 0.9rem 0.4rem 0.5rem;
  border: 2.5px solid var(--line); border-radius: 12px; box-shadow: 3px 3px 0 var(--line);
  background: var(--red); color: var(--white);
}
.story__date strong { font-family: var(--display); font-size: 2rem; line-height: 1; padding: 0 0.3rem; }
.story__date span { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; line-height: 1.15; }
.story:nth-child(4n+2) .story__date { background: var(--blue); }
.story:nth-child(4n+3) .story__date { background: var(--green); }
.story:nth-child(4n+4) .story__date { background: var(--yellow); color: var(--ink); }
.story h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); text-transform: uppercase; }
.story__place { font-weight: 700; margin: 0.6rem 0 0; }
.story__desc { font-size: 1.1rem; margin: 0.8rem 0 0; }
.story__thumbs { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.story__thumbs button {
  width: 72px; height: 72px; padding: 0; overflow: hidden; cursor: zoom-in;
  border: 2.5px solid var(--line); border-radius: 10px; background: none;
  transition: transform 0.2s;
}
.story__thumbs button:hover { transform: translateY(-3px) rotate(-3deg); }
.story__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.story__video { display: inline-block; margin-top: 1.2rem; font-weight: 700; text-decoration: none; border-bottom: 2.5px solid var(--red); }
.story__video:hover { color: var(--red); }
.events__more { margin: 2rem 0 0; }
.gallery__tabs { margin: 2rem 0 0; }
.gallery__tabs small { opacity: 0.7; margin-left: 0.2rem; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(20, 20, 20, 0.92);
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 0.8rem; min-width: 0; }
.lightbox img { max-width: 100%; max-height: 80vh; border: 3px solid var(--white); border-radius: 14px; }
.lightbox figcaption { color: var(--white); font-weight: 500; text-align: center; }
.lightbox button {
  display: grid; place-items: center; width: 3rem; height: 3rem;
  font-size: 1.3rem; font-weight: 700; cursor: pointer;
  background: var(--white); color: var(--ink); border: 2.5px solid var(--line); border-radius: 12px;
}
.lightbox button:hover { background: var(--yellow); }
.lightbox__close { position: absolute; top: clamp(12px, 3vw, 28px); right: clamp(12px, 3vw, 28px); }
.lightbox--single .lightbox__nav { visibility: hidden; }

@media (max-width: 760px) {
  .story { grid-template-columns: 1fr; }
  .story--flip .story__cover { order: 0; }
  .lightbox { grid-template-columns: 1fr; }
  .lightbox__nav { position: absolute; bottom: 20px; }
  .lightbox__nav--prev { left: 20px; }
  .lightbox__nav--next { right: 20px; }
}

/* ---------- Contact page ---------- */
.contact__mail { margin: 1.2rem auto 0 !important; font-size: 1rem !important; text-align: center; }
.contact__mail a { font-weight: 700; }
.contact-page { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; padding-top: 3rem; padding-bottom: clamp(4rem, 8vw, 7rem); }
.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 1.4rem;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  background: var(--white); border: 3px solid var(--line); border-radius: 24px; box-shadow: 10px 10px 0 var(--red);
}
.contact-form__hp { position: absolute; left: -9999px; }
.field { display: grid; gap: 0.4rem; }
.field--wide { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 0.92rem; }
.field input, .field select, .field textarea {
  width: 100%; font: 500 1rem var(--body); color: var(--ink);
  padding: 0.8rem 0.95rem;
  background: var(--soft); border: 2.5px solid var(--line); border-radius: 12px;
  transition: box-shadow 0.15s, background 0.15s;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background: var(--white); box-shadow: 4px 4px 0 var(--yellow), 4px 4px 0 2.5px var(--line); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.5rem; }
.contact-form__footer { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }
.contact-form button[disabled] { opacity: 0.6; cursor: wait; }
.contact-form__status { margin: 0; font-weight: 700; }
.contact-form__status.is-ok { color: var(--green); }
.contact-form__status.is-error { color: var(--red); }
.contact-side { display: grid; gap: 1.4rem; }
.contact-card { padding: 1.6rem; border: 2.5px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--blue); color: var(--white); }
.contact-card--yellow { background: var(--yellow); color: var(--ink); }
.contact-card h2 { font-size: 1.4rem; text-transform: uppercase; margin-bottom: 0.5rem; }
.contact-card p { margin: 0 0 0.6rem; }
.contact-card__mail { font-weight: 700; word-break: break-all; font-size: 1.05rem; }
.contact-card__socials { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }
.contact-card__socials a { font-weight: 700; text-decoration: none; padding: 0.45rem 1rem; border: 2.5px solid var(--line); border-radius: 999px; background: var(--white); }
.contact-card__socials a:hover { background: var(--ink); color: var(--white); }
.thanks { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 1rem; }
@media (max-width: 860px) {
  .contact-page { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
}

/* ---------- Legal page ---------- */
.legal { padding-bottom: clamp(4rem, 8vw, 6rem); }
.legal > * { max-width: 780px; }
.legal__updated { color: var(--muted); font-weight: 500; margin-top: 0; }
.legal h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); text-transform: uppercase; margin: 2.4rem 0 0.8rem; padding-top: 1.2rem; border-top: 2.5px solid var(--line); }
.legal h3 { font-family: var(--body); font-weight: 700; font-size: 1.05rem; margin: 1.2rem 0 0.3rem; }
.legal p, .legal li { font-size: 1.02rem; }
.legal ul { padding-left: 1.2rem; display: grid; gap: 0.5rem; }
.legal a, .footer__legal a, .linktree__legal a, .contact-form__privacy a { color: inherit; font-weight: 700; text-underline-offset: 3px; }
.contact-form__privacy { flex-basis: 100%; margin: 0; font-size: 0.85rem; color: var(--muted); }

/* Back to top */
.to-top {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 60;
  display: grid; place-items: center;
  width: 3.4rem; height: 3.4rem;
  background: var(--red); color: var(--white);
  border: 2.5px solid var(--line); border-radius: 12px;
  box-shadow: 4px 4px 0 var(--line);
  cursor: pointer;
  opacity: 0; pointer-events: none;
  transform: translateY(20px) rotate(-90deg) scale(0.6);
  transition: opacity 0.3s, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s;
}
.to-top.is-shown { opacity: 1; pointer-events: auto; transform: none; }
.to-top.is-shown:hover { transform: translate(-2px, -4px); box-shadow: 6px 8px 0 var(--line); }
.to-top.is-shown:hover svg { animation: nudge-up 0.6s ease-in-out infinite; }
.to-top:active { transform: translate(2px, 2px) !important; box-shadow: 1px 1px 0 var(--line) !important; }
.to-top:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
@keyframes nudge-up { 50% { transform: translateY(-4px); } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s, transform 0.6s; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .hero__visual { width: min(80%, 380px); margin: 1rem auto 2rem; }
  .bio__grid, .book__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .cards, .videos { grid-template-columns: repeat(2, 1fr); }
  .cards .card:last-child:nth-child(3n + 2) { grid-column: auto; }
  .cards .card:last-child:nth-child(odd) { grid-column: span 2; }
  .records__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 2.5px solid var(--line); }
}
@media (max-width: 760px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 1rem;
    padding: 1.4rem 16px;
    background: var(--white); border-bottom: 2.5px solid var(--line);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .scene { transform: scale(0.75); left: -30px; bottom: -50px; }
}
@media (max-width: 600px) {
  .cards, .videos { grid-template-columns: 1fr; }
  .cards .card:last-child:nth-child(odd) { grid-column: auto; }
  .records__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event { grid-template-columns: auto 1fr; }
  .event__link { grid-column: 1 / -1; }
  .h1__brand { -webkit-text-stroke: 1.5px var(--line); text-shadow: 3px 3px 0 var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
