/* =========================================================
   Silk Robotics — kit page (kit.html). Loaded after style.css.
   --c is the kit colour, set on <main> and <body> by kit.js.
   ========================================================= */

.page-kit { --c: var(--saffron); }
.page-kit .footer { padding-bottom: 110px; }

/* ---------- hero ---------- */
.kp-hero { position: relative; padding: calc(var(--nav-h) + 24px) 0 clamp(72px, 9vw, 120px); overflow: hidden; isolation: isolate; }
.kp-hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(50% 50% at 28% 40%, color-mix(in srgb, var(--c) 18%, transparent), transparent 65%),
    radial-gradient(40% 50% at 90% 20%, rgba(18,181,176,.10), transparent 60%),
    linear-gradient(180deg, var(--bg-deep), var(--bg));
}

.kp-hero__grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: clamp(28px, 4vw, 64px); align-items: start; }

/* ---------- stage ---------- */
.stage {
  position: relative; aspect-ratio: 1 / .92; border-radius: 32px; overflow: hidden; isolation: isolate;
  border: 1px solid var(--line);
  background: radial-gradient(60% 60% at 50% 50%, color-mix(in srgb, var(--c) 20%, transparent), transparent 70%), #0A0F2A;
}
@keyframes stageIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.stage__grid {
  position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(170,182,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(170,182,255,.08) 1px, transparent 1px);
  background-size: 32px 32px; background-position: center;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 78%); mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 78%);
}
.stage__code, .stage__scale { position: absolute; z-index: 2; font: 500 11px var(--mono); letter-spacing: .14em; color: var(--text-faint); }
.stage__code { top: 20px; left: 22px; color: var(--c); }
.stage__scale { top: 20px; right: 22px; }
.stage__view { position: absolute; inset: 0; display: grid; place-items: center; }
.stage__view[hidden] { display: none; }
@keyframes viewIn { from { opacity: 0; transform: scale(.97); } }

.stage__art { position: relative; width: min(66%, 500px); aspect-ratio: 1; color: var(--c); transition: transform .5s var(--ease-out); }
.stage__art > .art { position: relative; width: 100%; height: 100%; stroke-width: 1.7; }
.stage__art .kit__ring { inset: -2%; }
.dims { position: absolute; inset: -8%; width: 116%; height: 116%; fill: none; stroke: rgba(170,182,255,.32); stroke-width: .6; overflow: visible; pointer-events: none; }
.dims path { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.6s var(--ease-out) .4s forwards; }
.dims text { fill: var(--text-faint); stroke: none; font: 500 6px var(--mono); letter-spacing: .08em; }

