/* DEV-4381 home: the check-up row after «Il metodo», a night band with the five benefits and the profile cards (vote t0212-sito-home B). */

/* the check-up's night palette (check-up v4 «alba vivid»), scoped to the row */
.cu-night {
  --alba-night: #0b1d4d;
  --alba-deep: #0e2a6e;
  --alba-near: #154fc3;
  --alba-far: #85c7f1;
  --alba-sun-1: #e8b46e;
  --alba-sun-3: #f8dba9;
  --alba-sun-4: #fcebd0;
  --alba-sand: #f2c98a;
  --alba-mist: #9db3e4;
  --notte-ink-1: oklch(0.973 0.009 265);
  --notte-ink-2: oklch(0.87 0.028 265);
  --notte-line: color-mix(in oklab, var(--alba-mist) 16%, transparent);
  --glass-bg: linear-gradient(180deg, oklch(0.31 0.12 264) 0%, oklch(0.27 0.11 265) 55%, var(--alba-night) 100%);
  --glass-ring: inset 0 0 0 1px color-mix(in oklch, var(--alba-mist) 20%, transparent);
  --glass-lift: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.28);
}

/* ---------- the band ---------- */
.site main > #check-up {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: clamp(72px, 8vw, 120px);
  background:
    radial-gradient(55% 38% at 74% 104%, color-mix(in oklab, var(--alba-sun-3) 42%, transparent), color-mix(in oklab, var(--alba-sun-1) 10%, transparent) 55%, transparent 80%),
    linear-gradient(180deg, var(--alba-night) 0%, var(--alba-night) 30%, var(--alba-deep) 72%, #123b93 100%);
  background-color: var(--alba-night); /* the nav and the phone bar read the ground's colour to pick their theme */
  color: var(--notte-ink-1);
}
.site #check-up .d1-h2 { margin: 0; color: var(--notte-ink-1); }
.cu-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 448px); align-items: center; gap: 48px clamp(48px, 7vw, 112px); }
.cu-copy { display: grid; justify-items: start; }
.cu-kicker { justify-self: start; display: inline-block; margin: 0 0 20px; padding: 5px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--alba-sun-4) 22%, transparent); background: color-mix(in oklab, var(--alba-night) 55%, transparent); color: var(--alba-sun-4); font-size: var(--t-14, 14px); line-height: 20px; }
.cu-lead { margin: 28px 0 0; font-size: var(--t-16, 16px); line-height: 24px; color: var(--notte-ink-1); }
.cu-list { display: grid; gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; }
.cu-list li { display: grid; grid-template-columns: 8px minmax(0, 1fr); align-items: baseline; gap: 14px; font-size: var(--t-18, 18px); line-height: 26px; color: var(--notte-ink-2); text-wrap: pretty; }
/* the bullets: a small sun on the night */
.cu-list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; transform: translateY(-1px); background: var(--alba-sun-1); box-shadow: 0 0 0 3px color-mix(in oklab, var(--alba-sun-1) 22%, transparent); }
.site .cu-copy .btn { margin-top: 28px; background: var(--notte-ink-1); color: #02376c; }
@media (hover: hover) and (pointer: fine) { .site .cu-copy .btn:hover { background: #e6eefb; } }

/* ---------- the profile cards: Il Pilota Automatico in front, La Vetta behind ---------- */
.cu-stack { position: relative; margin: 0; justify-self: center; width: 100%; max-width: 448px; perspective: 1200px; user-select: none; }
.cu-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 28px;
  background: var(--glass-bg);
  box-shadow: var(--glass-ring), var(--glass-lift), 0 40px 80px rgb(4 12 40 / 0.45);
  color: var(--notte-ink-1);
}
.cu-card::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; background: linear-gradient(115deg, transparent 30%, color-mix(in oklch, var(--alba-sun-3) 10%, transparent) 45%, color-mix(in oklch, var(--alba-far) 8%, transparent) 52%, transparent 65%); }
.cu-front { z-index: 1; transform-origin: 50% 60%; }
.cu-back { position: absolute; z-index: 0; top: -76px; right: -48px; width: 60%; transform: rotate(7deg); }
.cu-win { position: relative; height: 192px; margin: 8px 8px 0; overflow: hidden; border-radius: 20px; background: linear-gradient(to top, var(--alba-near) 0%, var(--alba-deep) 55%, var(--alba-night) 100%); }
.cu-glow { position: absolute; inset: 0; background: radial-gradient(55% 60% at 50% 100%, color-mix(in oklch, var(--alba-sun-3) 55%, transparent), color-mix(in oklch, var(--alba-sun-1) 12%, transparent) 55%, transparent 80%); }
.cu-horizon { position: absolute; left: 0; right: 0; bottom: 14px; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in oklch, var(--alba-sand) 60%, transparent), transparent); }
.cu-mark { position: absolute; top: 16px; right: 16px; width: 26px; height: 26px; }
.cu-obj { position: absolute; left: 50%; bottom: 18px; width: 148px; height: 148px; margin-left: -74px; }
.cu-obj img { display: block; width: 100%; height: 100%; }
.cu-back .cu-win { height: 150px; }
.cu-back .cu-obj { left: auto; right: 28px; top: 10px; bottom: auto; width: 76px; height: 76px; margin-left: 0; }
.cu-body { padding: 20px 24px 8px; }
.cu-name { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 36px; letter-spacing: -0.01em; color: var(--notte-ink-1); }
.cu-back .cu-name { padding: 12px 16px 16px; font-size: 18px; line-height: 24px; color: var(--notte-ink-2); }
.cu-desc { margin: 10px 0 0; font-size: var(--t-15, 15px); line-height: 22px; color: var(--notte-ink-2); text-wrap: pretty; }
.cu-facts { margin: 16px 0 0; }
.cu-facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-top: 1px solid var(--notte-line); }
.cu-facts dt { font-size: var(--t-14, 14px); line-height: 20px; color: var(--notte-ink-2); }
.cu-facts dd { margin: 0; text-align: right; font-size: var(--t-16, 16px); line-height: 22px; font-weight: 500; color: var(--notte-ink-1); font-variant-numeric: tabular-nums; }
.cu-facts dd small { display: block; font-size: 13px; line-height: 18px; font-weight: 400; color: var(--notte-ink-2); }
.cu-foot { margin: 0; padding: 14px 24px 16px; border-top: 1px solid var(--notte-line); font-size: 13px; line-height: 18px; color: var(--notte-ink-2); }

