/* ============================================================================
   exidex.dev showcase — shared product-page stylesheet
   Served at /_showcase/style.css. Fonts served from /_showcase/fonts/.

   Any .exidex/index.html that links this file and uses the vocabulary below
   inherits the portfolio's retro desktop-OS look (PostHog-derived tokens —
   see portfolio/DESIGN_SYSTEM.md). Light mode; the page is a floating
   "window" sitting on the paper-grain wallpaper, exactly like the portfolio.

   CLASS VOCABULARY (all prefixed `sc-` so it never collides with app CSS)

   Shell
     body.sc-desk          wallpaper + grain; centers the window
     .sc-window            the floating window (border, hard offset shadow)
     .sc-titlebar          window title bar. Children:
       .sc-titlebar-dots   three window dots — needs one child:
                           <div class="sc-titlebar-dots"><span></span></div>
       .sc-titlebar-name   filename label, e.g. "liverics.mdx" (monospace)
       .sc-titlebar-end    right cluster: put .sc-accent-dot and .sc-close here
       .sc-accent-dot      small project-accent dot (matches its portfolio tile)
       .sc-close           the × — an <a href="https://exidex.dev/">, closing
                           the window returns to the desktop
     .sc-body              content column (padding, measure, typography)

   Content (inside .sc-body, plain HTML is pre-styled: h2 h3 p a table ol ul
   li code strong hr get the house look for free)
     .sc-kicker            small caps eyebrow, e.g. "PRODUCT · LIVERICS"
     .sc-title             the product name (h1)
     .sc-tagline           one-line pitch under the title
     .sc-demo              16:9 demo frame — put a <video>, <img>, <iframe>
                           inside; text-only content renders as a placeholder
     .sc-pills > .sc-pill  facts-at-a-glance chips
     .sc-actions           horizontal row for buttons
     .sc-btn               hardware button (press mechanics). Variants:
                           .sc-btn--primary (red) .sc-btn--cta (gold)
                           .sc-btn--secondary (paper)
     .sc-marker            inline highlighter emphasis
     .sc-footer            muted small print at the bottom

   Personality: set `--accent` on <html> or <body>
   (e.g. <body class="sc-desk" style="--accent:#B62AD9">). Default is brand
   red. It drives the accent dot, kicker, h2 ticks, link hovers and the
   focus ring — one variable, zero drift. Because it colors text, keep it
   ≥4.5:1 against #FDFDF8 — the dark-enough brand accents are red #F54E00,
   blue #2F80FA, purple #B62AD9, green #6AA84F, pink #E34C6F, navy #1E2F46.
   (Gold/teal/yellow are tile-dot colors only; don't use them here.)
   ========================================================================= */

/* ---- fonts (same files the portfolio bundles) --------------------------- */
@font-face {
  font-family: 'IBM Plex Sans Variable';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/_showcase/fonts/ibm-plex-sans-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+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans Variable';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/_showcase/fonts/ibm-plex-sans-latin-ext-wght-normal.woff2')
    format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/_showcase/fonts/source-code-pro-latin-400-normal.woff2')
    format('woff2');
}
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/_showcase/fonts/source-code-pro-latin-600-normal.woff2')
    format('woff2');
}

/* ---- tokens (verbatim from the portfolio design system) ----------------- */
:root {
  --light-1: #fdfdf8;
  --light-2: #eeefe9;
  --light-3: #e5e7e0;
  --light-4: #d2d3cc;
  --light-5: #c8cac1;
  --light-6: #bfc1b7;
  --light-7: #b6b7af;
  --light-9: #73756b;
  --light-11: #4d4f46;
  --light-12: #23251d;

  --red: #f54e00;
  --orange: #eb9d2a;
  --gold: #ffba53;
  --highlight: rgba(235, 157, 42, 0.2);
  --button-border: #b17816;
  --button-shadow: #cd8407;

  --accent: var(--red); /* per-project override point */

  --font-sans: 'IBM Plex Sans Variable', 'IBM Plex Sans', -apple-system,
    BlinkMacSystemFont, sans-serif;
  --font-code: 'Source Code Pro', Menlo, Consolas, monospace;
}

