/* Evenanse site. Colours, font and the card-and-wire look are Phenotope's own. */
@font-face {
  font-family: "Supreme";
  src: url("./Supreme-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --canvas: #060607;
  --bar: #1d1f26;
  --ink: #edf2f5;
  --muted: #9aa3ad;
  --line: rgba(237, 242, 245, 0.55);
  --hair: rgba(237, 242, 245, 0.12);
  --accent: #496be6;
  --link: #a8b7ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--canvas); }

body {
  margin: 0;
  color: var(--ink);
  font: 400 17px/1.55 "Supreme", "Segoe UI", Arial, sans-serif;
  /* the canvas grid: a small + at the middle of each 56 px cell, as faint as the old dots */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M25 28.5h7M28.5 25v7' stroke='%23edf2f5' stroke-opacity='.09'/%3E%3C/svg%3E") 0 0 / 56px 56px;
}

a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.site-head { display: flex; align-items: center; justify-content: space-between; padding: 24px 0; }
.site-head a { color: var(--ink); text-decoration: none; }
.site-head nav { display: flex; gap: 28px; }
.site-head nav a { color: var(--muted); }
.site-head nav a:hover, .site-head nav a[aria-current] { color: var(--ink); }
.wordmark { font-size: 20px; letter-spacing: -0.01em; }

h1, h2, h3 { font-weight: 400; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(40px, 6.4vw, 68px); line-height: 1.04; }
h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; }
h3 { font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; max-width: 62ch; }
.lead { font-size: 20px; color: var(--muted); margin-top: 20px; max-width: 46ch; }
.muted { color: var(--muted); }

.button {
  display: inline-block;
  margin-top: 32px;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}
.button:hover { background: #5a7af0; }
.note { margin-top: 12px; font-size: 15px; color: var(--muted); }

/* Diagram cards, drawn the way Phenotope draws them */
.card {
  display: block;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #1c1d21;
  color: var(--ink);
  text-decoration: none;
}
a.card:hover { border-color: var(--ink); background: #212329; }
.card p { margin-top: 8px; color: var(--muted); font-size: 16px; }
.card .logo { height: 44px; width: auto; display: block; margin-bottom: 14px; }

/* Home: headline beside a ring of changing letters around two live graphs */
.home-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 40px; padding: 56px 0 96px; }
.home-hero .lead { margin-left: auto; margin-right: auto; }
.orbit { width: min(100%, 480px); height: auto; overflow: visible; }
.orbit .ring { animation: spin 24s linear infinite; }
.orbit .ring text { font: 400 17px "Supreme", "Segoe UI", sans-serif; fill: var(--muted); text-anchor: middle; dominant-baseline: central; transition: opacity 140ms ease; }
.orbit .ring text.out { opacity: 0; }
.orbit .grid path { fill: none; stroke-width: 0.5; }
.orbit .grid .fine { stroke: rgba(237, 242, 245, 0.06); }
.orbit .grid .bold { stroke: rgba(237, 242, 245, 0.16); }
.orbit .curve { fill: none; stroke-linejoin: round; }
.orbit .whirl { stroke: #f4f6f8; stroke-width: 0.45; opacity: 0.35; }
.orbit .star { stroke: #c8ced4; stroke-width: 0.5; opacity: 0.35; }
.orbit .hexes { stroke: #c8ced4; stroke-width: 0.45; opacity: 0.3; }
.orbit .ico { stroke: #f4f6f8; stroke-width: 0.6; opacity: 0.6; }
.orbit .cube4 { stroke: #ffffff; stroke-width: 0.7; opacity: 0.9; }
.orbit .dot { fill: #fff; filter: drop-shadow(0 0 3px #fff); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .orbit .ring { animation: none; } }

/* Home: closing blur. --p (0 at the top, 1 at the bottom) is set from the scroll position.
   Each veil is a 70 px backdrop blur masked by a soft radial gradient from its bottom corner:
   the fully blurred part grows behind a 90vmax-wide fade, so no edge is ever hard, and at the
   bottom the two cover the whole window. */
:root { --p: 0; --q: 0; }
.reveal-room { height: 100vh; }
.veil {
  position: fixed; inset: 0; z-index: 5; pointer-events: none;
  -webkit-backdrop-filter: blur(70px); backdrop-filter: blur(70px);
  --fade: calc(var(--p) * 200vmax);
  --solid: max(0px, calc(var(--p) * 200vmax - 90vmax));
}
.veil-l { -webkit-mask-image: radial-gradient(circle at 0% 100%, #000 var(--solid), transparent var(--fade)); mask-image: radial-gradient(circle at 0% 100%, #000 var(--solid), transparent var(--fade)); }
.veil-r { -webkit-mask-image: radial-gradient(circle at 100% 100%, #000 var(--solid), transparent var(--fade)); mask-image: radial-gradient(circle at 100% 100%, #000 var(--solid), transparent var(--fade)); }

/* Moving lights, one per side, sliding in with the scroll */
.glow { position: fixed; top: 0; bottom: 0; width: 55vw; z-index: 6; pointer-events: none; opacity: var(--p); filter: blur(60px); }
.glow-l { left: 0; transform: translateX(calc((var(--p) - 1) * 60vw)); }
.glow-r { right: 0; transform: translateX(calc((1 - var(--p)) * 60vw)); }
.glow i { position: absolute; width: 38vw; height: 38vw; border-radius: 50%; opacity: .55; }
.glow-l i:first-child { left: -8vw; top: 18vh; background: radial-gradient(circle, #ff2a1a, transparent 70%); animation: drift-a 9s ease-in-out infinite alternate; }
.glow-l i:last-child { left: 6vw; top: 46vh; background: radial-gradient(circle, #42ff6b, #ffee00 40%, transparent 70%); animation: drift-b 11s ease-in-out infinite alternate; }
.glow-r i:first-child { right: -8vw; top: 18vh; background: radial-gradient(circle, #00e5ff, transparent 70%); animation: drift-b 10s ease-in-out infinite alternate; }
.glow-r i:last-child { right: 6vw; top: 46vh; background: radial-gradient(circle, #ff2bd6, #3d5bff 40%, transparent 70%); animation: drift-a 12s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(6vw, 14vh) scale(1.15); filter: hue-rotate(25deg); } }
@keyframes drift-b { to { transform: translate(-5vw, -12vh) scale(.9); filter: hue-rotate(-25deg); } }

/* The two apps, sliding in from their sides above the blur */
.side {
  position: fixed; top: 50%; z-index: 7; display: flex; flex-direction: column; align-items: center; gap: 18px;
  color: var(--ink); text-decoration: none; font-size: clamp(32px, 4.6vw, 56px); letter-spacing: -0.02em;
  opacity: clamp(0, calc((var(--p) * 2.2 - 1) * (1 - var(--q))), 1); pointer-events: none;
}
.side img { height: clamp(90px, 14vw, 160px); width: auto; }
.side-l { left: 25%; transform: translate(calc(-50% + (var(--p) - 1) * 50vw), -50%); }
.side-r { left: 75%; transform: translate(calc(-50% + (1 - var(--p)) * 50vw), -50%); }
.is-shut .side { pointer-events: auto; }
.side:hover span { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.site-foot { position: relative; z-index: 8; }
.glow { opacity: calc(var(--p) * (1 - 0.45 * var(--q))); }

/* Home: the story over the closed blur */
.story { position: relative; z-index: 8; display: grid; gap: 22vh; padding: 10vh 0 6vh; }
.chapter { max-width: 820px; margin: 0 auto; text-align: center; }
.chapter > p { margin-left: auto; margin-right: auto; }
.chapter h2 { font-size: clamp(32px, 4.8vw, 54px); line-height: 1.08; margin-bottom: 20px; }
.chapter .muted { font-size: 19px; }
.eyebrow { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.chapter .shot { margin: 44px 0 8px; }
.steps { list-style: none; padding: 0; margin: 40px 0 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; text-align: left; }
.steps span { font-size: 13px; color: var(--muted); letter-spacing: .1em; }
.steps h3 { margin: 8px 0 6px; }
.steps p { color: var(--muted); font-size: 15px; }
.chapter .facts { text-align: left; margin-top: 28px; }
.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; text-align: left; }
.notes .card { background: rgba(28, 29, 33, 0.7); }
.notes .date { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.notes h3 { font-size: 19px; }
.more { display: inline-block; margin-top: 24px; }
.notes-list { margin-top: 8px; }
.prose .eyebrow { margin: 0 0 18px; }
.prose .eyebrow a { color: var(--muted); }
.finale { padding-bottom: 6vh; }
.rise { opacity: 0; transform: translateY(28px); transition: opacity 900ms ease, transform 900ms cubic-bezier(.2, .7, .2, 1); }
.rise.in { opacity: 1; transform: none; }
.steps .rise:nth-child(2), .facts .rise:nth-child(2), .notes .rise:nth-child(2) { transition-delay: 120ms; }
.steps .rise:nth-child(3), .facts .rise:nth-child(3), .notes .rise:nth-child(3) { transition-delay: 240ms; }
.steps .rise:nth-child(4), .facts .rise:nth-child(4) { transition-delay: 360ms; }
@media (prefers-reduced-motion: reduce) { .rise { opacity: 1; transform: none; transition: none; } }
@media (max-width: 760px) {
  .story { gap: 14vh; }
  .steps { grid-template-columns: 1fr 1fr; }
  .notes { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .glow i { animation: none; } }

/* Product pages */
.hero { padding: 56px 0 48px; }
.hero .logo { height: 72px; width: auto; display: block; margin-bottom: 28px; }
.shot { display: block; width: 100%; height: auto; border: 1px solid var(--hair); border-radius: 14px; }
.section { padding: 72px 0 0; }
.section > h2 { margin-bottom: 32px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; margin: 0; }
.facts div { padding: 20px 0; border-top: 1px solid var(--hair); }
.facts dt { font-size: 20px; letter-spacing: -0.01em; }
.facts dd { margin: 6px 0 0; color: var(--muted); }
.prose h2 { margin-top: 48px; font-size: 24px; }
.prose p, .prose ul { margin-top: 14px; color: #cfd6dc; max-width: 68ch; }
.prose ul { padding-left: 20px; }
.draft { margin-top: 24px; padding: 14px 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); max-width: 68ch; }

.site-foot { margin-top: 112px; border-top: 1px solid var(--hair); padding: 28px 0 44px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; color: var(--muted); font-size: 15px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }

@media (max-width: 760px) {
  .home-hero { gap: 32px; padding: 40px 0 56px; }
  .facts { grid-template-columns: 1fr; }
  .site-head nav { gap: 20px; }
  .side-l, .side-r { left: 50%; }
  .side-l { top: 30%; }
  .side-r { top: 68%; }
}

/* Hero backdrop: the painting, faint, fading in from the left, with a slow drift, a passing light and fine scanlines. */
html { overflow-x: clip; }
.home-hero { position: relative; isolation: isolate; }
.home-hero::before, .home-hero::after { content: ""; position: absolute; top: -120px; bottom: 0; left: calc(50% - 50vw); width: 100vw; z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 18%, #000 75%), linear-gradient(180deg, #000 70%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0%, transparent 18%, #000 75%), linear-gradient(180deg, #000 70%, transparent); mask-composite: intersect; }
.home-hero::before { background: url("hero-homer.webp") right center / cover no-repeat; opacity: 0.16; filter: grayscale(0.7) sepia(0.25) contrast(1.05); transform-origin: 80% 40%; animation: hero-drift 40s ease-in-out infinite alternate; }
.home-hero::after { background: linear-gradient(105deg, transparent 35%, rgba(255, 236, 214, 0.07) 50%, transparent 65%) 0 0 / 250% 100% no-repeat, repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px); animation: hero-sweep 14s ease-in-out infinite; }
@keyframes hero-drift { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.12) translate(-1.5%, 1%); } }
@keyframes hero-sweep { 0%, 15% { background-position: 120% 0, 0 0; } 85%, 100% { background-position: -20% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .home-hero::before, .home-hero::after { animation: none; } }

.wordmark { display: inline-flex; align-items: center; gap: 10px; }
.wordmark img { width: 36px; height: auto; display: block; }

