/* ==========================================================================
   pigpup.dog — design tokens
   Palette: near-black ground, cool chrome sheen (latex), deep oxblood accent.
   Display: Bodoni Moda (high-contrast, editorial, dramatic)
   Utility: JetBrains Mono (labels, data, nav)
   Body: Inter (quiet workhorse, stays out of the way)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400;0,6..96,500;0,6..96,600;0,6..96,700;1,6..96,400&family=JetBrains+Mono:wght@400;500;600&family=Inter:wght@400;500;600&display=swap');

:root{
  --bg: #0a0a0b;
  --surface: #141415;
  --surface-2: #1c1c1e;
  --text: #ecece8;
  --text-dim: #8d8d89;
  --text-faint: #565653;
  --chrome: #cfd1cb;
  --chrome-dim: #7c7d78;
  --accent: #7a1220;
  --accent-bright: #a51c2c;
  --hairline: rgba(236, 236, 232, 0.1);
  --hairline-bright: rgba(236, 236, 232, 0.22);

  --font-display: 'Bodoni Moda', 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-body: 'Inter', -apple-system, sans-serif;

  --max-w: 1240px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

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

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; }

/* Faint film-grain texture over everything, dramatic/photographic mood */
body::before{
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.wrap{
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.eyebrow{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chrome-dim);
}

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

/* ---------------------------- Nav ---------------------------- */
.site-nav{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,11,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.site-nav .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand{
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--text);
}
.brand span{ color: var(--chrome-dim); font-style: normal; }
.nav-links{
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  list-style: none;
  margin: 0; padding: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-links a{
  text-decoration: none;
  color: var(--text-dim);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.25s ease;
}
.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: -1px;
  height: 1px;
  background: var(--accent-bright);
}
.nav-toggle{
  display: none;
  background: none;
  border: 1px solid var(--hairline-bright);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
}

@media (max-width: 720px){
  .nav-toggle{ display: block; }
  .nav-links{
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--hairline);
    padding: 1.25rem clamp(1.25rem, 4vw, 3rem) 1.75rem;
    gap: 1rem;
    display: none;
  }
  .nav-links.open{ display: flex; }
}

/* ---------------------------- Hero ---------------------------- */
.hero{
  position: relative;
  padding: clamp(4rem, 12vw, 8rem) 0 clamp(3rem, 8vw, 5rem);
  overflow: hidden;
}
.hero h1{
  font-size: clamp(2.75rem, 8vw, 6rem);
  max-width: 14ch;
}
.hero .lede{
  margin-top: 1.5rem;
  max-width: 42ch;
  color: var(--text-dim);
  font-size: 1.05rem;
}
.hero-meta{
  margin-top: 2.5rem;
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  flex-wrap: wrap;
}
.hero-meta div{ font-family: var(--font-mono); font-size: 0.78rem; color: var(--chrome-dim); }
.hero-meta strong{ display: block; color: var(--chrome); font-size: 0.95rem; font-weight: 500; margin-top: 0.2rem; }

/* Signature element: chrome sheen sweep, echoes latex/glass specular highlight */
.sheen{
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.sheen::after{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(207,209,203,0.16) 48%, rgba(207,209,203,0.35) 50%, rgba(207,209,203,0.16) 52%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 2;
}
.sheen:hover::after, .sheen:focus-visible::after{ transform: translateX(120%); }

/* ---------------------------- Section scaffolding ---------------------------- */
section{ padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1.25rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.section-head h2{ font-size: clamp(1.75rem, 4vw, 2.5rem); }
.section-head .count{ font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-faint); white-space: nowrap; }

/* ---------------------------- Gallery grid (portfolios) ---------------------------- */
.gallery{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap);
}
.piece{
  border: 1px solid var(--hairline);
  background: var(--surface);
}
.piece figure{ margin: 0; }
.piece .frame{
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.piece .frame img{ width: 100%; height: 100%; object-fit: cover; }
.placeholder-tag{
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  text-transform: uppercase;
  text-align: center;
  padding: 0 1rem;
}
.piece figcaption{
  padding: 1rem 1.15rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}
.piece figcaption .name{ font-family: var(--font-display); font-style: italic; font-size: 1.05rem; }
.piece figcaption .idx{ font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); }

/* ---------------------------- Shop / product cards ---------------------------- */
.shop-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--gap);
}
.product{
  border: 1px solid var(--hairline);
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.product .frame{ aspect-ratio: 1; background: var(--surface-2); display:flex; align-items:center; justify-content:center; }
.product .body{ padding: 1.1rem 1.2rem 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.product .name{ font-family: var(--font-display); font-size: 1.15rem; font-style: italic; }
.product .desc{ color: var(--text-dim); font-size: 0.88rem; }
.product .price-row{ margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.price{ font-family: var(--font-mono); color: var(--chrome); font-size: 0.95rem; }
.status{ font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.25rem 0.5rem; border: 1px solid var(--hairline-bright); color: var(--text-dim); }
.status.in-stock{ color: var(--chrome); border-color: var(--chrome-dim); }
.status.made-to-order{ color: var(--accent-bright); border-color: var(--accent); }

/* ---------------------------- Buttons & forms ---------------------------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--chrome-dim);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.btn:hover{ border-color: var(--chrome); background: rgba(207,209,203,0.06); }
.btn.primary{ background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover{ background: var(--accent-bright); border-color: var(--accent-bright); }
.btn:disabled{ opacity: 0.5; cursor: not-allowed; }

.form-panel{
  border: 1px solid var(--hairline);
  background: var(--surface);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.field{ margin-bottom: 1.25rem; }
.field label{
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.field input, .field textarea, .field select{
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--hairline-bright);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 0.9rem;
}
.field input:focus, .field textarea:focus, .field select:focus{
  outline: none;
  border-color: var(--chrome);
}
.field textarea{ resize: vertical; min-height: 120px; }
.form-msg{ font-family: var(--font-mono); font-size: 0.82rem; margin-top: 1rem; }
.form-msg.ok{ color: var(--chrome); }
.form-msg.err{ color: var(--accent-bright); }

/* ---------------------------- Footer ---------------------------- */
footer{
  border-top: 1px solid var(--hairline);
  padding: 2.5rem 0;
  margin-top: 3rem;
}
footer .wrap{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* Utility */
.visually-hidden{
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
