/* ============================================================
   GIGAMASSIVE — De Stijl grid in the causal.stream PRODUCT palette
   Cool lavender paper, slate-navy grid lines, a lead green with blue
   support and a single orange accent — the hues of the live causal app.
   Geometric type (Jost), Bauhaus accents, planes wipe in left→right.
   ============================================================ */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}

:root{
  --paper:#E9E9F2;   /* cool lavender grid paper (app canvas) */
  --ink:#3A4357;     /* slate navy (app chrome + grid lines)  */
  --green:#46A06F;   /* causal green  — lead hue              */
  --blue:#2E6FCE;    /* causal blue   — 'completed'           */
  --orange:#E0772B;  /* causal orange — single accent         */
  --gold:#E2B33A;    /* causal $ gold — tiny detail           */
  --line:12px;            /* grid line weight */
  --font-display:'Jost',sans-serif;
  --font-mono:'JetBrains Mono',ui-monospace,monospace;
  --ease:cubic-bezier(.2,.7,.2,1);
}
/* bolder, more saturated take on the same hues */
:root[data-palette="bold"]{
  --paper:#E7E7F1; --ink:#333B4E; --green:#2F9A60; --blue:#1F62CC; --orange:#E26C1C;
}
/* muted, earthy take */
:root[data-palette="muted"]{
  --paper:#E8E8EF; --ink:#434A5C; --green:#5C9A78; --blue:#5279B4; --orange:#C5824A;
}

