/* The hero's layers graphic (markup generated by scripts/hero_layers.py).
   At rest every layer is white with soft blue outlines; the right-facing side carries a thin blue line.
   On hover (or tap) a layer turns into the logo, a navy block on the blue band, and its note shows below.
   Colours not yet in the design system: line-soft #a8bcf0, line-strong #6e8ce8, edge #dce5fa,
   ink-blue #2a4ad0. To be synced into tokens. */
.gl-layers { --line-soft: #a8bcf0; --line-strong: #6e8ce8; --edge: #dce5fa; --ink-blue: #2a4ad0;
  margin: 0; min-width: 0; }
/* Wide screens: the headline centres on the drawing and its note. The drawing and its note share the hero's grid
   rows (subgrid), so the note hangs below without pulling the headline down. */
@media (min-width: 1000px) {
  .gl-hero:has(> .gl-layers) { grid-template-rows: auto auto; row-gap: var(--space-4); padding-block: var(--space-7); }
  /* While the hero is the only section, it sits in the middle of the screen between nav and footer. */
  main:has(> .gl-hero:only-child) { display: flex; flex-direction: column; justify-content: center; }
  .gl-hero:has(> .gl-layers) > :first-child { grid-row: 1 / span 2; align-self: center; margin-bottom: calc(var(--space-9) + var(--space-5)); }
  /* centred on the drawing and its note together (the note box never changes height), then lifted so the subline ends just above the note's line */
  .gl-hero > .gl-layers { grid-column: 2; grid-row: 1 / span 2; display: grid; grid-template-rows: subgrid; align-items: center; }
  .gl-hero > .gl-layers .gl-layers__notes { margin-top: 0; align-self: start; }
  .gl-hero > .gl-layers { position: relative; top: -64px; } /* the graphic and its hint sit a little higher than the text */
}
.gl-hero:has(> .gl-layers) .gl-lead { font-size: 15px; } /* a smaller step under the headline, so the hero stays light */
/* Wide screens: only the hint takes up room; a layer's card floats over the space below it, so nothing moves on hover.
   The card is opaque, so where it reaches the next section it reads as a pop-over. While the hero is the only section it
   centres between nav and footer (above); with sections below, it gets room on top for the lifted graphic. */
