/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #777;
  --line: #e8e8e8;
  --header-h: 88px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: url('assets/cursor.png') 16 16, auto;
}

/* Custom cursor everywhere — including over images and clickable elements.
   Inherit forces every element to take body's cursor instead of browser defaults. */
*, *::before, *::after { cursor: inherit; }

/* ----- Header ----- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  mix-blend-mode: difference;
  color: #fff;
}

.wordmark { display: inline-flex; align-items: center; height: 100%; }
.wordmark img { height: 64px; width: auto; display: block; }

.nav {
  display: flex;
  gap: 28px;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav a { opacity: 0.9; transition: opacity 0.2s; }
.nav a:hover { opacity: 1; }

.cart-count { display: inline-block; margin-left: 4px; opacity: 0.6; }

/* ----- Homepage: per-print slideshow + vertical sticky stack ----- */
.home { background: #000; }

.stack { position: relative; }

.stack-item {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.slideshow {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  background-color: #000;
  background-repeat: no-repeat;
  cursor: pointer;
  transform: translateX(100%);
  will-change: transform;
}

.slide:hover { filter: brightness(1.05); }

/* Indicator (bottom-right) */
.slide-indicator {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  color: #fff;
  mix-blend-mode: difference;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  line-height: 1;
}

.indicator-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
}

.indicator-counter { display: flex; align-items: baseline; gap: 4px; }
.indicator-current { font-size: 32px; letter-spacing: -0.02em; }
.indicator-divider { opacity: 0.5; font-size: 14px; }
.indicator-total { opacity: 0.7; font-size: 14px; }

/* Fade overlay for page transition — white wash matches product page bg */
.fade-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms ease-out;
}

.fade-overlay.active { opacity: 1; pointer-events: auto; }

/* ----- Product page ----- */
.product { background: var(--bg); }

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  padding-top: var(--header-h);
}

.product-image {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  background: #f4f4f4;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.product-info {
  padding: 32px 48px 112px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 640px;
  min-width: 0;
}