/* ---- dark theme (shared with portfolio; see shared/tokens.css) ----------- */
html[data-theme='dark'] {
  --light-1: #1e201a;
  --light-2: #282a24;
  --light-3: #141612;
  --light-4: #34362f;
  --light-5: #3e4038;
  --light-6: #4a4c44;
  --light-7: #56584f;
  --light-8: #3a3c35;
  --light-9: #9a9c92;
  --light-10: #7e8076;
  --light-11: #c4c6bc;
  --light-12: #f0f1ea;
  --highlight: rgba(235, 157, 42, 0.28);
  color-scheme: dark;
}

/* ---- shell --------------------------------------------------------------- */
.sc-desk {
  margin: 0;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(16px, 4vw, 56px) clamp(10px, 3vw, 40px) clamp(40px, 7vw, 96px);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--light-12);
  background-color: var(--light-3);
  /* paper-grain wallpaper, same recipe as the portfolio's .wallpaper-noise */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.34'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
}
.sc-desk *,
.sc-desk *::before,
.sc-desk *::after {
  box-sizing: border-box;
}

.sc-window {
  width: 100%;
  max-width: 880px;
  background: var(--light-1);
  border: 1px solid rgba(35, 37, 29, 0.9);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.15);
}

/* title bar — gradient band, monospace filename, hard bottom border */
.sc-titlebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 38px;
  padding: 0 10px;
  border-bottom: 1px solid rgba(35, 37, 29, 0.9);
  background: linear-gradient(to bottom, var(--light-1), var(--light-4));
}
.sc-titlebar-dots {
  display: flex;
  gap: 5px;
}
.sc-titlebar-dots::before,
.sc-titlebar-dots::after,
.sc-titlebar-dots span {
  content: '';
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  background: var(--light-5);
  border: 1px solid rgba(35, 37, 29, 0.35);
}
.sc-titlebar-name {
  font-family: var(--font-code);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--light-12);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60vw;
}
.sc-titlebar-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.sc-accent-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--accent);
  border: 1px solid rgba(35, 37, 29, 0.3);
}
.sc-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 2px;
  font-size: 15px;
  line-height: 1;
  color: var(--light-12);
  text-decoration: none;
  transition: background-color 80ms ease, color 80ms ease;
}
.sc-close:hover {
  background: var(--red);
  color: #fff;
}

/* content column */
.sc-body {
  padding: clamp(28px, 5vw, 48px) clamp(20px, 6vw, 72px)
    clamp(36px, 6vw, 64px);
}

/* ---- masthead ------------------------------------------------------------ */
.sc-kicker {
  margin: 0 0 14px;
  font-family: var(--font-code);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--light-9);
}
.sc-kicker::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 9999px;
  background: var(--accent);
  border: 1px solid rgba(35, 37, 29, 0.3);
  vertical-align: baseline;
}
.sc-title {
  margin: 0 0 8px;
  font-size: clamp(30px, 5.5vw, 42px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.sc-tagline {
  margin: 0 0 28px;
  max-width: 34em;
  font-size: 18px;
  line-height: 1.5;
  color: var(--light-11);
}

/* ---- pre-styled semantic HTML inside .sc-body ---------------------------- */
.sc-body h2 {
  margin: 40px 0 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.sc-body h2::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  background: var(--accent);
  border: 1px solid rgba(35, 37, 29, 0.3);
  border-radius: 2px;
  vertical-align: 0.08em;
}
.sc-body h3 {
  margin: 24px 0 8px;
  font-size: 16px;
  font-weight: 700;
}
.sc-body p {
  margin: 0 0 14px;
  max-width: 42em;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--light-11);
}
.sc-body a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 80ms ease;
}
.sc-body a:hover {
  color: var(--accent);
}
.sc-body code {
  font-family: var(--font-code);
  font-size: 0.86em;
  background: var(--light-2);
  border: 1px solid var(--light-5);
  border-radius: 2px;
  padding: 0.08em 0.35em;
}
.sc-body pre {
  overflow-x: auto;
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--light-2);
  border: 1px solid var(--light-12);
  font-family: var(--font-code);
  font-size: 13.5px;
  line-height: 1.55;
}
.sc-body pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}
.sc-body ol,
.sc-body ul {
  margin: 0 0 14px;
  padding-left: 22px;
  color: var(--light-11);
  font-size: 15.5px;
}
.sc-body li {
  margin: 5px 0;
}
.sc-body li::marker {
  color: var(--light-9);
  font-weight: 600;
}
.sc-body hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--light-4);
}
.sc-body strong {
  color: var(--light-12);
}