@media (min-width: 1000px) {
  .gl-hero > .gl-layers .gl-layers__notes { position: relative; width: 100%; }
  .gl-hero > .gl-layers .gl-layers__note:not(.gl-layers__note--rest) { position: absolute; inset: 0 0 auto 0; z-index: 2;
    background: var(--card); box-shadow: 0 1px 2px rgba(15, 31, 61, .04), 0 12px 32px rgba(15, 31, 61, .10); }
  /* the same top room as when it filled the first screen (half the free height, about 277px of content, so it sits a little low), but no room
     below: the next section follows right after */
  main:not(:has(> .gl-hero:only-child)) > .gl-hero:has(> .gl-layers) { padding-top: max(calc(var(--space-7) + 112px), calc((100svh - 61px - 277px) / 2)); padding-bottom: 0; }
}
@media (min-width: 1400px) {
  main:not(:has(> .gl-hero:only-child)) > .gl-hero:has(> .gl-layers) { padding-top: max(calc(var(--space-7) + 112px), calc((100svh - 77px - 377px) / 2)); }
}
/* Below 1000px the hero is one column: in a narrow second column the names would shrink under 13px. */
@media (max-width: 999px) {
  .gl-hero:has(> .gl-layers) { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
}

/* The drawing (width: 390/510 of the column, the share it had when the labels were longer, so the layers keep their size).
   It moves right by the labels' share of its width (9.22%), so the layers themselves sit on the column's centre, above the hint
   and the cards.
   One <label> per layer, each with its own SVG, stacked; the hidden radio before it holds the choice. */
.gl-layers__art { position: relative; width: 76.5%; max-width: 382px; margin: 0 auto; translate: 9.22% 0; padding: 0; border: 0; min-width: 0; }
.gl-layers__radio { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.gl-layer { position: absolute; inset: 0; pointer-events: none; }
.gl-layer svg { display: block; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.gl-layer svg * { pointer-events: visiblePainted; cursor: pointer; } /* only the painted shapes catch the pointer, so the stacked SVGs don't block each other */
.gl-layer__hit { fill: transparent; }
.gl-layer__focus { fill: none; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; opacity: 0; pointer-events: none !important; }

.gl-layer path { transition: fill 200ms ease, opacity 200ms ease; }
/* Outlines are filled shapes drawn in the tilted plane, as CSS borders are, so their width foreshortens with the angle. */
.gl-layer__side { fill: var(--edge); }
.gl-layer__band, .gl-layer__navy { opacity: 0; }
.gl-layer__band { fill: var(--blue); }
.gl-layer__navy { fill: var(--ink); }
.gl-layer__edge { fill: var(--line-soft); }
.gl-layer__top { fill: var(--card); }
.gl-layer__outline { fill: var(--line-soft); }
.gl-layer__front { fill: var(--blue); opacity: .4; } /* the bright blue lines on the right-facing side, toned down */
.gl-layer__end { stroke: var(--blue); stroke-width: 1; opacity: .3; }
.gl-layer__label { font: 500 16px var(--font-body); dominant-baseline: middle; }
.gl-layer__label tspan { fill: var(--muted); transition: fill 200ms ease; }

/* The active layer: the one under the pointer; otherwise the one chosen by click, tap or keyboard. */
.gl-layer:hover .gl-layer__band, .gl-layers:not(:has(.gl-layer:hover, .gl-layers__radio:focus-visible)) .gl-layers__radio:checked + .gl-layer .gl-layer__band, .gl-layers__radio:focus-visible + .gl-layer .gl-layer__band, .gl-layer:hover .gl-layer__navy, .gl-layers:not(:has(.gl-layer:hover, .gl-layers__radio:focus-visible)) .gl-layers__radio:checked + .gl-layer .gl-layer__navy, .gl-layers__radio:focus-visible + .gl-layer .gl-layer__navy { opacity: 1; }
.gl-layer:hover .gl-layer__top, .gl-layers:not(:has(.gl-layer:hover, .gl-layers__radio:focus-visible)) .gl-layers__radio:checked + .gl-layer .gl-layer__top, .gl-layers__radio:focus-visible + .gl-layer .gl-layer__top { fill: var(--ink); }
.gl-layer:hover .gl-layer__outline, .gl-layers:not(:has(.gl-layer:hover, .gl-layers__radio:focus-visible)) .gl-layers__radio:checked + .gl-layer .gl-layer__outline, .gl-layers__radio:focus-visible + .gl-layer .gl-layer__outline { fill: var(--line-strong); }
.gl-layer:hover .gl-layer__end, .gl-layers:not(:has(.gl-layer:hover, .gl-layers__radio:focus-visible)) .gl-layers__radio:checked + .gl-layer .gl-layer__end, .gl-layers__radio:focus-visible + .gl-layer .gl-layer__end { opacity: 0; }
.gl-layer:hover .gl-layer__edge, .gl-layers:not(:has(.gl-layer:hover, .gl-layers__radio:focus-visible)) .gl-layers__radio:checked + .gl-layer .gl-layer__edge, .gl-layers__radio:focus-visible + .gl-layer .gl-layer__edge { fill: var(--blue); }
.gl-layer:hover .gl-layer__label tspan, .gl-layers:not(:has(.gl-layer:hover, .gl-layers__radio:focus-visible)) .gl-layers__radio:checked + .gl-layer .gl-layer__label tspan, .gl-layers__radio:focus-visible + .gl-layer .gl-layer__label tspan { fill: var(--ink-blue); }
.gl-layers__radio:focus-visible + .gl-layer .gl-layer__focus { opacity: 1; }

/* The note under the graphic: one per layer, shown for the active layer. */
.gl-layers__notes { max-width: 450px; margin: var(--space-4) auto 0; font-size: 12px; color: var(--ink-2);
  display: grid; } /* every note sits in the same cell, so the box is always as tall as the tallest one and the hero never moves */
.gl-layers__note { grid-area: 1 / 1; align-self: start; visibility: hidden; margin: 0; padding: 14px 16px; background: rgba(255, 255, 255, .18); border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 31, 61, .03), 0 4px 16px rgba(15, 31, 61, .03); } /* each note in its own card, so the card fits its text */
.gl-layers__note--rest { background: none; box-shadow: none; } /* at rest only the hint shows, without a card */
.gl-layers__note b { display: block; margin-bottom: var(--space-1); color: var(--ink-2); } /* the same slate as the Share card titles */
/* The hint under the rest note: "hover" for a mouse, "tap" for a touch screen. */
.gl-layers__hint { display: block; font-size: inherit; color: var(--muted); text-align: center; } /* centred under the layers */
.gl-layers__hint::before { content: "\2197"; margin-right: 6px; color: var(--line-strong); } /* a small blue arrow towards the layers */
.gl-layers__hint--tap { display: none; }
@media (hover: none) { .gl-layers__hint--hover { display: none; } .gl-layers__hint--tap { display: block; } }
.gl-layers:has(.gl-layer--ingest:hover) .gl-layers__note--ingest,
.gl-layers:not(:has(.gl-layer:hover, .gl-layers__radio:focus-visible)):has(#gl-layer-ingest:checked) .gl-layers__note--ingest,
.gl-layers:has(#gl-layer-ingest:focus-visible) .gl-layers__note--ingest,
.gl-layers:has(.gl-layer--transform:hover) .gl-layers__note--transform,
.gl-layers:not(:has(.gl-layer:hover, .gl-layers__radio:focus-visible)):has(#gl-layer-transform:checked) .gl-layers__note--transform,
.gl-layers:has(#gl-layer-transform:focus-visible) .gl-layers__note--transform,
.gl-layers:has(.gl-layer--semantic:hover) .gl-layers__note--semantic,
.gl-layers:not(:has(.gl-layer:hover, .gl-layers__radio:focus-visible)):has(#gl-layer-semantic:checked) .gl-layers__note--semantic,
.gl-layers:has(#gl-layer-semantic:focus-visible) .gl-layers__note--semantic,
.gl-layers:has(.gl-layer--connect:hover) .gl-layers__note--connect,
.gl-layers:not(:has(.gl-layer:hover, .gl-layers__radio:focus-visible)):has(#gl-layer-connect:checked) .gl-layers__note--connect,
.gl-layers:has(#gl-layer-connect:focus-visible) .gl-layers__note--connect,
.gl-layers:not(:has(.gl-layer:hover, .gl-layers__radio:focus-visible, .gl-layers__radio:checked)) .gl-layers__note--rest { visibility: visible; } /* the rest note, while no layer is active */
.gl-layers__uses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-3); }
.gl-layers__uses > span { display: grid; align-content: start; gap: 2px; padding: 7px 9px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--card); color: var(--ink-2); font: 600 1em/1.3 var(--font-body); }
.gl-layers__uses svg { width: 18px; height: 18px; color: #7a8fc7; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.gl-layers__uses small { font-weight: 400; font-size: 1em; color: var(--ink-2); }

.gl-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The drawing scales with its column; these sizes keep the names at 13px or more on screen. */
@media (min-width: 1000px) and (max-width: 1199px) { .gl-layer__label { font-size: 19px; } }
@media (max-width: 720px) {
  .gl-hero:has(> .gl-layers) { padding-top: var(--space-7); }
  .gl-layer__label { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .gl-layer path, .gl-layer__label tspan { transition: none; }
}

/* Large screens: the drawing, the subline and the cards scale with the rest of the page (bundle.css). The layer names
   are SVG text, so they grow with the drawing on their own. */
@media (min-width: 1400px) {
  .gl-hero:has(> .gl-layers) .gl-lead { font-size: 19px; }
  .gl-layers__art { max-width: 478px; }
  .gl-layers__notes { max-width: 560px; font-size: 15px; }
}

/* On load the stack builds itself: each layer drops into place, bottom to top, then the hint appears. */
@keyframes gl-layer-in { from { opacity: 0; transform: translateY(-18px); } }
@keyframes gl-hint-in { from { opacity: 0; } }
.gl-layer { animation: gl-layer-in 700ms cubic-bezier(.2, .7, .3, 1) both; }
.gl-layer--ingest { animation-delay: 300ms; }
.gl-layer--transform { animation-delay: 650ms; }
.gl-layer--semantic { animation-delay: 1000ms; }
.gl-layer--connect { animation-delay: 1350ms; }
.gl-layers__note--rest { animation: gl-hint-in 500ms ease 2200ms both; }
@media (prefers-reduced-motion: reduce) {
  .gl-layer, .gl-layers__note--rest { animation: none; }
}
