/* GANCE site: the glass look, shared by every public page (loaded after ds/styles.css).
 * The pages are drawn from design-tool templates with inline styles, so site-glass.js measures each block once it
 * is on screen and tags it: data-sg="clear" (a full-width dark band, made see-through), "band" (a full-width band
 * with a faint glass tint), "panel" (a dark card, frosted), "pane" (a light card, bright glass, dark text kept) or
 * "tint" (a coloured card, its colour kept at glass strength). This file styles those tags; nothing else depends
 * on the page's markup. scripts/guard/check.mjs checks every page still loads this file, orb.js and site-glass.js. */

:root {
  --radius-sm: 8px; --radius-md: 14px; --radius-lg: 22px;
  --sg-night: #050a1c;
  --sg-line: rgba(255, 255, 255, 0.13);
  --sg-line-hi: rgba(255, 255, 255, 0.24);
  --sg-panel-a: rgba(255, 255, 255, 0.10);
  --sg-panel-b: rgba(255, 255, 255, 0.035);
  --sg-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.65);
}

/* The night sky behind every page: deep blue with slow-moving aurora in the GANCE inks. */
html, body { background: var(--sg-night) !important; overflow-x: clip; }   /* clip, not hidden: the sticky header keeps working */
body::before {   /* the aurora: a small pre-drawn image stretched to fill the screen (soft gradients scale up cleanly) */
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: #050a1c url(/assets/aurora.webp) center / cover no-repeat;
}   /* still on purpose: glass re-blurs whatever moves behind it, so a moving sky would cost every panel every frame */

[data-screen-label] { background: transparent !important; }



/* Full-width bands */
[data-sg="clear"] { background: transparent !important; }
[data-sg="band"] {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)) !important;
  border-top: 1px solid var(--sg-line); border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Header: frosted glass that stays readable over anything */
[data-sg="nav"] {
  background: linear-gradient(180deg, rgba(8, 14, 36, 0.72), rgba(8, 14, 36, 0.48)) !important;
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid var(--sg-line);
}

/* Dark cards: frosted panels */
[data-sg="panel"] {
  background: linear-gradient(155deg, var(--sg-panel-a), var(--sg-panel-b)) !important;
  backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--sg-line) !important; border-radius: 20px !important;
  box-shadow: var(--sg-shadow), inset 0 1px 0 var(--sg-line-hi) !important;
}
/* Light and coloured cards: clear glass, as on an iPhone over a dark wallpaper. The page's colour tokens are
   re-pointed to light versions inside the card, so its text, links and labels turn light with it. */
[data-sg="pane"], [data-sg="tint"] {
  --color-text: #f2f5ff; --color-neutral-900: #f2f5ff; --color-neutral-800: #dfe5f7; --color-neutral-700: #c9d1ea; --color-neutral-600: #b3bcd9;
  --color-accent: #6fd3ff; --color-accent-600: #8adcff; --color-accent-700: #9be3ff; --color-accent-800: #b8ecff;
  --color-accent-2: #ff86bd; --color-accent-2-600: #ff98c7; --color-accent-2-700: #ffa6cf;
  --color-divider: rgba(255, 255, 255, 0.18); --color-bg: rgba(255, 255, 255, 0.10); --color-surface: rgba(255, 255, 255, 0.08);
  color: #f2f5ff !important;
  backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.20) !important; border-radius: 22px !important;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.30), inset 0 -1px 0 rgba(255, 255, 255, 0.05) !important;
}
[data-sg="pane"] { background: linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05)) !important; }
/* Coloured cards keep their colour as a tint in the glass (site-glass.js sets --sg-c from the card's own colour) */
[data-sg="tint"] { background: linear-gradient(150deg, rgb(var(--sg-c) / 0.30), rgb(var(--sg-c) / 0.10)) !important; }

