:root { --bg: #07060f; --ink: #e8e6f5; --dim: #a7a3c4; --cyan: #22e6ff; --purple: #b44cff; --line: rgba(140, 120, 255, .22); }
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(34, 230, 255, .16), transparent 60%),
    radial-gradient(900px 600px at 90% 10%, rgba(180, 76, 255, .18), transparent 60%),
    var(--bg);
}
a { color: var(--cyan); }
.home-wrap { width: 100%; max-width: 62rem; margin: 0 auto; padding: 0 1.25rem; }
.home-header { border-bottom: 1px solid var(--line); background: rgba(7, 6, 15, .6); }
.home-header .home-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: .8rem; padding-bottom: .8rem; }
.home-mark { font-weight: 700; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: var(--ink); text-shadow: 0 0 12px var(--cyan); }
.home-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.home-nav a { color: var(--dim); text-decoration: none; padding: .15rem 0; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.home-nav a:hover, .home-nav a:focus-visible { color: var(--cyan); border-bottom-color: var(--cyan); }
main { flex: 1; }
.home-hero { padding: 3rem 0 1.5rem; text-align: center; }
#home-logo { display: block; margin: 0 auto; width: min(100%, 44rem); aspect-ratio: 1376 / 768; height: auto; object-fit: contain; mix-blend-mode: screen; }
.home-tag { margin: .5rem 0 0; color: var(--dim); letter-spacing: .08em; }
.home-blocks { display: grid; gap: 1rem; margin: 2rem 0; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.home-block { padding: 1.2rem 1.3rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(20, 16, 40, .6); }
.home-block h2 { margin: 0 0 .5rem; font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--cyan); }
.home-block p { margin: 0; color: var(--ink); }
.home-links-title { margin: 2.5rem 0 1rem; font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; color: var(--purple); }
.home-cards { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); margin-bottom: 3rem; }
.home-card { display: block; padding: 1rem 1.1rem; border-radius: 14px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: linear-gradient(160deg, rgba(34, 230, 255, .07), rgba(180, 76, 255, .09)); transition: border-color .18s, box-shadow .18s, transform .18s; }
.home-card:hover, .home-card:focus-visible { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 0 26px rgba(34, 230, 255, .28), 0 0 40px rgba(180, 76, 255, .2); transform: translateY(-2px); outline: none; }
.home-card b { display: block; color: var(--cyan); font-size: 1.05rem; }
.home-card span { display: block; color: var(--dim); font-size: .92rem; }
.home-card em { display: block; margin-top: .4rem; font-style: normal; font-size: .8rem; color: var(--purple); }
.home-footer { border-top: 1px solid var(--line); padding: 1.4rem 0 2rem; color: var(--dim); font-size: .88rem; text-align: center; }
.home-ready .fallback { display: none; }
@media (prefers-reduced-motion: reduce) { .home-card { transition: none; } .home-card:hover, .home-card:focus-visible { transform: none; } }
@media (max-width: 30rem) { .home-hero { padding-top: 2rem; } }
/* M1.10: phones. Under 700 px the main menu folds into a Menu button (shared/mobile.js
   toggles data-open; a tap outside closes it); tap targets are at least 44 px; one column. */
