/* =========================================================
   SLOJ 3D — stylesheet
   Design concept: "blueprint + filament" — a graphite/blueprint
   base with two filament-inspired accents (PLA orange, layer-line
   cyan). Signature motif: printer-readout stat pills and animated
   layer-line strokes, echoing an FDM machine's build process.
   ========================================================= */

:root {
  /* Color */
  --bg: #12161d;
  --bg-alt: #0d1015;
  --panel: #1b212b;
  --panel-raised: #232a36;
  --border: #2c3444;
  --border-soft: #232a36;
  --text: #edeff2;
  --text-muted: #8b93a3;
  --text-faint: #5b6474;
  --orange: #ff6b35;
  --orange-dim: #4a2a1c;
  --orange-soft: #ffb08a;
  --cyan: #4fd1c5;
  --cyan-dim: #163634;
  --success: #6bcf8e;

  /* Type */
  --font-display: "Space Grotesk", "IBM Plex Sans", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Layout */
  --maxw: 1180px;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 18px;
  --gap: clamp(1.25rem, 2vw, 2rem);
}

@media (prefers-color-scheme: light) {
  :root { color-scheme: dark; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  background-attachment: fixed;
  background-position: center top;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; color: var(--text-muted); }
strong { color: var(--text); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--orange);
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: var(--orange);
  box-shadow: 0 0 8px var(--orange);
}

.section { padding: clamp(3rem, 7vw, 6rem) 0; }
.section-head { max-width: 640px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p:last-child { margin-bottom: 0; }

.divider {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.85em 1.5em;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--orange);
  color: #1a1206;
  font-weight: 600;
}
.btn-primary:hover { transform: translateY(-2px); background: #ff7a49; }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-block { width: 100%; justify-content: center; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 22, 29, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.brand .mark { color: var(--orange); }
.nav-links {
  display: flex;
  gap: 1.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}
.nav-links a {
  color: var(--text-muted);
  transition: color 0.15s ease;
  position: relative;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 2px;
  background: var(--orange);
}
.nav-cta { display: flex; align-items: center; gap: 1rem; }
.nav-phone {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--cyan);
  display: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text);
  padding: 0.5em 0.7em;
  cursor: pointer;
}
@media (min-width: 620px) { .nav-phone { display: inline; } }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--border-soft);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: 0.55em; }
.hero h1 .accent { color: var(--orange); }
.hero-lead { font-size: 1.12rem; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.7rem; }
.hero-meta {
  display: flex;
  gap: 1.6rem;
  margin-top: 2.4rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-faint);
  flex-wrap: wrap;
}
.hero-meta strong { color: var(--text); display: block; font-family: var(--font-display); font-size: 1.15rem; }

.hero-art { position: relative; }

/* ---------- Readout stat pill (signature element) ---------- */
.readout {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.6em;
}
.readout-bar {
  width: 100px;
  height: 6px;
  border-radius: 3px;
  background: var(--panel-raised);
  border: 1px solid var(--border);
  overflow: hidden;
  flex: none;
}
.readout-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  border-radius: 3px;
}

/* ---------- Stat grid ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
}
@media (max-width: 760px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-cell {
  background: var(--panel);
  padding: 1.6rem 1.4rem;
}
.stat-cell .num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  color: var(--orange);
  display: block;
  margin-bottom: 0.15em;
}
.stat-cell .label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
@media (max-width: 920px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 1.8rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--cyan); transform: translateY(-3px); }
.card .icon { color: var(--cyan); margin-bottom: 1rem; }
.card h3 { margin-bottom: 0.5em; }
.card p:last-child { margin-bottom: 0; }
.card ul { padding-left: 1.1em; color: var(--text-muted); margin: 0.8em 0 0; }
.card ul li { margin-bottom: 0.3em; }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--orange);
}

/* ---------- Process infographic ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  position: relative;
}
@media (max-width: 980px) { .process { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } }

.process-step {
  position: relative;
  padding: 1.6rem 1.2rem 1.4rem;
  border: 1px solid var(--border);
  margin: -1px 0 0 -1px;
  background: var(--panel);
}
.process-step .n {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 0.78rem;
  display: block;
  margin-bottom: 0.9rem;
}
.process-step h3 { font-size: 1rem; margin-bottom: 0.4em; }
.process-step p { font-size: 0.88rem; margin: 0; }
.process-step .ico { margin-bottom: 0.8rem; color: var(--orange); }

/* ---------- Comparison / spec bars (materials & tech infographic) ---------- */
.spec-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--panel);
}
.spec-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  border-top: 1px solid var(--border);
  align-items: center;
}
.spec-row:first-child { border-top: none; }
.spec-row .spec-label {
  padding: 1rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  align-self: stretch;
  display: flex;
  align-items: center;
}
.spec-bars {
  display: grid;
  gap: 0.6rem;
  padding: 1rem 1.2rem;
}
.meter { display: flex; align-items: center; gap: 0.8rem; }
.meter .m-label { width: 76px; flex: none; font-size: 0.8rem; color: var(--text-faint); font-family: var(--font-mono); }
.meter .m-track {
  flex: 1;
  height: 8px;
  background: var(--panel-raised);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.meter .m-fill { height: 100%; border-radius: 4px; }
.meter.orange .m-fill { background: var(--orange); }
.meter.cyan .m-fill { background: var(--cyan); }

@media (max-width: 640px) {
  .spec-row { grid-template-columns: 1fr; }
  .spec-row .spec-label { border-right: none; border-bottom: 1px solid var(--border); }
}

/* ---------- Table (pricing) ---------- */
.price-table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-m); overflow: hidden; }
.price-table th, .price-table td { padding: 0.95rem 1.2rem; text-align: left; border-top: 1px solid var(--border); font-size: 0.94rem; }
.price-table thead th { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); border-top: none; background: var(--panel-raised); }
.price-table td:last-child, .price-table th:last-child { color: var(--orange); font-family: var(--font-mono); white-space: nowrap; }
.price-table tbody tr:hover { background: var(--panel-raised); }
.table-scroll { overflow-x: auto; border-radius: var(--radius-m); }
.price-note { font-size: 0.86rem; color: var(--text-faint); margin-top: 0.9rem; }