/* Menus (dropdowns in the header): dense glass, so text behind never shows through the menu's own text */
[data-sg="menu"] {
  background: linear-gradient(160deg, rgba(16, 26, 60, 0.90), rgba(8, 14, 36, 0.86)) !important;
  backdrop-filter: blur(34px) saturate(190%); -webkit-backdrop-filter: blur(34px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.16) !important; border-radius: 18px !important;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

/* iPhone-style glass on cards, menus and buttons:
   - a light-catching rim (brighter at the top left, like light hitting the edge of glass),
   - a specular highlight that follows the finger or pointer (--mx, --my, set by site-glass.js),
   - a sheen that sweeps across on hover or press, and a tilt toward the pointer (or with scrolling on phones;
     site-glass.js writes the tilt in front of any transform the card already has). */
[data-sg-rel] { position: relative; }
[data-sg="panel"], [data-sg="pane"], [data-sg="tint"], [data-sg="menu"] { --mx: 30%; --my: 0%; --glint: 0; }
:is([data-sg="panel"], [data-sg="pane"], [data-sg="tint"], [data-sg="menu"], [data-sg-btn])::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(255,255,255,.65), rgba(255,255,255,.10) 32%, rgba(255,255,255,.04) 62%, rgba(255,255,255,.34));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
:is([data-sg="panel"], [data-sg="pane"], [data-sg="tint"], [data-sg-btn])::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(520px circle at var(--mx) var(--my), rgba(255,255,255,calc(.10 + var(--glint) * .20)), transparent 42%),
    linear-gradient(112deg, transparent 38%, rgba(255,255,255,.26) 48%, rgba(255,255,255,.06) 54%, transparent 62%);
  background-size: 100% 100%, 260% 100%; background-position: 0 0, 160% 0; background-repeat: no-repeat;
  opacity: .55;   /* plain transparency, no blend mode: cheaper to composite on phones */
}
:is([data-sg="panel"], [data-sg="pane"], [data-sg="tint"])[data-sg-hot]::after, [data-sg-btn]:hover::after { animation: sgsheen 1.1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes sgsheen { from { background-position: 0 0, 160% 0; } to { background-position: 0 0, -60% 0; } }
:is([data-sg="panel"], [data-sg="pane"], [data-sg="tint"]) { transition: transform .7s cubic-bezier(.2,.8,.2,1), box-shadow .5s; }
:is([data-sg="panel"], [data-sg="pane"], [data-sg="tint"])[data-sg-hot] {
  transition: transform .12s ease-out, box-shadow .3s; will-change: transform;   /* a GPU layer only while it moves */
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.5) !important;
}
[data-sg-btn] { position: relative; overflow: hidden; }
[data-sg-btn]:active { transform: scale(.97); }