body { overflow-wrap: anywhere; }
.home-menu-btn { display: none; }
@media (max-width: 700px) {
  .home-wrap { padding: 0 1rem; }
  .home-header .home-wrap { position: relative; flex-wrap: nowrap; padding-top: .3rem; padding-bottom: .3rem; }
  .home-mark { display: inline-flex; align-items: center; min-height: 44px; }
  .home-menu-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 1rem; font: inherit; color: var(--cyan); background: none; border: 1px solid var(--cyan); border-radius: 999px; cursor: pointer; }
  .home-menu-btn[aria-expanded="true"] { box-shadow: 0 0 14px rgba(34, 230, 255, .35); }
  .home-nav { display: none; position: absolute; top: 100%; left: .75rem; right: .75rem; z-index: 10; flex-direction: column; flex-wrap: nowrap; gap: 0; padding: .4rem; background: rgba(12, 10, 26, .97); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
  .home-nav[data-open="true"] { display: flex; }
  .home-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 .8rem; border-bottom: 0; border-radius: 10px; }
  .home-nav a:hover, .home-nav a:focus-visible { background: rgba(34, 230, 255, .08); }
  .home-blocks, .home-cards { grid-template-columns: 1fr; }
  .home-card { min-height: 44px; }
  .fallback li { margin: .4rem 0; }
  .fallback a { display: inline-block; min-height: 44px; line-height: 44px; }
}
@media (pointer: coarse) and (min-width: 701px) { .home-nav a { display: inline-flex; align-items: center; min-height: 44px; } }
/* H17 splash: the WebGPU canvas behind the page (home/splash.js). The logo image is the hero
   until the canvas's first frame is on screen, and again whenever WebGPU is missing or fails. */
#home-splash { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .5s ease; }
.splash-on #home-splash { opacity: 1; }
.home-header, main, .home-footer { position: relative; z-index: 1; }
.home-hero { padding: 2rem 0 0; }
#home-logo { width: min(100%, 60rem); transition: opacity .5s ease; }
.splash-on #home-logo { opacity: 0; }
.splash-on .home-header { background: rgba(7, 6, 15, .35); }
.home-tag { position: relative; margin-top: -10%; }
/* H17 panels: the three columns as glass panels of a curved wall; the cards the same glass, flat.
   The wall's angles: --turn and --push below (wide screens only); tilt: home/panels.js. */
.home-block, .home-card { position: relative; border: 1px solid rgba(160, 150, 255, .14); background: linear-gradient(160deg, rgba(40, 34, 84, .42), rgba(10, 9, 26, .58)); -webkit-backdrop-filter: blur(12px) saturate(135%); backdrop-filter: blur(12px) saturate(135%); box-shadow: 0 18px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06); }
.home-block::before, .home-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(120deg, rgba(34, 230, 255, .8), rgba(90, 120, 255, .35) 45%, rgba(180, 76, 255, .8)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: .5; transition: opacity .2s; }
.home-block:hover::before, .home-block:focus-within::before, .home-card:hover::before, .home-card:focus-visible::before { opacity: 1; }
.home-block { transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .55s ease, box-shadow .2s; }
.home-block:hover, .home-block:focus-within { box-shadow: 0 18px 40px rgba(0, 0, 0, .35), 0 0 28px rgba(34, 230, 255, .18), 0 0 46px rgba(180, 76, 255, .16); }
.home-card:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.splash-writing:not(.splash-written) .home-block { opacity: 0; transform: translateY(24px); }
.splash-written .home-block:nth-child(2) { transition-delay: .1s, .1s, 0s; }
.splash-written .home-block:nth-child(3) { transition-delay: .2s, .2s, 0s; }
@media (min-width: 721px) {
  .home-blocks { --tilt-x: 0deg; --tilt-y: 0deg; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; perspective: 1200px; perspective-origin: 50% 40%; }
  .home-block { --turn: 0deg; --push: 0px; --origin: 50%; transform-origin: var(--origin) 50%; transform: translateZ(var(--push)) rotateY(calc(var(--turn) + var(--tilt-x))) rotateX(var(--tilt-y)); }
  .home-block:nth-child(1) { --turn: 22deg; --push: -60px; --origin: 100%; }
  .home-block:nth-child(3) { --turn: -22deg; --push: -60px; --origin: 0%; }
  .splash-writing:not(.splash-written) .home-block { transform: translateZ(var(--push)) translateY(28px) rotateY(var(--turn)); }
}
@media (prefers-reduced-motion: reduce) { .home-block, #home-splash, #home-logo { transition: none; } }
