/* XYZ Axis keychain configurator. Everything is scoped to .xyz-kc so it works in any theme. */
.xyz-kc {
  --paper: #f5f1e8;
  --card: #fffdf8;
  --ink: #161616;
  --ink-2: #4b4842;
  --muted: #8b867b;
  --line: #e2dccf;
  --x: #e8402a;   /* red   */
  --y: #16a05a;   /* green */
  --z: #2b59e6;   /* blue  */
  --sun: #ffc93a;
  --display: "Archivo", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  font-family: var(--display);
  font-variation-settings: "wdth" 100;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: normal;
}
.xyz-kc *, .xyz-kc *::before, .xyz-kc *::after { box-sizing: border-box; }
.xyz-kc [hidden] { display: none !important; }
.xyz-kc button { font: inherit; color: inherit; letter-spacing: normal; text-transform: none; }
.xyz-kc a { color: inherit; }
.xyz-kc h1, .xyz-kc h2, .xyz-kc h3, .xyz-kc p { color: inherit; }
.xyz-kc #kc-top, .xyz-kc #kc-configure, .xyz-kc #kc-why, .xyz-kc #kc-specs { scroll-margin-top: 96px; }

.xyz-kc .kc-notices { max-width: 1600px; margin: 0 auto; padding: 20px clamp(16px, 3vw, 40px) 0; }
.xyz-kc .kc-notices a { color: var(--z); }

