/* Kintsugi Industries: the cybernetic layer.
   Gold stays the mend; cyan is the machine talking. HUD corners, scanlines, the guide, the contact scene. */
:root { --cyan: #39e1ff; --cyan-dim: rgba(57,225,255,.35); --cyan-faint: rgba(57,225,255,.08); --hud: "JetBrains Mono", ui-monospace, Menlo, monospace; }

/* faint scanlines + vignette over everything, like a visor */
body::after { content: ""; position: fixed; inset: 0; z-index: 89; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(57,225,255,.025) 0 1px, transparent 1px 3px); mix-blend-mode: screen; }

/* eyebrows read like system labels */
.eyebrow::before { content: "// "; color: var(--cyan); opacity: .8; }
.cs-pad .eyebrow::before, .guide .eyebrow::before { content: none; }

/* header: a thin cyan data line under the gold */
.site-header.scrolled { box-shadow: 0 1px 0 var(--cyan-faint), 0 8px 30px -20px var(--cyan); }
.nav a:not(.cart)::after { content: ""; display: block; height: 1px; background: var(--cyan); transform: scaleX(0); transform-origin: left; transition: transform .35s; box-shadow: 0 0 8px var(--cyan); }
.nav a:not(.cart):hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

/* HUD corner brackets on panels */
.form-card, .stack-card, .pd-media, .zoom-panel { position: relative; }
.form-card::before, .stack-card::before, .pd-media::before {
  content: ""; position: absolute; inset: -6px; pointer-events: none; border-radius: inherit; z-index: 3;
  background:
    linear-gradient(var(--cyan), var(--cyan)) top left / 18px 1.5px no-repeat, linear-gradient(var(--cyan), var(--cyan)) top left / 1.5px 18px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) top right / 18px 1.5px no-repeat, linear-gradient(var(--cyan), var(--cyan)) top right / 1.5px 18px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) bottom left / 18px 1.5px no-repeat, linear-gradient(var(--cyan), var(--cyan)) bottom left / 1.5px 18px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) bottom right / 18px 1.5px no-repeat, linear-gradient(var(--cyan), var(--cyan)) bottom right / 1.5px 18px no-repeat;
  opacity: .55; filter: drop-shadow(0 0 4px var(--cyan)); }
.stack-card::before { inset: 10px; border-radius: 0; }

/* product tiles get a scan sweep on hover */
.product-media::before { content: ""; position: absolute; left: 0; right: 0; top: -20%; height: 18%; z-index: 2; pointer-events: none;
  background: linear-gradient(transparent, rgba(57,225,255,.22), transparent); opacity: 0; }
.product:hover .product-media::before { animation: scan 1.4s ease-in-out; }
@keyframes scan { 0% { top: -20%; opacity: 1; } 100% { top: 105%; opacity: 0; } }

/* buttons: gold body, cyan edge light on hover */
.btn:hover { box-shadow: 0 0 0 1px var(--cyan-dim), 0 0 26px -6px var(--cyan) !important; }
.seam-gold { stroke: var(--gold-hi); }
.page-seam::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px 4px var(--cyan); opacity: .7; animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .15; } }