.info-block { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.title {
  margin: 0;
  font-size: clamp(44px, 5.5vw, 80px);
  line-height: 1;
  letter-spacing: -0.025em;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.specs {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 8px 24px;
  margin: 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.specs > div { display: contents; }
.specs dt { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.specs dd { margin: 0; font-size: 13px; }

.description { margin: 0; font-size: 13px; line-height: 1.5; color: #333; }

.purchase { display: flex; flex-direction: column; gap: 16px; }
.qty { display: flex; align-items: center; gap: 16px; }
.qty label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.qty select { font: inherit; padding: 6px 10px; border: 1px solid var(--line); background: #fff; border-radius: 0; }
.qty-note { font-size: 11px; color: var(--muted); }

.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.price { font-size: 26px; letter-spacing: -0.01em; }

/* Generic button system */
.btn {
  padding: 16px 28px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
  border: 1px solid var(--fg);
}
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { opacity: 0.85; }
.btn-secondary { background: transparent; color: var(--fg); }
.btn-secondary:hover { background: var(--fg); color: var(--bg); }
.btn[disabled] { opacity: 0.5; cursor: inherit; }
.btn-block { width: 100%; padding: 18px; }

.actions { display: flex; gap: 12px; flex-wrap: nowrap; }
.actions .btn { flex: 1 1 0; min-width: 0; white-space: nowrap; padding-left: 16px; padding-right: 16px; }

/* Pin the product page actions to the bottom-right column */
.product .actions {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 50%;
  padding: 20px 48px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  z-index: 50;
  animation: actionsIn 500ms var(--ease-out) 200ms both;
}

@keyframes actionsIn {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Product page entry: image fades in, info panel slides up gently */
.product-image { animation: prodImgIn 700ms var(--ease-out) both; }
.product-info  { animation: prodInfoIn 700ms var(--ease-out) 100ms both; }
.site-header   { animation: headerIn 500ms ease-out both; }

@keyframes prodImgIn {
  from { opacity: 0; transform: scale(1.03); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes prodInfoIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes headerIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ----- Prints overview page ----- */
.prints { background: var(--bg); }

.prints-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: calc(var(--header-h) + 24px) 24px 24px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.tile-img {
  aspect-ratio: 4 / 5;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  overflow: hidden;
  transition: background 200ms ease;
}

.tile-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 600ms var(--ease-out);
}

.tile:hover .tile-img { background: #eee; }
.tile:hover .tile-img img { transform: scale(1.02); }

.tile-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tile-meta .tile-title { font-weight: 500; }
.tile-meta .tile-eyebrow { color: var(--muted); }

.grid-sentinel { height: 1px; }

/* ----- Success page ----- */
.success { background: var(--bg); }

.success-page {
  min-height: 100vh;
  padding: calc(var(--header-h) + 64px) 24px 96px;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.success-title {
  margin: 0;
  font-size: clamp(56px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-weight: 400;
}

.success-lede { font-size: 18px; line-height: 1.5; margin: 0; max-width: 520px; }

/* ----- About page ----- */
.about { background: var(--bg); }

.about-page {
  padding-top: var(--header-h);
  max-width: 960px;
  margin: 0 auto;
}

.about-hero {
  margin: 0;
  padding: 32px 24px 48px;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.about-hero img {
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.about-body {
  padding: 56px 24px 96px;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-title {
  margin: 0 0 16px;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-weight: 400;
}

.about-lede { font-size: 18px; line-height: 1.5; margin: 0; }
.about-body p { font-size: 14px; line-height: 1.65; color: #333; margin: 0; }
.about-body a { text-decoration: underline; }

/* ----- Cart page ----- */
.cart { background: var(--bg); }

.cart-page {
  padding: calc(var(--header-h) + 32px) 24px 96px;
  max-width: 1100px;
  margin: 0 auto;
}

.cart-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.cart-title { margin: 0; font-size: clamp(40px, 5vw, 72px); letter-spacing: -0.025em; font-weight: 400; line-height: 0.95; }

.cart-item-count { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

.cart-empty {
  text-align: center;
  padding: 96px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}
.cart-empty p { margin: 0; font-size: 16px; color: var(--muted); }

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 56px;
  align-items: start;
}

.cart-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; }

.cart-item {
  display: grid;
  grid-template-columns: 96px 1fr auto auto;
  gap: 24px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.cart-thumb {
  display: block;
  aspect-ratio: 1 / 1;
  background: #f4f4f4;
  padding: 8px;
  overflow: hidden;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: contain; }

.cart-item-info { display: flex; flex-direction: column; gap: 4px; }
.cart-item-eyebrow { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.cart-item-title { font-size: 18px; letter-spacing: -0.01em; }
.cart-item-spec { font-size: 11px; color: var(--muted); }
.cart-item-price { font-size: 18px; min-width: 80px; text-align: right; }
.cart-item-remove {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: none;
  padding: 8px 12px;
  transition: color 0.2s;
}
.cart-item-remove:hover { color: var(--fg); }

.cart-summary {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background: #fafafa;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
}
.summary-row.total {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 6px;
  font-size: 20px;
  font-weight: 500;
}
.summary-row .muted { color: var(--muted); font-size: 12px; }
.summary-note {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

/* ----- Mobile ----- */
@media (max-width: 800px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-image { position: relative; top: 0; height: 80vh; }
  .product-info { padding: 40px 24px 112px; gap: 28px; }
  .product .actions { width: 100%; padding: 16px 24px; }
  .nav { gap: 16px; }
  .prints-grid { gap: 16px; padding: calc(var(--header-h) + 16px) 16px 16px; }
  .cart-layout { grid-template-columns: 1fr; gap: 32px; }
  .cart-summary { position: static; }
  .cart-item { grid-template-columns: 72px 1fr; grid-template-areas: "thumb info" "thumb price" "remove remove"; gap: 12px 16px; }
  .cart-thumb { grid-area: thumb; }
  .cart-item-info { grid-area: info; }
  .cart-item-price { grid-area: price; text-align: left; }
  .cart-item-remove { grid-area: remove; justify-self: start; padding-left: 0; }
}
