/* ==========================================================================
   Artboard Supply Co. — POD design-file catalog
   Aesthetic: designer's workspace / artboard chrome, not a product showcase.
   ========================================================================== */

@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/space-grotesk.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --graphite-950: #15171b;
  --graphite-900: #1b1e23;
  --graphite-800: #23262c;
  --graphite-700: #2d3138;
  --line: rgba(236, 233, 226, 0.14);
  --line-strong: rgba(236, 233, 226, 0.26);
  --accent: #2e5cff;
  --accent-dark: #1c3ecc;
  --accent-soft: rgba(46, 92, 255, 0.16);
  --paper: #f4f1ea;
  --paper-dim: #e9e4d9;
  --ink: #1c1e21;
  --ink-muted: #666a72;
  --cream: #eeebe3;
  --cream-muted: #9a9ea6;
  --checker-a: #ececea;
  --checker-b: #dcdcd9;
  --font-display: 'Space Grotesk', 'Arial Narrow', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --container: 920px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---- reset & base ---- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--graphite-900);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); }
p { margin: 0; }

/* non-printing margin guides — decorative artboard edges, fixed to viewport */
body::before,
body::after {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1px dashed var(--line);
  pointer-events: none;
  z-index: 1;
}
body::before { left: calc(50% - (var(--container) / 2)); }
body::after { right: calc(50% - (var(--container) / 2)); }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

/* ---- header ---- */

.site-header {
  background: var(--graphite-950);
  border-bottom: 1px dashed var(--line-strong);
  position: relative;
  z-index: 2;
}
.site-header::before {
  content: '';
  display: block;
  height: 6px;
  background-image: repeating-linear-gradient(
    to right,
    var(--line-strong) 0,
    var(--line-strong) 1px,
    transparent 1px,
    transparent 10px
  );
  opacity: 0.8;
}
.site-header__row {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-header__brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.site-header__wordmark {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cream);
}
.site-header__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--cream-muted);
  text-transform: uppercase;
}
.site-header__catalog-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cream);
  border: 1px solid var(--line-strong);
  padding: 9px 16px;
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-header__catalog-link::before,
.site-header__catalog-link::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border: 1px solid var(--accent);
}
.site-header__catalog-link::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.site-header__catalog-link::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

/* ---- hero ---- */

.hero {
  padding: 64px 0 48px;
  position: relative;
}
.hero__inner {
  position: relative;
  padding: 40px 32px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1,15 L1,1 L15,1' fill='none' stroke='%232e5cff' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1,1 L15,1 L15,15' fill='none' stroke='%232e5cff' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1,15 L15,15 L15,1' fill='none' stroke='%232e5cff' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1,1 L1,15 L15,15' fill='none' stroke='%232e5cff' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 16px 16px;
  background-position:
    top 0 left 0,
    top 0 right 0,
    bottom 0 right 0,
    bottom 0 left 0;
}
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(28px, 4.4vw, 42px);
  font-weight: 700;
  line-height: 1.12;
  color: var(--cream);
  max-width: 18ch;
}
.hero__sub {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--cream-muted);
  max-width: 52ch;
}
.hero__ruler {
  margin-top: 32px;
  height: 10px;
  background-image: repeating-linear-gradient(
    to right,
    var(--checker-a) 0,
    var(--checker-a) 12px,
    var(--checker-b) 12px,
    var(--checker-b) 24px
  );
  opacity: 0.9;
}

/* ---- catalog grid ---- */

.catalog {
  padding: 8px 0 72px;
}
.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 760px) {
  .catalog-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- card ---- */

.card {
  position: relative;
  background: var(--paper);
  border: 1px solid rgba(28, 30, 33, 0.1);
  transition: transform 140ms var(--ease), opacity 140ms var(--ease);
}
.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background-color: var(--checker-a);
  background-image: repeating-conic-gradient(
    var(--checker-a) 0% 25%, var(--checker-b) 0% 50%
  );
  background-size: 20px 20px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(28, 30, 33, 0.1);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.card__reg-mark {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 14px;
  height: 14px;
  opacity: 0.55;
  pointer-events: none;
}
.card__body {
  padding: 20px 22px 22px;
  position: relative;
  z-index: 2;
}
.card__eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 8px;
}
.card__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
.card__title a {
  position: relative;
  z-index: 3;
}
.card__desc {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-muted);
}
.card__link {
  position: relative;
  z-index: 3;
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-dark);
  border-bottom: 1px solid var(--accent-dark);
  padding-bottom: 2px;
}
.card__stretched-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.card__frame {
  position: absolute;
  inset: 6px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.97);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1,15 L1,1 L15,1' fill='none' stroke='%232e5cff' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1,1 L15,1 L15,15' fill='none' stroke='%232e5cff' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1,15 L15,15 L15,1' fill='none' stroke='%232e5cff' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1,1 L1,15 L15,15' fill='none' stroke='%232e5cff' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 16px 16px;
  background-position: top left, top right, bottom right, bottom left;
  transition: transform 140ms var(--ease), opacity 140ms var(--ease);
}

/* ---- footer ---- */

.site-footer {
  background: var(--graphite-950);
  border-top: 1px dashed var(--line-strong);
  padding: 28px 0 36px;
  position: relative;
  z-index: 2;
}
.site-footer__row {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site-footer__disclosure {
  font-size: 13px;
  line-height: 1.6;
  color: var(--cream-muted);
  max-width: 68ch;
}
.site-footer__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(236, 233, 226, 0.4);
  text-transform: uppercase;
}

/* ---- product page ---- */

.product {
  padding: 48px 0 72px;
}
.product__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}
@media (min-width: 760px) {
  .product__grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
.product__media {
  position: relative;
  background-color: var(--checker-a);
  background-image: repeating-conic-gradient(
    var(--checker-a) 0% 25%, var(--checker-b) 0% 50%
  );
  background-size: 24px 24px;
  border: 1px solid var(--line-strong);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product__media img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.product__eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.product h1 {
  font-size: clamp(26px, 3.6vw, 34px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--cream);
}
.product__desc {
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--cream-muted);
  max-width: 58ch;
}

.cta-wrap {
  position: relative;
  display: inline-block;
  margin-top: 30px;
  padding: 8px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1,15 L1,1 L15,1' fill='none' stroke='%232e5cff' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1,1 L15,1 L15,15' fill='none' stroke='%232e5cff' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1,15 L15,15 L15,1' fill='none' stroke='%232e5cff' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1,1 L1,15 L15,15' fill='none' stroke='%232e5cff' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 16px 16px;
  background-position:
    top 0 left 0,
    top 0 right 0,
    bottom 0 right 0,
    bottom 0 left 0;
}
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  padding: 16px 28px;
  border: none;
  outline-offset: 3px;
  transition: transform 140ms var(--ease), opacity 140ms var(--ease);
}
.back-to-catalog {
  display: block;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cream-muted);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  width: fit-content;
}

/* ==========================================================================
   Interactive states — hover only under (hover: hover) and (pointer: fine);
   active/focus live outside it; reduced-motion turns transitions instant.
   ========================================================================== */

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-3px);
  }
  .card:hover .card__frame {
    opacity: 1;
    transform: scale(1);
  }
  .cta-button:hover {
    transform: translateY(-2px);
  }
}

.card:active {
  transform: translateY(0) scale(0.99);
}
.card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.card:focus-within .card__frame {
  opacity: 1;
  transform: scale(1);
}

.cta-button:active {
  transform: translateY(0) scale(0.98);
}
.cta-button:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.001ms !important;
  }
}
