/* Archivo (variable width + weight), self-hosted. SIL Open Font License: fonts/OFL.txt */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(fonts/archivo-wdth.woff2) format("woff2-variations"), url(fonts/archivo-wdth.woff2) format("woff2");
}

/* 3D Creation Nation — colors sampled from the logo */
:root {
  --ink: #14161b;        /* logo background */
  --plate: #1c1f25;      /* raised surfaces */
  --plate-2: #24272e;
  --line: #3a3e47;       /* build-plate grey */
  --cream: #f5f1e8;      /* wordmark */
  --steel: #a9adb6;      /* hotend grey, muted text */
  --yellow: #ffc23d;     /* filament: actions */
  --orange: #ff6a2b;     /* NATION: prices, brand */
  --teal: #0f8f8f;       /* info */
  --radius: 6px;
  --wrap: 1200px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.05; }
p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: clamp(20px, 4vw, 40px); }

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

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  background: var(--yellow); color: var(--ink); padding: 8px 14px; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Display type: extended Archivo, matched to the wordmark */
.display, h1, h2 {
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  letter-spacing: -0.01em;
}
h2 { font-size: clamp(30px, 4.2vw, 46px); }
h3 { font-size: 18px; font-weight: 650; line-height: 1.25; }

/* Preview banner */
.preview-bar { background: var(--teal); color: #fff; font-size: 14px; padding: 8px 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ink) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #23262d;
}
.site-header__inner { display: flex; align-items: center; gap: 32px; height: 72px; }
.brand img { height: 20px; width: auto; }
.nav { display: flex; gap: 28px; margin-left: auto; font-size: 15px; }
.nav a { color: var(--steel); text-decoration: none; padding: 6px 0; }
.nav a:hover { color: var(--cream); }
.cart-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 10px 8px 16px; cursor: pointer; font-size: 15px;
}
.cart-btn:hover { border-color: var(--steel); }
.cart-btn__count {
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: var(--plate-2); color: var(--steel); font-size: 13px; font-weight: 700;
}
.cart-btn__count.has-items { background: var(--yellow); color: var(--ink); }
.cart-btn__count.bump { animation: bump .35s ease-out; }
@keyframes bump { 40% { transform: scale(1.3); } }

/* Hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero__lede { max-width: 34em; margin-top: 28px; color: var(--steel); font-size: 19px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__art img { width: min(100%, 440px); margin-inline: auto; }

/* The signature: headline prints in, layer by layer */
.print {
  position: relative;
  font-size: clamp(52px, 9.4vw, 124px);
  line-height: 0.94;
  letter-spacing: -0.02em;
}
.print__text {
  display: inline-block;
  padding-bottom: 0.06em;
  background: repeating-linear-gradient(to bottom, var(--cream) 0 3px, #d6d0c3 3px 4px);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  clip-path: inset(100% 0 0 0);
  animation: print-up 1.5s steps(18, end) 0.25s forwards;
}
.print::after {
  content: ""; position: absolute; left: 0; right: 0; height: 3px;
  background: var(--yellow);
  box-shadow: 0 0 12px rgba(255, 194, 61, 0.55);
  top: 100%;
  animation: nozzle 1.5s steps(18, end) 0.25s forwards, nozzle-off 0.3s ease-out 1.8s forwards;
}
@keyframes print-up { to { clip-path: inset(0 0 0 0); } }
@keyframes nozzle { to { top: 0; } }
@keyframes nozzle-off { to { opacity: 0; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius);
  font-weight: 650; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
}
.btn--primary { background: var(--yellow); color: var(--ink); }
.btn--primary:hover { background: #ffd06b; }
.btn--ghost { border-color: var(--line); color: var(--cream); background: transparent; }
.btn--ghost:hover { border-color: var(--steel); }
.btn--small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: progress; }

/* Shop */
.shop { padding: clamp(56px, 7vw, 96px) 0; border-top: 1px solid #23262d; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 40px; margin-bottom: 40px; }
.section-head__note { margin-top: 12px; color: var(--steel); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button {
  background: none; border: 1px solid transparent; border-radius: 999px;
  padding: 8px 16px; color: var(--steel); cursor: pointer; font-size: 15px;
}
.filters button:hover { color: var(--cream); }
.filters button[aria-pressed="true"] { color: var(--ink); background: var(--cream); font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 40px 24px; }
.tile { display: flex; flex-direction: column; }
.tile__art {
  aspect-ratio: 1; border-radius: var(--radius); overflow: hidden;
  background-color: var(--plate);
  background-image:
    linear-gradient(#262a31 1px, transparent 1px),
    linear-gradient(90deg, #262a31 1px, transparent 1px);
  background-size: 25% 25%;
  background-position: -1px -1px;
}
.tile__art svg, .tile__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile__body { display: flex; flex-direction: column; flex: 1; padding-top: 16px; }
.tile__blurb { color: var(--steel); font-size: 15px; margin-top: 6px; }
.tile__meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 14px; }
.price { color: var(--orange); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.swatches { display: flex; gap: 0; list-style: none; margin: 0; padding: 0; }
.swatches li {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--ink); margin-left: -5px;
  box-shadow: 0 0 0 1px #4a4f5a;
}
.swatches li:first-child { margin-left: 0; }
.tile .btn { margin-top: 14px; background: var(--plate-2); color: var(--cream); }
.tile .btn:hover { background: #2e323a; }
.tile .btn.is-added { background: var(--teal); color: #fff; }
.grid__status { color: var(--steel); }

/* Custom parts */
.custom { padding: clamp(56px, 7vw, 96px) 0 clamp(64px, 8vw, 112px); border-top: 1px solid #23262d; }
.custom__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.custom__copy > p { margin-top: 18px; color: var(--steel); max-width: 32em; }
.steps { list-style: none; counter-reset: step; margin: 36px 0 0; padding: 0; display: grid; gap: 22px; }
.steps li { counter-increment: step; position: relative; padding-left: 46px; min-height: 30px; color: var(--steel); }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--orange); color: var(--orange);
  font-weight: 700; font-size: 14px;
}
.steps strong { color: var(--cream); font-weight: 650; margin-right: 4px; }

.quote { background: var(--plate); border: 1px solid #262a31; border-radius: 10px; padding: clamp(22px, 3vw, 32px); display: grid; gap: 18px; }
.quote__title { font-size: 20px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.optional { color: var(--steel); font-weight: 400; }
.field input, .field textarea {
  width: 100%; background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; font-size: 16px;
}
.field input::placeholder, .field textarea::placeholder { color: #6d717b; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 1px var(--yellow); }
.field [aria-invalid="true"] { border-color: var(--orange); }
.form-error { color: var(--orange); font-size: 14px; }
.quote__done { border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 12px; font-size: 15px; color: var(--steel); }
.quote__done pre {
  margin: 0; white-space: pre-wrap; background: var(--ink); border-radius: var(--radius);
  padding: 12px 14px; font: 14px/1.5 var(--font); color: var(--cream);
}
.quote__done .btn { justify-self: start; }

/* Footer */
.site-footer { border-top: 1px solid #23262d; padding: 40px 0 48px; font-size: 15px; color: var(--steel); }
.site-footer__inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-footer__mark { width: 56px; height: 56px; border-radius: 8px; }
.site-footer__name { color: var(--cream); font-weight: 700; font-stretch: 125%; font-variation-settings: "wdth" 125; }
.site-footer__contact { margin-left: auto; text-align: right; }
.site-footer__contact a { color: var(--cream); }
.site-footer__fine { font-size: 13px; margin-top: 4px; }

/* Cart drawer */
.scrim { position: fixed; inset: 0; background: rgba(8, 9, 12, 0.6); z-index: 30; }
.cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 40;
  width: min(420px, 100vw);
  background: #191c21; border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  animation: slide-in 0.22s ease-out;
}
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid #262a31; }
.cart__head h2 { font-size: 22px; }
.icon-btn { background: none; border: 0; padding: 6px; cursor: pointer; color: var(--steel); border-radius: var(--radius); }
.icon-btn:hover { color: var(--cream); }
.cart__body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.cart__empty { padding: 32px 0; color: var(--steel); display: grid; gap: 16px; justify-items: start; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid #262a31; align-items: center; }
.line__art { width: 64px; height: 64px; border-radius: var(--radius); overflow: hidden; background: var(--plate); }
.line__art svg, .line__art img { width: 100%; height: 100%; object-fit: cover; }
.line__name { font-size: 15px; font-weight: 600; line-height: 1.3; }
.line__price { font-size: 14px; color: var(--steel); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; margin-top: 8px; }
.qty button { width: 30px; height: 30px; background: none; border: 0; cursor: pointer; color: var(--cream); border-radius: 50%; font-size: 17px; line-height: 1; }
.qty button:hover { background: var(--plate-2); }
.qty span { min-width: 22px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.line__total { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.line__remove { display: block; margin-top: 6px; background: none; border: 0; padding: 0; color: var(--steel); font-size: 13px; text-decoration: underline; cursor: pointer; }
.cart__foot { padding: 20px 24px 24px; border-top: 1px solid #262a31; display: grid; gap: 12px; }
.cart__row { display: flex; justify-content: space-between; font-size: 18px; }
.cart__note { font-size: 14px; color: var(--steel); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  background: var(--cream); color: var(--ink); padding: 12px 18px; border-radius: var(--radius);
  font-weight: 600; font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.35);
  max-width: calc(100vw - 32px);
}

/* Responsive */
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { order: -1; }
  .hero__art img { width: min(62vw, 300px); margin: 0; }
  .custom__inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav { display: none; }
  .cart-btn { margin-left: auto; }
  .brand img { height: 14px; }
  .site-header__inner { height: 60px; gap: 16px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 28px 14px; }
  .tile__blurb { display: none; }
  .tile h3 { font-size: 15px; }
  .price { font-size: 16px; }
  .tile .btn { min-height: 42px; font-size: 14px; padding: 0 10px; }
  .site-footer__contact { margin-left: 0; text-align: left; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .print__text { animation: none; clip-path: none; }
  .print::after { display: none; }
  .cart, .cart-btn__count.bump { animation: none; }
}