.hotspots { position: absolute; inset: 0; }
.hs { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; z-index: 1; }
.hs:hover, .hs.is-open, .hs:focus-visible { z-index: 3; }
.hs i { position: relative; width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); transition: background-color .3s, transform .3s var(--ease-out); }
.hs i::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); }
@keyframes hsPing { from { transform: scale(1); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
.hs.is-open i, .hs:hover i { background: #fff; transform: scale(1.15); }
.hs__label {
  position: absolute; left: 50%; bottom: calc(100% - 2px); transform: translate(-50%, 6px);
  padding: 8px 12px; border-radius: 10px; white-space: nowrap; pointer-events: none;
  background: rgba(10,14,38,.92); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent);
  font: 600 13px/1.2 var(--font); color: var(--text); opacity: 0;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: opacity .3s, transform .35s var(--ease-out);
}
.hs.is-open .hs__label, .hs:hover .hs__label, .hs:focus-visible .hs__label { opacity: 1; transform: translate(-50%, 0); }
.hs--r .hs__label { left: auto; right: 4px; transform: translateY(6px); }
.hs--l .hs__label { left: 4px; transform: translateY(6px); }
.hs--b .hs__label { bottom: auto; top: calc(100% - 2px); }
.hs--r.is-open .hs__label, .hs--r:hover .hs__label, .hs--r:focus-visible .hs__label,
.hs--l.is-open .hs__label, .hs--l:hover .hs__label, .hs--l:focus-visible .hs__label { transform: none; }

.stage__hint { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; font: 500 11px var(--mono); letter-spacing: .06em; color: var(--text-faint); }
.hs__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

.flatlay { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; width: 86%; }
.flat-item {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; padding: 10px; border-radius: 16px; color: var(--c);
  border: 1px dashed color-mix(in srgb, var(--c) 35%, transparent); background: rgba(255,255,255,.02);
}
.flat-item .art { width: 58%; height: 58%; stroke-width: 3.4; }
.flat-item__q { position: absolute; top: 8px; right: 10px; font: 600 12px var(--mono); color: var(--text); }
.flat-item__n { position: absolute; left: 8px; right: 8px; bottom: 8px; font-size: 11px; line-height: 1.2; text-align: center; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes flatIn { from { opacity: 0; transform: translateY(16px) scale(.94); } }

.stage__view--class { background: repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 14px, transparent 14px 28px); }
.photo-ph { display: grid; justify-items: center; gap: 10px; max-width: 340px; padding: 24px; text-align: center; }
.photo-ph .ic { width: 44px; height: 44px; color: var(--c); stroke-width: 1.4; }
.photo-ph p { font-weight: 600; font-size: 18px; }
.photo-ph small { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }

.views { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.view-tab {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 14px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--text-dim); font: 600 14px var(--font); text-align: left;
  transition: border-color .3s, background-color .3s, color .3s;
}
.view-tab:hover { color: var(--text); border-color: var(--line-strong); }
.view-tab svg { width: 28px; height: 28px; flex: none; color: var(--c); }
.view-tab .art { stroke-width: 9; }
.view-tab .ic { width: 22px; height: 22px; }
.view-tab[aria-selected="true"] { color: var(--text); border-color: color-mix(in srgb, var(--c) 60%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); }

/* ---------- buy panel ---------- */
.buy { position: sticky; top: calc(var(--nav-h) + 16px); display: grid; gap: 18px; }
@keyframes buyIn { from { opacity: 0; transform: translateY(24px); } }
.buy__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.url-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); font: 500 12px var(--mono); color: var(--text-dim); }
.url-chip .ic { width: 14px; height: 14px; color: var(--c); }
.url-chip b { color: var(--c); font-weight: 600; }
.kp-title { font-size: clamp(40px, 4.6vw, 64px); font-weight: 300; line-height: 1; letter-spacing: -.03em; }
.kp-title b { font-weight: 800; color: var(--c); }
.buy .kit__tag { margin-top: -6px; }
.buy__desc { color: var(--text-dim); font-size: 17px; line-height: 1.6; }
.buy__meta { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.buy__meta div { padding: 14px 16px; min-width: 0; }
.buy__meta div + div { border-left: 1px solid var(--line); }
.buy__meta dt { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.buy__meta dd { margin: 4px 0 0; font-weight: 700; font-size: 17px; }
.buy__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding-top: 4px; }
.price { font-size: clamp(32px, 3.2vw, 44px); font-weight: 800; letter-spacing: -.025em; }
.buy__incl { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--turq-2); }
.buy__incl .ic { width: 16px; height: 16px; }
.buy__lesson { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); text-decoration: none; font-weight: 600; transition: border-color .3s, background-color .3s; }
.buy__lesson:hover { border-color: rgba(18,181,176,.55); background: rgba(18,181,176,.06); }
.buy__lesson > .ic { margin-left: auto; transition: transform .35s var(--ease-out); }
.buy__lesson:hover > .ic { transform: translateX(4px); }
.buy__play { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(18,181,176,.16); color: var(--turq-2); }
.buy__play .ic, .course-card .btn .ic { width: 16px; height: 16px; fill: currentColor; }
.assure { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.assure li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-dim); }
.assure .ic { width: 18px; height: 18px; color: var(--c); }
.buy__soon { display: grid; gap: 10px; padding: 22px; border-radius: 20px; border: 1px dashed color-mix(in srgb, var(--c) 50%, transparent); background: color-mix(in srgb, var(--c) 7%, transparent); }
.buy__soon-t { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; }
.buy__soon-t .ic { width: 22px; height: 22px; color: var(--c); }
.buy__soon-t--ok .ic { color: var(--turq-2); }
.buy__soon-d { color: var(--text-dim); }
.notify-inline { display: grid; gap: 8px; margin-top: 6px; }
.notify-inline label { font-weight: 600; font-size: 14px; }
.notify-inline__row { display: flex; gap: 8px; }
.notify-inline input {
  flex: 1; min-width: 0; min-height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: rgba(8,12,34,.5); color: var(--text); font: 500 16px var(--font); transition: border-color .25s, box-shadow .25s;
}
.notify-inline input::placeholder { color: #69729F; }
.notify-inline input:focus { outline: none; border-color: var(--turq-2); box-shadow: 0 0 0 4px rgba(18,181,176,.22); }
.notify-inline input[aria-invalid="true"] { border-color: #FF7085; }

/* ---------- sections ---------- */
.kp-count { display: flex; align-items: baseline; gap: 10px; font-size: 18px; color: var(--text-dim); }
.kp-count b { font-size: clamp(48px, 5vw, 72px); font-weight: 800; line-height: 1; letter-spacing: -.04em; color: var(--c); }

.kp-builds { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.kp-builds .proj { width: auto; }

.parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.part { position: relative; display: grid; gap: 14px; align-content: start; padding: 20px; border-radius: 20px; border: 1px solid var(--line); background: rgba(13,19,48,.72); transition: border-color .4s, opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); }
.part:hover { border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.part__ic { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 18px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); transition: box-shadow .4s; }
.part:hover .part__ic { box-shadow: 0 0 30px -4px color-mix(in srgb, var(--c) 60%, transparent); }
.part__ic .art { width: 72%; height: 72%; stroke-width: 5; }
.part__q { position: absolute; top: 18px; right: 20px; font: 700 22px var(--mono); }
.part__n { font-weight: 600; font-size: 16px; line-height: 1.35; }
.kp-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 28px; color: var(--text-dim); }
.kp-note > .ic { color: var(--turq-2); }

.kp-course { display: grid; grid-template-columns: 1.4fr .9fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.kp-course__main { display: grid; gap: 22px; }
.mods { display: grid; gap: 12px; margin-top: 20px; }
.mod { border-radius: 18px; border: 1px solid var(--line); background: var(--card); overflow: hidden; transition: border-color .3s, opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); }
.mod[open] { border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.mod summary { list-style: none; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 16px; min-height: 64px; padding: 18px 22px; cursor: pointer; }
.mod summary::-webkit-details-marker { display: none; }
.mod__n { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--c); white-space: nowrap; }
.mod__t { font-weight: 700; font-size: 19px; }
.mod__c { font: 500 13px var(--mono); color: var(--text-dim); white-space: nowrap; }
.mod summary .ic { transition: transform .35s var(--ease-out); }
.mod[open] summary .ic { transform: rotate(180deg); }
.mod__body { display: grid; gap: 14px; padding: 0 22px 22px; color: var(--text-dim); }
.mod__bar { height: 4px; border-radius: 2px; background: var(--line); }
.mod__bar i { display: block; height: 100%; width: calc(var(--w) * 100%); border-radius: 2px; background: var(--c); }

.course-card { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 18px; padding: 28px; border-radius: 26px; border: 1px solid var(--line-strong); background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); }
.course-card__top { display: flex; align-items: center; gap: 18px; }
.course-card__n { display: flex; align-items: baseline; gap: 8px; color: var(--text-dim); }
.course-card__n b { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -.03em; color: var(--c); }
.course-card__url { margin-top: 6px; font: 400 13px var(--mono); color: var(--text-dim); }
.course-card__url b { color: var(--c); font-weight: 500; }
.course-card__text { color: var(--text-dim); }

