/* PolyGrid Studio — global styles */
:root {
  --blue: #1E50FF;
  --blue-deep: #0d36b8;
  --ink: #0a0a0a;
  --ink-2: #1a1a1a;
  --paper: #F4F2EC;
  --paper-2: #ECE9DF;
  --line: #1a1a1a;
  --line-soft: rgba(10, 10, 10, 0.15);
  --line-softer: rgba(10, 10, 10, 0.08);
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--display);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }

/* Selection */
::selection { background: var(--blue); color: #fff; }

/* Type */
.mono { font-family: var(--mono); font-feature-settings: "ss01", "zero"; }
.up { text-transform: uppercase; letter-spacing: 0.12em; }
.tiny { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-family: var(--mono); }

/* Grid utility — visible technical grid backdrop */
.tech-grid {
  background-image:
    linear-gradient(to right, var(--line-softer) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-softer) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* Page layout */
.page { max-width: 1440px; margin: 0 auto; position: relative; }

/* Section wrapper with technical labels */
section { position: relative; }

.section-tag {
  position: absolute;
  top: 24px;
  left: 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 5;
}
.section-tag::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--blue);
  display: inline-block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  transition: all 180ms ease;
  cursor: pointer;
}
.btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.blue:hover { background: var(--ink); border-color: var(--ink); }

.arrow { display: inline-block; transition: transform 180ms ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* Cards */
.card {
  border: 1.5px solid var(--ink);
  background: var(--paper);
  position: relative;
}

/* Hairline */
.hr { height: 1.5px; background: var(--ink); width: 100%; }

/* Responsive */
@media (max-width: 900px) {
  .section-tag { top: 16px; left: 16px; font-size: 10px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--ink); }

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marquee 40s linear infinite;
}

/* Voxel hero animations */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes layer-build {
  from { transform: scaleY(0); opacity: 0; }
  to { transform: scaleY(1); opacity: 1; }
}

@keyframes scan {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.pulse-dot { animation: pulse-dot 1.4s ease-in-out infinite; }

/* Striped placeholder */
.stripe-placeholder {
  background-image: repeating-linear-gradient(
    45deg,
    var(--ink) 0,
    var(--ink) 1px,
    transparent 1px,
    transparent 8px
  );
}

.stripe-blue {
  background-image: repeating-linear-gradient(
    45deg,
    var(--blue) 0,
    var(--blue) 1px,
    transparent 1px,
    transparent 8px
  );
}

/* Input */
.input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color 120ms ease, background 120ms ease;
}
.input:focus { border-color: var(--blue); background: #fff; }
textarea.input { resize: vertical; min-height: 110px; }

/* Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: var(--ink);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  background: var(--blue);
  border: 2px solid var(--ink);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  background: var(--blue);
  border: 2px solid var(--ink);
  cursor: pointer;
}

/* Accordion */
details { border-top: 1.5px solid var(--ink); }
details:last-of-type { border-bottom: 1.5px solid var(--ink); }
details summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 22px;
  font-weight: 500;
}
details summary::-webkit-details-marker { display: none; }
details[open] summary .acc-icon { transform: rotate(45deg); }
.acc-icon {
  display: inline-block;
  width: 28px; height: 28px;
  border: 1.5px solid var(--ink);
  position: relative;
  transition: transform 220ms ease;
  flex-shrink: 0;
}
.acc-icon::before, .acc-icon::after {
  content: '';
  position: absolute;
  background: var(--ink);
  top: 50%; left: 50%;
}
.acc-icon::before { width: 12px; height: 1.5px; transform: translate(-50%, -50%); }
.acc-icon::after { width: 1.5px; height: 12px; transform: translate(-50%, -50%); }

.acc-body {
  padding: 0 8px 28px;
  font-size: 16px;
  line-height: 1.6;
  max-width: 720px;
  color: var(--ink-2);
}

/* Annotated dimension lines */
.dim-line {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dim-line::before, .dim-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ink);
}

/* Crosshair corner */
.crosshair {
  position: absolute;
  width: 12px; height: 12px;
  pointer-events: none;
}
.crosshair::before, .crosshair::after {
  content: '';
  position: absolute;
  background: var(--ink);
}
.crosshair::before { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-50%); }
.crosshair::after { top: 50%; left: 0; height: 1px; width: 100%; transform: translateY(-50%); }
