/*! Pink Design — home hero «من الورقة إلى يدك»: a print run on the cutting mat (print → cut → in your hand) */

.hx { position: relative; isolation: isolate; overflow: hidden; overflow: clip; background: var(--blush2); padding-block: clamp(18px, 2.4vw, 34px) clamp(26px, 3.4vw, 52px); }
.hx__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; background:
  radial-gradient(120% 90% at 30% 42%, #FFFDFC 0%, #FBF1EF 38%, #F3E1DE 72%, #EAD3CF 100%); }
.hx__light { position: absolute; inset: 0; background: radial-gradient(46% 52% at 30% 46%, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%); mix-blend-mode: soft-light; }
.hx__grain { position: absolute; inset: 0; opacity: .5; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .42 0 0 0 0 .44 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.hx__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr); grid-template-areas: "head stage" "form stage"; grid-template-rows: auto 1fr; column-gap: clamp(20px, 3vw, 48px); min-height: clamp(600px, calc(100svh - var(--hdr) - 38px - 64px), 820px); }
.hx__head { grid-area: head; align-self: end; padding-top: clamp(4px, 1.4vh, 20px); }
.hx__form { grid-area: form; align-self: start; }
.hx__stage { grid-area: stage; position: relative; min-height: 560px; }

/* ---------- copy */
.hx__k { display: flex; align-items: center; gap: 14px; margin: 0 0 clamp(12px, 2vh, 22px); font-size: 14px; color: var(--ink2); }
.hx__k .latin { font-size: 19px; color: var(--mauve); }
.hx__k > i { width: 44px; height: 1px; background: currentColor; opacity: .5; transform-origin: right; }
.hx__h { margin: 0; font-family: var(--ffd); font-weight: 700; font-size: clamp(40px, min(4.6vw, 7.3vh), 76px); line-height: 1.14; letter-spacing: -.005em; color: var(--ink); }
.hx__l { display: block; }
.hx__w { display: inline-block; position: relative; }
.hx__w--ink { color: var(--mauve); }
.hx__w--ink .hx__g { position: absolute; inset: 0; mix-blend-mode: multiply; opacity: 0; pointer-events: none; }
.hx__w--ink .hx__g--c { color: #00A0E3; }
.hx__w--ink .hx__g--m { color: #E5007E; }
.hx__w--ink .hx__g--y { color: #F6D800; }
.hx__p { margin: clamp(14px, 2vh, 22px) 0 0; max-width: 34em; font-size: clamp(16px, 1.25vw, 18.5px); line-height: 1.85; color: var(--ink2); }

/* ---------- form (the press console you type into) */
.hx__form { margin-top: clamp(18px, 2.6vh, 34px); display: grid; gap: clamp(12px, 1.8vh, 18px); max-width: 560px; }
.hx__fields { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; }
.hx__fields label { display: grid; gap: 4px; }
.hx__fields span { font-size: 12.5px; font-weight: 500; color: var(--mute); letter-spacing: .01em; }
.hx__fields input { width: 100%; min-height: 46px; padding: 6px 0 8px; border: 0; border-bottom: 1.5px solid rgba(43, 31, 35, .28); background: transparent; border-radius: 0; font-size: 19px; font-weight: 500; color: var(--ink); transition: border-color .25s; text-align: start; }
.hx__name input { font-size: 22px; font-weight: 600; }
.hx__fields input:focus { outline: none; border-bottom-color: var(--mauve); }
.hx__tpls { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
.hx__tpls::-webkit-scrollbar { display: none; }
.hx__tpl { flex: none; position: relative; width: 70px; display: grid; gap: 5px; justify-items: center; font-size: 11.5px; color: var(--mute); }
.hx__tpl > span:first-child { display: block; width: 70px; aspect-ratio: 85 / 55; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px rgba(43, 31, 35, .1), 0 6px 14px -8px rgba(43, 31, 35, .5); transition: transform .35s var(--ease), box-shadow .3s; }
.hx__tpl > span:first-child svg { display: block; width: 100%; height: 100%; }
.hx__tpl:hover > span:first-child { transform: translateY(-3px); }
.hx__tpl[aria-checked="true"] { color: var(--ink); font-weight: 500; }
.hx__tpl[aria-checked="true"] > span:first-child { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink), 0 10px 18px -10px rgba(43, 31, 35, .6); }
.hx__opts { display: flex; flex-wrap: wrap; gap: 10px; }
.hx__buy { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: clamp(12px, 1.8vh, 18px); border-top: 1px solid var(--line); }
.hx__price { display: grid; line-height: 1.25; }
.hx__price b { font-size: 30px; font-weight: 600; color: var(--ink); }
.hx__price span { font-size: 13px; color: var(--mute); }

/* ---------- stage + press readout */
.hxs { position: absolute; inset: -40px 0 -10px; display: grid; place-items: center; perspective: 2100px; perspective-origin: 50% 32%; transform-style: preserve-3d; pointer-events: none; }
.hxs .hc { pointer-events: auto; }
.hx__press { position: absolute; z-index: 5; inset-inline: 4% 4%; bottom: 6px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 10px 12px 10px 16px; border-radius: 16px; background: rgba(255, 255, 255, .62); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 0 0 1px rgba(43, 31, 35, .06), 0 18px 40px -24px rgba(43, 31, 35, .45); }
.hx__steps { display: flex; gap: 22px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; font-weight: 500; color: var(--mute); }
.hx__steps li { position: relative; padding-bottom: 6px; transition: color .4s; }
.hx__steps li i { position: absolute; inset-inline: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.hx__steps li.is-on { color: var(--ink); }
.hx__steps li.is-on i, .hx__steps li.is-done i { transform: scaleX(1); }
.hx__steps li.is-done { color: var(--ink2); }
.hx__steps li.is-done i { background: var(--rose); }
.hx__inks { display: flex; gap: 6px; }
.hx__inks i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(43, 31, 35, .22); transition: background .3s, box-shadow .3s, transform .4s var(--ease); }
.hx__inks i.is-on { box-shadow: none; transform: scale(1.12); }
.hx__inks i[data-ink="y"].is-on { background: #F6D800; }
.hx__inks i[data-ink="m"].is-on { background: #E5007E; }
.hx__inks i[data-ink="c"].is-on { background: #00A0E3; }
.hx__inks i[data-ink="k"].is-on { background: #1D1A1C; }
.hx__acts { display: flex; gap: 6px; }
.hx__btn { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--ink); background: rgba(255, 255, 255, .8); box-shadow: 0 0 0 1px rgba(43, 31, 35, .1); transition: background .25s, box-shadow .25s, transform .25s var(--ease); }
.hx__btn:hover { background: var(--white); box-shadow: 0 0 0 1px rgba(43, 31, 35, .22); }
.hx__btn:active { transform: scale(.97); }
.hx__btn .ic { width: 17px; height: 17px; }
.hx__btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- 3D scene: a rose cutting mat, a sheet with 9 cards, crop marks, plates, blades */
.hxs__plane { grid-area: 1 / 1; position: relative; width: calc(297px * var(--u, 2)); height: calc(210px * var(--u, 2)); transform-style: preserve-3d; }
.hxs__mat { position: absolute; inset: -17% -15%; border-radius: calc(7px * var(--u, 2)); transform-style: preserve-3d; background-color: #C79496;
  background-image:
    linear-gradient(rgba(255, 255, 255, .26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .26) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .1) 1px, transparent 1px),
    radial-gradient(70% 70% at 45% 40%, rgba(255, 255, 255, .22), rgba(0, 0, 0, .1));
  background-size: calc(50px * var(--u, 2)) calc(50px * var(--u, 2)), calc(50px * var(--u, 2)) calc(50px * var(--u, 2)), calc(10px * var(--u, 2)) calc(10px * var(--u, 2)), calc(10px * var(--u, 2)) calc(10px * var(--u, 2)), 100% 100%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18), 0 60px 90px -40px rgba(90, 50, 55, .55); }
.hxs__mat::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(255, 255, 255, .16), transparent 30%, rgba(60, 30, 34, .14)); }
.hxs__ruler { position: absolute; display: flex; justify-content: space-between; color: rgba(255, 255, 255, .7); font: 500 calc(5px * var(--u, 2)) / 1 var(--ff); direction: ltr; }
.hxs__ruler--t { inset-inline: 6% 6%; top: 2.2%; }
.hxs__ruler--s { top: 8%; bottom: 8%; left: 1.6%; flex-direction: column; }

.hxs__deck { position: absolute; inset: 0; transform-style: preserve-3d; }
.hxs__shadow { position: absolute; inset: 1% 0 -1%; border-radius: 3px; background: rgba(70, 35, 40, .5); filter: blur(calc(9px * var(--u, 2))); transform: translateZ(-1px); }
.hxs__strip { position: absolute; background: #FFFFFF; transform-style: preserve-3d; backface-visibility: hidden; }
.hxs__strip svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hxs__roller { position: absolute; top: -6%; bottom: -6%; left: 0; width: calc(16px * var(--u, 2)); opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .95) 45%, rgba(255, 238, 244, .9) 55%, rgba(255, 255, 255, 0));
  box-shadow: 0 0 calc(14px * var(--u, 2)) rgba(255, 255, 255, .9); transform: translateZ(3px); mix-blend-mode: screen; }
.hxs__blade { position: absolute; background: #2B1F23; opacity: 0; transform: translateZ(2px); box-shadow: 0 0 0 .5px rgba(255, 255, 255, .7), 0 0 8px rgba(255, 255, 255, .9); }
.hxs__blade--h { height: 1.5px; left: 0; right: 0; transform-origin: left center; }
.hxs__blade--v { width: 1.5px; top: 0; bottom: 0; transform-origin: center top; }

/* a card: layout box is the BIG card; the sheet places it scaled down */
.hc { position: absolute; left: 0; top: 0; width: var(--cw, 340px); height: calc(var(--cw, 340px) * 55 / 85); transform-style: preserve-3d; }
.hc__in { position: absolute; inset: 0; transform-style: preserve-3d; }
.hc__f, .hc__b { position: absolute; inset: 0; overflow: hidden; background: #FFFFFF; backface-visibility: hidden; -webkit-backface-visibility: hidden; transform: translateZ(calc(var(--t, 3px) / 2)); }
.hc__b { transform: rotateY(180deg) translateZ(calc(var(--t, 3px) / 2)); }
.hc__f img, .hc__f svg, .hc__b svg, .hc__b img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hc__f .pl, .hc__f .fin { position: absolute; inset: 0; background-repeat: no-repeat; }
.hc__f .pl { mix-blend-mode: multiply; opacity: 0; will-change: transform, clip-path; }
.hc__f .fin { opacity: 0; }
.hc__f .vec { opacity: 0; }
.hc.is-live .hc__f .vec { opacity: 1; }
.hc__sheen { position: absolute; inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: soft-light; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .85) 48%, transparent 62%); background-size: 260% 100%; background-position: var(--sx, 100%) 0; }
.hc--front .hc__sheen { opacity: 1; }
.hc--front.is-plast .hc__sheen { mix-blend-mode: screen; opacity: .55; }
.hc__e { position: absolute; background: linear-gradient(90deg, #EFE5E2, #FFFFFF 50%, #EADDD9); backface-visibility: visible; }
.hc__e--t { left: 0; right: 0; top: 0; height: var(--t, 3px); transform: translateY(-50%) rotateX(90deg); }
.hc__e--b { left: 0; right: 0; bottom: 0; height: var(--t, 3px); transform: translateY(50%) rotateX(90deg); }
.hc__e--l { top: 0; bottom: 0; left: 0; width: var(--t, 3px); transform: translateX(-50%) rotateY(90deg); }
.hc__e--r { top: 0; bottom: 0; right: 0; width: var(--t, 3px); transform: translateX(50%) rotateY(90deg); }
.hc--front { cursor: grab; touch-action: pan-y; }
.hc:not(.hc--front) { cursor: pointer; }
.hc--front:active { cursor: grabbing; }
.hc--front .hc__f, .hc--front .hc__b { box-shadow: 0 0 0 .5px rgba(43, 31, 35, .08); }
.hxs__drop { grid-area: 1 / 1; width: calc(var(--cw, 340px) * 1.05); height: calc(var(--cw, 340px) * .16); border-radius: 50%; background: radial-gradient(closest-side, rgba(70, 35, 40, .42), rgba(70, 35, 40, 0)); opacity: 0; transform: translateY(calc(var(--cw, 340px) * .62)); pointer-events: none; filter: blur(4px); }

/* ---------- static fallback when JS/3D is off: a simple printed card */
.hxs__static { grid-area: 1 / 1; width: min(78%, 420px); aspect-ratio: 85 / 55; border-radius: 4px; background: #fff; box-shadow: 0 30px 60px -30px rgba(43, 31, 35, .5); overflow: hidden; }
.hxs__static svg { width: 100%; height: 100%; display: block; }

/* ---------- responsive */
@media (max-width: 1180px) {
  .hx__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .hx__fields { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 1023px) {
  .hx__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "stage" "form"; grid-template-rows: auto auto auto; min-height: 0; }
  .hx__head { align-self: start; padding-top: 6px; text-align: start; }
  .hx__stage { min-height: 0; height: clamp(420px, 70vw, 600px); margin-top: 10px; }
  .hxs { inset: -30px 0 0; }
  .hx__form { max-width: none; margin-top: 8px; }
  .hx__fields { grid-template-columns: 1.1fr 1fr; }
}
@media (max-width: 720px) {
  .hx { padding-top: 18px; }
  .hx__k { margin-bottom: 14px; font-size: 12.5px; flex-wrap: wrap; gap: 0 10px; }
  .hx__k .latin { font-size: 17px; white-space: nowrap; }
  .hx__k > i { display: none; }
  .hx__k > span:last-child { flex-basis: 100%; }
  .hx__h { font-size: clamp(36px, 10.4vw, 46px); }
  .hx__p { margin-top: 14px; font-size: 15.5px; line-height: 1.8; }
  .hx__stage { height: clamp(380px, 108vw, 470px); margin-top: 0; }
  .hxs { inset: -20px 0 40px; perspective: 1500px; }
  .hx__press { inset-inline: 0 0; bottom: 0; padding: 8px 10px; gap: 8px; justify-content: center; }
  .hx__steps { gap: 14px; font-size: 12.5px; }
  .hx__inks { display: none; }
  .hx__btn { min-height: 34px; padding: 5px 11px; font-size: 12.5px; }
  .hx__fields { grid-template-columns: 1fr; gap: 10px; }
  .hx__buy { flex-direction: column; align-items: stretch; }
  .hx__buy .btn { width: 100%; }
  .hx__price { grid-auto-flow: column; justify-content: space-between; align-items: baseline; }
}
@media (max-width: 380px) {
  .hx__steps { display: none; }
}

/* template row + palette dots */
.hx__tplrow { display: flex; align-items: center; gap: 14px; min-width: 0; }
.hx__tplrow .hx__tpls { flex: 1; min-width: 0; }
.hx__pals { flex: none; gap: 7px; }
.hx__pals .dot { width: 26px; height: 26px; }
.hx__pals .dot[aria-checked="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }
@media (max-width: 720px) { .hx__tplrow { flex-direction: column; align-items: stretch; gap: 10px; } .hx__pals { justify-content: flex-start; } }
