/* U-Science homepage. Same look as the U-Align release page (u-align.u-science.org): floating glass capsules and
   panels (blur, translucent fill, a light rim and a top highlight), soft colour behind, the system font, the system
   blue for actions, light and dark. */
:root {
  --bg: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #6e6e73;
  --accent: #007aff;
  --accent-soft: rgba(0, 122, 255, 0.12);
  --teal: #1eaeba;
  --coral: #fd6d6b;
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-panel-bg: rgba(255, 255, 255, 0.7);
  --glass-rim: rgba(255, 255, 255, 0.8);
  --glass-edge: rgba(15, 23, 42, 0.08);
  --glass-hi: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 12px 32px rgba(15, 23, 42, 0.1), 0 2px 6px rgba(15, 23, 42, 0.05);
  --glass-fill: rgba(15, 23, 42, 0.05);
  --glass-fill-hover: rgba(15, 23, 42, 0.09);
  --orb-a: rgba(30, 174, 186, 0.26);
  --orb-b: rgba(253, 109, 107, 0.2);
  --orb-c: rgba(0, 122, 255, 0.14);
  --orb-d: rgba(150, 120, 255, 0.16);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0b0d;
    --ink: #f5f5f7;
    --ink-2: #d2d2d7;
    --muted: #98989f;
    --accent: #0a84ff;
    --accent-soft: rgba(10, 132, 255, 0.22);
    --teal: #35c2cd;
    --coral: #ff7f7d;
    --glass-bg: rgba(28, 30, 36, 0.55);
    --glass-panel-bg: rgba(24, 26, 31, 0.66);
    --glass-rim: rgba(255, 255, 255, 0.14);
    --glass-edge: rgba(255, 255, 255, 0.06);
    --glass-hi: rgba(255, 255, 255, 0.24);
    --glass-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.25);
    --glass-fill: rgba(255, 255, 255, 0.07);
    --glass-fill-hover: rgba(255, 255, 255, 0.12);
    --orb-a: rgba(30, 174, 186, 0.22);
    --orb-b: rgba(253, 109, 107, 0.16);
    --orb-c: rgba(10, 132, 255, 0.16);
    --orb-d: rgba(150, 120, 255, 0.14);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
/* soft colour behind everything, so the glass has something to bend */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42vw 42vw at 8% 4%, var(--orb-a), transparent 70%),
    radial-gradient(38vw 38vw at 94% 14%, var(--orb-b), transparent 70%),
    radial-gradient(46vw 46vw at 78% 78%, var(--orb-c), transparent 70%),
    radial-gradient(40vw 40vw at 6% 88%, var(--orb-d), transparent 70%);
}
img { max-width: 100%; height: auto; display: block; }
p, h1, h2, h3, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }

.glass, .glass-panel {
  border: 1px solid var(--glass-rim);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 var(--glass-edge);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  background: var(--glass-bg);
}
.glass-panel {
  background: var(--glass-panel-bg);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  backdrop-filter: blur(32px) saturate(1.5);
  border-radius: 28px;
}
.capsule { border-radius: 999px; height: 48px; display: flex; align-items: center; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
main > section { padding-block: clamp(36px, 5vw, 64px); }
h1, h2 { letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: clamp(40px, 6.4vw, 80px); line-height: 1.05; font-weight: 700; letter-spacing: -0.022em; max-width: 14ch; margin-inline: auto; }
.fine { color: var(--muted); font-size: 13.5px; line-height: 1.45; }

/* top bar: three capsules, as on the U-Align page */
.topbar {
  position: fixed; top: 12px; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px));
  z-index: 50; display: flex; justify-content: space-between; align-items: center; gap: 12px; pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar nav.seg { position: absolute; left: 50%; transform: translateX(-50%); } /* centred in the window */
