/* phase1 — cookie bar slim + marquee pausing. Loaded after main.css. */
.magnet-cookie-banner {
  left: 0; right: 0; bottom: 0;
  max-width: none; margin: 0;
  border: 0; border-top: 2px solid #e30613;
  box-shadow: none;
  background: #0b0b0e;
  flex-direction: column; gap: .5rem;
  padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom, 0px));
  font-size: .75rem; line-height: 1.35;
}
.magnet-cookie-banner__text { margin: 0; max-width: 72ch; }
.magnet-cookie-banner__actions { flex-wrap: nowrap; gap: .5rem; justify-content: stretch; }
.magnet-cookie-banner__button {
  flex: 1 1 0; min-height: 2.75rem; padding: .25rem .75rem;
  font-size: .6875rem; line-height: 1; box-shadow: none;
}
.magnet-cookie-banner__button:hover,
.magnet-cookie-banner__button:focus-visible { transform: none; box-shadow: none; background: #ff1f2d; }
.magnet-cookie-banner__button--reject:hover,
.magnet-cookie-banner__button--reject:focus-visible { background: #e4e4e7; }
@media (min-width: 640px) {
  .magnet-cookie-banner {
    flex-direction: row; align-items: center; justify-content: space-between;
    gap: 1.5rem; padding: .5rem 1.5rem; font-size: .8125rem;
  }
  .magnet-cookie-banner__text { max-width: none; flex: 1 1 auto; }
  .magnet-cookie-banner__actions { flex: 0 0 auto; }
  .magnet-cookie-banner__button { flex: 0 0 auto; min-height: 2.5rem; padding: .25rem 1.1rem; }
}
/* one line (with ellipsis) only where the full text certainly fits, so the Cookie Policy link is never cut */
@media (min-width: 1360px) {
  .magnet-cookie-banner__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* marquee: pause when off-screen, while a link inside has focus, or when reduced motion is requested */
.animate-marquee.phase1-paused,
.animate-marquee:focus-within { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .animate-marquee { animation-play-state: paused !important; }
}

/* phase2-4 — HERO: one large picture, lighter secondary text, facts on the grid. */
html.dark .p2-front-hero { --svc-muted: #c4c4cc; }
.p2-front-hero .magnet-front-hero__claim { font-size: clamp(2.25rem, 10.4vw, 3.25rem); }
@media (min-width: 640px) {
  .p2-front-hero .magnet-front-hero__claim { font-size: clamp(2.75rem, min(4.8vw, 8.8vh), 5rem); }
}
.p2-hero-media { position: relative; width: 100%; aspect-ratio: 4 / 3; }
.p2-hero-media__link {
  display: block; width: 100%; height: 100%; overflow: hidden;
  border: 4px solid var(--svc-ink, #fff); background: #141417;
  box-shadow: 8px 8px 0 #e30613;
  transition: transform .2s ease, box-shadow .2s ease;
}
.p2-hero-media__img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}
.p2-hero-media__link:focus-visible { outline: 3px solid #fff; outline-offset: 6px; }
@media (hover: hover) and (pointer: fine) {
  .p2-hero-media__link:hover { transform: translateY(-2px); box-shadow: 10px 10px 0 #e30613; }
  .p2-hero-media__link:hover .p2-hero-media__img { transform: scale(1.02); }
}
@media (min-width: 1024px) {
  .p2-front-hero .magnet-front-hero__inner { align-items: start; }
  .p2-hero-media { aspect-ratio: 1 / 1; margin-block-start: 2.375rem; }
}
@media (prefers-reduced-motion: reduce) {
  .p2-hero-media__link, .p2-hero-media__img { transition: none; }
  .p2-hero-media__link:hover, .p2-hero-media__link:hover .p2-hero-media__img { transform: none; }
}
@media (min-width: 768px) {
  .p2-front-hero .magnet-front-hero__facts .magnet-about-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .p2-front-hero .magnet-front-hero__facts .magnet-about-facts__item:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* phase2-4 — WORKS strip: big 4:3 cards, in colour, linked, no caption. */
.p3-works { padding-block: 1.25rem 2.5rem; }
.p3-works__track { align-items: stretch; padding-inline: .5rem; }
.p3-works__item { padding-inline: .625rem; }
.p3-works__card {
  display: block; position: relative; overflow: hidden;
  width: clamp(20rem, 28vw, 25rem); aspect-ratio: 4 / 3;
  border: 3px solid var(--svc-card-line, #3f3f46); background: #141417;
  transition: translate .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.p3-works__img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; filter: none;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}
.p3-works__img--fit { object-fit: contain; background: #111; }
.p3-works__card:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) {
  .p3-works__card:hover { translate: 0 -2px; border-color: #e30613; box-shadow: 6px 6px 0 #e30613; }
  .p3-works__card:hover .p3-works__img { transform: scale(1.02); }
}
@media (max-width: 767px) {
  .p3-works__item { padding-inline: .375rem; }
  .p3-works__card,
  .animate-marquee.is-touch-scroll .p3-works__card { width: 75vw; }
}
@media (prefers-reduced-motion: reduce) {
  .p3-works__card, .p3-works__img { transition: none; }
  .p3-works__card:hover { translate: none; }
  .p3-works__card:hover .p3-works__img { transform: none; }
  /* one row, scrolled by hand (main.css would wrap all the cards into a wall); main.js makes no copies in this mode */
  .p3-works .animate-marquee.p3-works__track {
    flex: 1 1 auto; width: 100%; min-width: 0;
    flex-wrap: nowrap !important; justify-content: flex-start !important; gap: 0 !important; white-space: nowrap !important;
    overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #52525b transparent;
  }
  .p3-works .p3-works__item { scroll-snap-align: start; }
}

/* phase2-4 — LICENSING spotlight: large square covers, in colour, no labels, no stagger. */
.magnet-spotlight__projects > li:nth-child(2n) { translate: none; }
.magnet-spotlight__project { aspect-ratio: 4 / 3; transition: translate .2s ease, box-shadow .2s ease, border-color .2s ease; }
.magnet-spotlight__project img,
.magnet-spotlight__project:hover img { filter: none; }
.magnet-spotlight__project-name { display: none; }
@media (hover: hover) and (pointer: fine) {
  .magnet-spotlight__project:hover, .magnet-spotlight__project:focus-visible { translate: 0 -2px; }
  .magnet-spotlight__project:hover img, .magnet-spotlight__project:focus-visible img { scale: 1.02; }
}
@media (min-width: 1024px) {
  .magnet-spotlight__inner { gap: 4rem; }
  .magnet-spotlight__figure dd { font-size: clamp(1.75rem, 1.2vw + 1.1rem, 2.5rem); }
}

/* phase2-4 — SERVICES: 3x3 compact cards, no quotes, a "Scopri" cue. */
.magnet-services-grid { gap: 1.25rem; }
.magnet-services-grid .magnet-services-card { padding: 1.5rem; transition: translate .2s ease, box-shadow .2s ease, border-color .2s ease; }
.magnet-services-grid .magnet-services-card__icon { width: 2.75rem; height: 2.75rem; margin-bottom: 1rem; }
.magnet-services-grid .magnet-services-card__icon svg,
.magnet-services-grid .magnet-services-card__icon i { width: 1.375rem; height: 1.375rem; }
.magnet-services-grid .magnet-services-card__title { margin-bottom: .5rem; font-size: 1.375rem; line-height: 1.15; }
.magnet-services-grid .magnet-services-card__description {
  display: block; -webkit-line-clamp: unset; overflow: visible; /* never cut a description mid-sentence (the phone list had its own clamp) */
  flex: 0 0 auto; margin-bottom: 1rem; font-size: .9375rem; line-height: 1.5;
}
html.dark .magnet-services-grid .magnet-services-card__description { color: #c4c4cc; }
.p4-service__more {
  margin-top: auto; display: inline-flex; align-items: center; gap: .5rem;
  font-family: "Space Grotesk", sans-serif; font-size: .75rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--magnet-red-text, #e30613);
}
.p4-service__more svg { width: 1rem; height: 1rem; transition: transform .2s ease; }
@media (hover: hover) and (pointer: fine) {
  .magnet-services-grid .magnet-services-card:hover { translate: 0 -2px; }
  .magnet-services-grid .magnet-services-card:hover .p4-service__more svg { transform: translateX(3px); }
}
@media (max-width: 767px) {
  .magnet-home .p4-service__more { display: none; }
  /* the 4px top border of the list already closes the heading: drop the heading's own underline */
  #services .magnet-service-section__head { border-bottom: 0; padding-bottom: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .magnet-services-grid .magnet-services-card:hover { translate: none; }
}

/* round 2 — HERO: the facts row sits in the first screen at 1440x900; tablet picture is shorter. */
@media (min-width: 1024px) {
  .p2-front-hero .magnet-front-hero__inner { padding-block: 1.5rem 1.5rem; }
  .p2-front-hero .magnet-front-hero__lead { margin-top: 1.25rem; font-size: 1.125rem; line-height: 1.6; }
  .p2-front-hero .magnet-front-hero__actions { margin-top: 1.5rem; }
  .p2-front-hero .magnet-front-hero__proof { margin-top: 1.75rem; }
  .p2-front-hero .magnet-front-hero__facts { padding-bottom: 3rem; }
  .p2-front-hero .magnet-front-hero__facts .magnet-about-facts { gap: 1rem; }
  .p2-front-hero .magnet-front-hero__facts .magnet-about-facts__item { padding: 1rem 1.5rem; gap: .5rem; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  /* tablet: tighter text, a wide picture, so the whole picture fits above the fold at 768x1024 */
  .p2-front-hero .magnet-front-hero__inner { padding-block: 1.5rem 1.5rem; gap: 1.5rem; }
  .p2-front-hero .magnet-front-hero__lead { margin-top: 1.25rem; font-size: 1.0625rem; line-height: 1.55; }
  .p2-front-hero .magnet-front-hero__actions { margin-top: 1.5rem; }
  .p2-front-hero .magnet-front-hero__proof { margin-top: 1.5rem; }
  .p2-hero-media { aspect-ratio: 2 / 1; }
}
