/* Vertistra 3D — site styles
   Palette taken from filament spools: deep indigo, silk gold, galaxy teal. */

:root {
  --ink: #1e1b3a;
  --ink-soft: #3a365c;
  --plate: #f2f0f7;
  --paper: #ffffff;
  --gold: #c8962e;
  --gold-deep: #8a6214;
  --teal: #1f7a78;
  --muted: #5e5a78;
  --line: #d9d5e6;

  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.75rem, 3.4vw, 2.4rem);
  --step-4: clamp(2.1rem, 5vw, 3.75rem);

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--plate);
}

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

a { color: var(--teal); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.3; }

p { margin: 0 0 1em; max-width: 64ch; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--ink);
  color: var(--plate);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; }

/* ---------- Header ---------- */

.site-header {
  background: var(--ink);
  color: var(--plate);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--plate);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}
.brand:hover { color: var(--plate); }
.brand svg { width: 2rem; height: 2rem; }
.brand span { color: var(--gold); }

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--ink-soft);
  color: var(--plate);
  font: inherit;
  font-size: var(--step--1);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  color: #cfcbe2;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: var(--step--1);
  font-weight: 600;
}
.site-nav a:hover { color: var(--plate); background: var(--ink-soft); }
.site-nav a[aria-current="page"] { color: var(--plate); box-shadow: inset 0 -3px 0 var(--gold); border-radius: 0; }
.site-nav .nav-cta {
  background: var(--gold);
  color: var(--ink);
  margin-left: 0.5rem;
}
.site-nav .nav-cta:hover { background: #ddb050; color: var(--ink); }
.site-nav .nav-cta[aria-current="page"] { box-shadow: none; border-radius: 6px; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav { display: none; width: 100%; padding-bottom: 1rem; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav .nav-cta { margin: 0.5rem 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--step-0);
  padding: 0.85rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #ddb050; color: var(--ink); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: inherit; }

/* ---------- Hero (home) ---------- */

.hero {
  background: var(--ink);
  color: var(--plate);
  padding-block: clamp(3rem, 8vw, 6rem) clamp(3.5rem, 9vw, 7rem);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}
.hero h1 { color: var(--plate); max-width: 14ch; }
.hero p { color: #cfcbe2; font-size: var(--step-1); max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.die-stage { position: relative; max-width: 26rem; justify-self: center; width: 100%; }
.die-print {
  width: 100%;
  height: auto;
  animation: print-up 3.2s steps(32, end) 0.3s both;
}
.nozzle {
  position: absolute;
  left: -6%;
  right: -6%;
  height: 3px;
  background: var(--gold);
  box-shadow: 0 0 12px 2px rgba(200, 150, 46, 0.6);
  top: 0;
  opacity: 0;
  animation: nozzle-up 3.2s steps(32, end) 0.3s both;
}
.die-caption {
  text-align: center;
  font-size: var(--step--1);
  color: #a9a4c4;
  margin: 1rem auto 0;
}

@keyframes print-up {
  from { clip-path: inset(100% 0 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
@keyframes nozzle-up {
  0% { top: 100%; opacity: 1; }
  97% { opacity: 1; }
  100% { top: 0; opacity: 0; }
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .die-stage { max-width: 16rem; order: -1; }
}

/* ---------- Page header (inner pages) ---------- */

.page-head {
  background: var(--ink);
  color: var(--plate);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  position: relative;
}
.page-head::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 14px;
  background: repeating-linear-gradient(to bottom, var(--gold) 0 2px, transparent 2px 4px);
  opacity: 0.55;
}
.page-head h1 { color: var(--plate); margin-bottom: 0.4em; }
.page-head p { color: #cfcbe2; font-size: var(--step-1); max-width: 48ch; margin: 0; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-alt { background: var(--paper); }
.section-intro { max-width: 46rem; margin-bottom: 2.5rem; }
.section-intro p { color: var(--muted); font-size: var(--step-1); }

/* What we print: list with layer-line markers */
.print-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 2.5rem 2.5rem;
}
.print-list li {
  padding-top: 1.25rem;
  background: repeating-linear-gradient(to bottom, var(--ink) 0 2px, transparent 2px 5px) top left / 3.5rem 11px no-repeat;
}
.print-list h3 { margin-bottom: 0.4em; }
.print-list p { color: var(--muted); margin: 0; }

/* Quote steps — a genuine sequence, so numbered */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0;
  border-top: 2px solid var(--ink);
}
.steps li {
  counter-increment: step;
  padding: 1.5rem 1.5rem 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-2);
  color: var(--gold-deep);
  margin-bottom: 0.5rem;
}
.steps h3 { margin-bottom: 0.3em; }
.steps p { color: var(--muted); margin: 0; font-size: 0.98rem; }

/* CTA band */
.cta-band {
  background: var(--teal);
  color: #fff;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.cta-band .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.cta-band h2 { margin: 0 0 0.3em; color: #fff; }
.cta-band p { margin: 0; color: #e0f1f0; }

/* ---------- Gallery ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filters button {
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--plate); }

.gallery-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.5rem;
}
.gallery-grid li[hidden] { display: none; }
.gallery-item figure { margin: 0; }
.gallery-item img,
.photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 10px;
  background: var(--ink-soft);
}
.photo-placeholder {
  display: grid;
  place-items: center;
  color: #cfcbe2;
  font-size: var(--step--1);
  background:
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 0 2px, transparent 2px 6px),
    var(--ink-soft);
}
.gallery-item figcaption { padding-top: 0.75rem; }
.gallery-item figcaption strong { display: block; }
.gallery-item figcaption span { color: var(--muted); font-size: var(--step--1); }

.note {
  background: var(--paper);
  border-left: 4px solid var(--gold);
  padding: 1rem 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 46rem;
}
.note p { margin: 0; }

/* ---------- Filaments ---------- */

.table-scroll { overflow-x: auto; margin-bottom: 1rem; }
.materials {
  width: 100%;
  border-collapse: collapse;
  min-width: 40rem;
  background: var(--paper);
}
.materials th,
.materials td {
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.materials thead th {
  font-size: var(--step--1);
  color: var(--muted);
  border-bottom: 2px solid var(--ink);
}
.materials tbody th { font-family: var(--font-display); font-size: 1rem; }

.swatch-group { margin-top: 3rem; }
.swatch-group h3 { margin-bottom: 1.25rem; }
.swatches {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 1.5rem 1rem;
}
.swatch { text-align: center; font-size: var(--step--1); }
.spool {
  width: 4.75rem;
  height: 4.75rem;
  margin: 0 auto 0.6rem;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(30, 27, 58, 0.2);
  position: relative;
}
/* hub of the spool */
.spool::after {
  content: "";
  position: absolute;
  inset: 34%;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(30, 27, 58, 0.2);
}
.spool.silk { background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.55), transparent 55%), var(--c); }

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.about-grid aside {
  background: var(--paper);
  padding: 1.75rem;
  border-top: 4px solid var(--gold);
}
.about-grid aside ul { padding-left: 1.1rem; margin: 0; }
.about-grid aside li { margin-bottom: 0.5rem; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- Quote form ---------- */

.form-layout {
  display: grid;
  grid-template-columns: 1fr 18rem;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 860px) { .form-layout { grid-template-columns: 1fr; } }

.quote-form {
  background: var(--paper);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 12px;
}
.quote-form fieldset { border: 0; padding: 0; margin: 0 0 2rem; }
.quote-form legend {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  margin-bottom: 1rem;
  padding: 0;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.field .hint { display: block; font-size: var(--step--1); color: var(--muted); margin-top: 0.3rem; }
.field .optional { font-weight: 400; color: var(--muted); }

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--plate);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--teal); outline: 2px solid var(--teal); outline-offset: 0; }

.field input[type="file"] { background: var(--paper); border-style: dashed; padding: 1rem; cursor: pointer; }
.field-error { color: #a32626; font-size: var(--step--1); font-weight: 600; margin-top: 0.4rem; }
.field-error:empty { display: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.form-aside h2 { font-size: var(--step-1); }
.form-aside ul { padding-left: 1.1rem; color: var(--muted); }
.form-aside li { margin-bottom: 0.5rem; }

/* ---------- Simple message pages ---------- */

.message { min-height: 50vh; display: grid; align-content: center; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: #a9a4c4;
  padding-block: 2.5rem;
  font-size: var(--step--1);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
}
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; }
.site-footer a { color: #cfcbe2; text-decoration: none; }
.site-footer a:hover { color: var(--plate); text-decoration: underline; }
.site-footer p { margin: 0; }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .die-print, .nozzle { animation: none; }
  .nozzle { display: none; }
}
