/* Site-wide styles for Keus website */
@import url("./tokens.css");

html, body { margin: 0; padding: 0; }
html { overflow-x: clip; }
body {
  background: var(--keus-bg-warm-2);
  color: var(--keus-ink);
  font-family: var(--font-sans);
  font-weight: 500;
  overflow-x: clip;
}
* { box-sizing: border-box; }

a { transition: opacity 240ms cubic-bezier(0.2,0,0,1); }

/* ── Site header / nav ──────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding: 16px 64px;
  background: rgba(255,249,245,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #ECECEC;
  transition: padding 280ms cubic-bezier(0.2,0,0,1);
}
.site-header.is-scrolled { padding-top: 10px; padding-bottom: 10px; }
/* When the mobile drawer is open, drop backdrop-filter so the fixed-position
   .nav-drawer (a descendant of the header) escapes the containing block that
   backdrop-filter would otherwise create — otherwise the drawer is clipped to
   the header's height. */
.site-header.is-open {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.site-header-inner {
  display: flex; align-items: center; gap: 24px;
  max-width: 1280px; margin: 0 auto;
}
.site-header.is-dark {
  background: rgba(5,13,44,0.85);
  border-bottom-color: rgba(255,255,255,0.08);
  color: #fff;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none; border: none;
  font-weight: 600; font-size: 22px; letter-spacing: -0.01em;
}
.brand:hover { opacity: 1; }
.brand svg { width: 22px; height: 22px; display: block; color: currentColor; }
.brand span { line-height: 1; }

/* Logo image variant — uses keus-logo-black/white.png */
.brand.brand-logo { gap: 0; padding: 0; flex: none; max-width: 120px; }
.brand.brand-logo img {
  height: 22px; max-height: 22px; width: auto; max-width: 100%; display: block;
  object-fit: contain;
}
/* Mask-recolored navbar logo (lets us tint the wordmark to brand deep-blue
   on light surfaces, white on dark surfaces, without baking color into the asset). */
.brand-logo-mark {
  display: block;
  width: 92px; height: 22px;
  background-color: var(--keus-deep-blue, #050D2C);
  -webkit-mask: url(/assets/keus-logo-black.png) no-repeat left center / contain;
          mask: url(/assets/keus-logo-black.png) no-repeat left center / contain;
}
.brand.brand-logo.is-dark .brand-logo-mark {
  background-color: #fff;
  -webkit-mask-image: url(/assets/keus-logo-white.png);
          mask-image: url(/assets/keus-logo-white.png);
}
.nav { display: flex; gap: 32px; margin-left: 24px; flex: 1; justify-content: flex-start; min-width: 0; }
.nav a {
  color: inherit; font-size: 15px; font-weight: 500;
  text-decoration: none; border: none; opacity: 0.75;
  position: relative;
  white-space: nowrap;
}
.nav a:hover { opacity: 1; }
.nav a.is-active { opacity: 1; }
.nav a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -20px;
  height: 2px; background: #F8502E;
}
.cta-pill {
  padding: 10px 18px 10px 20px; border-radius: 40px;
  background: #050D2C; color: #fff; border: 1px solid #050D2C;
  font-size: 14px; font-weight: 500; font-family: inherit;
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap; flex: none;
  line-height: 1;
  transition: opacity 240ms cubic-bezier(0.2,0,0,1), transform 240ms cubic-bezier(0.2,0,0,1), background 240ms;
}
.is-dark .cta-pill { background: #F8502E; border-color: #F8502E; }
.cta-pill:hover { opacity: 1; transform: translateY(-1px); background: #F8502E; border-color: #F8502E; }

/* ── Page chrome ─────────────────────────────────────────────── */
.page-shell { min-height: 100vh; display: flex; flex-direction: column; }
.page-shell main { flex: 1; }

/* ── Sections / containers ───────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px; color: #6A6767;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 24px;
}
.eyebrow.on-dark { color: rgba(255,255,255,0.85); }
.sq { width: 10px; height: 10px; background: #F8502E; display: inline-block; flex: none; }
.sq.sm { width: 8px; height: 8px; }

.h-display {
  font-size: 80px; font-weight: 500; letter-spacing: -0.02em;
  line-height: 1.0; margin: 0; text-wrap: balance; color: #000;
}
.h-display.on-dark { color: #fff; }
.h-section {
  font-size: 56px; font-weight: 500; letter-spacing: -0.01em;
  line-height: 1.05; margin: 0; color: #000; text-wrap: balance;
}
.h-section.on-dark { color: #fff; }
.lead {
  font-size: 20px; font-weight: 500; line-height: 1.5;
  color: #1A1A1A; max-width: 640px; margin: 24px 0 0;
}
.lead.on-dark { color: #ffffff; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 25px; border-radius: 40px;
  border: 1px solid transparent;
  font-family: inherit; font-size: 17px; font-weight: 500;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  line-height: 1; box-sizing: border-box;
  transition: opacity 240ms cubic-bezier(0.2,0,0,1), transform 240ms cubic-bezier(0.2,0,0,1);
}
.btn-primary { background: #F8502E; color: #fff; border-color: #F8502E; }
.btn-dark { background: #000; color: #fff; border-color: #000; }
.btn-ghost-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,0.22); }
.btn-ghost-light { background: transparent; color: #1A1A1A; border-color: #CDCDCD; }
.btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  position: relative;
  background: linear-gradient(#050D2C 0%, #01040D 100%);
  color: #fff;
  padding: 96px 64px 36px;
  font-family: var(--font-sans);
  overflow: hidden;
}
.site-footer .glow {
  position: absolute; left: 50%; top: 30%; width: 1200px; height: 1200px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 60%);
  pointer-events: none;
}
.footer-inner { position: relative; max-width: 1280px; margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 64px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-footer .footer-logo { max-width: 140px; margin-bottom: 28px; display: inline-flex; }
.site-footer .footer-logo img { height: 32px; max-height: 32px; width: auto; max-width: 100%; display: block; object-fit: contain; }
.footer-headline {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 20px;
  max-width: 320px;
}
.footer-tag { font-family: var(--font-mono); font-size: 14px; color: rgba(255,249,245,0.55); }
.footer-col h4 {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,249,245,0.5);
  margin: 0 0 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer-col a {
  color: #fff; font-size: 15px; text-decoration: none; border: none; opacity: 0.85;
}
.footer-col a:hover { opacity: 1; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 32px; font-family: var(--font-mono); font-size: 12px;
  color: rgba(255,249,245,0.4);
}
.footer-bottom .links { display: flex; gap: 24px; }
.footer-bottom a { color: inherit; text-decoration: none; border: none; }

/* ── Inline mini-CTA strip (used above footer on most pages) ── */
.mini-cta {
  background: var(--keus-bg-warm-2);
  padding: 80px 64px;
  border-top: 1px solid #ECECEC;
}
.mini-cta-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center;
}
.mini-cta h3 {
  font-size: 44px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.05;
  margin: 0 0 14px; color: #000;
}
.mini-cta p { font-size: 17px; color: #6A6767; margin: 0; max-width: 520px; line-height: 1.5; }
.mini-cta .form {
  display: flex; gap: 8px; align-items: stretch;
  background: #fff; border: 1px solid #E6E6E6; border-radius: 40px;
  padding: 6px; box-shadow: 0 0 16px rgba(0,0,0,.04);
}
.mini-cta .form input {
  flex: 1; border: none; outline: none; padding: 14px 20px;
  font-size: 16px; font-family: inherit; font-weight: 500; color: #1A1A1A;
  background: transparent;
}
.mini-cta .form input::placeholder { color: #989898; }
.mini-cta .form button {
  border: none; background: #F8502E; color: #fff;
  padding: 12px 24px; border-radius: 40px;
  font-size: 15px; font-weight: 500; font-family: inherit; cursor: pointer;
}

/* ── Card recipe ─────────────────────────────────────────────── */
.card {
  background: #FAFBFB; border: 1px solid #E6E6E6; border-radius: 24px;
  padding: 32px;
  box-shadow: 0 0 16px rgba(0,0,0,.05), 0 4px 8px rgba(0,0,0,.03);
}
.card-dark {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 32px; color: #fff;
}

/* ── Mono meta line ──────────────────────────────────────────── */
.meta { font-family: var(--font-mono); font-size: 14px; color: #6A6767; }
.meta.on-dark { color: rgba(255,255,255,0.85); }

/* ── Reveal animations ────────────────────────────────────────
   Bending-Spoons-style scroll-reveal. Implemented as keyframes (not
   transitions) because CSS transitions get stuck in "pending" state
   inside iframe contexts. */
@keyframes reveal-rise {
  0%   { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes reveal-rise-sm {
  0%   { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes reveal-fade {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes reveal-scale {
  0%   { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}

/* Default state: visible. Only when JS explicitly attaches data-reveal
   AND data-reveal-on does the entrance animation play. This way, if JS
   is slow/blocked, content is never stuck invisible. */
[data-reveal]:not([data-reveal-on]) {
  /* Pre-animation: subtly hidden, but only briefly — the JS sets
     data-reveal-on within a frame. If JS fails entirely, the safety
     timeout in Motion.jsx forces it on within 1.5s. */
  opacity: 0;
}
[data-reveal-on="true"] {
  animation: reveal-rise 900ms cubic-bezier(0.2,0.7,0.2,1) forwards;
  /* Belt-and-suspenders: if animation is pending (iframe quirk), the
     declared opacity:1 still applies because `forwards` only fills
     after the animation, not before. */
  opacity: 1;
}
[data-reveal="fade"][data-reveal-on="true"]    { animation-name: reveal-fade; }
[data-reveal="rise"][data-reveal-on="true"]    { animation-name: reveal-rise; }
[data-reveal="rise-sm"][data-reveal-on="true"] { animation-name: reveal-rise-sm; }
[data-reveal="scale"][data-reveal-on="true"]   { animation-name: reveal-scale; }

[data-reveal-stagger] [data-reveal-on="true"] { animation-duration: 800ms; }

/* Split-text */
@keyframes split-word-in {
  0%   { opacity: 0; transform: translateY(0.7em); }
  100% { opacity: 1; transform: translateY(0); }
}
.split-line { display: block; overflow: hidden; }
.split-word {
  display: inline-block;
  opacity: 0;
}
.split-word.is-in {
  animation: split-word-in 750ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  opacity: 1; /* fallback if animation is pending */
}

/* Parallax marker — JS reads data-parallax="-0.2" etc */
[data-parallax] { will-change: transform; }

/* ── ScrollText words ─────────────────────────────────────────
   Initial opacity is 0.12; JS overrides inline on scroll.
   No CSS transition — rAF-batched updates are already smooth. */
.st-word { display: inline; }

/* ── Marquee ──────────────────────────────────────────────────── */
@keyframes marquee-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes marquee-right {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
.marquee-outer {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.marquee-track {
  display: flex;
  width: max-content;
  align-items: center;
}
.marquee-track--left  { animation: marquee-left  38s linear infinite; }
.marquee-track--right { animation: marquee-right 48s linear infinite; }
.marquee-track:hover  { animation-play-state: paused; }

/* ── Hero gradient breathe ────────────────────────────────────── */
@keyframes hero-glow-breathe {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1;   }
}
.hero-glow { animation: hero-glow-breathe 9s ease-in-out infinite; }

@keyframes hero-k-in {
  from { opacity: 0; transform: translateY(-50%); }
  to   { opacity: 1; transform: translateY(-50%); }
}
.hero-k {
  animation: hero-k-in 900ms cubic-bezier(0.2,0.7,0.2,1) 0.2s both;
}
.hero-k svg { width: 100%; height: 100%; display: block; }
@media (prefers-reduced-motion: reduce) {
  .hero-k { animation: none; opacity: 1; transform: translateY(-50%); }
}

/* ── Card hover lift ─────────────────────────────────────────── */
.card {
  transition: transform 240ms cubic-bezier(0.2,0,0,1),
              box-shadow 240ms cubic-bezier(0.2,0,0,1);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.10), 0 4px 10px rgba(0,0,0,0.05);
}

/* ── Button enhanced hover ───────────────────────────────────── */
.btn {
  transition: opacity 220ms cubic-bezier(0.2,0,0,1),
              transform 220ms cubic-bezier(0.2,0,0,1),
              background 220ms, border-color 220ms, color 220ms;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-ghost-light:hover { background: #F5F5F5; transform: translateY(-1px); }
.btn-ghost-dark:hover  { background: rgba(255,255,255,0.08); transform: translateY(-1px); }
.btn-dark:hover { opacity: 0.85; transform: translateY(-1px); }

/* ── Button & pill arrow animation ──────────────────────────── */
.btn span[aria-hidden],
.cta-pill span[aria-hidden] {
  display: inline-block;
  transition: transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn:hover span[aria-hidden],
.cta-pill:hover span[aria-hidden] {
  transform: translateX(5px);
}

/* ── HubSpot embed: align to Keus design system ─────────────── */
.hs-form-frame { font-family: var(--font-sans, "Inter", system-ui, sans-serif); }
.hs-form-frame form { display: grid; gap: 18px; }
.hs-form-frame .hs-form-field > label,
.hs-form-frame label.hs-main-font-element {
  font-size: 11px; font-family: var(--font-mono, ui-monospace, monospace);
  text-transform: uppercase; letter-spacing: 0.08em; color: #1A1A1A;
  font-weight: 500; margin-bottom: 8px; display: block;
}
.hs-form-frame input[type="text"],
.hs-form-frame input[type="email"],
.hs-form-frame input[type="tel"],
.hs-form-frame input[type="number"],
.hs-form-frame select,
.hs-form-frame textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px;
  border: 1px solid #E6E6E6; background: #FFF9F5;
  font-size: 15px; font-family: inherit; font-weight: 500;
  color: #1A1A1A; outline: none; box-sizing: border-box;
  transition: border-color .15s ease, background .15s ease;
}
.hs-form-frame input:focus,
.hs-form-frame select:focus,
.hs-form-frame textarea:focus {
  border-color: #1A1A1A; background: #fff;
}
.hs-form-frame textarea { resize: vertical; min-height: 96px; }
.hs-form-frame ul.inputs-list,
.hs-form-frame ul.no-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.hs-form-frame .hs-form-checkbox label,
.hs-form-frame .hs-form-radio label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: #1A1A1A; text-transform: none; letter-spacing: 0;
  font-family: var(--font-sans);
}
.hs-form-frame .hs-error-msg,
.hs-form-frame .hs-error-msgs label {
  color: #F8502E; font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.04em;
}
.hs-form-frame input[type="submit"],
.hs-form-frame .hs-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 28px; border-radius: 999px;
  background: #1A1A1A; color: #fff; border: 1px solid #1A1A1A;
  font-size: 17px; font-weight: 500; font-family: inherit;
  cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .15s ease;
  width: 100%;
}
.hs-form-frame input[type="submit"]:hover,
.hs-form-frame .hs-button:hover { background: #F8502E; border-color: #F8502E; }
.hs-form-frame .legal-consent-container,
.hs-form-frame .hs-richtext { font-size: 12px; color: #6A6767; line-height: 1.5; }
.hs-form-frame .legal-consent-container a,
.hs-form-frame .hs-richtext a { color: inherit; border-bottom: 1px solid currentColor; text-decoration: none; }
.hs-form-frame .submitted-message {
  padding: 32px 24px; text-align: center; font-size: 16px; color: #1A1A1A; font-weight: 500;
}
#hs-form-target .hs-button span[aria-hidden],
.hs-form-frame .hs-button span[aria-hidden] {
  display: inline-block;
  transition: transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
#hs-form-target .hs-button:hover span[aria-hidden],
.hs-form-frame .hs-button:hover span[aria-hidden] { transform: translateX(5px); }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], .split-word { opacity: 1 !important; transform: none !important; }
  [data-parallax] { transform: none !important; }
  a, .cta-pill { transition: none !important; }
  .btn span[aria-hidden], .cta-pill span[aria-hidden] { transition: none !important; }
}

/* ── Product mockups (CSS-only) ────────────────────────────── */
.mock {
  position: relative;
  aspect-ratio: 1152 / 740;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.04);
  isolation: isolate;
}
.mock-grain {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}
.mock-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  filter: blur(60px); opacity: 0.6;
}
.mock-brand {
  position: absolute; top: 28px; left: 32px; z-index: 5;
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 700; font-size: 28px; letter-spacing: -0.01em;
  font-family: var(--font-sans);
}
.mock-brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px; font-size: 24px; font-weight: 800;
}
.mock-brand-word { font-weight: 600; }
.mock-meta {
  position: absolute; z-index: 5;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 999px;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(12px);
  font-family: var(--font-mono); font-size: 11px; color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  letter-spacing: 0.04em;
}
.mock-meta .meta-k { color: rgba(255,255,255,0.5); text-transform: uppercase; }
.mock-meta .meta-v { font-weight: 600; }
.mock-meta b { font-weight: 700; color: #fff; }
.mock-meta-tl { top: 28px; right: auto; left: 32px; }
.mock-meta-tr { top: 28px; right: 32px; }
.mock-meta-bl { bottom: 28px; left: 32px; }
.mock-meta-br { bottom: 28px; right: 32px; }

.meta-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #F8502E;
  box-shadow: 0 0 0 4px rgba(248,80,46,0.18);
  animation: pulse-dot 2s ease-in-out infinite;
}
.meta-dot-blue { background: #1E78FF; box-shadow: 0 0 0 4px rgba(30,120,255,0.22); }
.meta-dot-violet { background: #B388FF; box-shadow: 0 0 0 4px rgba(179,136,255,0.22); }
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(248,80,46,0.18); }
  50% { box-shadow: 0 0 0 8px rgba(248,80,46,0.06); }
}

/* ─── Nquadro ─── */
.mock-nquadro {
  background: radial-gradient(ellipse at 30% 20%, #1A1A1A 0%, #050505 70%);
}
.mock-glow-nquadro {
  background: radial-gradient(circle at 70% 50%, rgba(248,80,46,0.18), transparent 60%);
}
.mock-brand-mark-nquadro {
  background: linear-gradient(180deg, #fff 0%, #fff 50%, #050505 50%, #050505 100%);
  color: transparent; -webkit-text-fill-color: transparent;
  background-clip: text; -webkit-background-clip: text;
  border: 0;
  font-family: var(--font-sans);
  position: relative;
}
.mock-brand-mark-nquadro::before {
  content: "N"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #fff 0 50%, #050505 50% 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.mock-stack {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  perspective: 1400px;
}
.plan {
  position: absolute;
  width: 56%; aspect-ratio: 16 / 9;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 4px;
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-32deg) translate3d(var(--x,0), var(--y,0), 0);
  animation: float-plan 9s ease-in-out infinite;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0));
}
.plan-0 { --x: -80px; --y: -90px; opacity: 0.35; animation-delay: 0s; }
.plan-1 { --x: -30px; --y: -30px; opacity: 0.6; border-style: solid; animation-delay: -2s; }
.plan-2 { --x: 30px;  --y: 40px;  opacity: 1; border-color: rgba(255,255,255,0.55); animation-delay: -4s; background: rgba(255,255,255,0.03); }
.plan-3 { --x: 80px;  --y: 110px; opacity: 0.4; border-style: dashed; animation-delay: -6s; }
@keyframes float-plan {
  0%,100% { transform: rotateX(58deg) rotateZ(-32deg) translate3d(var(--x), var(--y), 0); }
  50%     { transform: rotateX(58deg) rotateZ(-32deg) translate3d(var(--x), calc(var(--y) - 6px), 0); }
}
.plan-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 14px 14px;
}
.plan-rooms { position: absolute; inset: 12% 14%; display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: 6%; }
.plan-rooms .room {
  border: 1px solid rgba(255,255,255,0.4); border-radius: 2px;
  background: rgba(255,255,255,0.04);
}
.plan-rooms .r1 { grid-row: 1 / span 2; }
.plan-rooms .r2 { background: rgba(248,80,46,0.18); border-color: rgba(248,80,46,0.7); }
.plan-tag {
  position: absolute; top: 8px; right: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.12);
  font-family: var(--font-mono); font-size: 9px; color: #fff;
  text-transform: uppercase; letter-spacing: 0.08em;
  transform: rotateZ(0); /* counter-rotate for legibility */
}
.plan-dot { width: 5px; height: 5px; background: #F8502E; border-radius: 50%; }

/* ─── PAGAI ─── */
.mock-pagai {
  background: linear-gradient(135deg, #1E78FF 0%, #0040CC 100%);
}
.mock-waves {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 50% 100%, transparent 0, transparent 14%, rgba(255,255,255,0.08) 14%, rgba(255,255,255,0.08) 14.5%, transparent 14.5%),
    radial-gradient(circle at 50% 100%, transparent 0, transparent 26%, rgba(255,255,255,0.08) 26%, rgba(255,255,255,0.08) 26.5%, transparent 26.5%),
    radial-gradient(circle at 50% 100%, transparent 0, transparent 40%, rgba(255,255,255,0.08) 40%, rgba(255,255,255,0.08) 40.5%, transparent 40.5%),
    radial-gradient(circle at 50% 100%, transparent 0, transparent 58%, rgba(255,255,255,0.08) 58%, rgba(255,255,255,0.08) 58.5%, transparent 58.5%),
    radial-gradient(circle at 50% 100%, transparent 0, transparent 78%, rgba(255,255,255,0.08) 78%, rgba(255,255,255,0.08) 78.5%, transparent 78.5%);
}
.mock-brand-mark-pagai {
  background: transparent; padding: 0;
}
.payslip {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -42%) rotate(-3deg);
  width: 64%;
  background: #fff; color: #0A1338;
  border-radius: 16px; padding: 22px 24px;
  box-shadow: 0 20px 60px rgba(0,32,80,0.35), 0 0 0 1px rgba(0,0,0,0.04);
  z-index: 4;
  animation: float-card 6s ease-in-out infinite;
}
@keyframes float-card {
  0%,100% { transform: translate(-50%, -42%) rotate(-3deg); }
  50%     { transform: translate(-50%, -45%) rotate(-3deg); }
}
.payslip-h {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 14px; border-bottom: 1px solid #ECECEC;
  margin-bottom: 14px;
}
.payslip-emp { font-weight: 700; font-size: 16px; }
.payslip-id { font-family: var(--font-mono); font-size: 11px; color: #6A6767; letter-spacing: 0.04em; }
.payslip-rows { display: grid; gap: 8px; }
.prow {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; font-weight: 500; color: #1A1A1A;
}
.prow span { color: #6A6767; }
.prow b { font-family: var(--font-mono); font-weight: 700; }
.prow .m { color: #6A6767; font-family: var(--font-mono); }
.prow-tot {
  margin-top: 6px; padding-top: 12px; border-top: 1px solid #ECECEC;
  color: #050D2C; font-weight: 700;
}
.prow-tot b { font-size: 18px; color: #050D2C; }
.payslip-tag {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 999px; background: #F0F6FF;
  font-family: var(--font-mono); font-size: 11px; color: #0040CC;
}
.mock-meta-pagai { background: rgba(0,32,80,0.5); }

/* ─── Genio ─── */
.mock-genio {
  background: radial-gradient(ellipse at 50% 100%, #B388FF 0%, #5B2FBE 35%, #1A0A3D 80%, #0B0420 100%);
}
.mock-halo {
  position: absolute; inset: -10%;
  background: radial-gradient(ellipse at 50% 70%, rgba(255,255,255,0.4) 0%, transparent 30%);
  filter: blur(40px); z-index: 0;
}
.mock-spark {
  position: absolute; z-index: 2;
  color: #fff; font-size: 14px;
  text-shadow: 0 0 12px rgba(255,255,255,0.8);
  animation: sparkle 4s ease-in-out infinite;
}
.mock-spark-1 { top: 22%; left: 60%; font-size: 18px; animation-delay: 0s; }
.mock-spark-2 { top: 70%; left: 20%; font-size: 12px; animation-delay: -1.4s; }
.mock-spark-3 { top: 40%; left: 80%; font-size: 10px; animation-delay: -2.6s; }
@keyframes sparkle {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}
.mock-brand-word-genio { font-size: 32px; }
.genio-dot { color: #fff; font-size: 0.7em; margin: 0 0.05em; vertical-align: 0.1em; }
.kpi-stack {
  position: absolute; right: 7%; bottom: 12%;
  display: grid; gap: 12px;
  grid-template-columns: 1fr; width: 56%;
  z-index: 4;
}
.kpi-card {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 16px;
  padding: 14px 18px; border-radius: 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(20px);
  color: #fff;
}
.kpi-1 { animation: float-kpi 7s ease-in-out infinite; }
.kpi-2 { transform: translateX(-32px); opacity: 0.92; animation: float-kpi 7s ease-in-out -2.3s infinite; }
.kpi-3 { transform: translateX(-64px); opacity: 0.82; animation: float-kpi 7s ease-in-out -4.6s infinite; }
@keyframes float-kpi {
  0%, 100% { transform: translateY(0) translateX(var(--ox, 0)); }
  50% { transform: translateY(-4px) translateX(var(--ox, 0)); }
}
.kpi-2 { --ox: -32px; }
.kpi-3 { --ox: -64px; }
.kpi-l { font-family: var(--font-mono); font-size: 11px; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.06em; grid-column: 1; }
.kpi-v { font-size: 22px; font-weight: 600; letter-spacing: -0.005em; grid-column: 1; grid-row: 2; }
.kpi-d { font-family: var(--font-mono); font-size: 12px; color: #B5FFB1; grid-column: 2; grid-row: 1 / span 2; align-self: center; padding: 4px 10px; border-radius: 999px; background: rgba(181,255,177,0.12); }
.kpi-d-warn { color: #FFB199; background: rgba(255,177,153,0.14); }
.kpi-spark { grid-column: 1 / -1; grid-row: 3; height: 24px; opacity: 0.7; }
.mock-meta-genio { background: rgba(11,4,32,0.6); }

/* ── Mobile nav burger + drawer ───────────────────────────── */
.nav-burger {
  display: none;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.6);
  border-radius: 12px; padding: 0;
  cursor: pointer;
  position: relative; z-index: 60;
  flex-direction: column; gap: 5px;
}
.is-dark .nav-burger { border-color: rgba(255,255,255,0.18); background: rgba(255,255,255,0.04); }
/* When the drawer is open the burger morphs into the close (X) — drop the chip
   styling so it reads as a close affordance on top of the drawer panel, not as
   a separate floating button. */
.site-header.is-open .nav-burger,
.site-header.is-open.is-dark .nav-burger {
  background: transparent;
  border-color: transparent;
  color: #050D2C;
}
.burger-bar {
  display: block; width: 18px; height: 1.5px; background: currentColor;
  transition: transform 240ms cubic-bezier(0.2,0,0,1), opacity 200ms;
  transform-origin: center;
}
.burger-bar.is-x1 { transform: translateY(6.5px) rotate(45deg); }
.burger-bar.is-x2 { opacity: 0; }
.burger-bar.is-x3 { transform: translateY(-6.5px) rotate(-45deg); }

.nav-drawer {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(5,13,44,0.45); backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  cursor: pointer; /* required for iOS Safari to fire onClick on a div */
  transition: opacity 200ms cubic-bezier(0.2,0,0,1);
}
.nav-drawer.is-open { opacity: 1; pointer-events: auto; }
.nav-drawer-inner {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(90vw, 380px);
  background: #FFF9F5; color: #050D2C;
  padding: 88px 28px 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  transform: translateX(100%);
  transition: transform 240ms cubic-bezier(0.2,0,0,1);
  box-shadow: -20px 0 60px rgba(0,0,0,0.18);
  cursor: default; /* reset cursor for the panel itself */
}
.is-dark .nav-drawer-inner { background: #050D2C; color: #FFF9F5; }
.nav-drawer.is-open .nav-drawer-inner { transform: translateX(0); }
.nav-drawer-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-drawer-nav a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 4px;
  font-size: 26px; font-weight: 500; letter-spacing: -0.01em;
  color: inherit; text-decoration: none; border: none;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  touch-action: manipulation;
}
.is-dark .nav-drawer-nav a { border-bottom-color: rgba(255,255,255,0.08); }
.nav-drawer-nav a span { color: #F8502E; font-size: 18px; opacity: 0.5; transition: transform 200ms, opacity 200ms; }
.nav-drawer-nav a:hover span,
.nav-drawer-nav a.is-active span { opacity: 1; transform: translateX(4px); }
.nav-drawer-nav a.is-active { color: #F8502E; }
.nav-drawer-foot {
  display: flex; flex-direction: column; gap: 10px;
  font-family: var(--font-mono); font-size: 14px;
  padding-top: 24px; border-top: 1px solid rgba(0,0,0,0.08);
}
.is-dark .nav-drawer-foot { border-top-color: rgba(255,255,255,0.08); }
.nav-drawer-foot a {
  color: inherit; text-decoration: none; border: none; opacity: 0.7;
  padding: 8px 0;
}
.nav-drawer-foot a:hover { opacity: 1; }

/* ── RESPONSIVE BREAKPOINTS ─────────────────────────────────── */

/* Mid-tablet/small-laptop ≤ 1280px — clamp oversized inline hero type */
@media (max-width: 1280px) {
  h1[style*="font-size:104"], h1[style*="font-size: 104"] { font-size: 80px !important; line-height: 1.04 !important; }
  h1[style*="font-size:96"], h1[style*="font-size: 96"] { font-size: 76px !important; line-height: 1.04 !important; }
  h1[style*="font-size:88"], h1[style*="font-size: 88"] { font-size: 72px !important; line-height: 1.05 !important; }
}

/* Tablet ≤ 1024px */
@media (max-width: 1024px) {
  .site-header { padding: 14px 32px; }
  .site-footer { padding: 80px 32px 32px; }
  .mini-cta { padding: 64px 32px; }
  .container { padding-left: 32px; padding-right: 32px; }

  .h-display { font-size: 64px; }
  .h-section { font-size: 44px; }
  .lead { font-size: 18px; }

  /* Override hero inline sizes at tablet so they don't blow up before 768 hits.
     React serializes inline styles as `font-size: 104px;` so selectors must include the space. */
  h1[style*="font-size: 104px"] { font-size: 64px !important; line-height: 1.04 !important; }
  h1[style*="font-size: 96px"] { font-size: 60px !important; line-height: 1.04 !important; }
  h1[style*="font-size: 88px"] { font-size: 56px !important; line-height: 1.05 !important; }
  h2[style*="font-size: 64px"] { font-size: 44px !important; line-height: 1.08 !important; }
  h2[style*="font-size: 56px"] { font-size: 40px !important; line-height: 1.1 !important; }
  h2[style*="font-size: 44px"] { font-size: 34px !important; line-height: 1.15 !important; }
  h2[style*="font-size: 36px"] { font-size: 30px !important; line-height: 1.15 !important; }

  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; gap: 48px; }
  .footer-grid > div:nth-child(4) { grid-column: 1 / -1; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.08); }

  .mini-cta-inner { grid-template-columns: 1fr; gap: 32px; }
  .mini-cta h3 { font-size: 36px; }

  /* Tablet grid relaxations */
  div[style*="grid-template-columns: 1fr 1.4fr"],
  div[style*="grid-template-columns: 1fr 1.3fr"],
  div[style*="grid-template-columns: 1fr 1.6fr"] {
    grid-template-columns: 1fr !important;
    gap: 48px !important;
  }
  ol[style*="grid-template-columns: repeat(5, 1fr)"] { gap: 16px !important; }
  div[style*="grid-template-columns: repeat(3, 1fr)"] { gap: 24px !important; }
  div[style*="grid-template-columns: repeat(4, 1fr)"] { gap: 24px !important; }
}

/* Mobile ≤ 768px */
@media (max-width: 768px) {
  /* React serializes JSX inline styles as e.g. `padding: 120px 64px;` (space after colon, no quotes around the value).
     Selectors below must therefore use that exact substring form — `[style*="padding: 120px 64px"]` — not the escaped-quote
     form (`[style*="padding:\"120px 64px\""]`) that an earlier pass assumed. */

  /* Horizontal section padding — any section that uses 64px horizontal padding gets clamped */
  section[style*="padding"][style*="64px"] {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  /* Vertical section padding scaling for the common values used across pages */
  section[style*="padding: 120px 64px"],
  section[style*="padding: 140px 64px"],
  section[style*="padding: 100px 64px"] {
    padding-top: 64px !important;
    padding-bottom: 64px !important;
  }
  section[style*="padding: 96px 64px"],
  section[style*="padding: 40px 64px 120px"] {
    padding-top: 56px !important;
    padding-bottom: 48px !important;
  }

  /* Inline 2/3/4/5-column grids → stack on mobile.
     The `1fr 1fr;` form (with trailing semicolon) only matches the 2-column grid, not `1fr 1fr 1fr;`. */
  div[style*="grid-template-columns: 1fr 1.3fr"],
  div[style*="grid-template-columns: 1fr 1.4fr"],
  div[style*="grid-template-columns: 1fr 1.6fr"],
  div[style*="grid-template-columns: 1fr 1fr;"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  div[style*="grid-template-columns: 1fr 1fr 1fr"],
  div[style*="grid-template-columns: repeat(3, 1fr)"],
  div[style*="grid-template-columns: repeat(4, 1fr)"],
  ol[style*="grid-template-columns: repeat(5, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  /* Service price/delivery/model card (Servizi) — keep box but stack rows with separators */
  div[style*="grid-template-columns: 1fr 1fr 1fr"][style*="border-radius: 24px"] > * {
    border-right: none !important;
    border-bottom: 1px solid #E6E6E6 !important;
  }
  div[style*="grid-template-columns: 1fr 1fr 1fr"][style*="border-radius: 24px"] > *:last-child {
    border-bottom: none !important;
  }
  /* Channels grid inside contatti (icon + text) */
  div[style*="grid-template-columns: 80px 1fr"] {
    grid-template-columns: 1fr !important; gap: 6px !important;
  }
  /* Metodo timeline list item — number + content + meta */
  li[style*="grid-template-columns: 100px 1.6fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 24px !important;
  }
  /* Convinzioni 2x2 grid → stack; flip vertical separators to horizontal */
  div[style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  div[style*="grid-template-columns: repeat(2, 1fr)"] > div[style*="border-right"] {
    border-right: none !important;
    border-bottom: 1px solid #E6E6E6 !important;
  }

  /* Sticky asides on mobile → unsticky (otherwise they'd cover content in the single-column flow) */
  div[style*="position: sticky"] { position: relative !important; top: auto !important; }

  /* Service jump nav scrolls horizontally instead of wrapping */
  nav[style*="padding: 16px 64px"] {
    padding: 12px 20px !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  nav[style*="padding: 16px 64px"] > div { flex-wrap: nowrap !important; }

  /* Inline heading sizes (the inline values are the ones used at desktop). */
  h1[style*="font-size: 104px"] { font-size: 44px !important; line-height: 1.05 !important; }
  h1[style*="font-size: 96px"] { font-size: 40px !important; line-height: 1.05 !important; }
  h1[style*="font-size: 88px"] { font-size: 40px !important; line-height: 1.05 !important; }
  h2[style*="font-size: 64px"] { font-size: 34px !important; line-height: 1.08 !important; }
  h2[style*="font-size: 56px"] { font-size: 32px !important; line-height: 1.1 !important; }
  h2[style*="font-size: 44px"] { font-size: 28px !important; line-height: 1.15 !important; }
  h2[style*="font-size: 36px"] { font-size: 26px !important; line-height: 1.15 !important; }
  h3[style*="font-size: 32px"] { font-size: 22px !important; }
  h3[style*="font-size: 30px"] { font-size: 22px !important; }
  h3[style*="font-size: 28px"] { font-size: 20px !important; }
  h3[style*="font-size: 26px"] { font-size: 20px !important; }
  h3[style*="font-size: 24px"] { font-size: 19px !important; }

  /* Metodo proof points: 48px mono number → smaller */
  div[style*="font-size: 48px"] { font-size: 36px !important; }

  /* Inline buttons inside product rows / detail pages */
  a[class*="btn"][style*="font-size: 16px"] { width: 100%; justify-content: center; }

  .site-header { padding: 14px 20px; }
  .site-header-inner { gap: 12px; }
  .site-header .nav { display: none; }
  .site-header .cta-pill-desktop { display: none; }
  /* Hamburger sits at the far right; with .nav and .cta-pill-desktop hidden,
     margin-left:auto pushes it past the brand to the opposite edge. */
  .site-header .nav-burger { display: inline-flex; margin-left: auto; }

  .site-footer { padding: 64px 20px 28px; }
  .mini-cta { padding: 56px 20px; }
  .container { padding-left: 20px !important; padding-right: 20px !important; max-width: 100%; }

  /* Typography */
  .h-display { font-size: 44px; line-height: 1.05; }
  .h-section { font-size: 34px; line-height: 1.1; }
  .lead { font-size: 17px; }

  .eyebrow { margin-bottom: 16px; font-size: 12px; }

  /* Buttons full width feel */
  .btn { font-size: 16px; padding: 14px 22px; min-height: 48px; }

  /* Footer stack */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
  }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-grid > div:nth-child(4) {
    grid-column: 1 / -1;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .footer-headline { font-size: 28px; }
  .site-footer .footer-logo img { height: 28px; max-height: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-bottom .links { gap: 16px; }

  /* Mini CTA */
  .mini-cta-inner { gap: 24px; }
  .mini-cta h3 { font-size: 28px; line-height: 1.15; }
  .mini-cta p { font-size: 16px; }
  .mini-cta-inner > div:last-child { justify-content: flex-start !important; }

  /* Product mockups */
  .mock { aspect-ratio: 4 / 5; border-radius: 20px; }
  .mock-brand { top: 20px; left: 20px; font-size: 22px; }
  .mock-brand-mark { width: 30px; height: 30px; font-size: 20px; }
  .mock-meta { font-size: 10px; padding: 8px 11px; }
  .mock-meta-tl, .mock-meta-tr { top: 22px; }
  .mock-meta-bl, .mock-meta-br { bottom: 22px; }
  .mock-meta-tl, .mock-meta-bl { left: 20px; }
  .mock-meta-tr, .mock-meta-br { right: 20px; }
  .plan { width: 78%; }
  .payslip { width: 82%; padding: 18px 18px; }
  .payslip-emp { font-size: 15px; }
  .payslip-rows { gap: 6px; }
  .prow { font-size: 13px; }
  .prow-tot b { font-size: 16px; }
  .kpi-stack { width: 88%; right: 6%; bottom: 8%; }
  .kpi-card { padding: 12px 14px; }
  .kpi-v { font-size: 18px; }
  .kpi-l { font-size: 10px; }
  .kpi-2 { --ox: -16px; }
  .kpi-3 { --ox: -32px; }

  /* HubSpot form — compact on mobile */
  .hs-form-frame form { gap: 14px; }
  .hs-form-frame input[type="text"],
  .hs-form-frame input[type="email"],
  .hs-form-frame input[type="tel"],
  .hs-form-frame input[type="number"],
  .hs-form-frame select { padding: 10px 12px; font-size: 14px; }
  .hs-form-frame input[type="submit"],
  .hs-form-frame .hs-button { padding: 12px 20px; font-size: 15px; }
  #hs-form-target .hs-button:hover span[aria-hidden],
  .hs-form-frame .hs-button:hover span[aria-hidden] { transform: none; }

  /* hover transforms — disable on touch to avoid sticky states */
  .btn:hover, .cta-pill:hover { transform: none; }
  .btn:hover span[aria-hidden], .cta-pill:hover span[aria-hidden] { transform: none; }

  /* backdrop-filter is expensive on mobile GPU — replace with solid dim */
  .nav-drawer { backdrop-filter: none; background: rgba(5,13,44,0.6); }
}

/* ── Marquee sections — mobile padding ─────────────────────────
   These sections have no horizontal padding at the section level;
   the inner text wrapper carries the padding instead. */
@media (max-width: 768px) {
  .marquee-section { padding-top: 64px !important; padding-bottom: 64px !important; }
  .marquee-text-inner { padding-left: 20px !important; padding-right: 20px !important; }
}

/* Small mobile ≤ 420px */
@media (max-width: 420px) {
  .h-display { font-size: 36px; }
  .h-section { font-size: 28px; }
  .mini-cta h3 { font-size: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > div:nth-child(4) { padding-top: 24px; }
  .nav-drawer-nav a { font-size: 22px; padding: 16px 4px; }
}

/* ── Product Farm grid (overlay-style cards) ────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.product-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #050D2C;
  transition: transform 240ms cubic-bezier(0.2,0,0,1), box-shadow 240ms;
  box-shadow: 0 4px 12px rgba(5,13,44,0.06);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 60px rgba(5,13,44,0.18), 0 4px 12px rgba(5,13,44,0.08);
  opacity: 1;
}
.product-card-art {
  /* New portrait artwork (≈4:5) is sized to fill the entire card.
     `center top` keeps the brand logo (always near the top-left of the source)
     anchored when the artwork is slightly taller than the card. */
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
/* Legibility scrim under the title — keeps the upper 60% of the artwork
   untouched and only darkens the bottom band where text sits. */
.product-card::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; top: 50%;
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.18) 55%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}
.product-card-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 28px 26px;
  color: #fff;
}
.product-card-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0;
  text-wrap: pretty;
}
.product-card-host {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255,249,245,0.7);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: lowercase;
}
.product-card-host span { transition: transform 200ms cubic-bezier(0.2,0,0,1); }
.product-card:hover .product-card-host { color: #F8502E; }
.product-card:hover .product-card-host span { transform: translate(3px, -3px); }

@media (max-width: 1024px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
  .product-grid > :nth-child(3) { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
  .product-card-title { font-size: 20px; }
}
@media (max-width: 640px) {
  .product-grid { grid-template-columns: 1fr; gap: 16px; }
  .product-grid > :nth-child(3) { grid-column: auto; aspect-ratio: 4 / 5; }
}

/* ── CrossSell (Prodotti) — mobile ─────────────────────────── */
@media (max-width: 768px) {
  .cross-sell-section { padding: 64px 20px !important; }
  .cross-sell-grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
  .cross-sell-card-wrapper { display: none; }
}

/* ── Policy / Legal pages ───────────────────────────────────── */
.policy-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
  align-items: start;
}
.policy-layout aside ol::-webkit-scrollbar { width: 6px; }
.policy-layout aside ol::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 999px; }
.policy-layout aside a:hover { color: #F8502E; opacity: 1; }
@media (max-width: 1024px) {
  .policy-layout { grid-template-columns: 1fr; gap: 32px; }
  .policy-layout aside { position: static !important; top: auto !important; }
  .policy-layout aside ol { max-height: none !important; }
}

.policy-prose {
  color: #2A2828;
  font-size: 17px;
  line-height: 1.7;
}
.policy-h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #050D2C;
  margin: 56px 0 20px;
}
.policy-h2:first-child { margin-top: 0; }
.policy-h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #050D2C;
  margin: 36px 0 14px;
}
.policy-p {
  margin: 0 0 18px;
  text-wrap: pretty;
}
.policy-p a, .policy-list a {
  color: #F8502E;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.policy-p a:hover, .policy-list a:hover { color: #050D2C; }
.policy-list {
  margin: 0 0 20px;
  padding-left: 24px;
}
.policy-list li {
  margin-bottom: 10px;
  padding-left: 4px;
}
.policy-list li::marker { color: #F8502E; }
.policy-ul { list-style: disc; }
.policy-ol { list-style: decimal; }
.policy-list .policy-list { margin: 12px 0 4px; }

@media (max-width: 768px) {
  .policy-prose { font-size: 16px; }
  .policy-h2 { font-size: 26px; margin: 40px 0 16px; }
  .policy-h3 { font-size: 19px; margin: 28px 0 12px; }
}

/* ── Tweaks panel position (override starter if needed) ─────── */
