/* ============================================================
   NSCM — wordless visual instruction posters
   Cream bg matching the generated illustrations · Lexend type
   Minimal chrome — the images are the content.
   ============================================================ */

:root{
  --bg:#fbf8f1;
  --ink:#2a1b3d;
  --ink-soft:#6d6280;
  --line:rgba(42,27,61,.12);
  --purple:#5a2d82;
  --purple-soft:#ece1f6;
  --gold:#e8b50a;
  --gold-soft:#fbeec0;
  --radius:18px;
  --maxw:1240px;
  --ease:cubic-bezier(.22,.61,.36,1);
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:"Lexend",system-ui,sans-serif;
  font-weight:500;
  color:var(--ink);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  line-height:1.45;
}
img{display:block;max-width:100%;height:auto}
a{color:var(--purple);text-decoration:none}
a:hover{text-decoration:underline}
.wrap{width:min(var(--maxw),94vw);margin-inline:auto}

/* ---- top bar (minimal) ---- */
.topbar{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 0 14px;
}
.brand{display:inline-flex;align-items:center;gap:10px;font-weight:700;color:var(--ink)}
.pebbles{display:inline-flex;align-items:flex-end;gap:3px}
.pebbles i{display:block;border-radius:50%;background:var(--purple)}
.pebbles i:nth-child(1){width:16px;height:16px}
.pebbles i:nth-child(2){width:11px;height:11px;opacity:.78}
.pebbles i:nth-child(3){width:7px;height:7px;opacity:.55}
.brand small{display:block;font-weight:500;font-size:.7rem;letter-spacing:.18em;text-transform:uppercase;color:var(--ink-soft);margin-top:1px}
.brand .word{display:flex;flex-direction:column;line-height:.95}

.back{
  display:inline-flex;align-items:center;gap:.4rem;
  font-weight:600;font-size:.92rem;color:var(--purple);
  padding:.55rem .9rem;border:1px solid var(--line);
  border-radius:999px;background:#fff;
  transition:border-color .25s,box-shadow .25s,transform .25s;
}
.back:hover{border-color:var(--purple);text-decoration:none;transform:translateY(-1px);box-shadow:0 8px 18px -8px rgba(90,45,130,.4)}

