/* ADAMS Lab landing page.
   Kept in its own file (rather than inline in index.html) so the Content-Security-Policy
   can be a strict style-src 'self' with no 'unsafe-inline'. See README. */

:root {
  --void: #07080A;
  --line: rgba(255, 255, 255, 0.14);
  --white: #F4F6F8;
  --dim: rgba(244, 246, 248, 0.58);

  --hot-1: #2A0B06;  --hot-2: #C2410C;  --hot-3: #FF7A18;  --hot-4: #FFD08A;
  --cold-1: #04121A; --cold-2: #0E6B7A; --cold-3: #21C7C7; --cold-4: #A9F2EE;

  --sans: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, "SF Mono", Menlo, monospace;

  /* Deliberately a single dark world — a two-panel choice screen, not a document.
     Form controls and scrollbars should match it. */
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--void);
  color: var(--white);
  font-family: var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--white); outline-offset: -6px; }

/* ── fixed chrome ── */
.chrome {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 3rem;
  pointer-events: none;
  /* A scrim rather than difference blending: the canvas underneath animates through
     light and dark, and difference made this text disappear whenever a bright plume
     drifted behind it. */
  background: linear-gradient(to bottom, rgba(7,8,10,0.88) 0%, rgba(7,8,10,0.6) 48%, rgba(7,8,10,0) 100%);
}

.chrome b { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; }

.chrome span {
  display: block; font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.82; margin-top: 2px;
}

/* The lab's full name — sentence case in the sans face, since mono uppercase at this
   length becomes a wall of tracking rather than something you can read. */
.chrome .full {
  font-family: var(--sans); font-weight: 500;
  letter-spacing: 0.005em; text-transform: none;
  opacity: 0.9; margin-top: 5px; line-height: 1.35;
  /* Always one line: the size scales with the viewport rather than wrapping. */
  white-space: nowrap;
  font-size: clamp(0.6rem, 1.5vw, 0.82rem);
}

.chrome .inst { margin-top: 6px; opacity: 0.6; }

.chrome .right {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em;
  text-transform: uppercase; opacity: 0.88; text-align: right; line-height: 1.7;
}

/* ── the two panels ── */
.doors { display: flex; min-height: 100svh; }

.door {
  --c1: var(--hot-1); --c2: var(--hot-2); --c3: var(--hot-3); --c4: var(--hot-4);
  position: relative;
  flex: 1 1 50%;
  display: flex; flex-direction: column; justify-content: flex-end;
  /* Still bottom-anchored, just lifted off the floor of the panel. The extra bottom
     padding is viewport-relative so the lift stays proportional on short and tall
     screens rather than looking cramped on one and lost on the other. */
  padding: clamp(2rem, 5vw, 4rem) clamp(2rem, 5vw, 4rem) clamp(3.5rem, 9vh, 6.5rem);
  overflow: hidden;
  border-right: 1px solid var(--line);
  transition: flex-grow 0.75s cubic-bezier(.16,.8,.24,1);
}

.door:last-child {
  border-right: 0;
  --c1: var(--cold-1); --c2: var(--cold-2); --c3: var(--cold-3); --c4: var(--cold-4);
}

.door canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: blur(2px);
  transform: scale(1.06);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(.16,.8,.24,1);
}

.door::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--void) 4%, rgba(7,8,10,0.72) 42%, rgba(7,8,10,0.28) 100%);
  transition: background 0.6s ease;
}

.door > * { position: relative; z-index: 2; }

/* desktop: hovering one panel widens it and quiets the other */
@media (min-width: 861px) and (hover: hover) {
  .doors:hover .door { flex-grow: 0.82; }
  .doors:hover .door:hover { flex-grow: 1.36; }
  .doors:hover .door:not(:hover) canvas { opacity: 0.22; }
  .door:hover canvas { opacity: 0.78; transform: scale(1.0); }
  .door:hover::after { background: linear-gradient(to top, var(--void) 2%, rgba(7,8,10,0.6) 46%, rgba(7,8,10,0.14) 100%); }
}

.idx {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--c3); margin: 0 0 1.1rem;
  display: flex; align-items: center; gap: 0.7rem;
}
.idx::after {
  content: ""; height: 1px; flex: 1;
  background: linear-gradient(to right, var(--c3), transparent);
  max-width: 90px;
}

.door h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 800; letter-spacing: -0.04em; line-height: 0.96;
  margin: 0 0 1rem; max-width: 12ch; text-wrap: balance;
}

.door p {
  color: var(--dim); font-size: 0.95rem; line-height: 1.55;
  max-width: 42ch; margin: 0 0 1.6rem;
  /* Three lines reserved in both panels. Without this the shorter description pulls
     its heading down and the two sides stop lining up across the divide. */
  min-height: calc(3 * 1.55 * 0.95rem);
}

.door ul {
  list-style: none; margin: 0 0 2rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  /* The row's height is ALWAYS reserved and only opacity animates. Collapsing the
     height on the un-hovered panel is what threw the two sides out of alignment —
     one panel's button sat a tag-row higher than the other's. */
  min-height: 1.55rem;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.door li {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.04em;
  padding: 0.32rem 0.6rem;
  border: 1px solid var(--line); border-radius: 2px;
  color: var(--dim);
}

@media (min-width: 861px) and (hover: hover) {
  .door:hover ul { opacity: 1; }
}
@media (max-width: 860px), (hover: none) {
  .door ul { opacity: 1; }
}

.enter {
  display: inline-flex; align-items: center; gap: 0.85rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--void); background: var(--c3);
  padding: 0.9rem 1.5rem;
  align-self: flex-start;
  transition: gap 0.25s ease, background 0.25s ease;
}
.enter:hover { gap: 1.4rem; background: var(--c4); }

@media (max-width: 860px) {
  /* The full name can't wrap, so side-by-side would collide on a phone. */
  .chrome { flex-direction: column; gap: 0.75rem; }
  .chrome .right { text-align: left; }

  .doors { flex-direction: column; }
  .door { border-right: 0; border-bottom: 1px solid var(--line); min-height: 88svh; }
  .door canvas { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