/* ---------- title row ---------- */
.xyz-kc .intro { max-width: 1600px; margin: 0 auto; padding: 30px clamp(16px, 3vw, 40px) 6px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: end; }
.xyz-kc .crumbs { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.xyz-kc .crumbs a { text-decoration: none; }
.xyz-kc .crumbs a:hover { color: var(--ink); text-decoration: underline; }
.xyz-kc h1.title { font-family: var(--display); font-weight: 900; font-variation-settings: "wdth" 112; font-size: clamp(44px, 6vw, 92px); line-height: .9; letter-spacing: -.035em; margin: 0; }
.xyz-kc h1.title .hl { color: var(--x); }
.xyz-kc .intro-side { display: flex; flex-direction: column; gap: 12px; }
.xyz-kc .lede { font-size: 17px; line-height: 1.55; color: var(--ink-2); margin: 0; }
.xyz-kc .price-row { display: flex; align-items: baseline; gap: 12px; }
.xyz-kc .price { font-family: var(--display); font-weight: 900; font-variation-settings: "wdth" 110; font-size: 46px; letter-spacing: -.02em; color: var(--ink); }
.xyz-kc .price-note { font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* ---------- hero preview ---------- */
.xyz-kc .hero { padding: 18px clamp(16px, 3vw, 40px) 0; max-width: 1600px; margin: 0 auto; }
.xyz-kc .stage { position: relative; height: clamp(360px, 64vh, 720px); border-radius: 18px; overflow: hidden; isolation: isolate; clip-path: inset(0 round 18px); background: #f6f4ef; border: 2px solid var(--ink); }
.xyz-kc #kc-canvas3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.xyz-kc #kc-canvas3d:active { cursor: grabbing; }
.xyz-kc .tag { position: absolute; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 7px 10px; border-radius: 7px; background: var(--ink); color: #fff; display: inline-flex; align-items: center; gap: 8px; }
.xyz-kc .tag.tl { top: 16px; left: 16px; }
.xyz-kc .tag.tr { top: 16px; right: 16px; background: var(--sun); color: var(--ink); }
.xyz-kc .rec { width: 8px; height: 8px; border-radius: 50%; background: var(--y); }
.xyz-kc .stage-tools { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.xyz-kc .tool { cursor: pointer; border: 2px solid var(--ink); background: var(--card); color: var(--ink); border-radius: 9px; padding: 8px 12px; font-size: 13px; font-weight: 700; display: inline-flex; gap: 7px; align-items: center; line-height: 1.2; }
.xyz-kc .tool:hover { background: #fff; transform: translateY(-1px); }
.xyz-kc .tool[aria-pressed=true] { background: var(--ink); color: #fff; }
.xyz-kc .tool svg { width: 15px; height: 15px; }
.xyz-kc .hint { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-2); background: rgba(255,255,255,.7); padding: 6px 9px; border-radius: 6px; }
/* scrolling over the preview without ctrl: the hint flashes to say how to zoom */
.xyz-kc .hint.nudge { animation: kcNudge 1.4s ease; }
@keyframes kcNudge { 0%, 60% { background: var(--sun); color: var(--ink); } }
.xyz-kc .loading { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; font-family: var(--mono); font-size: 13px; color: var(--ink-2); background: #f6f4ef; transition: opacity .5s; }
.xyz-kc .loading.done { opacity: 0; pointer-events: none; }
.xyz-kc .gl-lost { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: #f6f4ef; }
.xyz-kc .gl-lost[hidden] { display: none; }
.xyz-kc .gl-lost b { font-family: var(--display); font-weight: 900; font-size: 22px; }
.xyz-kc .gl-lost span { max-width: 38ch; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.xyz-kc .gl-lost .tool { margin-top: 6px; }

/* ---------- configurator ---------- */
.xyz-kc .config { max-width: 1600px; margin: 0 auto; padding: 26px clamp(16px, 3vw, 40px) 40px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: stretch; }
.xyz-kc .options { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.xyz-kc .opt { background: var(--card); border: 2px solid var(--ink); border-radius: 16px; position: relative; transition: box-shadow .15s; }
.xyz-kc .opt-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: none; border: 0; cursor: pointer; text-align: left; border-radius: 14px; color: var(--ink); transition: padding .35s cubic-bezier(.3,.7,.2,1); }
.xyz-kc .opt-head:hover, .xyz-kc .opt-head:focus { background: none; color: var(--ink); }
.xyz-kc .opt-head:focus-visible { outline: 3px solid var(--z); outline-offset: 2px; }
.xyz-kc .opt-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .4s cubic-bezier(.3,.7,.2,1), opacity .3s ease; }
.xyz-kc .opt-inner { min-height: 0; overflow: hidden; }
.xyz-kc .opt-pad { padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.xyz-kc .chev { width: 30px; height: 30px; border: 2px solid var(--ink); border-radius: 8px; display: grid; place-items: center; flex: none; margin-left: 10px; background: #fff; }
.xyz-kc .chev::before { content: ""; width: 8px; height: 8px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.xyz-kc .opt.collapsed .opt-body { grid-template-rows: 0fr; opacity: 0; }
.xyz-kc .opt.collapsed .opt-value { opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s .2s; }
.xyz-kc .opt.collapsed .opt-head { padding: 11px 18px; }
.xyz-kc .opt.collapsed .chev::before { transform: translateX(-2px) rotate(-45deg); }
.xyz-kc .opt:not(.collapsed) .opt-head:hover .chev { background: var(--paper); }
.xyz-kc .colour-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.xyz-kc .sub-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-weight: 800; font-size: 16px; }
.xyz-kc .sub-val { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.xyz-kc .step { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-family: var(--mono); font-weight: 600; font-size: 13px; color: #fff; flex: none; }
.xyz-kc .s-x { background: var(--x); } .xyz-kc .s-y { background: var(--y); } .xyz-kc .s-z { background: var(--z); } .xyz-kc .s-sun { background: var(--sun); color: var(--ink); }
.xyz-kc .opt-title { font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 110; font-size: 24px; letter-spacing: -.01em; margin: 0; }
.xyz-kc .opt-value { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--ink-2); background: #efe9dc; padding: 5px 8px; border-radius: 6px; transition: opacity .25s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.xyz-kc .name-input { position: relative; }
.xyz-kc .name-input input { width: 100%; margin: 0; font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 105; font-size: 30px; line-height: 1.2; padding: 14px 76px 14px 16px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--ink); outline: none; box-shadow: none; height: auto; }
.xyz-kc .name-input input:focus { border-color: var(--x); box-shadow: 0 0 0 4px rgba(232,64,42,.15); }
.xyz-kc .name-input input.is-default { color: #a8a294; }
.xyz-kc .count { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 12px; color: var(--muted); }

.xyz-kc .fonts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.xyz-kc .font-chip { cursor: pointer; border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 12px; padding: 14px 6px 10px; text-align: center; transition: transform .12s, border-color .15s; min-width: 0; }
.xyz-kc .font-chip:hover { transform: translateY(-2px); border-color: #c9c1b1; background: #fff; }
.xyz-kc .font-chip[aria-pressed=true] { border-color: var(--z); background: #eef2ff; box-shadow: 0 4px 0 var(--z); }
.xyz-kc .font-chip .sample { font-size: 24px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.xyz-kc .font-chip .fname { font-family: var(--mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.xyz-kc .swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.xyz-kc .sw { width: 46px; height: 46px; border-radius: 12px; cursor: pointer; border: 2px solid rgba(0,0,0,.12); padding: 0; transition: transform .12s; }
.xyz-kc .sw:hover { transform: translateY(-2px); }
.xyz-kc .sw[aria-pressed=true] { border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }
.xyz-kc .warn { font-size: 13px; color: #b3321c; margin: 0; font-weight: 600; }

.xyz-kc .sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.xyz-kc .size-chip { cursor: pointer; border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 12px; padding: 14px; text-align: left; transition: border-color .15s; min-width: 0; }
.xyz-kc .size-chip:hover { border-color: #c9c1b1; background: #fff; }
.xyz-kc .size-chip[aria-pressed=true] { border-color: var(--ink); background: var(--sun); box-shadow: 0 4px 0 var(--ink); }
.xyz-kc .size-chip b { display: block; font-family: var(--display); font-weight: 800; font-size: 18px; }
.xyz-kc .size-chip span { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.xyz-kc .size-chip i { font-style: normal; display: block; margin-top: 8px; font-weight: 800; font-size: 16px; }

/* summary */
.xyz-kc .summary { background: var(--ink); color: #fff; border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.xyz-kc .summary h2 { font-family: var(--display); font-weight: 900; font-variation-settings: "wdth" 112; font-size: 26px; margin: 0; letter-spacing: -.01em; color: #fff; }
.xyz-kc .sum-rows { font-family: var(--mono); font-size: 13px; }
.xyz-kc .sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px dashed rgba(255,255,255,.2); }
.xyz-kc .sum-row span { color: rgba(255,255,255,.6); }
.xyz-kc .sum-row b { font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xyz-kc .chips { display: inline-flex; gap: 4px; vertical-align: -1px; margin-right: 6px; }
.xyz-kc .chips i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.xyz-kc .sum-price { display: flex; justify-content: space-between; align-items: baseline; margin-top: auto; }
.xyz-kc .sum-price b { font-family: var(--display); font-weight: 900; font-size: 40px; letter-spacing: -.02em; }
.xyz-kc .sum-price span { font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.6); }
.xyz-kc .purchase { display: flex; gap: 10px; }
.xyz-kc .qty { display: flex; align-items: center; border: 2px solid rgba(255,255,255,.25); border-radius: 12px; }
.xyz-kc .qty button { width: 40px; height: 100%; min-height: 48px; border: 0; background: none; color: #fff; font-size: 20px; cursor: pointer; padding: 0; }
.xyz-kc .qty output { min-width: 24px; text-align: center; font-family: var(--mono); font-weight: 600; }
.xyz-kc .add { flex: 1; cursor: pointer; border: 0; border-radius: 12px; padding: 16px; font-weight: 800; font-size: 16px; color: #fff; background: var(--x); box-shadow: 0 4px 0 #a92513; display: flex; align-items: center; justify-content: center; gap: 10px; transition: transform .1s, box-shadow .1s; }
.xyz-kc .add:hover { transform: translateY(-1px); box-shadow: 0 5px 0 #a92513; background: var(--x); color: #fff; }
.xyz-kc .add:active { transform: translateY(3px); box-shadow: 0 1px 0 #a92513; }
.xyz-kc .add:disabled { opacity: .45; cursor: default; transform: none; box-shadow: 0 4px 0 #a92513; }
.xyz-kc .add svg { width: 19px; height: 19px; }
.xyz-kc .sum-msg { margin: 0; font-size: 14px; font-weight: 700; color: #fff; background: rgba(232,64,42,.25); border: 1px solid rgba(232,64,42,.7); border-radius: 10px; padding: 10px 12px; }
.xyz-kc .perks { display: grid; gap: 8px; font-size: 13px; color: rgba(255,255,255,.8); }
.xyz-kc .perks div { display: flex; gap: 10px; align-items: center; }
.xyz-kc .perks i { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* ---------- lower sections ---------- */
.xyz-kc section.block { max-width: 1600px; margin: 0 auto; padding: 30px clamp(16px, 3vw, 40px); }
.xyz-kc h2.section { font-family: var(--display); font-weight: 900; font-variation-settings: "wdth" 112; font-size: clamp(36px, 4.4vw, 64px); letter-spacing: -.03em; line-height: .95; margin: 0 0 22px; }
.xyz-kc .features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.xyz-kc .feature { border-radius: 18px; padding: 26px; min-height: 230px; display: flex; flex-direction: column; justify-content: space-between; border: 2px solid var(--ink); }
.xyz-kc .feature .lbl { font-family: var(--mono); font-weight: 600; font-size: 13px; }
.xyz-kc .feature h3 { font-family: var(--display); font-weight: 900; font-variation-settings: "wdth" 110; font-size: 30px; letter-spacing: -.02em; margin: 0 0 8px; line-height: 1; }
.xyz-kc .feature p { margin: 0; line-height: 1.5; font-size: 15px; }
.xyz-kc .fx { background: var(--x); color: #fff; } .xyz-kc .fy { background: var(--y); color: #fff; } .xyz-kc .fz { background: var(--z); color: #fff; }
.xyz-kc .specs { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.xyz-kc .spec-card { background: var(--card); border: 2px solid var(--ink); border-radius: 18px; padding: 26px; }
.xyz-kc .spec-card h3, .xyz-kc .care h3 { font-family: var(--display); font-weight: 900; font-variation-settings: "wdth" 110; font-size: 30px; margin: 0 0 14px; letter-spacing: -.02em; }
.xyz-kc .spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px dashed var(--line); font-size: 15px; }
.xyz-kc .spec-row span { color: var(--ink-2); }
.xyz-kc .spec-row b { font-family: var(--mono); font-weight: 600; font-size: 14px; text-align: right; }
.xyz-kc .care { background: var(--sun); border: 2px solid var(--ink); border-radius: 18px; padding: 26px; }
.xyz-kc .care ul { margin: 0; padding-left: 20px; line-height: 1.8; font-size: 15px; }

/* ---------- added-to-cart toast ---------- */
.xyz-kc .toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); opacity: 0; z-index: 60; background: var(--ink); color: #fff; padding: 10px 10px 10px 10px; border-radius: 12px; display: flex; gap: 12px; align-items: center; font-size: 14px; font-weight: 700; border-left: 6px solid var(--y); transition: opacity .25s, transform .3s cubic-bezier(.2,.9,.3,1.3); pointer-events: none; max-width: calc(100vw - 32px); }
.xyz-kc .toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.xyz-kc .toast img { width: 38px; height: 38px; border-radius: 7px; object-fit: cover; }
.xyz-kc .toast a { margin-left: 4px; background: #fff; color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 9px; font-weight: 800; white-space: nowrap; }
.xyz-kc .toast a:hover { background: var(--sun); }

.xyz-kc-setup { max-width: 760px; margin: 40px auto; padding: 16px 20px; border: 2px dashed #c9c1b1; border-radius: 12px; font-family: system-ui, sans-serif; }

@media (max-width: 1100px) {
  .xyz-kc .config { grid-template-columns: minmax(0, 1fr); }
  .xyz-kc .sum-price { margin-top: 0; }
  .xyz-kc .fonts { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .xyz-kc .stage { height: auto; aspect-ratio: 4 / 3; width: 100%; }
  .xyz-kc .intro { grid-template-columns: 1fr; padding-top: 20px; gap: 16px; }
  .xyz-kc .colour-grid { grid-template-columns: 1fr; }
  .xyz-kc .features, .xyz-kc .specs { grid-template-columns: 1fr; }
  .xyz-kc .hint { display: none; }
}
@media (max-width: 480px) {
  .xyz-kc .fonts { grid-template-columns: repeat(2, 1fr); }
  .xyz-kc .toast span { font-size: 13px; }
  .xyz-kc .name-input input { padding-right: 62px; }
  .xyz-kc .count { right: 12px; }
  /* three size cards side by side still fit a 360 px phone */
  .xyz-kc .sizes { gap: 8px; }
  .xyz-kc .size-chip { padding: 12px 10px; }
  .xyz-kc .size-chip b { font-size: 16px; }
  .xyz-kc .opt-pad { padding: 4px 16px 18px; }
}
/* ---------- motion ---------- */
@keyframes kcPopIn { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes kcTick { 0% { transform: translateY(0); } 35% { transform: translateY(-3px); color: var(--x); } 100% { transform: translateY(0); } }
@keyframes kcAdded { 0% { background: var(--x); } 25%, 70% { background: var(--y); box-shadow: 0 4px 0 #0b5e34; } 100% { background: var(--x); } }
@keyframes kcReveal { from { opacity: 0; transform: translateY(-6px); } }
.xyz-kc .tool, .xyz-kc .size-chip, .xyz-kc .font-chip, .xyz-kc .sw, .xyz-kc .qty button, .xyz-kc .chev { transition: transform .14s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.xyz-kc .tool:active { transform: translateY(1px); }
.xyz-kc .size-chip:hover { transform: translateY(-2px); }
.xyz-kc .size-chip:active, .xyz-kc .font-chip:active, .xyz-kc .sw:active { transform: translateY(1px) scale(.97); }
.xyz-kc .qty button:active { transform: scale(.85); }
.xyz-kc .opt-head:hover .chev { transform: scale(1.08); }
.xyz-kc .sw.pop { animation: kcPopIn .32s cubic-bezier(.3,1.6,.5,1); }
.xyz-kc .add.added { animation: kcAdded .9s ease; }
.xyz-kc .tick { animation: kcTick .35s ease; }
.xyz-kc .price.tick, .xyz-kc .sum-price b.tick { display: inline-block; }
.xyz-kc .warn:not([hidden]), .xyz-kc .sum-msg:not([hidden]) { animation: kcReveal .25s ease both; }
@media (prefers-reduced-motion: reduce) { .xyz-kc * { transition: none !important; animation: none !important; } }