/* ---------- Timeline / About ---------- */
.kit-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.kit-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  font-size: 0.92rem;
}
.kit-list .tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  border: 1px solid var(--cyan-dim);
  background: var(--cyan-dim);
  padding: 0.15em 0.6em;
  border-radius: 3px;
  align-self: start;
  white-space: nowrap;
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0.8rem; }
.faq details {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 1rem 1.2rem;
}
.faq summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--orange);
  font-size: 1.3rem;
  flex: none;
}
.faq details[open] summary::after { content: "\2212"; }
.faq p { margin-top: 0.8rem; margin-bottom: 0; }

/* ---------- Testimonials ---------- */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (max-width: 900px) { .quote-grid { grid-template-columns: 1fr; } }
.quote {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius-s);
  padding: 1.5rem 1.6rem;
}
.quote p { color: var(--text); font-size: 0.98rem; margin-bottom: 0.9rem; }
.quote cite { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-faint); font-style: normal; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: clamp(2rem, 5vw, 3.2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 200px at 90% 0%, rgba(255,107,53,0.13), transparent 70%);
  pointer-events: none;
}
.cta-band h2 { margin-bottom: 0.3em; }
.cta-band p { margin: 0; max-width: 42ch; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--panel);
  overflow: hidden;
}
.gallery-item .thumb {
  aspect-ratio: 4/3;
  background: var(--panel-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}
.gallery-item .meta { padding: 1.1rem 1.2rem; }
.gallery-item h3 { font-size: 0.98rem; margin-bottom: 0.25em; }
.gallery-item p { font-size: 0.85rem; margin: 0; }
.gallery-filters { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 2rem; }
.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.5em 1em;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.filter-btn[aria-pressed="true"] { border-color: var(--orange); color: var(--orange); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.info-list { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 1.1rem; }
.info-list li { display: flex; gap: 0.9rem; align-items: flex-start; }
.info-list .ico { color: var(--cyan); flex: none; margin-top: 0.15em; }
.info-list strong { display: block; font-size: 0.95rem; }
.info-list span { font-size: 0.9rem; color: var(--text-muted); }

.map-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
  aspect-ratio: 16/10;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.3) invert(0.92) contrast(0.9); }

.form-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: clamp(1.5rem, 3vw, 2.4rem);
}
.form-row { display: grid; gap: 0.4rem; margin-bottom: 1.2rem; }
.form-row.two { grid-template-columns: 1fr 1fr; gap: 1.2rem; display: grid; }
@media (max-width: 560px) { .form-row.two { grid-template-columns: 1fr; } }
.form-row label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.form-row input, .form-row select, .form-row textarea {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text);
  padding: 0.85em 1em;
  font-family: var(--font-body);
  font-size: 0.96rem;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--cyan);
  outline: none;
}
.form-row textarea { resize: vertical; min-height: 120px; }
.form-consent { display: flex; gap: 0.7em; align-items: flex-start; font-size: 0.84rem; color: var(--text-muted); margin-bottom: 1.4rem; }
.form-consent input { margin-top: 0.25em; }
.form-consent a { color: var(--cyan); }
.form-status { margin-top: 1rem; font-family: var(--font-mono); font-size: 0.86rem; }
.form-status[data-state="ok"] { color: var(--success); }
.form-status[data-state="err"] { color: var(--orange); }
.form-status[data-state="sending"] { color: var(--text-muted); }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 3rem 0 2rem;
  background: var(--bg-alt);
  margin-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2rem;
  margin-bottom: 2.4rem;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 1rem;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.footer-grid a { color: var(--text-muted); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--cyan); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  padding: 1rem 0;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--cyan); }

/* ---------- Utility ---------- */
.center { text-align: center; margin-left: auto; margin-right: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--orange); color: #1a1206;
  padding: 0.7em 1.2em; z-index: 100; border-radius: 0 0 6px 0; font-family: var(--font-mono);
}
.skip-link:focus { left: 0; }

/* Layer-line animation for hero SVG */
.layer-anim {
  stroke-dasharray: 6 5;
  animation: dash 22s linear infinite;
}
@keyframes dash { to { stroke-dashoffset: -400; } }
@media (prefers-reduced-motion: reduce) { .layer-anim { animation: none; } }

.nozzle {
  animation: nozzle-move 6s ease-in-out infinite;
  transform-origin: center;
}
@keyframes nozzle-move {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(148px); }
}
@media (prefers-reduced-motion: reduce) { .nozzle { animation: none; } }