/* Tab and toggle holders (.seg): rounded glass pills; the selected option is a glowing pill inside */
[data-sg="seg"], .seg {
  border-radius: 999px !important; padding: 4px; gap: 4px; overflow: visible;
  background: linear-gradient(150deg, rgba(255,255,255,.14), rgba(255,255,255,.04)) !important;
  backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255,255,255,.20) !important;
  box-shadow: 0 14px 34px -18px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.28) !important;
  transition: transform .7s cubic-bezier(.2,.8,.2,1);
}
.seg > *, .seg-opt { border-radius: 999px !important; border: 0 !important; }
.seg-opt + .seg-opt { border-left: 0 !important; }
:is([data-sg="seg"])::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(255,255,255,.6), rgba(255,255,255,.08) 35%, rgba(255,255,255,.3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
[data-sg="seg"][data-sg-hot] { transition: transform .12s ease-out; }

/* Buttons: soft glass edges */
.btn, [data-sg-btn] { border-radius: 999px !important; transition: background 0.2s, box-shadow 0.2s, transform 0.2s; }
.btn-primary, a[data-sg-btn][style*="--color-accent)"] { background-image: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 55%) !important; box-shadow: 0 12px 30px -12px rgba(0, 136, 176, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0,0,0,.18); }
/* Readable main button (Nov 25): text on the brand teal #0088b0 scored 3.65:1; the deeper brand teal (accent-700) scores about 5.7:1, above the 4.5:1 minimum. */
.btn-primary, a[data-sg-btn][style*="--color-accent)"] { background-color: var(--color-accent-700, #006786) !important; color: #fff !important; }
.btn-primary:hover, a[data-sg-btn][style*="--color-accent)"]:hover { background-color: var(--color-accent-800, #004961) !important; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(0, 136, 176, 1), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
[data-sg="clear"] .btn-secondary, [data-sg="band"] .btn-secondary, [data-sg="panel"] .btn-secondary {
  background: rgba(255, 255, 255, 0.08); border-color: var(--sg-line-hi);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.tag, [data-sg] .tag { border-radius: 999px !important; padding-inline: 10px; }
/* Cards inside glass cards (a plan inside a photo frame, a row of stats): rounded like their parent */
[data-sg] .card, [data-sg] [class*="card"]:not(.card-kicker):not(.card-body):not(.card-meta):not(.card-title) { border-radius: 16px !important; }
/* Sliders: a glass track with the brand colour, instead of the browser's plain white bar */
input[type="range"] { accent-color: var(--color-accent, #0088b0); }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,.16); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,.16); }
img[data-sg-img] { border-radius: 22px !important; box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.14); }

/* The orb in place of the rosette logo, and as the feature piece */
gance-orb.sg-logo { flex: none; }
img[data-orbified], [data-orbified] { display: none !important; }
gance-orb.sg-feature { display: block; width: 100%; height: 100%; }
/* The hero orb: a large particle orb behind each page's opening section, the page's feature piece */
.sg-hero-host { position: relative; isolation: isolate; overflow-x: clip; }   /* the orb may glow past the edge, never widen the page */
.sg-hero-orb { position: absolute; z-index: -1; pointer-events: none; right: 3vw; top: max(24px, calc(50% - min(32vh, 22vw, 320px))); transform: none;
  width: min(64vh, 44vw, 640px); aspect-ratio: 1; }   /* fully on screen: never cut by the page edge or the header */
.sg-hero-orb gance-orb { width: 100%; height: 100%; display: block; }
@media (max-width: 899px) { .sg-hero-orb { right: -26vw; top: -4vw; transform: none; width: 72vw; opacity: .42; } }

@media (prefers-reduced-motion: reduce) { .btn-primary:hover { transform: none; }
  :is([data-sg-hot], [data-sg-btn]:hover)::after { animation: none !important; } }
@media (max-width: 700px) {   /* lighter glass on phones: smaller blurs keep scrolling smooth */
  [data-sg="panel"], [data-sg="pane"], [data-sg="tint"] { backdrop-filter: blur(12px) saturate(150%); -webkit-backdrop-filter: blur(12px) saturate(150%); border-radius: 18px !important; }
}
@media print { body::before { display: none; } html, body { background: #fff !important; } }

/* Header links keep to one line in every language (translated labels are longer than the English ones). */
[data-sg="nav"] :is(a, button, span):not([data-sg="menu"] *) { white-space: nowrap; }
[data-sg="nav"] a:not([data-sg="menu"] *) { width: auto !important; max-width: none !important; }
[data-sg="nav"] [data-ssr="wide"] > div:has(> a) { width: auto !important; padding-inline: 12px; }

/* Home hero picture: on laptops it fills a tall frame; on phones and small tablets it keeps the picture's own shape
   (its height attribute would otherwise force a 612px-tall strip that cut Jero off on the left). */
.hero-jero { object-position: 30% 50%; }
@media (max-width: 900px) { .hero-jero { height: auto !important; aspect-ratio: 850 / 612 !important; } }

/* Words on photos (Nov 7): the labels that were painted on the pictures are real text over them, so they change
   with the page language (lang.js). .g-ph-l covers the box and clips; .g-ph-i is sized like the photo as
   object-fit:cover draws it, so each label sits where the painted word was. Labels are sized in cqw of the photo. */
.g-ph { position: relative; }
.g-ph-l { position: absolute; inset: 0; overflow: hidden; container-type: size; pointer-events: none; border-radius: 2px; }
.g-ph-i { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); container-type: inline-size; }
.g-ph-t { position: absolute; display: block; margin-top: -0.14em; font: 600 var(--fs)/1 Inter, system-ui, sans-serif; letter-spacing: -0.01em; color: #f3fdff; text-shadow: 0 0 0.3em rgba(120, 225, 255, 0.55), 0 0 0.08em rgba(0, 40, 60, 0.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: rotate(var(--rot, 0deg)); transform-origin: left top; }
.g-ph-t.is-c { text-align: center; transform-origin: center top; }
.g-ph-t.is-2 { white-space: normal; line-height: 1.12; overflow: visible; text-wrap: balance; }
/* Other languages: a label on a narrow card uses the smaller size set for it (--fs2), so the longer word fits. */
html:not([lang|="en"]) .g-ph-t { font-size: var(--fs2, var(--fs)); }
.g-ph--painting { width: max(100cqw, calc(100cqh * 880 / 572)); aspect-ratio: 880 / 572; }
.g-ph--jero-art { width: max(100cqw, calc(100cqh * 880 / 612)); aspect-ratio: 880 / 612; }
.g-ph--reading { width: max(100cqw, calc(100cqh * 900 / 588)); aspect-ratio: 900 / 588; }
.g-ph--robotics { width: max(100cqw, calc(100cqh * 900 / 560)); aspect-ratio: 900 / 560; }
.g-ph--skills { width: max(100cqw, calc(100cqh * 790 / 600)); aspect-ratio: 790 / 600; }
.g-ph--jero-group { width: max(100cqw, calc(100cqh * 720 / 470)); aspect-ratio: 720 / 470; }