/* ---- version toggle pill ---- */
.toggle{display:inline-flex;background:#fff;border:1px solid var(--line);border-radius:999px;padding:4px;gap:2px;align-items:center}
.toggle button{
  border:0;background:transparent;cursor:pointer;
  font-family:"Lexend";font-weight:600;font-size:.85rem;color:var(--ink-soft);
  padding:.5rem 1rem;border-radius:999px;transition:all .25s;
}
.toggle button[aria-pressed="true"]{background:var(--purple);color:#fff;box-shadow:0 4px 12px -4px rgba(90,45,130,.5)}
.toggle button:hover:not([aria-pressed="true"]){color:var(--ink)}

/* ---- task page: 8-step grid ---- */
.steps{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
  padding:6px 0 32px;
  position:relative;
}
.step{
  position:relative;
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  aspect-ratio:1/1;
  box-shadow:0 4px 14px -8px rgba(42,27,61,.15);
  transition:transform .35s var(--ease),box-shadow .35s var(--ease);
}
.step:hover{transform:translateY(-4px);box-shadow:0 16px 36px -16px rgba(42,27,61,.3)}
.step img{width:100%;height:100%;object-fit:cover}
.step .num{
  position:absolute;top:12px;left:12px;
  width:44px;height:44px;border-radius:50%;
  background:var(--purple);color:#fff;
  display:grid;place-items:center;
  font-family:"Lexend";font-weight:800;font-size:1.15rem;
  box-shadow:0 6px 16px -6px rgba(90,45,130,.7);
  border:3px solid var(--bg);
}
.step:nth-child(8) .num{background:var(--gold);color:#2a1b3d}

/* arrows between steps (between cards on desktop) */
.step::after{
  content:"";
  position:absolute;
  top:50%;right:-14px;
  width:22px;height:22px;
  background-color:var(--purple);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M13 5l7 7-7 7-1.4-1.4L17.2 12 11.6 6.4z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M13 5l7 7-7 7-1.4-1.4L17.2 12 11.6 6.4z'/%3E%3C/svg%3E") center/contain no-repeat;
  transform:translateY(-50%);
  opacity:.55;
  z-index:2;
}
.steps .step:nth-child(4n)::after,
.steps .step:last-child::after{display:none}
/* row-end → down arrow (card 4) */
.steps .step:nth-child(4):not(:last-child)::after{
  display:block;top:auto;right:50%;bottom:-14px;left:auto;
  transform:translateX(50%) rotate(90deg);
}

/* ---- task page header (small, optional) ---- */
.task-head{
  display:flex;align-items:center;justify-content:space-between;gap:1rem;
  padding:8px 0 22px;
}
.task-name{display:flex;align-items:center;gap:14px}
.task-name .ico{
  width:64px;height:64px;border-radius:18px;background:var(--purple);color:#fff;
  display:grid;place-items:center;font-size:34px;line-height:1;
}
.task-name h1{font-family:"Lexend";font-weight:700;font-size:1.55rem;line-height:1;letter-spacing:-.01em}
.task-name p{margin-top:4px;color:var(--ink-soft);font-size:.92rem}

/* ---- index gallery ---- */
.idx-hero{padding:36px 0 12px;display:flex;justify-content:space-between;align-items:flex-end;flex-wrap:wrap;gap:18px}
.idx-hero h1{font-family:"Lexend";font-weight:700;font-size:clamp(1.9rem,4vw,2.6rem);line-height:1.05}
.idx-hero p{margin-top:.5rem;color:var(--ink-soft);font-size:1.05rem;max-width:60ch}
.gallery{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:18px;padding:18px 0 64px;
}
.tile{
  display:block;
  background:#fff;border:1px solid var(--line);border-radius:var(--radius);
  overflow:hidden;text-decoration:none;color:var(--ink);
  transition:transform .35s var(--ease),box-shadow .35s var(--ease);
}
.tile:hover{transform:translateY(-5px);box-shadow:0 22px 50px -22px rgba(42,27,61,.3);text-decoration:none}
.tile .thumb{
  aspect-ratio:1/1;background:var(--bg);position:relative;overflow:hidden;
}
.tile .thumb img{width:100%;height:100%;object-fit:cover;transition:transform .6s var(--ease)}
.tile:hover .thumb img{transform:scale(1.04)}
.tile .meta{padding:14px 16px 16px;display:flex;justify-content:space-between;align-items:center;gap:10px}
.tile .meta h2{font-family:"Lexend";font-weight:700;font-size:1.1rem;line-height:1.15}
.tile .meta .arr{
  width:34px;height:34px;border-radius:50%;background:var(--purple-soft);color:var(--purple);
  display:grid;place-items:center;flex-shrink:0;transition:background .25s,color .25s;
}
.tile:hover .meta .arr{background:var(--purple);color:#fff}

/* ---- pager between guides ---- */
.pager{display:flex;justify-content:space-between;gap:.6rem;padding:8px 0 20px}

/* ---- minimal footer ---- */
.minfoot{padding:24px 0 40px;color:var(--ink-soft);font-size:.85rem;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:.5rem;border-top:1px solid var(--line)}

/* ---- utilities ---- */
.hidden{display:none !important}

/* ---- responsive ---- */
@media(max-width:1000px){
  .steps{grid-template-columns:repeat(2,1fr);gap:14px}
  .step::after{display:none !important}
  .step .num{width:38px;height:38px;font-size:1rem}
}
@media(max-width:520px){
  body{font-size:16px}
  .gallery{grid-template-columns:1fr 1fr;gap:12px}
  .tile .meta h2{font-size:.95rem}
  .task-name .ico{width:54px;height:54px;font-size:28px}
}

/* ---- print: each task page prints as a single sheet of 8 images ---- */
@page{ size: A4 landscape; margin: 8mm; }
@media print{
  .topbar,.task-head,.minfoot,.back,.toggle{display:none !important}
  body{background:#fff}
  .steps{grid-template-columns:repeat(4,1fr);gap:8px}
  .step{break-inside:avoid;box-shadow:none;border:1px solid #ddd}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none !important;animation:none !important}
}
