/* AltMind — white page, floating slide switches, pure CSS. Only the logo stands still. */
:root {
  --page: #ffffff; --ink: #111111; --muted: #6a6a6a; --line: #ececec;
  --track: #e4e4e4; --track-on: #111111; --knob: #ffffff; --knob-on: #ffffff;
  --knob-shadow: 0 1px 1px rgba(0,0,0,.08), 0 3px 8px rgba(0,0,0,.18);
  --panel-shadow: 0 2px 4px rgba(0,0,0,.04), 0 40px 90px -30px rgba(0,0,0,.28);
  --font: "IBM Plex Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.3,.7,.25,1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 16px/1.6 var(--font); overflow-x: hidden; }
p { margin: 0; }
h1, h2 { margin: 0; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the only thing that stands still */
.brand { position: fixed; z-index: 30; top: 28px; left: 32px; display: inline-flex; color: var(--ink); }
.brand svg { height: 28px; width: auto; overflow: visible; }
.brand .sym { transform-box: fill-box; transform-origin: center; transition: transform 240ms var(--ease); }
.brand:hover .sym, .brand:focus-visible .sym { transform: scaleY(-1); }

/* stage */
.stage { position: relative; width: 100%; height: 100vh; min-height: 640px; overflow: hidden; }
.u { position: absolute; left: var(--x); top: var(--y); display: grid; gap: 4px; justify-items: center; text-align: center; transform: translate(-50%, -100%); }
.u .u__row { margin-top: 4px; }
.u__t { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.u__row { display: flex; align-items: center; gap: 14px; }
.u__n { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }

@keyframes fa { 0% { transform: translate(-50%, -50%) translate(0, 0); } 100% { transform: translate(-50%, -50%) translate(18px, -14px); } }
@keyframes fb { 0% { transform: translate(-50%, -50%) translate(0, 0); } 100% { transform: translate(-50%, -50%) translate(-16px, 16px); } }
@keyframes fc { 0% { transform: translate(-50%, -50%) translate(-10px, -8px); } 50% { transform: translate(-50%, -50%) translate(12px, 6px); } 100% { transform: translate(-50%, -50%) translate(-4px, 14px); } }
@keyframes fd { 0% { transform: translate(-50%, -50%) translate(8px, 10px); } 100% { transform: translate(-50%, -50%) translate(-14px, -12px); } }

/* idle line in the middle (also drifts) */
.idle { position: absolute; left: 50%; top: 50%; width: min(560px, 80vw); text-align: center; display: grid; gap: 16px; justify-items: center; animation: fc 14s ease-in-out -3s infinite alternate; transition: opacity 300ms var(--ease); }
.idle .k { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.idle h1 { font-size: clamp(36px, 4.6vw, 60px); line-height: 1.04; letter-spacing: -0.03em; }
.idle p { color: var(--muted); max-width: 44ch; }
.mini { display: inline-block; vertical-align: middle; width: .95em; height: .56em; border-radius: 999px; background: var(--track); position: relative; transform: translateY(-.06em); }
.mini::after { content: ""; position: absolute; top: .06em; left: .06em; width: .44em; height: .44em; border-radius: 50%; background: #fff; box-shadow: var(--knob-shadow); animation: mini 3.2s var(--ease) infinite; }
@keyframes mini { 0%, 35% { transform: translateX(0); } 50%, 85% { transform: translateX(.39em); } 100% { transform: translateX(0); } }
.mini { animation: mini-track 3.2s var(--ease) infinite; }
@keyframes mini-track { 0%, 35% { background: var(--track); } 50%, 85% { background: var(--track-on); } 100% { background: var(--track); } }

/* the switch */
.sw { position: relative; flex: none; width: 58px; height: 34px; border-radius: 999px; background: var(--track); cursor: pointer; box-shadow: inset 0 1px 2px rgba(0,0,0,.07); }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: var(--knob); box-shadow: var(--knob-shadow); animation: knob-off 260ms var(--ease); }
.sw--on { background: var(--track-on); display: none; }
.sw--on::after { background: var(--knob-on); transform: translateX(24px); animation: knob-on 260ms var(--ease); }
@keyframes knob-on { from { transform: translateX(0); } to { transform: translateX(24px); } }
@keyframes knob-off { from { transform: translateX(24px); } to { transform: translateX(0); } }
.sw:hover { filter: brightness(.96); }

/* content: one floating sheet in the middle */
.panel { position: fixed; z-index: 20; left: 50%; top: 50%; width: min(600px, calc(100vw - 32px)); max-height: min(64vh, 640px); overflow: auto; overscroll-behavior: contain; background: var(--page); border-radius: 26px; box-shadow: var(--panel-shadow); padding: 30px 36px 36px; display: none; animation: sheet-in 420ms var(--ease) both, sheet-drift 9s ease-in-out 420ms infinite alternate; }
@keyframes sheet-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); filter: blur(4px); } to { opacity: 1; transform: translate(-50%, -50%); filter: none; } }
@keyframes sheet-drift { from { transform: translate(-50%, -50%); } to { transform: translate(-50%, calc(-50% - 6px)); } }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--line); position: sticky; top: -30px; background: var(--page); padding-top: 4px; }
.panel__head .u__t { display: block; margin-bottom: 6px; }
.panel h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.08; margin-bottom: 16px; max-width: 22ch; }
.panel .lead { font-size: 18px; line-height: 1.55; }
.panel .muted { color: var(--muted); }
.panel .body { display: grid; gap: 12px; }
.list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 24px; }
.list li { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 3px; }
.list b { font-weight: 600; }
.list span { color: var(--muted); font-size: 15px; line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.tag { font: 500 12px/1 var(--mono); padding: 7px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.contact { display: grid; gap: 14px; margin: 6px 0 0; }
.contact dt { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.contact dd { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.contact dd a { text-decoration: none; border-bottom: 2px solid currentColor; }
.btn { display: inline-flex; margin-top: 22px; padding: 12px 22px; border-radius: 999px; background: var(--ink); color: var(--page); text-decoration: none; font-weight: 600; }
.legal { margin-top: 24px; font-size: 13px; color: var(--muted); display: grid; gap: 2px; }

/* while a sheet is open, the floating switches step back a little */
.stage.dim .u { opacity: .55; }

@media (max-width: 760px) {
  .brand { top: 18px; left: 18px; }
  .brand svg { height: 24px; }
  .u__n { font-size: 18px; }
  .idle h1 { font-size: 34px; }
  .panel { top: auto; bottom: 0; left: 0; width: 100%; max-height: 78vh; border-radius: 24px 24px 0 0; padding: 22px 20px 32px; animation: sheet-up 380ms var(--ease) both; }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .panel__head { top: -22px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .u { transform: translate(-50%, -100%); } .canopy { transform: translateX(-50%); } .idle { transform: translate(-50%, -50%); } .panel { transform: translate(-50%, -50%); } }
@media (prefers-reduced-motion: reduce) and (max-width: 760px) { .panel { transform: none; } }
.panel .k { display: block; font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }

/* circuit-board tree (grey, faint). The switches are its crown. */
.canopy { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100vw, 160vh); aspect-ratio: 1.6 / 1; animation: sway 9s ease-in-out infinite alternate; }
@keyframes sway { from { transform: translate(-50%, 0); } to { transform: translate(-50%, -10px); } }
@keyframes sway-m { from { transform: translateY(0); } to { transform: translateY(-8px); } }
.tree { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: visible; }
.tree--m { display: none; }
.u, .idle { z-index: 1; }
.idle { top: 47%; background: radial-gradient(closest-side, #ffffff 72%, rgba(255,255,255,0)); padding: 44px 36px; }
.tree path { fill: none; stroke: #e2e2e2; stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; }
.tree .twig { stroke-width: 4; }
.tree .trunk { stroke-width: 6; }
.tree .base, .tree .twig, .tree .trunk { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.2s var(--ease) calc(var(--n, 0) * 110ms) forwards; }
.tree .trunk { animation-duration: 1.4s; }
.tree .foot { fill: #e2e2e2; }
.tree .ring { fill: #ffffff; stroke: #e2e2e2; stroke-width: 4; opacity: 0; animation: pop 500ms var(--ease) calc(1.6s + var(--n, 0) * 110ms) forwards; }
.tree .ring.end { stroke-width: 5; }
.tr { --c: #bcbcbc; transition: opacity .3s; }
.tree .pulse { stroke: var(--c); stroke-width: 5; stroke-dasharray: 3 97; stroke-dashoffset: 100; opacity: .9; animation: flow 5s linear calc(2.2s + var(--n, 0) * 560ms) infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes flow { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; } to { opacity: 1; } }
@keyframes blink { 0%, 5% { fill: #cfcfcf; } 16%, 100% { fill: #ffffff; } }
#s-none:not(:checked) ~ .stage .tr { opacity: .4; }
@media (max-width: 760px) {
  .stage { height: auto; min-height: 0; padding-top: 70px; }
  .canopy { position: relative; left: 0; transform: none; width: 100%; aspect-ratio: 390 / 1180; animation-name: sway-m; }
  .tree--d { display: none; } .tree--m { display: block; }
  .tree path { stroke-width: 3; } .tree .trunk { stroke-width: 4; } .tree .twig { stroke-width: 2.5; }
  .tree .ring { stroke-width: 2.5; } .tree .pulse { stroke-width: 3; }
  .idle { top: 9%; width: calc(100% - 32px); padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { .tree .base, .tree .twig, .tree .trunk { stroke-dashoffset: 0; } .tree .pulse { display: none; } .tree .ring { opacity: 1; } }

/* labels run down along the trace under each switch, like silkscreen on a board */
.u { gap: 0; }
.u .u__row { margin: 0; }
.lab { position: absolute; top: calc(100% + 12px); writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; pointer-events: none; }
.lab--n { right: calc(50% + 9px); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1; color: var(--ink); }
.lab--t { left: calc(50% + 9px); font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 760px) { .lab--n { font-size: 17px; } .lab--t { font-size: 10px; letter-spacing: .1em; } }

/* click anywhere outside an open sheet to switch everything off */
.scrim { position: fixed; inset: 0; z-index: 15; display: none; cursor: default; background: rgba(255,255,255,.35); }
#s-none:not(:checked) ~ .scrim { display: block; animation: pop 300ms var(--ease) both; }


/* black rail on the left with the logo in white, reading upwards */
.rail { pointer-events: none; position: fixed; z-index: 25; left: 0; top: 0; bottom: 0; width: 72px; background: #111111; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 40px; }
.rail__logo { pointer-events: auto; position: relative; width: 26px; height: 128px; color: #ffffff; }
.rail__logo svg { position: absolute; left: 50%; top: 50%; width: 128px; height: 26px; transform: translate(-50%, -50%) rotate(-90deg); overflow: visible; }
.rail__logo .sym { transform-box: fill-box; transform-origin: center; transition: transform 240ms var(--ease); }
.rail__logo:hover .sym { transform: scaleY(-1); }
.canopy { left: calc(72px + (100vw - 72px) / 2); width: min(100vw - 72px, 160vh); }
.panel { left: calc(50% + 36px); width: min(600px, calc(100vw - 72px - 32px)); }
@media (max-width: 760px) {
  .rail { width: 48px; padding-bottom: 24px; }
  .rail__logo { width: 20px; height: 99px; }
  .rail__logo svg { width: 99px; height: 20px; }
  .canopy { left: 0; margin-left: 48px; width: calc(100% - 48px); }
  .panel { left: 48px; width: calc(100% - 48px); }
}

/* tiny twigs */
.tree .twig--s { stroke-width: 2.5; stroke: #e8e8e8; }
.tree .ring--s { stroke-width: 2.5; stroke: #e4e4e4; }
@media (max-width: 760px) { .tree .twig--s, .tree .ring--s { stroke-width: 1.6; } }

.list--one { grid-template-columns: 1fr; }
.list .tagline { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-left: 8px; font-weight: 500; }
