/* Pixel Coat — site styles */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("../fonts/silkscreen-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("../fonts/silkscreen-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Brand palette, taken from the Pixel Coat drop mark */
  --ink: #0b0b0d;
  --ink-2: #141417;
  --ink-3: #1d1d22;
  --line: #2a2a31;
  --paper: #f3f2ee;
  --white: #fafafa;
  --mute: #a3a3ad;

  --cyan: #22b4ee;
  --blue: #2446c8;
  --magenta: #e8178e;
  --red: #e9222c;
  --yellow: #ffd400;
  --green: #17a84b;

  --spectrum: linear-gradient(90deg, var(--cyan), var(--blue) 18%, var(--magenta) 42%, var(--red) 60%, var(--yellow) 80%, var(--green));

  --pixel: "Silkscreen", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3.1rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.015em; line-height: 1.2; }
p { text-wrap: pretty; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--yellow); color: var(--ink); padding: 10px 14px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.label {
  font-family: var(--pixel);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  display: flex;
  align-items: center;
  gap: 10px;
}
.label .dot { width: 9px; height: 9px; background: var(--green); animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

.lede { font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: #d0d0d6; max-width: 34em; }

/* Buttons — hard pixel shadow, no rounding */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 22px;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--white);
  box-shadow: 5px 5px 0 var(--magenta);
  transition: transform 0.12s steps(2), box-shadow 0.12s steps(2);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--cyan); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--yellow); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { border-color: var(--white); box-shadow: 5px 5px 0 var(--line); }
