/* ==================================================================
   Claudium — site stylesheet.

   The tokens below are lifted from the engine's own style.css, because
   the site and the tool should not look like two different companies.
   Near-black, monochrome, hairline rules, and exactly one colour — used
   only where it means something.

   The one departure: long prose in a monospace face is tiring to read,
   so headings, labels and code stay mono and body copy gets a sans.
   ================================================================== */

/* ---- fonts ------------------------------------------------------- */
@font-face{
  font-family:'JetBrains Mono';font-style:normal;font-weight:400;font-display:swap;
  src:url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,
                U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,
                U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:'JetBrains Mono';font-style:normal;font-weight:700;font-display:swap;
  src:url('../fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,
                U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,
                U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:'Inter';font-style:normal;font-weight:100 900;font-display:swap;
  src:url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,
                U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,
                U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ---- tokens ------------------------------------------------------ */
:root{
  color-scheme:dark;

  --bg:#0a0a0a;
  --bg2:#070707;
  --panel:#101010;
  --panel2:#0c0c0c;
  --line:#242424;
  --line2:#191919;
  --dimmer:#4f4f4f;      /* rules, dots, punctuation — never body text */
  --dim:#8a8a8a;         /* the dimmest colour any TEXT may be: 5.7:1 */
  --txt:#c6c6c6;
  --bright:#ffffff;
  --hover:#1b1b1b;

  /* The one colour in the place. */
  --accent:#a78bfa;
  --accent-dim:#6b5aa6;
  --accent-bg:#17141f;

  --mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,
         'Liberation Mono',monospace;
  --sans:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;

  /* One spacing scale. Everything snaps to it, which is most of what
     makes a layout look deliberate rather than assembled. */
  --s1:4px; --s2:8px; --s3:14px; --s4:22px; --s5:36px; --s6:58px;
  --s7:94px; --s8:150px;

  --r:4px;
  --edge:inset 0 1px 0 rgba(255,255,255,.055);
  --lift:0 1px 2px rgba(0,0,0,.5),0 18px 48px rgba(0,0,0,.6);
  --ease:cubic-bezier(.2,.8,.3,1);

  --wide:1180px;
  --text:660px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

body{
  margin:0;background:var(--bg);color:var(--txt);
  font:400 16px/1.7 var(--sans);
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
  overflow-x:hidden;
}

/* A faint vertical wash, so the page has a top and a bottom rather than
   being one flat sheet of black. */
body::before{
  content:'';position:fixed;inset:0;pointer-events:none;z-index:0;
  background:
    radial-gradient(1100px 620px at 50% -10%,rgba(167,139,250,.07),transparent 70%),
    linear-gradient(180deg,#0d0d10 0%,var(--bg) 40%,var(--bg2) 100%);
}
body>*{position:relative;z-index:1}

img{max-width:100%;height:auto;display:block}
a{color:var(--txt);text-decoration:none}

::selection{background:var(--accent);color:#0a0a0a}

/* ---- type -------------------------------------------------------- */
h1,h2,h3,h4{
  font-family:var(--mono);font-weight:400;color:var(--bright);
  letter-spacing:-.02em;margin:0;line-height:1.15;
}
h1{font-size:clamp(34px,6.2vw,64px)}
h2{font-size:clamp(25px,3.4vw,36px)}
h3{font-size:19px;letter-spacing:-.01em}
h4{font-size:15px;color:var(--txt)}
p{margin:0 0 var(--s3)}
p:last-child{margin-bottom:0}
strong{color:var(--bright);font-weight:600}
code{
  font-family:var(--mono);font-size:.88em;color:var(--accent);
  background:var(--accent-bg);border:1px solid #221d33;border-radius:3px;
  padding:1px 5px;white-space:nowrap;
}

.lead{font-size:clamp(17px,1.9vw,20px);line-height:1.65;color:var(--dim)}
.lead strong{color:var(--txt);font-weight:500}
.muted{color:var(--dim)}
.small{font-size:13px}

/* The engine labels everything in square brackets. So does the site. */
.tag{
  font-family:var(--mono);font-size:11px;letter-spacing:.14em;
  text-transform:uppercase;color:var(--dim);
}
.tag::before{content:'[ ';color:var(--dimmer)}
.tag::after{content:' ]';color:var(--dimmer)}
.tag.on{color:var(--accent)}

/* ---- layout ------------------------------------------------------ */
.wrap{max-width:var(--wide);margin:0 auto;padding:0 var(--s4)}
.narrow{max-width:var(--text)}
section{padding:var(--s7) 0}
section.tight{padding:var(--s6) 0}
.rule{height:1px;background:var(--line2);border:0;margin:0}

.head{margin-bottom:var(--s5);max-width:var(--text)}
.head h2{margin:var(--s2) 0 var(--s3)}

.grid{display:grid;gap:var(--s4)}
/* Without this a wide child (a <pre>, a long unbroken string) makes the
   whole grid wider than the page instead of scrolling inside its own box. */
.grid>*{min-width:0}
.g2{grid-template-columns:repeat(2,minmax(0,1fr))}
.g3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:860px){.g2,.g3{grid-template-columns:1fr}}

/* ---- header ------------------------------------------------------ */
.top{
  position:sticky;top:0;z-index:40;
  background:rgba(10,10,10,.82);backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line2);
}
.top .wrap{display:flex;align-items:center;gap:var(--s4);height:58px}
.brand{display:flex;align-items:center;gap:10px;margin-right:auto}
.brand img{width:22px;height:22px}
.brand b{
  font-family:var(--mono);font-weight:400;color:var(--bright);
  font-size:15px;letter-spacing:.24em;text-transform:lowercase;
}
nav{display:flex;gap:var(--s1)}
nav a{
  font-family:var(--mono);font-size:13px;color:var(--dim);
  padding:5px 10px;border-radius:3px;transition:color .13s var(--ease),background .13s var(--ease);
}
nav a::before{content:'[';color:var(--dimmer);margin-right:1px}
nav a::after{content:']';color:var(--dimmer);margin-left:1px}
nav a:hover{color:var(--bright);background:var(--hover)}
nav a[aria-current=page]{color:var(--bright)}
nav a[aria-current=page]::before,nav a[aria-current=page]::after{color:var(--accent)}
.navToggle{display:none}

@media (max-width:720px){
  .top .wrap{height:52px;gap:var(--s2)}
  .brand b{font-size:13px;letter-spacing:.18em}
  nav{gap:0}
  nav a{padding:5px 6px;font-size:12px}
  nav a::before,nav a::after{display:none}
}

/* ---- buttons ----------------------------------------------------- */
.btn{
  display:inline-flex;align-items:center;gap:8px;
  font-family:var(--mono);font-size:14px;color:var(--txt);
  border:1px solid var(--line);border-radius:var(--r);
  padding:10px 18px;background:var(--panel);box-shadow:var(--edge);
  transition:border-color .15s var(--ease),color .15s var(--ease),
             background .15s var(--ease),transform .15s var(--ease);
}
.btn:hover{color:var(--bright);border-color:#3a3a3a;background:#151515;transform:translateY(-1px)}
.btn .arw{color:var(--dimmer);transition:transform .18s var(--ease),color .15s var(--ease)}
.btn:hover .arw{transform:translateX(3px);color:var(--accent)}
.btn.primary{
  border-color:var(--accent-dim);color:var(--bright);
  background:linear-gradient(180deg,#1a1626,#131020);
}
.btn.primary:hover{border-color:var(--accent);background:linear-gradient(180deg,#221c33,#171327)}
.btn.primary .arw{color:var(--accent)}
.btn.ghost{background:transparent}
.btns{display:flex;flex-wrap:wrap;gap:var(--s2)}

/* ---- hero -------------------------------------------------------- */
.hero{padding:var(--s7) 0 var(--s6)}
.hero .mark{width:min(430px,78vw);margin-bottom:var(--s4);opacity:.98}
.hero h1{max-width:25ch}
.hero .lead{margin-top:var(--s4);max-width:52ch}
.hero .btns{margin-top:var(--s5)}

/* ---- the framed screenshot -------------------------------------- */
/* A screenshot dropped straight onto the page reads as a stray picture.
   In a frame with a title bar it reads as the application it is. */
.shot{
  border:1px solid var(--line);border-radius:6px;overflow:hidden;
  background:var(--panel2);box-shadow:var(--lift);
}
.shot .bar{
  display:flex;align-items:center;gap:7px;height:30px;padding:0 12px;
  border-bottom:1px solid var(--line2);background:var(--panel);
  font-family:var(--mono);font-size:11px;color:var(--dim);
}
.shot .dot{width:8px;height:8px;border-radius:50%;background:#232323;flex:0 0 auto}
.shot .bar span{margin-left:8px;letter-spacing:.04em}
.shot img{display:block;width:100%}
.shot.plain{border-radius:4px}
figure{margin:0}
figcaption{
  font-family:var(--mono);font-size:12px;color:var(--dim);
  margin-top:10px;line-height:1.5;
}

.bleed{margin-top:var(--s5)}

/* ---- cards ------------------------------------------------------- */
.card{
  border:1px solid var(--line2);border-radius:var(--r);background:var(--panel2);
  padding:var(--s4);box-shadow:var(--edge);
  transition:border-color .16s var(--ease),background .16s var(--ease),
             transform .16s var(--ease);
}
.card h3{margin-bottom:10px}
.card p{color:var(--dim);font-size:15px}
a.card:hover{border-color:#333;background:var(--panel);transform:translateY(-2px)}
a.card:hover h3{color:var(--accent)}

/* A numbered feature row: mono index, then the point. */
.pts{display:grid;gap:var(--s5);counter-reset:pt}
.pt{display:grid;grid-template-columns:44px 1fr;gap:var(--s3);align-items:start}
.pt::before{
  counter-increment:pt;content:counter(pt,decimal-leading-zero);
  font-family:var(--mono);font-size:12px;color:var(--dim);
  padding-top:5px;letter-spacing:.06em;
}
.pt h3{margin-bottom:8px}
.pt p{color:var(--dim);font-size:15px;max-width:60ch}
@media (max-width:600px){.pt{grid-template-columns:1fr;gap:var(--s2)}}

/* ---- specs table ------------------------------------------------- */
.spec{width:100%;border-collapse:collapse;font-size:14px}
.spec th,.spec td{
  text-align:left;padding:11px 0;border-bottom:1px solid var(--line2);
  vertical-align:top;
}
.spec th{
  font-family:var(--mono);font-weight:400;color:var(--dim);width:34%;
  font-size:13px;padding-right:var(--s3);
}
.spec td{color:var(--txt)}
.spec tr:last-child th,.spec tr:last-child td{border-bottom:0}

/* ---- code sample ------------------------------------------------- */
pre{
  font-family:var(--mono);font-size:13px;line-height:1.75;max-width:100%;
  background:var(--panel2);border:1px solid var(--line2);border-radius:var(--r);
  padding:var(--s4);overflow-x:auto;margin:0;color:var(--txt);
  box-shadow:var(--edge);
}
pre code{background:none;border:0;padding:0;white-space:pre;color:inherit;font-size:inherit}
pre .c{color:#7f7f7f}           /* comment — dim, but still readable */
pre .k{color:var(--accent)}      /* the engine's own calls */
pre .s{color:#9a9a9a}            /* string */

/* ---- games ------------------------------------------------------- */
.game{
  display:grid;grid-template-columns:1.15fr 1fr;gap:var(--s5);align-items:center;
}
.game>*{min-width:0}
.game.flip{grid-template-columns:1fr 1.15fr}
.game.flip .txt{order:2}
@media (max-width:900px){
  .game,.game.flip{grid-template-columns:1fr}
  .game.flip .txt{order:0}
}
.game .txt h2{margin-bottom:var(--s3)}
.meta{display:flex;flex-wrap:wrap;gap:var(--s1) var(--s3);margin:var(--s3) 0 var(--s4)}
.meta span{font-family:var(--mono);font-size:12px;color:var(--dim)}
.meta span b{color:var(--dim);font-weight:400}

.soon{
  border:1px dashed var(--line);border-radius:var(--r);
  padding:var(--s5) var(--s4);text-align:center;color:var(--dim);
  font-family:var(--mono);font-size:13px;
}

/* ---- callout ----------------------------------------------------- */
.note{
  border-left:2px solid var(--accent-dim);background:var(--accent-bg);
  padding:var(--s3) var(--s4);border-radius:0 var(--r) var(--r) 0;
  font-size:15px;color:var(--dim);
}
.note strong{color:var(--txt)}

/* ---- footer ------------------------------------------------------ */
footer{border-top:1px solid var(--line2);padding:var(--s5) 0;margin-top:var(--s6)}
footer .wrap{display:flex;flex-wrap:wrap;gap:var(--s4);align-items:center}
footer .fbrand{display:flex;align-items:center;gap:10px;margin-right:auto}
footer .fbrand img{width:20px;height:20px;opacity:.8}
footer small{font-family:var(--mono);font-size:12px;color:var(--dim);line-height:1.7}
footer nav a{font-size:12px}

/* ---- scroll reveal ---------------------------------------------- *
   Hand-rolled: one IntersectionObserver and a transform. A library for
   this would be more code than the thing it does. Anything not yet
   revealed is still in the DOM and still readable — if the script never
   runs, the .on class is applied by the no-js rule below.
   ------------------------------------------------------------------ */
/* Hidden only once the head script has confirmed scripting is on. The
   other way round — hide by default, reveal with JS — leaves a page with
   no JavaScript permanently blank, which is a high price for a fade. */
html.js .rise{opacity:0;transform:translateY(14px);
      transition:opacity .55s var(--ease),transform .55s var(--ease)}
html.js .rise.on{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){
  html.js .rise{opacity:1;transform:none;transition:none}
}