/* tables — light-2 header band, hard thin rules, hover tint */
.sc-body table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
  border: 1px solid var(--light-12);
  font-size: 14.5px;
}
.sc-body th {
  background: var(--light-2);
  text-align: left;
  font-weight: 600;
  color: var(--light-11);
  padding: 8px 12px;
  border-bottom: 1px solid var(--light-12);
}
.sc-body td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--light-4);
  color: var(--light-11);
}
.sc-body tr:last-child td {
  border-bottom: 0;
}
.sc-body tbody tr {
  transition: background-color 80ms ease;
}
.sc-body tbody tr:hover {
  background: var(--light-2);
}
@media (max-width: 640px) {
  /* wide tables scroll inside the window instead of bleeding out of it */
  .sc-body table {
    display: block;
    overflow-x: auto;
  }
}

/* ---- components ----------------------------------------------------------- */

/* demo frame: 16:9, framed like a window pane. Media children fill it;
   text-only content reads as a labelled placeholder slot. */
.sc-demo {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* faint diagonal stripes read "reserved slot"; media children cover them */
  background: repeating-linear-gradient(
    -45deg,
    var(--light-2) 0 14px,
    #e9eae3 14px 28px
  );
  border: 1px solid var(--light-12);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
  color: var(--light-11);
  font-family: var(--font-code);
  font-size: 13.5px;
}
.sc-demo > video,
.sc-demo > img,
.sc-demo > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

/* fact pills — match the portfolio tile's stack chips */
.sc-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}
.sc-pill {
  font-family: var(--font-code);
  font-size: 11.5px;
  color: var(--light-11);
  background: var(--light-1);
  border: 1px solid var(--light-5);
  border-radius: 2px;
  padding: 2px 8px;
}

/* hardware buttons — raised sticker shadow, press to flatten */
.sc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 24px 0 8px;
}
.sc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  color: var(--light-12);
  background: var(--light-1);
  border: 1.5px solid var(--button-border);
  box-shadow: 0 2px 0 0 var(--button-shadow);
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.sc-btn:hover {
  transform: translateY(1px);
  box-shadow: 0 1px 0 0 var(--button-shadow);
  color: var(--light-12);
}
.sc-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}
.sc-btn--primary {
  background: var(--red);
  color: #fff;
}
.sc-btn--primary:hover {
  color: #fff;
}
.sc-btn--cta {
  background: var(--gold);
}
.sc-btn--secondary {
  border-color: var(--orange);
  box-shadow: 0 2px 0 0 var(--light-7);
}
.sc-btn--secondary:hover {
  box-shadow: 0 1px 0 0 var(--light-7);
}

/* inline highlighter */
.sc-marker {
  background: var(--highlight);
  padding: 0.08em 0.05em;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* footer small print */
.sc-footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--light-4);
  font-size: 13.5px;
  color: var(--light-9);
}
.sc-footer a {
  color: inherit;
}

/* ---- quality floor -------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
::selection {
  background: var(--highlight);
}
@media (prefers-reduced-motion: reduce) {
  .sc-desk *,
  .sc-desk *::before,
  .sc-desk *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