body{
  font-family:var(--font-display);
  background:var(--ink);
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow:hidden;
}
img{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
::selection{background:var(--green);color:var(--paper)}

/* ---------- the canvas ---------- */
.page{
  position:fixed;inset:0;
  display:grid;
  gap:var(--line);
  padding:var(--line);
  background:var(--ink);   /* lines = ink showing through the gaps */
  grid-template-columns:1.5fr 1fr 1fr 1.05fr;
  grid-template-rows:1.3fr 0.82fr 1fr 0.95fr;
  grid-template-areas:
    "wm   wm   red  blue"
    "wm   wm   blk  blue"
    "yel  blur blur caus"
    "yel  blur blur caus";
}

/* every cell */
.cell{
  position:relative;
  background:var(--paper);
  overflow:hidden;
  min-width:0;min-height:0;
}

/* color planes drawn from the causal app palette. Each cell carries a
   real fill element that wipes in left→right. Green leads (two planes,
   diagonal), blue supports, orange is the single accent (the play block). */
.c-tm{grid-area:red;--c:var(--blue)}      /* top-mid: blue        */
.c-play{grid-area:blk;--c:var(--orange)}  /* play block: orange    */
.c-tr{grid-area:blue;--c:var(--green)}     /* tall right: green     */
.c-bl{grid-area:yel;--c:var(--green)}      /* big bottom-left: green*/

.fill-bg{
  position:absolute;inset:-1px -2px -1px 0;z-index:0;
  background:var(--c);
  transform:scaleX(1);transform-origin:left center;
}
html.play .fill-bg{
  animation:wipe .7s var(--ease) both;
  animation-delay:calc(var(--i,0) * .13s + .12s);
}
@keyframes wipe{from{transform:scaleX(0)}to{transform:scaleX(1)}}

/* accents + play triangle fade in just behind their plane's wipe */
html.play .geo,
html.play .tri{
  animation:fadein .5s var(--ease) both;
  animation-delay:calc(var(--i,0) * .13s + .5s);
}
@keyframes fadein{from{opacity:0}to{opacity:1}}

/* the causal.stream card bounces in last, after the grid has assembled */
html.play .caus{
  animation:cardbounce .62s var(--ease) both;
  animation-delay:1.45s;
}
@keyframes cardbounce{
  0%{opacity:0;transform:translateY(26px) scale(.95)}
  58%{opacity:1;transform:translateY(-7px) scale(1.015)}
  78%{transform:translateY(2px) scale(.997)}
  100%{opacity:1;transform:translateY(0) scale(1)}
}
@media(prefers-reduced-motion:reduce){
  html.play .fill-bg{animation:none;transform:scaleX(1)}
  html.play .geo,html.play .tri{animation:none;opacity:1}
  html.play .caus{animation:none}
}

/* ---------- wordmark cell ---------- */
.wm{grid-area:wm;display:flex;flex-direction:column;justify-content:space-between;
  padding:clamp(22px,3.4vw,52px)}
.wm-top{display:flex;align-items:center;gap:14px;font-family:var(--font-mono);
  font-size:12px;letter-spacing:.18em;text-transform:uppercase;color:var(--ink);
  opacity:.65}
.wm-top .sq{width:13px;height:13px;background:var(--orange)}
.wordmark{font-family:var(--font-display);font-weight:var(--wm-weight,500);
  font-size:calc(clamp(40px,7.4vw,118px) * var(--wm-scale,1));line-height:.84;
  letter-spacing:var(--wm-track,-.022em);color:var(--ink);white-space:nowrap}
.wordmark .wm-text{white-space:nowrap}
.wordmark .dot{display:inline-block;width:.16em;height:.16em;border-radius:50%;
  background:var(--green);vertical-align:baseline;margin-left:.06em}
.wm-foot{font-family:var(--font-mono);font-size:11.5px;letter-spacing:.06em;
  color:var(--ink);opacity:.55}

/* Bauhaus geometric accents inside color planes */
.geo{position:absolute;z-index:1}
/* top-mid (blue): a paper quarter-disc */
.c-tm .geo{right:13%;bottom:13%;width:42%;aspect-ratio:1;
  background:var(--paper);border-radius:50% 50% 0 50%}
/* tall right (green): a hollow paper ring */
.c-tr .geo{left:50%;top:16%;transform:translateX(-50%);width:58%;aspect-ratio:1;
  border-radius:50%;border:var(--line) solid var(--paper);background:transparent}
/* play plane (orange): a paper right-pointing triangle (play / stream / flow) */
.c-play .tri{position:absolute;z-index:1;left:52%;top:50%;
  transform:translate(-50%,-50%);width:0;height:0;border-style:solid;
  border-width:clamp(18px,2.6vw,32px) 0 clamp(18px,2.6vw,32px) clamp(30px,4.4vw,54px);
  border-color:transparent transparent transparent var(--paper)}

/* ---------- blurb cell ---------- */
.blur{grid-area:blur;display:flex;align-items:flex-end;
  padding:clamp(22px,3vw,46px)}
.blurb{font-family:var(--font-display);font-weight:400;
  font-size:clamp(20px,2.5vw,38px);line-height:1.12;letter-spacing:-.012em;
  color:var(--ink);text-wrap:balance;max-width:18ch}
.blurb b{font-weight:600}

/* ---------- causal.stream cell (tall, bottom-right) ---------- */
.caus{grid-area:caus;background:var(--paper);display:flex;flex-direction:column;
  align-items:flex-start;justify-content:flex-end;gap:clamp(10px,1.2vw,16px);
  padding:clamp(18px,2.4vw,34px);transition:background .2s var(--ease)}
.caus .lbl{font-family:var(--font-mono);font-size:11px;letter-spacing:.16em;
  text-transform:uppercase;color:var(--ink);opacity:.5;margin-bottom:auto;
  transition:color .2s var(--ease)}
.caus .stream-mark{width:clamp(34px,4vw,54px);height:auto;flex:none}
.caus .stream-name{font-family:var(--font-display);font-weight:500;
  font-size:clamp(22px,2.7vw,38px);letter-spacing:-.015em;color:var(--ink);
  line-height:.95;transition:color .2s var(--ease)}
.caus .stream-arr{font-size:clamp(22px,2.6vw,34px);color:var(--blue);
  transition:transform .2s var(--ease),color .2s var(--ease)}
.caus:hover{background:var(--blue)}
.caus:hover .lbl,.caus:hover .stream-name,.caus:hover .stream-arr{color:var(--paper)}
.caus:hover .lbl{opacity:.7}
.caus:hover .stream-arr{transform:translate(4px,-4px)}

/* ---------- responsive: stack into a vertical Mondrian on small screens ---------- */
@media(max-width:760px){
  body{overflow:auto}
  .page{position:static;min-height:100svh;height:auto;
    grid-template-columns:1fr 1fr;
    grid-template-rows:auto auto auto auto auto;
    grid-template-areas:
      "wm   wm"
      "red  blue"
      "blur blur"
      "yel  blk"
      "caus caus";}
  .wm{padding:30px 24px;gap:30px}
  .c-tm,.c-tr,.c-bl,.c-play{min-height:30vw}
  .caus{min-height:84px}
  .blur{min-height:26vh}
}