.kp-specs__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); }
.kp-specs__grid > div { display: grid; gap: 22px; align-content: start; }
.kp-specs .h-section { font-size: clamp(28px, 3.4vw, 48px); }
.kp-faq-title { padding-top: 36px; }
.spec-table { margin: 10px 0 0; display: grid; border-top: 1px solid var(--line); }
.spec-table div { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.spec-table dt { padding-top: 2px; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.spec-table dd { margin: 0; font-weight: 600; }

.kp-more { padding-top: 0; }
.kp-others { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.other { display: flex; align-items: center; gap: 16px; padding: 16px 20px 16px 16px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); text-decoration: none; transition: border-color .4s, opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); }
.other:hover { border-color: color-mix(in srgb, var(--c) 50%, transparent); }
.other__art { width: 64px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 16px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.other__art .art { width: 72%; height: 72%; stroke-width: 5; }
.other__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.other__name { font-size: 20px; font-weight: 300; }
.other__name b { font-weight: 800; color: var(--c); }
.other__tag { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.other__price { font: 600 13px var(--mono); color: var(--text-dim); white-space: nowrap; }
.other > .ic { transition: transform .35s var(--ease-out); }
.other:hover > .ic { transform: translateX(4px); }

/* ---------- sticky buy bar ---------- */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 44; padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: rgba(9,13,36,.88); border-top: 1px solid var(--line);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transform: translateY(110%); transition: transform .5s var(--ease-out);
}
.has-buybar .buybar { transform: none; }
.buybar__inner { display: flex; align-items: center; gap: 14px; }
.buybar__art { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.buybar__art .art { width: 76%; height: 76%; stroke-width: 7; }
.buybar__name { font-weight: 700; }
.buybar__price { margin-left: auto; font: 600 15px var(--mono); white-space: nowrap; }
.has-buybar .fab { bottom: calc(84px + env(safe-area-inset-bottom)); }
.has-buybar .toast { bottom: 96px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .kp-hero__grid, .kp-course { grid-template-columns: 1fr; }
  .buy, .course-card { position: static; }
  .parts { grid-template-columns: repeat(3, 1fr); }
  .kp-others { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .stage { aspect-ratio: 1 / 1.06; border-radius: 24px; }
  .stage__art { width: 70%; }
  .flatlay { grid-template-columns: repeat(3, 1fr); gap: 8px; width: 90%; }
  .flat-item__n { display: none; }
  .view-tab { gap: 8px; padding: 8px 10px; font-size: 13px; }
  .view-tab svg { width: 22px; height: 22px; }
  .buy__meta { grid-template-columns: repeat(2, 1fr); }
  .buy__meta div:nth-child(3) { border-left: 0; }
  .buy__meta div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .parts { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .part { padding: 16px; }
  .part__ic { width: 56px; height: 56px; border-radius: 14px; }
  .part__q { top: 14px; right: 14px; font-size: 18px; }
  .part__n { font-size: 14px; }
  .kp-specs__grid { grid-template-columns: 1fr; }
  .kp-faq-title { padding-top: 0; }
  .mod summary { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 16px 18px; }
  .mod__n, .mod__t, .mod__c { grid-column: 1; }
  .mod summary .ic { grid-column: 2; grid-row: 1 / 4; }
  .mod__body { padding: 0 18px 18px; }
  .notify-inline__row { flex-direction: column; }
  .other__price { display: none; }
}
@media (max-width: 480px) {
  .buybar__name { display: none; }
  .stage__hint { font-size: 10px; }
  .view-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* calmer: no big icon areas on project cards, smaller part icons */
.kp-builds .proj__art { display: none; }
.kp-builds .proj { padding: 18px 16px 20px; }
.part__ic { width: 44px; height: 44px; border-radius: 10px; }
.part { gap: 10px; padding: 16px; }

/* 3D renders on the kit page */
.stage__view--model img { width: 86%; height: auto; }
.flat-item img { width: 84%; height: auto; }
.part__ic { background: rgba(255,255,255,.04); }
.part__ic img { width: 100%; height: 100%; object-fit: contain; }
.part__ic { width: 64px; height: 64px; }
.other__art img { width: 100%; height: 100%; object-fit: contain; }
.buybar__art img { width: 100%; height: 100%; object-fit: contain; }
.view-tab { justify-content: center; }