.btn-small { min-height: 40px; padding: 6px 14px; font-size: 0.92rem; box-shadow: 3px 3px 0 var(--magenta); }
.btn-small:hover { box-shadow: 5px 5px 0 var(--cyan); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(11, 11, 13, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 27px; height: 36px; image-rendering: pixelated; }
.wordmark { font-family: var(--pixel); font-weight: 400; font-size: 1.02rem; line-height: 0.95; letter-spacing: 0.06em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { text-decoration: none; font-size: 0.96rem; color: #d0d0d6; padding: 8px 0; position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--spectrum); transform: scaleX(0); transform-origin: left; transition: transform 0.2s steps(6); }
.nav a:not(.btn):hover { color: var(--white); }
.nav a:not(.btn):hover::after { transform: scaleX(1); }

.nav-toggle { display: none; width: 44px; height: 44px; background: none; border: 1px solid var(--line); color: var(--white); cursor: pointer; padding: 0; }
.bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px; background: currentColor; margin-inline: auto; position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; }
.bars::after { top: 6px; }

/* Hero */
.hero { position: relative; padding-block: clamp(48px, 9vw, 110px) clamp(56px, 9vw, 120px); overflow: hidden; }
.hero-grid { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.9; }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero-copy { display: grid; gap: 26px; justify-items: start; }
.spectrum-text { background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 6px; }

/* The "print bed" */
.bed { position: relative; background: var(--ink-2); border: 1px solid var(--line); padding: 22px; display: grid; gap: 14px; max-width: 380px; width: 100%; justify-self: end; }
.bed-head, .bed-foot { display: flex; justify-content: space-between; font-family: var(--pixel); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.bed-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 34px 0;
  background-image: linear-gradient(var(--ink-3) 1px, transparent 1px), linear-gradient(90deg, var(--ink-3) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: center;
  overflow: hidden;
}
.bed-drop { width: 178px; height: auto; image-rendering: pixelated; animation: print 2.6s steps(12, jump-none) 0.3s both; }
@keyframes print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.bed-pass { position: absolute; left: 0; right: 0; top: 34px; height: 3px; background: var(--white); box-shadow: 0 0 18px 2px rgba(255, 255, 255, 0.5); animation: pass 2.6s steps(12, jump-none) 0.3s both; }
@keyframes pass { from { transform: translateY(0); opacity: 1; } 99% { opacity: 1; } to { transform: translateY(238px); opacity: 0; } }

.crop { position: absolute; width: 16px; height: 16px; border: 0 solid var(--mute); }
.crop.tl { top: -9px; left: -9px; border-right-width: 1px; border-bottom-width: 1px; }
.crop.tr { top: -9px; right: -9px; border-left-width: 1px; border-bottom-width: 1px; }
.crop.bl { bottom: -9px; left: -9px; border-right-width: 1px; border-top-width: 1px; }
.crop.br { bottom: -9px; right: -9px; border-left-width: 1px; border-top-width: 1px; }

/* Calibration strips */
.wedge { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.wedge i { height: 14px; background: #fff; }
.wedge i:nth-child(2) { opacity: 0.9; } .wedge i:nth-child(3) { opacity: 0.8; } .wedge i:nth-child(4) { opacity: 0.7; }
.wedge i:nth-child(5) { opacity: 0.6; } .wedge i:nth-child(6) { opacity: 0.5; } .wedge i:nth-child(7) { opacity: 0.4; }
.wedge i:nth-child(8) { opacity: 0.3; } .wedge i:nth-child(9) { opacity: 0.2; } .wedge i:nth-child(10) { opacity: 0.1; }
.spectrum-bar { height: 8px; background: var(--spectrum); }

/* Ticker */
.ticker { border-block: 1px solid var(--line); overflow: hidden; background: var(--ink-2); }
.ticker-track { display: flex; width: max-content; animation: ticker 36s linear infinite; }
.ticker span { font-family: var(--pixel); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 16px 0; white-space: nowrap; color: #d0d0d6; }
.ticker span::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline: 26px; background: var(--magenta); }
.ticker span:nth-child(4n+2)::after { background: var(--cyan); }
.ticker span:nth-child(4n+3)::after { background: var(--yellow); }
.ticker span:nth-child(4n)::after { background: var(--green); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Sections */
.section { padding-block: clamp(64px, 10vw, 128px); }
.section-rule { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head > p:not(.label) { color: #c4c4cc; font-size: 1.1rem; max-width: 38em; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.card { position: relative; background: var(--ink-2); border: 1px solid var(--line); padding: 26px 24px 28px; display: flex; flex-direction: column; gap: 14px; transition: transform 0.14s steps(3), box-shadow 0.14s steps(3), border-color 0.14s; }
.card::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 4px; background: var(--c); }
.card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--c); border-color: var(--c); }
.card p { color: #bdbdc6; font-size: 0.98rem; }
.card-icon { width: 48px; height: 48px; margin-bottom: 6px; }
.card-icon svg { width: 100%; height: 100%; fill: none; stroke: var(--c); stroke-width: 2.5; stroke-linecap: square; stroke-linejoin: miter; }
.card-link { margin-top: auto; padding-top: 6px; font-weight: 600; text-decoration: none; color: var(--c); }
.card-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.card-open { background: transparent; border-style: dashed; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); counter-reset: step; }
.steps li { display: grid; gap: 12px; align-content: start; padding-top: 22px; border-top: 2px solid var(--white); }
.steps li:nth-child(1) { border-color: var(--cyan); }
.steps li:nth-child(2) { border-color: var(--magenta); }
.steps li:nth-child(3) { border-color: var(--yellow); }
.step-n { font-family: var(--pixel); font-size: 3.2rem; line-height: 1; }
.steps li:nth-child(1) .step-n { color: var(--cyan); }
.steps li:nth-child(2) .step-n { color: var(--magenta); }
.steps li:nth-child(3) .step-n { color: var(--yellow); }
.steps p { color: #bdbdc6; }

.facts { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--ink-2); }
.facts li { padding: 24px; display: grid; gap: 6px; }
.facts li + li { border-left: 1px solid var(--line); }
.facts strong { font-size: 1.08rem; font-weight: 600; }
.facts span { color: #bdbdc6; font-size: 0.96rem; }

/* Shops (paper section) */
.paper { background: var(--paper); color: var(--ink); }
.paper .label { color: #5b5b63; }
.paper .section-head > p:not(.label) { color: #3d3d44; }
.shops { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 20px; }
.shop { display: flex; flex-direction: column; gap: 14px; padding: 28px; border: 2px solid var(--ink); background: var(--white); text-decoration: none; color: var(--ink); min-height: 300px; }
.shop p { color: #3d3d44; }
.shop h3 { font-size: 1.6rem; }
.shop-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.status { font-family: var(--pixel); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 9px; border: 1px solid currentColor; }
.status-live { background: var(--green); color: #fff; border-color: var(--green); }
.shop-url { font-family: var(--pixel); font-size: 0.66rem; letter-spacing: 0.04em; opacity: 0.75; }
.shop-go { margin-top: auto; font-weight: 600; text-decoration: none; color: inherit; }
a.shop-go:hover { text-decoration: underline; text-underline-offset: 4px; }

.shop-live { background: var(--ink); color: var(--white); box-shadow: 8px 8px 0 var(--magenta); transition: transform 0.14s steps(3), box-shadow 0.14s steps(3); }
.shop-live p { color: #d0d0d6; }
.shop-live h3 { font-size: 2rem; }
.shop-live:hover { transform: translate(-3px, -3px); box-shadow: 11px 11px 0 var(--cyan); }
.shop-live .shop-go { color: var(--yellow); }
.shop-soon { background: transparent; border-style: dashed; }

/* Contact */
.contact { position: relative; }
.contact::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px; background: var(--spectrum); }
.contact-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-inner > div:first-child { display: grid; gap: 20px; }
.contact-card { background: var(--ink-2); border: 1px solid var(--line); padding: clamp(24px, 3vw, 36px); display: grid; gap: 24px; justify-items: start; }
.contact-mail { font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 600; letter-spacing: -0.02em; text-decoration: underline; text-decoration-color: var(--magenta); text-decoration-thickness: 3px; text-underline-offset: 6px; overflow-wrap: anywhere; }
.contact-mail:hover { text-decoration-color: var(--cyan); }
.checklist { display: grid; gap: 10px; color: #d0d0d6; }
.checklist li { display: flex; gap: 12px; align-items: baseline; }
.checklist li::before { content: ""; flex: none; width: 9px; height: 9px; background: var(--yellow); }
.checklist li:nth-child(1)::before { background: var(--cyan); }
.checklist li:nth-child(2)::before { background: var(--magenta); }

/* Footer */
.site-footer { padding-block: 40px 48px; border-top: 1px solid var(--line); }
.wedge-wide { max-width: 420px; margin-bottom: 6px; }
.site-footer .spectrum-bar { max-width: 420px; }
.footer-inner { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-nav a { color: #d0d0d6; text-decoration: none; font-size: 0.95rem; padding: 6px 0; }
.footer-nav a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.small { font-size: 0.86rem; color: var(--mute); width: 100%; }

/* Scroll reveal (only when JS is running) */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .card[data-reveal].in, .js .shop-live[data-reveal].in { transition: transform 0.14s steps(3), box-shadow 0.14s steps(3), border-color 0.14s; }

/* Responsive */
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shops { grid-template-columns: 1fr 1fr; }
  .shop-live { grid-column: 1 / -1; min-height: 0; }
}

@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .bed { justify-self: start; }
  .contact-inner { grid-template-columns: 1fr; }
  .steps, .facts { grid-template-columns: 1fr; }
  .facts li + li { border-left: 0; border-top: 1px solid var(--line); }

  .nav-toggle { display: grid; place-items: center; }
  .nav { position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 24px; background: var(--ink); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav .btn { margin-top: 18px; min-height: 48px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .cards, .shops { grid-template-columns: 1fr; }
  .shop { min-height: 0; }
  .cta-row { width: 100%; }
  .cta-row .btn { flex: 1 1 100%; }
  .bed { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bed-pass { display: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
