/* The shared layer, loaded last on every page.
   It stays out of the way: the pages keep their own colour bands and tiles.
   This file only gives each page its own ground and holds the few shared fixes.
   (The blueprint grid and the clear "panel" boxes that used to live here are gone: Pol, 13 Nov.) */

/* ---- one ground per page, no grid ---- */
.pg       { background: #f5f5f5; }                                   /* Home: plain paper, colour comes from the bands */
.pg.dark  { background: #09080c; }                                   /* Science: dark all the way down */
.pg.lab   { background: linear-gradient(180deg, #ddd3ff 0, #ebe5ff 420px, #f5f5f5 980px); }  /* Lab: lilac sky that clears */
.pg.learn { background: #ffffff; }                                   /* Learn: white page under the blue head */
.pg.about { background: #fef7fa; }                                   /* About: warm paper */
body:has(.pg.lab)   { background: #ddd3ff; }
body:has(.pg.learn) { background: #3d46b8; }
body:has(.pg.about) { background: #fef7fa; }

/* ---- room to breathe between sections ---- */
.pg > section + section { margin-top: clamp(24px, 4vw, 64px); }

/* ---- open columns carry their product's colour as a bar, not a box ---- */
.tile.open.bl:not(.stat)  { border-top: 6px solid #cfc3ff; }
.tile.open.bb:not(.stat)  { border-top: 6px solid #a8e8f2; }
.tile.open.bp:not(.stat)  { border-top: 6px solid #f4bbd4; }
.tile.open.bpe:not(.stat) { border-top: 6px solid #ffd0b5; }
.tile.open.by:not(.stat)  { border-top: 6px solid #faf038; }

/* ---- Home products: one product per row, words on the left, its picture on the right ---- */
.prod-stack { display: flex; flex-direction: column; gap: clamp(56px, 7vw, 96px); }
.tile.open.prod {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  column-gap: clamp(32px, 5vw, 80px);
  row-gap: 40px;
  align-items: end;
  overflow: hidden;
}
.prod-text { display: flex; flex-direction: column; gap: 16px; align-self: start; padding-bottom: 40px; }
.prod-art  { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 300px; }
.prod-art > div[aria-hidden]:only-child { margin-bottom: 56px; }
/* the yellow sun rises behind the approval card and is cut by the row's baseline */
.sun-disc { position: absolute; left: 50%; bottom: -130px; width: min(480px, 100%); aspect-ratio: 1; translate: -50% 0; border-radius: 50%; }
.prod-art.sun { padding-top: 110px; }
/* the demo video sits as one centred card, not the full page width */
.prod-stack > article.tile.bw { width: min(100%, 980px); margin-inline: auto; }

/* ---- coloured tiles: a soft lift on hover, in the tile's own colour, so they feel like objects not boxes ---- */
article.tile:not(.open):not(.band) { transition: transform .5s var(--ease, ease), rotate .7s var(--ease, ease), box-shadow .5s ease; }
article.tile:not(.open):not(.band):hover { box-shadow: 0 22px 44px -22px rgba(18, 18, 18, .35); }

/* ---- keyboard focus is always visible ---- */
.pg a:focus-visible, .pg button:focus-visible { outline: 2px solid #e0792f; outline-offset: 3px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  article.tile { transition: none !important; }
}

@media (max-width: 720px) {
  .prod-text { padding-bottom: 0; }
  .prod-art { min-height: 0; }
  .prod-art.sun { padding-top: 56px; }
  .tile.open.prod { row-gap: 24px; }
}

/* ---- the menu follows you down every page ---- */
.pg > div:has(> nav.nav) { position: sticky; top: 0; z-index: 20; pointer-events: none; }
.pg > div:has(> nav.nav) > nav.nav { pointer-events: auto; }
/* overflow:hidden on the page wrapper stops sticky from working; clip hides the same overflow without that */
.pg { overflow: clip; }