.brand { padding: 0 18px 0 10px; gap: 9px; color: var(--ink); font-size: 16.5px; font-weight: 700; letter-spacing: -0.015em; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.seg { padding: 0 6px; gap: 2px; }
.seg a { height: 36px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; white-space: nowrap; font: 500 14.5px/1 var(--font); color: var(--ink); }
.seg a:hover { background: var(--glass-fill-hover); }
.links { padding: 0 6px; }
.pill { height: 36px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; font: 500 14.5px/1 var(--font); color: var(--ink); }
.pill:hover { background: var(--glass-fill-hover); }

/* hero */
main > section.hero { padding-block: clamp(128px, 14vw, 176px) clamp(28px, 4vw, 44px); text-align: center; }
.lede { font-size: clamp(19px, 2vw, 24px); line-height: 1.38; color: var(--ink-2); max-width: 36ch; margin: 22px auto 0; letter-spacing: -0.012em; text-wrap: balance; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }
.btn { height: 48px; padding: 0 24px; border-radius: 999px; display: inline-flex; align-items: center; font: 600 16px/1 var(--font); color: var(--ink); white-space: nowrap; }
.btn.primary { background: var(--accent); color: #fff; border: 0; box-shadow: 0 6px 18px rgba(10, 132, 255, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn.small { height: 40px; padding: 0 18px; font-size: 15px; }
.btn.glass.small { box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06), inset 0 1px 0 var(--glass-hi); }
.btn:hover { filter: brightness(1.06); }

/* sections */
.eyebrow { text-align: center; color: var(--accent); font-size: 15px; font-weight: 600; letter-spacing: 0.01em; margin-bottom: 12px; }
main > section > h2 { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.08; font-weight: 700; letter-spacing: -0.02em; text-align: center; margin-bottom: clamp(26px, 3.6vw, 44px); }
.lede.sec { font-size: clamp(17px, 1.6vw, 20px); max-width: 50ch; margin: -14px auto clamp(26px, 3.6vw, 40px); text-align: center; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

/* projects: three glass cards, illustration on top */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project { padding: 10px 10px 24px; display: flex; flex-direction: column; }
.art { position: relative; border-radius: 20px; background: var(--glass-fill); aspect-ratio: 3 / 2; display: grid; place-items: center; padding: 14px; }
.art img { width: 100%; height: 100%; object-fit: contain; }
.art figcaption { position: absolute; right: 12px; bottom: 8px; font-size: 11px; color: var(--muted); }
.copy { display: flex; flex-direction: column; align-items: flex-start; padding: 18px 14px 0; flex: 1; }
.kind { color: var(--accent); font-size: 13.5px; font-weight: 600; }
.project h3 { font-size: clamp(28px, 2.6vw, 34px); line-height: 1.05; font-weight: 700; letter-spacing: -0.025em; margin-top: 4px; }
.tagline { font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; margin-top: 10px; text-wrap: balance; }
.desc { color: var(--ink-2); font-size: 15px; line-height: 1.42; margin-top: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 20px; }
.pub { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; font-weight: 500; color: var(--muted); }
.pub:hover { color: var(--ink); }
.pub i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(30, 174, 186, 0.2); }

/* mission and about: tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { padding: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.tile h3 { font-size: 21px; letter-spacing: -0.02em; }
.tile p { color: var(--ink-2); font-size: 15.5px; line-height: 1.45; }
.tile .btn { margin-top: auto; }
.ico { width: 46px; height: 46px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 4px; }
.ico svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.about { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tile.wide { grid-column: 1 / -1; padding: clamp(26px, 3.4vw, 40px); }
.tile .big { font-size: clamp(19px, 1.9vw, 24px); line-height: 1.4; letter-spacing: -0.015em; color: var(--ink); text-wrap: pretty; }

/* footer */
.foot { padding-block: 28px 56px; display: grid; gap: 8px; justify-items: center; text-align: center; color: var(--ink-2); font-size: 14.5px; }
.foot img { width: 40px; height: 40px; border-radius: 11px; margin-bottom: 4px; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15); }
.foot b { font-weight: 600; color: var(--ink); }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 0; }
.notfound .eyebrow { color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 16px; }

@media (max-width: 1000px) {
  .topbar nav.seg { display: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .cards, .tiles, .about { grid-template-columns: 1fr; }
  .glass-panel { border-radius: 24px; }
  .art { border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
