/* ============================================================
   LAYER UP LABS — shared stylesheet
   Edit colors and fonts here; they apply to every page.
   ============================================================ */

:root {
  /* Palette — drawn from slicer software and print hardware.
     --perimeter is the teal a slicer uses for outer walls.
     --infill is the orange it uses for interior fill. */
  --plate:      #d7dcde;   /* page background: build plate grey */
  --plate-deep: #c3cacd;   /* recessed areas */
  --paper:      #f2f4f4;   /* cards, panels */
  --ink:        #15191c;
  --ink-soft:   #59636a;
  --perimeter:  #0c8f8c;
  --infill:     #e37b2a;
  --support:    #7a6ea6;
  --line:       rgba(21, 25, 28, 0.16);
  --line-soft:  rgba(21, 25, 28, 0.08);

  --display: "Archivo", system-ui, sans-serif;
  --body:    "Newsreader", Georgia, serif;
  --mono:    "DM Mono", ui-monospace, monospace;

  --rail: 64px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --measure: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--plate);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1.02rem, 0.4vw + 0.95rem, 1.14rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Type roles ---------- */

h1, h2, h3, .display {
  font-family: var(--display);
  font-variation-settings: "wdth" 112;
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0;
}

h1 { font-size: clamp(2.6rem, 9vw, 6.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.05rem, 1.6vw, 1.35rem); font-variation-settings: "wdth" 100; }

p { margin: 0 0 1.1em; max-width: 62ch; }

a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--perimeter); }

.meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.lede {
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  line-height: 1.5;
  max-width: 46ch;
}

/* ---------- Z-axis rail (the site's spine) ---------- */

.zrail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  border-right: 1px solid var(--line);
  background: var(--plate);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
  z-index: 40;
}

.zrail__mark {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  writing-mode: vertical-rl;
}

.zrail__readout {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--perimeter);
  writing-mode: vertical-rl;
  letter-spacing: 0.1em;
}

.zrail__ticks {
  flex: 1;
  width: 1px;
  margin: 1rem 0;
  background: repeating-linear-gradient(
    to bottom,
    var(--line) 0 1px,
    transparent 1px 9px
  );
}

/* ---------- Shell ---------- */

.shell {
  margin-left: var(--rail);
  padding: 0 var(--pad);
}

.wrap { max-width: var(--measure); margin: 0 auto; }

/* ---------- Nav ---------- */

.nav {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 2.2rem);
  padding: 1.6rem 0 2.4rem;
  flex-wrap: wrap;
}

.nav__brand {
  font-family: var(--display);
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  font-size: 1rem;
  text-decoration: none;
  margin-right: auto;
}

.nav__brand span { color: var(--perimeter); }

.nav a:not(.nav__brand) {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.nav a:not(.nav__brand):hover,
.nav a[aria-current="page"] { border-bottom-color: var(--infill); }

/* ---------- Hero: the wordmark prints itself ---------- */

.hero { padding: clamp(1rem, 5vh, 3.5rem) 0 clamp(3rem, 9vh, 6rem); }

.hero__mark {
  display: block;
  margin-bottom: 1.8rem;
}

.hero__mark span {
  display: block;
  clip-path: inset(0 0 100% 0);
  animation: build 1.15s steps(14) forwards;
}

.hero__mark span:nth-child(2) { animation-delay: 0.32s; color: var(--perimeter); }
.hero__mark span:nth-child(3) { animation-delay: 0.64s; }

@keyframes build {
  to { clip-path: inset(0 0 0 0); }
}

.hero__cols {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 1.8rem;
}

.spec {
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 2.1;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.spec b {
  color: var(--ink);
  font-weight: 500;
  display: inline-block;
  min-width: 8.5rem;
}

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

.section {
  padding: clamp(3rem, 8vh, 5.5rem) 0;
  border-top: 1px solid var(--line);
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.2rem;
  flex-wrap: wrap;
}

/* ---------- Work grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: clamp(1rem, 2.2vw, 1.8rem);
}

.card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.card:hover { transform: translateY(-3px); border-color: var(--perimeter); }

/* Photo slot. Until a real photo is dropped in, the layer-line
   texture below stands in and still looks deliberate. */
.card__shot {
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(21,25,28,0.055) 0 1px,
      transparent 1px 6px
    ),
    var(--plate-deep);
  position: relative;
  overflow: hidden;
}

.card__shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__body { padding: 1.1rem 1.15rem 1.35rem; }

.card__body h3 { margin-bottom: 0.35rem; }

.card__note {
  font-size: 0.94rem;
  color: var(--ink-soft);
  margin: 0;
}

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  margin-bottom: 0.7rem;
}

.tag--sale { border-color: var(--infill); color: var(--infill); }

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

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.82rem 1.4rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn:hover { background: var(--ink); color: var(--plate); }

.btn--buy { border-color: var(--infill); color: var(--infill); }
.btn--buy:hover { background: var(--infill); color: var(--paper); border-color: var(--infill); }

/* ---------- Piece detail ---------- */

.piece {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.piece__shot {
  aspect-ratio: 1 / 1;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(21,25,28,0.055) 0 1px,
      transparent 1px 6px
    ),
    var(--plate-deep);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
}

.piece__shot img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

.piece__strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.piece__strip div {
  aspect-ratio: 1 / 1;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(21,25,28,0.055) 0 1px,
      transparent 1px 6px
    ),
    var(--plate-deep);
  border: 1px solid var(--line-soft);
}

.piece__strip img { width: 100%; height: 100%; object-fit: cover; display: block; }

.speclist {
  border-top: 1px solid var(--line);
  margin: 1.6rem 0;
  padding-top: 1rem;
}

.speclist div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.speclist dt, .speclist span:first-child {
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

/* ---------- Process steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(1.2rem, 3vw, 2.4rem);
  counter-reset: step;
}

.step { border-top: 2px solid var(--perimeter); padding-top: 0.9rem; }
.step:nth-child(2) { border-top-color: var(--infill); }
.step:nth-child(3) { border-top-color: var(--support); }
.step:nth-child(4) { border-top-color: var(--ink); }

.step h3 { margin-bottom: 0.4rem; }
.step p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }

/* ---------- Callout ---------- */

.callout {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  padding: clamp(1.5rem, 4vw, 2.6rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
}

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

.foot {
  border-top: 1px solid var(--line);
  padding: 2.2rem 0 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .hero__cols, .piece, .callout { grid-template-columns: 1fr; }
  .callout { text-align: left; }
  :root { --rail: 40px; }
  .zrail__mark { display: none; }
}

/* ---------- Accessibility floor ---------- */

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__mark span { animation: none; clip-path: none; }
  .card { transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