/* light foil on the object: it slides with transform only while the front card leans towards a fine pointer (checkup-fila.js) */
.cu-foil {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; mix-blend-mode: overlay; opacity: 0.24;
  -webkit-mask: url("img/checkup/pilota-aereo-400.webp") center / 100% 100% no-repeat;
  mask: url("img/checkup/pilota-aereo-400.webp") center / 100% 100% no-repeat;
  transition: opacity 300ms ease-out;
}
.cu-foil::before {
  content: ""; position: absolute; inset: -60px;
  background-image: repeating-linear-gradient(118deg, transparent 0px, color-mix(in oklch, #85c7f1, oklch(0.84 0.09 25) 50%) 18.8px, color-mix(in oklch, #f8dba9, oklch(0.88 0.09 90) 50%) 33.8px, color-mix(in oklch, #e8b46e, oklch(0.87 0.09 150) 50%) 48.8px, color-mix(in oklch, #f3c784, oklch(0.85 0.08 205) 50%) 63.8px, color-mix(in oklch, #9db3e4, oklch(0.8 0.09 265) 50%) 78.8px, color-mix(in oklch, #4fa6e9, oklch(0.83 0.09 320) 50%) 93.8px, transparent 131.3px, transparent 150px);
  transform: translate3d(var(--foil-x, 0px), 0, 0);
}
.cu-card.is-lean .cu-foil { opacity: 0.4; }

/* ---------- phones ---------- */
@media (min-width: 861px) and (max-width: 1040px) { .cu-back { right: -12px; } }
@media (max-width: 860px) {
  .cu-row { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .cu-list li { font-size: var(--t-16, 16px); line-height: 24px; }
  .site main > #check-up { padding-block: var(--m-sec-lg, 72px); }
  .cu-stack { max-width: 400px; margin-top: 48px; }
  .cu-back { right: -10px; top: -58px; width: 56%; }
  .cu-back .cu-obj { right: 18px; top: 8px; width: 60px; height: 60px; }
  .cu-name { font-size: 26px; line-height: 32px; }
  .cu-body { padding: 18px 18px 6px; }
  .cu-foot { padding: 12px 18px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .cu-foil { transition: none; }
}
