/* PrintLogic showcase — shared styles. System fonts only (no third-party font hosts). */
:root {
  --bg: #f4f2ee;
  --surface: #ffffff;
  --ink: #1d1d1b;
  --muted: #6b6a66;
  --line: #e3e0da;
  --accent: #0b5d4b;
  --stage-a: #ffffff;
  --stage-b: #e9e6e0;
  --shadow: rgba(40, 35, 25, 0.28);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151514;
    --surface: #1e1e1c;
    --ink: #f1efe9;
    --muted: #a19f99;
    --line: #2e2d2a;
    --accent: #5cc8a8;
    --stage-a: #2a2a27;
    --stage-b: #161615;
    --shadow: rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0;
}
.brand { font-weight: 700; letter-spacing: 0.02em; text-decoration: none; font-size: 18px; }
.brand span { color: var(--accent); }
nav.site a { text-decoration: none; color: var(--muted); margin-left: 22px; font-size: 15px; }
nav.site a:hover { color: var(--ink); }

/* ---- Stage: the render on a soft backdrop with a floor shadow ---- */
.stage {
  position: relative;
  border-radius: 20px;
  background: radial-gradient(120% 90% at 50% 35%, var(--stage-a) 0%, var(--stage-b) 100%);
  overflow: hidden;
  display: grid; place-items: center;
}
.stage img { /* fills the stage exactly; contain = never cropped, whatever the render's shape */
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: contain; padding: 3% 0;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.12));
}
.stage::after { /* contact shadow under the object */
  content: ''; position: absolute; z-index: 0;
  left: 22%; right: 22%; bottom: 9%; height: 7%;
  background: radial-gradient(closest-side, var(--shadow), transparent);
  filter: blur(6px);
}

/* ---- Overview ---- */
.intro { padding: 40px 0 28px; max-width: 720px; }
.intro h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.08; margin: 0 0 14px; letter-spacing: -0.02em; }
.intro p { color: var(--muted); font-size: 18px; margin: 0; }
.grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  padding-bottom: 64px;
}
.card { text-decoration: none; display: block; }
.card .stage { aspect-ratio: 4 / 3; transition: transform 0.25s ease; }
.card:hover .stage { transform: translateY(-3px); }
.card h2 { font-size: 19px; margin: 14px 2px 2px; }
.card p { margin: 0 2px; color: var(--muted); font-size: 14px; }

/* ---- Project page ---- */
.hero { padding: 8px 0 0; }
.hero .stage { aspect-ratio: 16 / 10; max-height: 76vh; width: 100%; }
.head { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); padding: 36px 0 12px; }
@media (max-width: 760px) { .head { grid-template-columns: 1fr; gap: 12px; } }
.kicker { color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 8px; }
.head h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
.story { color: var(--ink); font-size: 18px; white-space: pre-line; margin: 0; }
.story.empty { color: var(--muted); font-style: italic; }

section.block { padding: 40px 0; border-top: 1px solid var(--line); margin-top: 28px; }
section.block h3 { font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
section.block > p { color: var(--muted); margin: 0 0 20px; max-width: 640px; }
.sheets { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.sheet { flex: 0 0 auto; scroll-snap-align: start; margin: 0; }
.sheet .crop {
  position: relative; overflow: hidden; height: 240px;
  border-radius: 4px; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 28px rgba(0,0,0,.10);
}
.sheet .crop img { position: absolute; max-width: none; height: auto; display: block; }
.sheet .crop.whole { aspect-ratio: 4 / 3; }
.sheet .crop.whole img { position: static; width: 100%; height: 100%; object-fit: contain; }
.sheet figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.sheet .sides { display: flex; gap: 10px; }
.sheet .side-label { font-size: 12px; color: var(--muted); margin-top: 6px; letter-spacing: 0.04em; text-transform: uppercase; }
.sheet .crop.whole[style] { aspect-ratio: auto; }

footer.site { border-top: 1px solid var(--line); padding: 28px 0 48px; color: var(--muted); font-size: 14px; }
.back { display: inline-block; margin: 6px 0 14px; color: var(--muted); text-decoration: none; font-size: 15px; }
.back:hover { color: var(--ink); }
.notfound { padding: 80px 0; text-align: center; color: var(--muted); }

/* ---- 3D in the hero (BoxLogic public viewer) ---- */
.slot-3d { position: absolute; inset: 0; z-index: 2; }
.stage.is-3d > img { visibility: hidden; }
.stage.is-3d::after { display: none; } /* the viewer draws its own floor */
.slot-3d { cursor: grab; }
.slot-3d:active { cursor: grabbing; }
.hint-3d { /* fades away after the first drag or a few seconds */
  position: absolute; z-index: 3; left: 50%; top: 16px; transform: translateX(-50%);
  font-size: 13px; color: var(--ink); background: color-mix(in srgb, var(--bg) 82%, transparent);
  padding: 6px 12px; border-radius: 999px; pointer-events: none;
  transition: opacity 0.6s ease; backdrop-filter: blur(6px);
}
.hint-3d.gone { opacity: 0; }
/* Folding is opt-in per project (PL Settings → Showcase). Hides BL v0.2.0's fold bar until the
   viewer takes a fold:false option itself. */
.stage.no-fold .blv-bar { display: none; }

/* "Made of" line under the project title */
.made-of { margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: baseline; font-size: 15px; }
.made-of-k { color: var(--muted); margin-right: 2px; }
.made-of-v { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; }