/* ================= the guide ================= */
.guide { position: fixed; left: 0; top: 0; z-index: 70; width: var(--gw, 190px); height: var(--gh, 275px); pointer-events: none; will-change: transform; transition: opacity .5s; }
.guide.away { opacity: 0; }
.guide canvas { width: 100%; height: 100%; display: block; cursor: pointer; filter: drop-shadow(0 0 14px rgba(57,225,255,.25)); }
.guide-say { position: absolute; bottom: 72%; left: 82%; width: min(260px, 60vw); padding: 12px 14px 13px; pointer-events: none;
  background: rgba(8,20,28,.82); backdrop-filter: blur(8px); color: #dff8ff; border: 1px solid var(--cyan-dim);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  opacity: 0; transform: translateY(8px) scale(.96); transform-origin: bottom left; transition: opacity .35s, transform .45s cubic-bezier(.2,.9,.2,1.2); }
.guide.say-left .guide-say { left: auto; right: 82%; transform-origin: bottom right; }
.guide-say.on { opacity: 1; transform: none; }
.guide-say p { font: 500 13.5px/1.45 var(--body); margin-top: 6px; }
.guide-tag { font: 500 9.5px/1 var(--hud); letter-spacing: .18em; color: var(--cyan); }
.guide-beam { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; transition: opacity .3s; opacity: 0; }
.guide-beam line { stroke: var(--cyan); stroke-width: 1.2; stroke-dasharray: 4 5; filter: drop-shadow(0 0 4px var(--cyan)); animation: march 0.8s linear infinite; }
@keyframes march { to { stroke-dashoffset: -18; } }
@media (max-width: 700px) { .guide-say { width: min(200px, 55vw); bottom: 92%; left: 30%; } .guide.say-left .guide-say { right: 30%; } .guide-say p { font-size: 12.5px; } }

/* ================= contact: Musashi's on the line ================= */
.contact-sec { position: relative; }
.cs-stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4vw; padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  background: radial-gradient(ellipse 50% 60% at 35% 60%, rgba(57,225,255,.10), transparent 70%), radial-gradient(ellipse at 70% 40%, #1d1030, var(--lacquer) 70%); }
.cs-grid { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: linear-gradient(var(--cyan-faint) 1px, transparent 1px) 0 0 / 48px 48px, linear-gradient(90deg, var(--cyan-faint) 1px, transparent 1px) 0 0 / 48px 48px;
  mask-image: radial-gradient(ellipse at 40% 70%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 40% 70%, #000 20%, transparent 70%); }
.cs-figure { position: relative; height: 86svh; align-self: end; perspective: 900px; justify-self: center; aspect-ratio: 417 / 1002; max-width: 100%; }
.cs-figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 0 30px rgba(57,225,255,.12)); }
.cs-figure::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -2%; height: 8%; border-radius: 50%; border: 1.5px solid var(--cyan-dim); box-shadow: 0 0 30px var(--cyan-dim), inset 0 0 20px var(--cyan-faint); }
.cs-scan { position: absolute; left: -6%; right: -6%; height: 2px; background: var(--cyan); box-shadow: 0 0 18px 4px var(--cyan); pointer-events: none; z-index: 2; }
.cs-phone { position: absolute; z-index: 3; width: 28%; aspect-ratio: 9 / 18; translate: -50% -50%; transform-style: preserve-3d;
  border-radius: 14% / 7%; padding: 6% 5%; background: linear-gradient(160deg, rgba(57,225,255,.28), rgba(8,22,30,.85)); border: 1.5px solid var(--cyan);
  box-shadow: 0 0 30px rgba(57,225,255,.55), inset 0 0 24px rgba(57,225,255,.25); }
.cs-screen { height: 100%; display: grid; align-content: center; justify-items: center; gap: 10%; text-align: center; color: #dff8ff; }
.cs-status { font: 500 clamp(6px, .7vw, 9px)/1.3 var(--hud); letter-spacing: .14em; color: var(--cyan); }
.cs-number { font: 400 clamp(18px, 2.4vw, 34px)/1 var(--display); letter-spacing: .12em; color: var(--gold-hi); min-height: 1em; text-shadow: 0 0 12px rgba(236,212,151,.6); }
.cs-call { font: 500 clamp(7px, .8vw, 11px)/1 var(--hud); letter-spacing: .12em; text-transform: uppercase; }
.connected .cs-call { color: #7dffb0; }
.cs-trail { position: absolute; left: 48%; top: 40%; width: 2px; height: 28%; z-index: 2; background: linear-gradient(var(--cyan), transparent); box-shadow: 0 0 14px var(--cyan); transform-origin: bottom; }
.cs-rings { position: absolute; left: 60%; top: 38%; z-index: 1; pointer-events: none; }
.cs-rings i { position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 50%; border: 1.5px solid var(--cyan); opacity: .8; }
.cs-side { display: grid; gap: 28px; align-content: center; position: relative; z-index: 2; }
.cs-head h2 { font-size: clamp(40px, 5.6vw, 84px); margin-top: 14px; }
.cs-head p { color: var(--stone); font-size: 18px; max-width: 40ch; margin-top: 16px; }
.cs-pad { display: grid; grid-template-columns: repeat(3, 64px); gap: 10px; perspective: 600px; }
.cs-pad button { all: unset; display: grid; place-items: center; gap: 2px; height: 56px; border-radius: 12px; font: 400 22px/1 var(--display); color: #dff8ff;
  border: 1px solid var(--cyan-dim); background: rgba(8,22,30,.6); transition: background .15s, box-shadow .15s, transform .15s; }
.cs-pad button small { font: 500 8px/1 var(--hud); letter-spacing: .2em; color: var(--cyan); }
.cs-pad button.hit { background: var(--cyan); color: #04131a; box-shadow: 0 0 30px var(--cyan); transform: scale(1.08); }
.cs-pad button.hit small { color: #04131a; }
.contact-form { padding-block: clamp(60px, 9vw, 120px); }
.contact-form .ticks li { list-style: none; }
@media (max-width: 860px) {
  .cs-stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; padding-top: 90px; }
  .cs-side { order: -1; gap: 16px; }
  .cs-head h2 { font-size: 38px; } .cs-head p { display: none; }
  .cs-pad { grid-template-columns: repeat(3, 46px); gap: 6px; position: absolute; right: var(--gutter); bottom: 6svh; z-index: 4; }
  .cs-pad button { height: 40px; font-size: 16px; }
  .cs-figure { height: 62svh; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { body::after { display: none; } .guide-beam line, .page-seam::after { animation: none; } }

/* NERD: the main Kintsugi Industries mark */
.brand-nerd { height: 30px; width: auto; filter: drop-shadow(0 0 10px rgba(236,212,151,.25)); }
.brand .brand-name { font-size: 15px; padding-left: 12px; border-left: 1px solid rgba(201,168,98,.35); }
@media (max-width: 1100px) { .brand .brand-name { display: none; } }
.foot-brand img.foot-nerd { width: 110px; }
.curtain-mark { height: 56px; width: auto; }
@media (max-width: 860px) { .cs-side { position: static; } }
/* the guide talks from above his hat so he never covers headlines */
.guide-say, .guide.say-left .guide-say { bottom: 96%; left: auto; right: 0; transform-origin: bottom right; }
.guide:not(.say-left) .guide-say { left: 0; right: auto; transform-origin: bottom left; }
/* shop filters hide cards with [hidden]; keep that winning over .product's display */
.product[hidden] { display: none !important; }
/* header: keep the nav clear of the brand name; the name hides before they can touch */
.brand { flex-shrink: 0; }
.nav { gap: clamp(14px, 1.6vw, 30px); }
@media (max-width: 1360px) { .brand .brand-name { display: none; } }
/* under construction notice (home page) */
.uc-banner { position: fixed; inset: 0 0 auto 0; z-index: 60; height: 44px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 16px;
  background: #ffd400; }
.uc-banner span { color: #111; font: 800 15px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; }
body.has-uc .site-header { top: 44px; }
body.has-uc main { padding-top: 44px; }
@media (max-width: 640px) { .uc-banner span { font-size: 13px; letter-spacing: .12em; } }
/* the scrolled header's blur lives on a backdrop layer, not the header itself: a blur on the header
   traps the full-screen mobile menu inside the 68px bar (it opened "stuck half way" after scrolling) */
.site-header.scrolled { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; transition: background .4s; }
.site-header.scrolled::before { background: rgba(12, 9, 17, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
/* open the mobile menu from where the button actually is (it sits lower under the home page banner) */
@media (max-width: 900px) {
  body.has-uc .site-header .nav { clip-path: circle(0% at calc(100% - 40px) 80px); }
  body.has-uc .site-header.menu-open .nav { clip-path: circle(150% at calc(100% - 40px) 80px); }
}
/* the guide steps aside while the mobile menu is open */
body:has(.site-header.menu-open) .guide { opacity: 0; pointer-events: none; }
body:has(.site-header.menu-open) .guide canvas { pointer-events: none; }
