:root {
  --yellow: #EEBB1C;
  --ink: #231F20;
  --paper: #FFFFFF;
  --panel: #2E2A2B;
  --line: #4A4546;
  --sel: #2F7BF5;
  --bar: 64px;
  --rule: 20px;
  --ease: cubic-bezier(.2, .75, .2, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + var(--rule)); }
body { font-family: "HE Sans", system-ui, sans-serif; color: var(--ink); background: var(--ink); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sel); outline-offset: 3px; }

.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--bar);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px;
  padding: 0 28px; background: var(--ink); color: var(--paper);
}
.bar-logo img { height: 38px; width: auto; }
.bar-nav { display: flex; gap: 28px; justify-content: flex-end; font-size: 17px; }
.bar-nav a { opacity: .75; transition: opacity .2s, color .2s; }
.bar-nav a:hover, .bar-nav a.on { opacity: 1; color: var(--yellow); }
.bar-social { display: flex; gap: 18px; }
.bar-social a { width: 19px; height: 19px; opacity: .75; transition: opacity .2s, color .2s; }
.bar-social a:hover { opacity: 1; color: var(--yellow); }
.bar-social svg { width: 100%; height: 100%; fill: currentColor; }

.ruler { position: fixed; z-index: 40; background: #F6F3EC; overflow: hidden; pointer-events: none; color: #6b6566; font-size: 9px; }
.ruler-x {
  top: var(--bar); left: var(--rule); right: 0; height: var(--rule); border-bottom: 1px solid #d8d3c8;
  background-image:
    linear-gradient(90deg, #8d8788 1px, transparent 1px),
    linear-gradient(90deg, #b9b3b4 1px, transparent 1px);
  background-size: 100px 100%, 10px 6px;
  background-repeat: repeat-x;
  background-position: 0 0, 0 100%;
}
.ruler-y {
  top: calc(var(--bar)); left: 0; bottom: 0; width: var(--rule); border-right: 1px solid #d8d3c8;
  background-image:
    linear-gradient(180deg, #8d8788 1px, transparent 1px),
    linear-gradient(180deg, #b9b3b4 1px, transparent 1px);
  background-size: 100% 100px, 6px 10px;
  background-repeat: repeat-y;
  background-position: 0 var(--rule), 100% var(--rule);
}
.ruler-x b { position: absolute; top: 2px; font-weight: 400; transform: translateX(3px); }
.ruler-y b { position: absolute; left: 2px; font-weight: 400; writing-mode: vertical-rl; transform: rotate(180deg) translateX(-1px); }
.ruler-mark { position: absolute; background: var(--sel); opacity: 0; transition: opacity .2s; }
.ruler-x .ruler-mark { top: 0; bottom: 0; width: 1px; }
.ruler-y .ruler-mark { left: 0; right: 0; height: 1px; }
.ruler.live .ruler-mark { opacity: 1; }

main { padding-top: calc(var(--bar) + var(--rule)); padding-left: var(--rule); }

.hero {
  position: relative; min-height: calc(100vh - var(--bar) - var(--rule)); padding: 80px 24px 110px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background-color: var(--yellow);
  background-image:
    linear-gradient(rgba(35,31,32,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35,31,32,.06) 1px, transparent 1px);
  background-size: 40px 40px;
  overflow: hidden;
}
.sel { --s: 1; --tr: -0.02em; --lh: .92; position: relative; display: inline-block; padding: 22px 34px 26px; touch-action: none; }
.sel::before {
  content: ""; position: absolute; inset: 0; border: 1.5px solid var(--sel); pointer-events: none;
  clip-path: inset(0 100% 100% 0); transition: clip-path 1s var(--ease-io) .35s;
}
.sel-text {
  font-size: calc(clamp(58px, 11.5vw, 184px) * var(--s)); line-height: var(--lh); letter-spacing: var(--tr);
  font-weight: 700; color: var(--ink); user-select: none; -webkit-user-select: none; white-space: nowrap;
}
.sel-size {
  position: absolute; left: 50%; top: calc(100% + 12px); transform: translateX(-50%);
  background: var(--sel); color: #fff; font-size: 12px; line-height: 1; padding: 6px 9px; border-radius: 4px; white-space: nowrap;
  opacity: 0; transition: opacity .4s ease 1.3s; font-variant-numeric: tabular-nums;
}
.h {
  position: absolute; width: 12px; height: 12px; background: #fff; border: 1.5px solid var(--sel);
  transform: translate(-50%, -50%) scale(0); transition: transform .35s var(--ease); touch-action: none; z-index: 2;
}
.h::after { content: ""; position: absolute; inset: -12px; }
.tl { left: 0; top: 0; cursor: nwse-resize; } .tm { left: 50%; top: 0; cursor: ns-resize; } .tr { left: 100%; top: 0; cursor: nesw-resize; }
.ml { left: 0; top: 50%; cursor: ew-resize; } .mr { left: 100%; top: 50%; cursor: ew-resize; }
.bl { left: 0; top: 100%; cursor: nesw-resize; } .bm { left: 50%; top: 100%; cursor: ns-resize; } .br { left: 100%; top: 100%; cursor: nwse-resize; }
.sel.ready::before { clip-path: inset(0 0 0 0); }
.sel.ready .h { transform: translate(-50%, -50%) scale(1); }
.sel.ready .h:nth-of-type(2) { transition-delay: 1.05s; } .sel.ready .h:nth-of-type(3) { transition-delay: 1.1s; }
.sel.ready .h:nth-of-type(4) { transition-delay: 1.15s; } .sel.ready .h:nth-of-type(5) { transition-delay: 1.2s; }
.sel.ready .h:nth-of-type(6) { transition-delay: 1.25s; } .sel.ready .h:nth-of-type(7) { transition-delay: 1.3s; }
.sel.ready .h:nth-of-type(8) { transition-delay: 1.35s; } .sel.ready .h:nth-of-type(9) { transition-delay: 1.4s; }
.sel.ready .sel-size { opacity: 1; }
.sel.busy .h { transition-delay: 0s !important; }
.sel.busy .h.grab { transform: translate(-50%, -50%) scale(1.35); background: var(--sel); }
.sel.limit::before { border-color: #E5484D; }
.sel.limit .h { border-color: #E5484D; }
.sel.limit .sel-size { background: #E5484D; }
.sel.shake { animation: shake .5s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake { 15%, 85% { translate: -3px 0; } 30%, 70% { translate: 6px 0; } 45%, 55% { translate: -8px 0; } }
.sel-text { transition: color .2s; }
.fake-cursor {
  position: absolute; left: 0; top: 0; width: 26px; height: 26px; z-index: 5; pointer-events: none;
  fill: #fff; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round;
  opacity: 0; transition: transform 1s var(--ease-io), opacity .35s;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.3));
}
.fake-cursor.on { opacity: 1; }
.fake-cursor.follow { transition: opacity .35s; }
.fake-cursor path { transition: transform .2s; transform-origin: 4px 3px; }
.fake-cursor.press path { transform: scale(.85); }

.alert { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(35,31,32,.35); opacity: 0; transition: opacity .25s; }
.alert.open { opacity: 1; }
.alert[hidden] { display: none; }
.alert-box {
  width: min(440px, 100%); display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 22px 22px 18px;
  background: #fbfaf8; color: var(--ink); border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.4), 0 0 0 1px rgba(0,0,0,.08);
  transform: scale(.9) translateY(10px); transition: transform .35s var(--ease);
}
.alert.open .alert-box { transform: none; }
.alert-icon { position: relative; width: 56px; height: 56px; }
.alert-icon img { width: 56px; height: 56px; border-radius: 12px; background: var(--ink); padding: 8px; }
.alert-icon span {
  position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; display: grid; place-items: center;
  background: var(--yellow); color: var(--ink); font-weight: 700; font-size: 16px; border-radius: 50%; border: 2px solid #fbfaf8;
}
.alert-body h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.alert-body p { font-size: 15px; line-height: 1.45; color: #4b4647; }
.alert-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.alert-actions button { border: 1px solid #d6d1c8; background: #fff; border-radius: 6px; padding: 7px 18px; font-size: 15px; cursor: pointer; }
.alert-actions button.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.alert-actions button:hover { border-color: var(--ink); }

[data-type] .ch { visibility: hidden; }
[data-type] .ch.on, [data-type].typed .ch { visibility: visible; }
[data-type] .tcaret { display: none; width: .07em; height: .9em; background: var(--sel); vertical-align: -0.08em; margin-left: .04em; animation: blink .8s steps(1) infinite; }
[data-type].typing .tcaret { display: inline-block; }

.hero-sub { margin-top: 72px; font-size: clamp(18px, 2vw, 22px); color: var(--ink); }
.hint {
  position: absolute; left: calc(100% + 4px); top: calc(100% + 6px); width: 170px; text-align: left;
  font-size: 14px; line-height: 1.35; color: var(--sel); pointer-events: none;
  opacity: 0; transition: opacity .6s ease 1.9s;
}
.hint svg { display: block; width: 64px; height: 44px; margin-bottom: 4px; fill: none; stroke: var(--sel); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hint.show { opacity: 1; }
.hint.gone { opacity: 0 !important; transition-delay: 0s; }

.work { padding: 110px 28px 120px; color: var(--paper);
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.2px); background-size: 24px 24px; }
.work-head { max-width: 1320px; margin: 0 auto 48px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.work-head h2 { font-size: clamp(36px, 5vw, 64px); font-weight: 700; line-height: 1; }
.on-phone { display: none; }
.work-head p { max-width: 34ch; font-size: 17px; line-height: 1.5; color: rgba(255,255,255,.62); }
.desk { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }

.layers {
  position: sticky; top: calc(var(--bar) + var(--rule) + 24px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 12px 0 14px; font-size: 14px;
}
.layers-title { padding: 0 14px 10px; font-weight: 600; color: rgba(255,255,255,.9); border-bottom: 1px solid var(--line); }
.layers ul { list-style: none; padding: 6px 0; }
.layers li button {
  width: 100%; display: grid; grid-template-columns: 22px 10px 1fr auto; align-items: center; gap: 10px;
  background: none; border: 0; padding: 9px 14px; cursor: pointer; text-align: left; color: rgba(255,255,255,.88);
  transition: background .2s, color .2s;
}
.layers li button:hover { background: rgba(255,255,255,.06); }
.layers .eye { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.layers .eye .shut { display: none; }
.layers li button[aria-pressed="false"] { color: rgba(255,255,255,.38); }
.layers li button[aria-pressed="false"] .eye .open { display: none; }
.layers li button[aria-pressed="false"] .eye .shut { display: inline; }
.layers .chip { width: 10px; height: 10px; border-radius: 2px; }
[data-chip="yellow"] .chip { background: var(--yellow); }
[data-chip="white"] .chip { background: var(--paper); }
[data-chip="yellow-ring"] .chip { box-shadow: inset 0 0 0 2px var(--yellow); }
[data-chip="white-ring"] .chip { box-shadow: inset 0 0 0 2px var(--paper); }
[data-chip="yellow-half"] .chip { background: linear-gradient(135deg, var(--yellow) 50%, var(--paper) 50%); }
[data-chip="ink"] .chip { background: var(--ink); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }
.layers .count { font-size: 12px; color: rgba(255,255,255,.45); font-variant-numeric: tabular-nums; }
.arrange {
  display: block; width: calc(100% - 28px); margin: 8px 14px 0; padding: 10px 12px; cursor: pointer;
  background: var(--yellow); color: var(--ink); border: 0; border-radius: 4px; font-weight: 600; font-size: 15px;
  transition: background .2s;
}
.arrange:hover { background: #fff; }

.canvas { --cw: 300px; position: relative; min-height: 400px; transition: height .7s var(--ease-io); }
.canvas-empty { position: absolute; inset: 40px 0 auto; text-align: center; color: rgba(255,255,255,.55); font-size: 17px; display: none; }
.canvas.empty .canvas-empty { display: block; }
.print {
  position: absolute; left: 0; top: 0; width: var(--cw); padding: 0; border: 0; background: none; text-align: left; cursor: grab;
  transform-origin: 50% 50%; transition: transform .8s var(--ease-io), width .8s var(--ease-io), opacity .45s ease;
  touch-action: pan-y;
}
.print-name { display: block; font-size: 13px; color: rgba(255,255,255,.6); padding: 0 0 7px 2px; transition: color .2s; }
.print-paper {
  display: block; background: var(--paper); padding: 10px; aspect-ratio: 416 / 325;
  box-shadow: 0 18px 40px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.3);
  transition: box-shadow .3s, outline-color .2s; outline: 1.5px solid transparent; outline-offset: 4px;
}
.print-paper img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.print:hover .print-name, .print:focus-visible .print-name { color: var(--yellow); }
.print:hover .print-paper, .print:focus-visible .print-paper { outline-color: var(--yellow); }
.print:hover { z-index: 5; }
.print-paper { transition: box-shadow .3s, outline-color .2s, transform .35s var(--ease); }
.print:hover .print-paper { transform: scale(1.04); }
.print.dragging .print-paper { transform: scale(1.07); }
.print:focus-visible { outline: none; }
.print.dragging { cursor: grabbing; transition: opacity .45s ease; }
.print.dragging .print-paper { box-shadow: 0 34px 70px rgba(0,0,0,.55), 0 4px 10px rgba(0,0,0,.3); }
.print.off { opacity: 0; pointer-events: none; }
.print.drop { animation: drop .9s var(--ease) both; animation-delay: var(--dd, 0s); }
@keyframes drop { from { opacity: 0; translate: 0 -60px; } to { opacity: 1; translate: 0 0; } }

.about {
  position: relative; padding: 40px 28px 140px; color: var(--ink); overflow-x: clip;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.2px); background-size: 24px 24px;
}
.board {
  position: relative; max-width: 1240px; margin: 0 auto; background: var(--paper); padding: 56px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  transition: transform 1s var(--ease), opacity .8s ease;
}
.board.pre { opacity: 0; transform: translateY(60px) scale(.98); }
.placed { position: relative; margin: 0; outline: none; }
.placed img { width: 100%; height: auto; aspect-ratio: 1100 / 1341; object-fit: contain; transition: transform 1.2s var(--ease); }
.placed:hover img { transform: scale(1.02); }
.about-text { max-width: 540px; padding-top: 8px; }
.about h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1; font-weight: 700; margin-bottom: 28px; min-height: 1em; }
.about p { font-size: 20px; line-height: 1.55; color: #4b4647; }
.about p + p { margin-top: 14px; }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--ink); vertical-align: -0.2em; margin-left: 3px; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.about h3 { font-size: 15px; font-weight: 600; margin: 40px 0 12px; color: var(--ink); }
.tools { list-style: none; }
.tools li {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 21px; font-weight: 500; padding: 11px 0; border-top: 1px solid #e7e3dc; transition: padding .3s var(--ease), background .3s;
}
.tools li:last-child { border-bottom: 1px solid #e7e3dc; }
.tools li:hover { padding-left: 10px; background: linear-gradient(90deg, rgba(238,187,28,.35), transparent 70%); }
.tools kbd {
  font: inherit; font-size: 13px; font-weight: 600; min-width: 26px; text-align: center; padding: 3px 7px;
  border: 1px solid #d9d4cb; border-bottom-width: 3px; border-radius: 5px; color: #6b6566; background: #faf8f4;
  transition: transform .15s, border-bottom-width .15s;
}
.tools li:hover kbd { transform: translateY(2px); border-bottom-width: 1px; color: var(--ink); background: var(--yellow); border-color: var(--ink); }

.swatch-panel {
  position: absolute; right: max(16px, calc((100% - 1240px) / 2 - 80px)); bottom: 36px; width: 250px; z-index: 2;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 12px 0 10px; color: #fff;
  box-shadow: 0 20px 50px rgba(0,0,0,.45); transform: rotate(-2deg);
  transition: transform 1s var(--ease) .25s, opacity .8s ease .25s;
}
.swatch-panel.pre { opacity: 0; transform: translate(40px, 30px) rotate(4deg); }
.panel-title { padding: 0 14px 10px; font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.swatch {
  width: 100%; display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px;
  padding: 8px 14px; background: none; border: 0; cursor: pointer; text-align: left; font-size: 14px; color: rgba(255,255,255,.9);
  transition: background .2s;
}
.swatch span { width: 26px; height: 26px; border-radius: 4px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); transition: transform .3s var(--ease); }
.swatch b { font-weight: 400; font-size: 12px; color: rgba(255,255,255,.5); font-variant-numeric: tabular-nums; }
.swatch:hover { background: rgba(255,255,255,.06); }
.swatch:hover span { transform: scale(1.12) rotate(-6deg); }
.swatch.pop span { animation: swpop .5s var(--ease); }
@keyframes swpop { 40% { transform: scale(1.35) rotate(8deg); } }
.swatch-status { padding: 8px 14px 2px; font-size: 12px; color: rgba(255,255,255,.5); min-height: 1.6em; }

.contact { background: var(--yellow); color: var(--ink); padding: 110px 28px 120px; }
.contact-title { font-size: clamp(42px, 7vw, 108px); line-height: .98; font-weight: 700; letter-spacing: -.02em; max-width: 13ch; }
.contact-lead { margin-top: 24px; font-size: 20px; max-width: 40ch; line-height: 1.5; }
.contact form { margin-top: 64px; max-width: 980px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 32px; }
.field label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 20px; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1.5px solid rgba(35,31,32,.35); border-radius: 0; padding: 8px 0 12px;
  transition: border-color .2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(35,31,32,.4); }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: transparent; }
.field { position: relative; }
.field::before, .field::after { content: ""; position: absolute; pointer-events: none; opacity: 0; transition: opacity .2s, inset .3s var(--ease); }
.field::before { inset: -6px -14px -6px -14px; border: 1.5px solid var(--sel); }
.field::after {
  inset: -6px -14px -6px -14px;
  background:
    linear-gradient(#fff, #fff) 0 0 / 9px 9px no-repeat, linear-gradient(#fff, #fff) 100% 0 / 9px 9px no-repeat,
    linear-gradient(#fff, #fff) 0 100% / 9px 9px no-repeat, linear-gradient(#fff, #fff) 100% 100% / 9px 9px no-repeat;
  outline: 0; translate: 0 0;
  -webkit-mask: none;
}
.field:focus-within::before { opacity: 1; inset: -10px -16px -8px -16px; }
.field:focus-within::after { opacity: 1; inset: -14px -20px -12px -20px;
  background:
    linear-gradient(var(--sel), var(--sel)) 0 0 / 11px 11px no-repeat, linear-gradient(var(--sel), var(--sel)) 100% 0 / 11px 11px no-repeat,
    linear-gradient(var(--sel), var(--sel)) 0 100% / 11px 11px no-repeat, linear-gradient(var(--sel), var(--sel)) 100% 100% / 11px 11px no-repeat; }
.field-wide { grid-column: 1 / -1; }
.hp { position: absolute; left: -9999px; }
.form-end { grid-column: 1 / -1; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.send {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--ink); color: var(--yellow); border: 0; border-radius: 4px; padding: 17px 30px 17px 34px; font-size: 19px; font-weight: 700;
  cursor: pointer; transition: background .2s, color .2s, box-shadow .3s;
}
.send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.send:hover svg { transform: translateX(6px); }
.send:hover { box-shadow: 0 0 0 4px rgba(35,31,32,.18); }
.send:hover { background: var(--paper); color: var(--ink); }

.send:disabled { opacity: .6; cursor: wait; }
.status { font-size: 17px; }
.status.ok { color: #14532d; }
.status.err { color: #8a1c13; }

footer { text-align: center; color: rgba(255,255,255,.45); font-size: 15px; padding: 48px 16px 56px 36px; }

.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(35,31,32,.97);
  display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lb-head { display: flex; align-items: center; gap: 16px; padding: 20px 28px; color: #fff; }
.lb-title { font-size: 22px; font-weight: 600; }
.lb-title small { display: block; font-size: 14px; font-weight: 400; opacity: .6; }
.lb-count { margin-left: auto; font-size: 15px; opacity: .7; font-variant-numeric: tabular-nums; }
.lb-btn {
  background: none; border: 0; color: #fff; cursor: pointer; display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%; transition: background .2s, color .2s;
}
.lb-btn:hover { background: var(--yellow); color: var(--ink); }
.lb-btn svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.lb-progress { height: 3px; margin: 0 28px 14px; background: rgba(255,255,255,.12); overflow: hidden; }
.lb-progress span { display: block; height: 100%; background: var(--yellow); transform: scaleX(0); transform-origin: left; }
.lb-progress.run span { animation: lbprog var(--lb-delay, 3.5s) linear forwards; }
.lightbox.paused .lb-progress span { animation-play-state: paused; }
@keyframes lbprog { to { transform: scaleX(1); } }
#lbPlay .i-play { display: none; fill: currentColor; stroke: none; }
.lightbox.paused #lbPlay .i-play { display: block; } .lightbox.paused #lbPlay .i-pause { display: none; }
.lightbox.single #lbPlay, .lightbox.single .lb-progress, .lightbox.single .lb-prev, .lightbox.single .lb-next, .lightbox.single .lb-thumbs { visibility: hidden; }
.lb-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 84px; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; padding: 10px; box-shadow: 0 30px 70px rgba(0,0,0,.5); transition: opacity .25s, transform .6s var(--ease); }
.lb-stage img.loading { opacity: 0; transform: scale(.97); }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 18px; } .lb-next { right: 18px; }
.lb-thumbs { display: flex; gap: 8px; justify-content: center; padding: 18px 16px 24px; overflow-x: auto; }
.lb-thumbs button { flex: 0 0 auto; width: 84px; height: 60px; padding: 0; border: 2px solid transparent; background: #333; opacity: .5; cursor: pointer; transition: opacity .2s, border-color .2s; }
.lb-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumbs button.active { opacity: 1; border-color: var(--yellow); }
body.locked { overflow: hidden; }

@media (max-width: 1000px) {
  .board { grid-template-columns: 1fr; gap: 40px; padding: 40px; }
  .placed img { max-width: 460px; margin: 0 auto; display: block; }
  .swatch-panel { position: relative; right: auto; bottom: auto; margin: -30px 0 0 auto; }
  .contact form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  :root { --rule: 0px; --bar: 58px; }
  .ruler { display: none; }
  .bar { grid-template-columns: auto auto; gap: 12px; padding: 0 16px; }
  .bar-logo img { height: 27px; }
  .bar-nav { gap: 18px; font-size: 15px; }
  .bar-social { display: none; }
  .hero { padding: 64px 16px 96px; }
  .sel { padding: 14px 18px 18px; }
  .hint { left: 50%; top: calc(100% + 42px); transform: translateX(-50%); text-align: center; width: 220px; }
  .hero-sub { margin-top: 116px; }
  .on-desk { display: none; } .on-phone { display: inline; }
  .hint svg { display: none; }
  .work { padding: 80px 16px 90px; }
  .desk { grid-template-columns: 1fr; gap: 24px; }
  .layers { position: static; display: flex; align-items: center; gap: 8px; padding: 8px; overflow-x: auto; border-radius: 999px; scrollbar-width: none; }
  .layers::-webkit-scrollbar { display: none; }
  .layers-title { display: none; }
  .layers ul { display: flex; gap: 4px; padding: 0; }
  .layers li button { grid-template-columns: 18px 8px auto auto; gap: 7px; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
  .arrange { display: none; }
  .canvas { height: auto !important; display: grid; gap: 34px; min-height: 0; }
  .print { position: relative; width: 100% !important; transform: rotate(var(--r, 0deg)) !important; cursor: pointer; }
  .print.off { display: none; }
  .about { padding: 40px 16px 80px; }
  .board { padding: 24px; }
  .swatch-panel { margin: -20px 8px 0 auto; width: min(250px, 90%); }
  .about p { font-size: 18px; }
  .tools { font-size: 19px; }
  .contact { padding: 80px 16px 90px; }
  .contact form { grid-template-columns: 1fr; gap: 28px; }
  footer { padding-left: 16px; }
  .lb-stage { padding: 0 8px; }
  .lb-prev, .lb-next { background: rgba(0,0,0,.45); }
  .lb-prev { left: 6px; } .lb-next { right: 6px; }
  .lb-head { padding: 14px 16px; }
  .lb-progress { margin: 0 16px 10px; }
  .lb-thumbs button { width: 64px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.seal { position: absolute; right: -128px; top: -104px; width: 148px; height: 148px; color: var(--ink); pointer-events: none; animation: seal-in .9s var(--ease) 1.2s both; }
.seal svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: seal-spin 22s linear infinite; }
.seal text { font-size: 15.5px; font-weight: 700; letter-spacing: .02em; fill: var(--ink); }
.seal-num { position: absolute; inset: 31px; border-radius: 50%; background: var(--ink); color: var(--yellow); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 40px; font-weight: 700; line-height: .9; transform: rotate(-8deg); }
.seal-num small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--paper); margin-top: 4px; }
@keyframes seal-spin { to { transform: rotate(360deg); } }
@keyframes seal-in { from { opacity: 0; transform: scale(.4) rotate(-40deg); } to { opacity: 1; transform: none; } }
.hero-quote { margin-top: 18px; font-size: clamp(20px, 2.4vw, 30px); font-weight: 500; color: var(--ink); max-width: 30ch; line-height: 1.35; animation: quote-in .9s var(--ease) 1.5s both; }
.hero-quote mark { display: inline-block; margin-top: 6px; background: none; color: var(--yellow); position: relative; z-index: 0; padding: 0 .2em; white-space: nowrap; font-weight: 700; }
.hero-quote mark::before { content: ""; position: absolute; inset: .05em 0 -.02em; background: var(--ink); z-index: -1; transform-origin: left; animation: mark-in .8s var(--ease-io) 2.1s both; }
@keyframes quote-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes mark-in { from { transform: scaleX(0); } to { transform: none; } }
@media (max-width: 760px) {
  .seal { width: 104px; height: 104px; right: -18px; top: -92px; }
  .seal-num { inset: 22px; font-size: 28px; }
  .seal-num small { font-size: 8px; }
  .hero-quote mark { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .seal, .seal svg, .hero-quote, .hero-quote mark::before { animation: none; }
}

.toolkit { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.app { position: relative; outline: none; transition: transform .6s var(--ease), opacity .5s ease; transition-delay: calc(var(--i) * 70ms + .5s); }
.board.pre .app { opacity: 0; transform: translateY(18px) scale(.8); }
.app-icon {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 22%; background: var(--ink); color: var(--yellow);
  font-size: clamp(16px, 1.7vw, 22px); font-weight: 700; letter-spacing: -.02em; box-shadow: inset 0 0 0 2px var(--yellow), 0 6px 14px rgba(35,31,32,.18);
  transition: transform .35s var(--ease), background .25s, color .25s; cursor: default;
}
.app:hover .app-icon, .app:focus-visible .app-icon { background: var(--yellow); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink), 0 10px 22px rgba(35,31,32,.25); transform: translateY(-6px) rotate(-4deg); }
.app-tip {
  position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translate(-50%, 6px); opacity: 0; pointer-events: none; white-space: nowrap; z-index: 3;
  background: var(--ink); color: rgba(255,255,255,.7); font-size: 12px; line-height: 1.3; padding: 7px 11px; border-radius: 5px; text-align: center;
  transition: opacity .2s, transform .3s var(--ease);
}
.app-tip b { display: block; color: var(--yellow); font-size: 14px; font-weight: 700; }
.app-tip::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--ink); }
.app:hover .app-tip, .app:focus-visible .app-tip { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px) {
  .toolkit { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .app-icon { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .board.pre .app { opacity: 1; transform: none; } }
.about-media h3 { margin-top: 28px; }
.app-icon svg { width: 52%; height: 52%; fill: currentColor; }

body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img { -webkit-user-drag: none; user-drag: none; -webkit-touch-callout: none; }
.lb-stage img, .placed img, .app-icon { pointer-events: none; }
.lb-stage { position: relative; }
.lb-stage::after {
  content: "© Hassan El Midaoui"; position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); pointer-events: none;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.35);
}
body.shield main img, body.shield .lightbox img, body.shield .print-paper { filter: blur(28px) grayscale(1); transition: filter .1s; }
@media print {
  body > * { display: none !important; }
  body::before { content: "This portfolio is protected. Visit hesolutions.ma/he"; display: block; padding: 40px; font: 18px sans-serif; color: #231F20; }
}
