/* Pixels on Ridge, 2026 redesign. Concept: the diagonal on the grid. */
@font-face { font-family: "Archivo"; src: url("/fonts/v2/archivo-800x.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/v2/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("/fonts/v2/dm-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  /* color */
  --paper: #f5f3ee;
  --white: #ffffff;
  --ink: #14161a;
  --schist: #3a4049;
  --schist-deep: #262a31;
  --line: #ddd9d0;
  --muted: #5c626b;
  --signal: #c8371f;
  --signal-hover: #a92c17;
  --sodium: #f2b544;
  /* type */
  --display: "Archivo", "Arial Black", system-ui, sans-serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  --step-3: clamp(2.25rem, 1.6rem + 2.6vw, 3.75rem);
  --step-4: clamp(2.75rem, 1.6rem + 5vw, 5.75rem);
  /* space (8px unit) */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --section: clamp(64px, 9vw, 120px);
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --r-well: 4px;
  --r-card: 8px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--step-0)/1.55 var(--text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, canvas { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-thickness .15s, color .15s; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; font-stretch: 112%; line-height: 0.98; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.skip { position: absolute; left: var(--s2); top: -60px; background: var(--ink); color: #fff; padding: var(--s1) var(--s2); z-index: 50; text-decoration: none; }
.skip:focus { top: var(--s2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.kicker { display: inline-flex; align-items: center; gap: var(--s1); }
.kicker::before { content: ""; width: 10px; height: 10px; background: var(--signal); }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-height: 48px; padding: 0 var(--s3);
  font: 600 1rem/1 var(--text); text-decoration: none;
  background: var(--signal); color: #fff; border: 0; border-radius: var(--r-well);
  transition: background .15s, transform .15s var(--ease);
}
.btn:hover { background: var(--signal-hover); transform: translateY(-1px); }
.btn.dark { background: var(--ink); }
.btn.dark:hover { background: #000; }
.btn.light { background: var(--white); color: var(--ink); }
.btn.light:hover { background: var(--paper); }
.tlink { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; }
.tlink:hover { text-decoration-thickness: 3px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(245, 243, 238, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.0625rem/1 var(--display); font-stretch: 112%; letter-spacing: -0.01em; }
.brand:hover .mark { transform: rotate(-6deg); }
.mark { width: 36px; height: 36px; flex: none; position: relative; transition: transform .25s var(--ease); }
.mark svg, .mark canvas { width: 100%; height: 100%; }
.mark canvas { position: absolute; inset: 0; }
.mark.rive-on svg { visibility: hidden; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { padding: 10px 12px; font-size: 0.9375rem; font-weight: 600; text-decoration: none; color: var(--muted); border-radius: var(--r-well); transition: color .15s, background .15s; }
.nav a:hover { color: var(--ink); background: var(--white); }
.nav a.btn { color: #fff; margin-left: var(--s1); min-height: 40px; padding: 0 var(--s2); }
.nav a.btn:hover { background: #000; }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding: var(--s6) 0 var(--section); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--hero-art, none) center / cover no-repeat;
  opacity: .9;
}
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--s5); align-items: center; }
.hero h1 { font-size: var(--step-4); margin: var(--s3) 0; max-width: 11ch; }
.hero .lede { font-size: var(--step-1); color: var(--muted); max-width: 36ch; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s4); }
.facts { display: flex; flex-wrap: wrap; gap: var(--s4); margin-top: var(--s5); padding-top: var(--s3); border-top: 1px solid var(--line); }
.facts b { display: block; font: 800 2rem/1 var(--display); font-stretch: 112%; }
.facts span { display: block; margin-top: 6px; }

.plinth {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-card);
  background: var(--schist) var(--schist-art, none) center / cover;
  display: grid; place-items: center; overflow: hidden;
}
.plinth::after { /* the one diagonal */
  content: ""; position: absolute; left: -10%; right: -10%; top: 50%; height: 2px;
  background: var(--sodium); opacity: .55; transform: rotate(-38deg);
}
.device { position: relative; z-index: 1; width: 78%; aspect-ratio: 600 / 900; }
.device img { width: 100%; height: 100%; filter: drop-shadow(0 28px 32px rgba(0, 0, 0, .35)); }
.face {
  position: absolute; left: 22.3%; top: 29.7%; width: 57%; aspect-ratio: 1;
  background: #0b0b0b; color: #fff; overflow: hidden;
  display: grid; grid-template-columns: .95fr 1.25fr; align-items: center; padding: 8% 6% 8% 7%;
  container-type: inline-size;
}
.face canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.face.rive-on > :not(canvas) { visibility: hidden; }
.face .col { display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.face .bar { height: 2px; width: 88%; background: #444; position: relative; margin-bottom: 6cqi; }
.face .bar i { position: absolute; inset: 0 auto 0 0; background: #fff; }
.face b { display: block; font: 700 9cqi/1 var(--text); }
.face small { display: block; margin-top: 3cqi; font: italic 400 6.2cqi/1.15 var(--text); color: #ccc; }
.face small strong { color: #fff; font-weight: 700; }
.face .time { font: 800 37cqi/.84 var(--display); font-stretch: 100%; letter-spacing: -0.03em; text-align: right; font-variant-numeric: tabular-nums; }
.face .time .hot { color: var(--signal); }
.caption { position: absolute; left: var(--s2); bottom: var(--s2); z-index: 1; color: #c9ccd1; }
@media (max-width: 880px) {
  .hero { padding-top: var(--s4); }
  .hero .wrap { grid-template-columns: 1fr; }
  .plinth { aspect-ratio: 1; max-width: 420px; width: 100%; justify-self: center; }
  .device { width: 54%; }
}

/* Sections */
section { scroll-margin-top: 72px; }
.section { padding: var(--section) 0; }
.section.white { background: var(--white); }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s3); margin-bottom: var(--s5); }
.head h2 { font-size: var(--step-3); margin-top: var(--s2); }
.head p { color: var(--muted); max-width: 42ch; }

/* Filter */
.filter { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s1); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s1); }
.chip {
  min-height: 44px; padding: 0 var(--s2);
  font: 600 0.9375rem/1 var(--text); color: var(--ink);
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-well); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { background: var(--white); border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (max-width: 720px) { .filter { align-items: flex-start; } }

/* Face grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3) var(--s2); }
@media (max-width: 1040px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .grid { grid-template-columns: repeat(2, 1fr); gap: var(--s3) 12px; } }
.card { display: flex; flex-direction: column; }
.card[hidden] { display: none; }
.well {
  background: var(--white); border-radius: var(--r-well); aspect-ratio: 4 / 5;
  display: grid; place-items: center; overflow: hidden; position: relative;
}
.well::before { /* faint grid in each well */
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--paper) 1px, transparent 1px), linear-gradient(90deg, var(--paper) 1px, transparent 1px);
  background-size: 24px 24px; opacity: .9;
}
.well img { position: absolute; top: 4%; left: 0; right: 0; margin: 0 auto; height: 92%; width: auto; transition: transform .45s var(--ease); }
.promo { background: var(--ink); color: #fff; border-radius: var(--r-well); padding: var(--s3); text-decoration: none; display: flex; flex-direction: column; justify-content: space-between; gap: var(--s3); min-height: 100%; transition: background .2s; }
.promo:hover { background: var(--schist); }
.promo .mono { color: var(--sodium); }
.promo strong { font: 800 var(--step-2)/1.05 var(--display); font-stretch: 112%; display: block; }
.promo span.go { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.promo:hover span.go { text-decoration-thickness: 3px; }
.card:hover .well img, .card:focus-within .well img { transform: translateY(-6px) rotate(-2deg); }
.white .well { background: var(--paper); }
.white .well::before { background-image: linear-gradient(var(--white) 1px, transparent 1px), linear-gradient(90deg, var(--white) 1px, transparent 1px); }
.card .meta { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s1); margin-top: var(--s2); }
.card h3 { font-size: var(--step-1); font-stretch: 105%; letter-spacing: -0.01em; }
.card h3 [lang="ja"] { font-family: var(--text); font-weight: 400; color: var(--muted); font-size: 0.875rem; margin-left: 4px; }
.price { font-family: var(--mono); font-size: 0.875rem; color: var(--muted); white-space: nowrap; }
.price.free { color: var(--signal); }
.card p { margin-top: 6px; color: var(--muted); font-size: 0.9375rem; flex: 1; }
.card .open { margin-top: 10px; font-size: 0.875rem; font-weight: 600; align-self: start; min-height: 32px; display: inline-flex; align-items: center; }
@media (max-width: 760px) { .card p { font-size: 0.875rem; } .card h3 { font-size: 1.0625rem; } }

/* Design notes */
.notes { display: grid; gap: var(--s6); }
.note { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); align-items: center; }
.note:nth-child(even) .note-art { order: 2; }
.note-art { background: var(--paper); border-radius: var(--r-card); aspect-ratio: 5 / 4; display: grid; place-items: center; position: relative; overflow: hidden; }
.note-art::after { content: ""; position: absolute; left: -10%; right: -10%; top: 62%; height: 2px; background: var(--signal); opacity: .5; transform: rotate(-30deg); }
.note-art img { position: absolute; z-index: 1; top: 6%; left: 0; right: 0; margin: 0 auto; height: 88%; width: auto; }
.note h3 { font-size: var(--step-2); margin: var(--s2) 0; }
.note p { color: var(--muted); max-width: 44ch; }
.note p + p { margin-top: var(--s2); }
@media (max-width: 760px) { .note { grid-template-columns: 1fr; gap: var(--s3); } .note:nth-child(even) .note-art { order: 0; } }

/* Apps */
.apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
@media (max-width: 760px) { .apps-grid { grid-template-columns: 1fr; } }
.app { background: var(--white); border-radius: var(--r-card); padding: var(--s3); display: grid; grid-template-columns: 96px 1fr; gap: var(--s2); align-items: center; }
.app .spot { width: 96px; height: 96px; border-radius: var(--r-well); background: var(--paper); object-fit: cover; }
.app h3 { font-size: var(--step-1); font-stretch: 105%; }
.app p { color: var(--muted); font-size: 0.9375rem; margin-top: 4px; }
.app .row { display: flex; justify-content: space-between; gap: var(--s1); align-items: baseline; }
.app .open { grid-column: 1 / -1; font-size: 0.875rem; font-weight: 600; }
.app-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin-bottom: var(--s3); }
.app-shots .well { aspect-ratio: 1; }
@media (max-width: 760px) { .app-shots { display: none; } }

/* Bundles: the one Schist band */
.night { position: relative; background: var(--schist-deep); color: #fff; overflow: hidden; }
.night::before { content: ""; position: absolute; inset: 0; background: var(--night-art, none) center / cover; opacity: .35; }
.night .wrap { position: relative; display: grid; grid-template-columns: 1fr 1.25fr; gap: var(--s5); align-items: center; }
.night .mono { color: #a9afb8; }
.night h2 { font-size: var(--step-3); margin: var(--s2) 0 var(--s3); }
.night .lead { color: #d3d6db; max-width: 40ch; }
.night .lead strong { color: var(--sodium); font-weight: 600; }
.night .tlink { color: #fff; }
.deal { position: relative; aspect-ratio: 3 / 2; margin-bottom: var(--s3); }
.deal canvas, .deal .fan { position: absolute; inset: 0; width: 100%; height: 100%; }
.deal.rive-on .fan { visibility: hidden; }
.fan { display: grid; place-items: center; }
.fan img { position: absolute; width: 30%; top: 8%; left: 35%; transform-origin: 50% 120%; transition: transform .7s var(--ease); filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .35)); }
.fan img:nth-child(1) { transform: rotate(-24deg) translateX(-40%); }
.fan img:nth-child(2) { transform: rotate(-12deg) translateX(-20%); }
.fan img:nth-child(3) { transform: none; z-index: 2; }
.fan img:nth-child(4) { transform: rotate(12deg) translateX(20%); }
.fan img:nth-child(5) { transform: rotate(24deg) translateX(40%); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.plan { border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--r-card); padding: var(--s3); display: flex; flex-direction: column; gap: var(--s2); background: rgba(20, 22, 26, .45); }
.plan.pick { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.plan h3 { font-size: var(--step-1); font-stretch: 105%; }
.plan .amount { font: 800 3rem/1 var(--display); font-stretch: 112%; letter-spacing: -0.03em; }
.plan .amount small { font-size: 1.25rem; vertical-align: top; margin-right: 2px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.9375rem; }
.plan li::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--sodium); margin-right: 10px; vertical-align: middle; }
.plan.pick li::before { background: var(--signal); }
.plan .vs { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }
.plan .btn { margin-top: auto; }
@media (max-width: 880px) { .night .wrap { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .plans { grid-template-columns: 1fr; } }

/* Quotes */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
@media (max-width: 880px) { .quotes { grid-template-columns: 1fr; } }
.quote { margin: 0; padding-top: var(--s3); border-top: 2px solid var(--ink); }
.quote blockquote { margin: 0; font: 600 var(--step-1)/1.4 var(--text); letter-spacing: -0.01em; }
.quote figcaption { margin-top: var(--s2); }

/* Studio */
.studio { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); align-items: end; }
.studio h2 { font-size: var(--step-3); }
.studio p { color: var(--muted); max-width: 46ch; }
.studio p + p { margin-top: var(--s2); }
@media (max-width: 760px) { .studio { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--ink); color: #c4c8ce; padding: var(--s6) 0 var(--s4); font-size: 0.9375rem; }
.site-footer .top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s4); }
.site-footer .brand { color: #fff; display: inline-flex; padding: 0; }
.site-footer h2 { font: 500 0.8125rem/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: #8a9099; margin: 0 0 var(--s2); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer a { text-decoration: none; display: inline-block; padding: 6px 0; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 2px; }
.site-footer .about p { margin-top: var(--s2); max-width: 34ch; }
.site-footer .bottom { margin-top: var(--s5); padding-top: var(--s3); border-top: 1px solid #2c3037; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); font-size: 0.875rem; }
.site-footer .credit a { color: #fff; font-weight: 600; text-decoration: underline; padding: 0; }
@media (max-width: 720px) { .site-footer .top { grid-template-columns: 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }

/* Reveal: content is visible without JS; JS opts in */
.js .reveal { opacity: 0; transition: opacity .7s ease; }
.js .reveal.in { opacity: 1; }

/* Journal */
.page-hero { padding: var(--s6) 0 var(--s4); }
.page-hero h1 { font-size: var(--step-4); margin-top: var(--s2); }
.page-hero p { color: var(--muted); margin-top: var(--s2); font-size: var(--step-1); max-width: 44ch; }
.posts { display: grid; gap: 0; padding-bottom: var(--section); }
.post-item { display: grid; grid-template-columns: 180px 1fr 140px; gap: var(--s3); align-items: baseline; padding: var(--s3) 0; border-top: 1px solid var(--line); text-decoration: none; }
.post-item:last-child { border-bottom: 1px solid var(--line); }
.post-item h2 { font-size: var(--step-2); font-stretch: 105%; letter-spacing: -0.01em; transition: color .15s; }
.post-item:hover h2 { color: var(--signal); }
.post-item .cat { text-align: right; }
@media (max-width: 640px) { .post-item { grid-template-columns: 1fr; gap: 6px; } .post-item .cat { text-align: left; } }
.article { max-width: 720px; margin: 0 auto; padding: var(--s5) 0 var(--section); }
.article h1 { font-size: var(--step-3); margin: var(--s3) 0; }
.byline { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.9375rem; padding-bottom: var(--s4); margin-bottom: var(--s4); border-bottom: 1px solid var(--line); }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.byline a { color: var(--ink); font-weight: 600; }
.prose { font-size: 1.125rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: var(--step-2); margin-top: 1.8em; }
.prose h3 { font-size: var(--step-1); margin-top: 1.6em; font-stretch: 100%; }
.prose a { color: var(--signal); }
.prose a:hover { color: var(--signal-hover); }
.prose img { border-radius: var(--r-well); margin: 1.5em auto; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose blockquote { margin: 1.5em 0; padding-left: var(--s3); border-left: 3px solid var(--signal); color: var(--muted); }
.prose code { font-family: var(--mono); font-size: .85em; background: #ebe8e0; padding: 2px 6px; border-radius: 3px; }
.prose pre { background: var(--ink) !important; color: #eee; border-radius: var(--r-well); padding: var(--s3) !important; overflow-x: auto; font-size: 0.875rem; line-height: 1.6; }
.prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; }

/* Audit fixes: explicit paper backgrounds, stronger hover cues */
.hero, .section:not(.white):not(.night), .page-hero { background-color: var(--paper); }
.hero { isolation: isolate; }
.tlink:hover { color: var(--signal); }
.night .tlink:hover, .promo .go:hover { color: var(--sodium); }
.site-footer .credit a:hover { color: var(--sodium); text-decoration-thickness: 3px; }

/* Typography tightening (owner review 11-12) */
h1, h2, h3 { line-height: 0.94; letter-spacing: -0.03em; }
.hero h1 { letter-spacing: -0.035em; margin: 20px 0; }
.head h2, .night h2, .studio h2 { letter-spacing: -0.035em; }
.hero .lede, .head p, .note p, .studio p, .night .lead { line-height: 1.45; }
.mono { font-size: 0.75rem; letter-spacing: 0.06em; }
.kicker::before { width: 8px; height: 8px; }
.facts { gap: 40px; }
.facts b { font-size: 2.25rem; letter-spacing: -0.03em; line-height: 1; }
.facts span { font: 600 0.875rem/1.2 var(--text); letter-spacing: 0; text-transform: none; color: var(--muted); margin-top: 6px; }
.card h3 { font-stretch: 100%; letter-spacing: -0.02em; line-height: 1.05; }
.card .meta { margin-top: 14px; }
.card p { line-height: 1.4; }
.note h3 { line-height: 1; letter-spacing: -0.03em; }
.plan .amount { letter-spacing: -0.04em; }
.quote blockquote { line-height: 1.35; letter-spacing: -0.015em; }
.app h3, .plan h3 { font-stretch: 100%; letter-spacing: -0.02em; }
.post-item h2 { letter-spacing: -0.025em; line-height: 1.05; }
h1, h2, h3 { text-wrap: balance; }
p, blockquote { text-wrap: pretty; }

/* Hard lines between hero and shop: a bezel ruler (minute ticks, a long tick every 5) */
.hero { border-bottom: 2px solid var(--ink); }
.bezel {
  height: 22px; background-color: var(--white);
  background-image:
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 80px),
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 16px);
  background-size: 100% 18px, 100% 8px;
  background-repeat: no-repeat;
  background-position: var(--gutter) 0, var(--gutter) 0;
  border-bottom: 1px solid var(--line);
}
#faces { padding-top: calc(var(--section) - 22px); }
#faces .head { padding-bottom: var(--s3); border-bottom: 2px solid var(--ink); }

/* Earp Works callout */
.studio .earp {
  grid-column: 1 / -1; margin-top: var(--s4);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3);
  background: var(--ink); color: #fff; border-radius: var(--r-card); padding: var(--s4);
  border-left: 8px solid var(--signal);
}
.studio .earp .mono { color: var(--sodium); }
.studio .earp h3 { font-size: var(--step-2); margin: 12px 0 10px; color: #fff; max-width: 22ch; }
.studio .earp p { color: #c4c8ce; max-width: 46ch; }
.studio .earp .btn { flex: none; }
@media (max-width: 760px) { .studio .earp { padding: var(--s3); } .studio .earp .btn { width: 100%; } }

/* Night band: pixel mosaic of the Ridge diagonal + newspaper halftone */
.night::before { opacity: .5; background-position: center; }
.night::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at center, rgba(245, 243, 238, .16) 1.1px, transparent 1.6px);
  background-size: 7px 7px;
  -webkit-mask-image: linear-gradient(105deg, #000 0%, transparent 55%, #000 100%);
  mask-image: linear-gradient(105deg, #000 0%, transparent 55%, #000 100%);
}
.night .wrap { z-index: 1; }
.night::before {
  opacity: 1;
  background:
    linear-gradient(90deg, rgba(38, 42, 49, .94) 0%, rgba(38, 42, 49, .82) 38%, rgba(38, 42, 49, .35) 62%, rgba(38, 42, 49, .45) 100%),
    var(--night-art, none) center / cover no-repeat;
}
@media (max-width: 880px) { .night::before { background: linear-gradient(rgba(38, 42, 49, .82), rgba(38, 42, 49, .7)), var(--night-art, none) center / cover no-repeat; } }

/* Hero as an owner quote */
.hero h1.quote-h { position: relative; max-width: 9ch; margin-bottom: 14px; }
.hero h1.quote-h .hang { position: absolute; right: 100%; margin-right: .04em; color: var(--signal); }
@media (max-width: 1340px) { .hero h1.quote-h .hang { position: static; margin: 0; } }
.hero .said { margin-bottom: var(--s3); }

/* Design notes: Ridge Step stair replaces the flat line; staggered load-in */
.note-art::after { display: none; }
.stair { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.stair i {
  position: absolute; width: 7%; aspect-ratio: 1;
  left: calc(2% + var(--i) * 9.6%); bottom: calc(4% + var(--i) * 9.6%);
  background: var(--ink); opacity: .9;
}
.stair i:nth-child(odd) { background: var(--schist); }
.stair i:last-child { background: var(--signal); opacity: 1; }
.note:nth-child(even) .stair { transform: scaleX(-1); }

.js .note .stair i { transform: scale(0); transition: transform .45s cubic-bezier(.3, 1.4, .5, 1) calc(var(--i) * 70ms); }
.js .note.in .stair i { transform: scale(1); }
.js .note .note-art img { opacity: 0; transform: translateY(28px) rotate(-3deg); filter: brightness(.35); transition: opacity .6s ease .15s, transform .9s var(--ease) .15s, filter .9s ease .55s; }
.js .note.in .note-art img { opacity: 1; transform: none; filter: brightness(1); }
.js .note .note-art + div > * { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s var(--ease); }
.js .note.in .note-art + div > * { opacity: 1; transform: none; }
.js .note.in .note-art + div > :nth-child(1) { transition-delay: .35s; }
.js .note.in .note-art + div > :nth-child(2) { transition-delay: .45s; }
.js .note.in .note-art + div > :nth-child(3) { transition-delay: .55s; }
.js .note.in .note-art + div > :nth-child(4) { transition-delay: .65s; }
.js .note.reveal { opacity: 1; }

/* Bento face grid: featured Medium 2x2 up front, bundle tile 2x2 at the end */
@media (min-width: 1041px) {
  .grid .feature, .grid .promo { grid-column: span 2; grid-row: span 2; }
}
@media (min-width: 761px) and (max-width: 1040px) {
  .grid .feature { grid-column: span 2; grid-row: span 2; }
}
@media (max-width: 760px) {
  .grid .feature, .grid .promo { grid-column: span 2; }
}
.grid .feature .well { aspect-ratio: auto; flex: 1; min-height: 360px; background: var(--ink); }
.grid .feature .well::before { background-image: linear-gradient(#22252b 1px, transparent 1px), linear-gradient(90deg, #22252b 1px, transparent 1px); background-size: 32px 32px; }
.grid .feature h3 { font-size: var(--step-2); }
.grid .feature p { flex: none; font-size: 1rem; }
.grid .promo { justify-content: flex-end; padding: var(--s4); }
.grid .promo strong { font-size: var(--step-3); max-width: 9ch; }
#face-grid.filtered .feature, #face-grid.filtered .promo { grid-column: auto; grid-row: auto; }
#face-grid.filtered .feature .well { aspect-ratio: 4 / 5; min-height: 0; flex: none; }

/* Asymmetric design notes */
@media (min-width: 761px) {
  .notes { gap: var(--s7); }
  .note { grid-template-columns: repeat(12, 1fr); gap: var(--s3); align-items: start; }
  .note:nth-child(even) .note-art { order: 0; }
  .note-a .note-art { grid-column: 1 / 8; aspect-ratio: 4 / 3; }
  .note-a .note-art + div { grid-column: 9 / 13; align-self: end; padding-bottom: var(--s4); }
  .note-b .note-art + div { grid-column: 1 / 6; grid-row: 1; padding-top: var(--s4); }
  .note-b .note-art { grid-column: 6 / 13; grid-row: 1; margin-top: var(--s7); aspect-ratio: 16 / 10; background: var(--white); }
  .note-c .note-art { grid-column: 2 / 9; grid-row: 1; aspect-ratio: 5 / 4; background: var(--schist); }
  .note-c .note-art + div { grid-column: 8 / 13; grid-row: 1; align-self: center; position: relative; z-index: 2; background: var(--white); padding: var(--s4); border-top: 4px solid var(--signal); box-shadow: 0 24px 48px -28px rgba(20, 22, 26, .35); }
  .note-c .stair i { background: var(--paper); opacity: .25; }
  .note-c .stair i:last-child { background: var(--signal); opacity: 1; }
}

/* Notice: no new faces, Gallery closing, now Earp Works */
.notice { background: var(--ink); color: #d3d6db; font-size: 0.9375rem; line-height: 1.45; }
.notice .wrap { padding-top: 12px; padding-bottom: 12px; }
.notice strong { color: #fff; font-weight: 600; }
.notice a { color: var(--sodium); font-weight: 600; text-decoration: underline; }
.notice a:hover { color: #fff; text-decoration-thickness: 2px; }
.after-close { display: none; }
.archived .before-close { display: none; }
.archived .after-close { display: inline; }
/* Archive mode (set by JS after the Gallery closes): showcase only */
.archived .price, .archived .card .open, .archived .app .open, .archived #bundles, .archived .promo,
.archived .nav a[href="#bundles"], .archived .hero .actions .tlink, .archived .site-footer a[href="#bundles"] { display: none; }
.promo-note { font-size: 0.875rem; color: #c4c8ce; }

/* Bundle tile as a full-width banner at the end of the grid */
@media (min-width: 761px) {
  .grid .promo { grid-column: 1 / -1; grid-row: auto; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s2) var(--s4); padding: var(--s4); }
  .grid .promo strong { max-width: none; font-size: var(--step-2); }
}

/* Bezel turns with scroll; red index tick stays at centre */
.bezel { position: relative; background-position: calc(var(--gutter) - var(--bezel, 0px)) 0, calc(var(--gutter) - var(--bezel, 0px)) 0; will-change: background-position; }
.bezel::after { content: ""; position: absolute; left: 50%; top: -2px; width: 4px; height: 24px; margin-left: -2px; background: var(--signal); }
.bezel::before { content: ""; position: absolute; left: 50%; top: -9px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top: 7px solid var(--signal); }

/* Pixel field behind the design notes (canvas); the stair stays as the no-JS fallback */
.note-art .pfield { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.note-art.pf-on .stair { display: none; }
.note-a .note-art, .note-b .note-art { background: var(--white); }
.js .note .pfield { opacity: 0; transition: opacity 1s ease .1s; }
.js .note.in .pfield { opacity: 1; }

/* Hero in the pixel language: crisp faint grid backdrop, ink panel with a live pixel field */
.hero::before {
  background-image: linear-gradient(rgba(20, 22, 26, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(20, 22, 26, .06) 1px, transparent 1px);
  background-size: 28px 28px; background-position: -1px -1px; opacity: 1;
  -webkit-mask-image: radial-gradient(120% 90% at 70% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(120% 90% at 70% 40%, #000 30%, transparent 75%);
}
.plinth { background: var(--ink); }
.plinth::after { display: none; }
.plinth .pfield { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.plinth .caption { z-index: 2; color: #9aa0a8; }
.hero-grid { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
  -webkit-mask-image: radial-gradient(130% 100% at 60% 50%, #000 45%, transparent 85%); mask-image: radial-gradient(130% 100% at 60% 50%, #000 45%, transparent 85%); }
.hero::before { background-position: 0 0; }

/* Card hover: the well "wakes" (grid goes dark, steps one cell), red index pixel, watch lifts */
.well { transition: background-color .35s ease; }
.well::before { transition: opacity .35s ease; }
.well::after {
  content: ""; position: absolute; top: 12px; right: 12px; width: 10px; height: 10px; z-index: 2;
  background: var(--signal); transform: scale(0); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1) .1s;
}
.card:hover .well, .card:focus-within .well { background-color: var(--ink); }
.card:hover .well::before, .card:focus-within .well::before {
  background-image: linear-gradient(#2a2e35 1px, transparent 1px), linear-gradient(90deg, #2a2e35 1px, transparent 1px);
  animation: grid-step .5s steps(4) both;
}
.card:hover .well::after, .card:focus-within .well::after { transform: scale(1); }
.card:hover .well img, .card:focus-within .well img { transform: translateY(-8px) scale(1.03); filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .45)); }
.well img { transition: transform .45s var(--ease), filter .45s ease; }
@keyframes grid-step { from { background-position: 0 0; } to { background-position: 24px 24px; } }
.grid .feature:hover .well::before { animation-name: grid-step-lg; }
@keyframes grid-step-lg { from { background-position: 0 0; } to { background-position: 32px 32px; } }

/* "On the wrist": play button turns the tile edge-on, swaps to the wrist photo, turns back */
.well { transition: background-color .35s ease, transform .22s ease-in; }
.well.turning { transform: perspective(900px) rotateY(90deg); }
.well .wrist { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 3; opacity: 0; border-radius: var(--r-well); }
.card.on-wrist .well .wrist { opacity: 1; }
.wrist-btn {
  position: absolute; left: 12px; bottom: 12px; z-index: 4; display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px 0 10px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--ink); color: #fff; font: 600 0.8125rem/1 var(--text);
  transition: background .15s, transform .15s;
}
.wrist-btn:hover { background: var(--signal); transform: translateY(-1px); }
.wrist-btn svg { width: 14px; height: 14px; }
.card.on-wrist .wrist-btn { background: var(--paper); color: var(--ink); }
.card.on-wrist .wrist-btn:hover { background: #fff; }
.archived .wrist-btn { display: inline-flex; }

/* Thank-you note to supporters */
.thanks { margin-top: var(--s6); max-width: 720px; margin-left: auto; padding: var(--s4) var(--s4) var(--s4) var(--s5); background: var(--white); border-left: 4px solid var(--signal); position: relative; }
.thanks::before { content: ""; position: absolute; left: -4px; top: 0; width: 4px; height: 24px; background: var(--ink); }
.thanks .thanks-lead { font: 800 var(--step-3)/1 var(--display); font-stretch: 112%; letter-spacing: -0.035em; margin: var(--s2) 0 var(--s3); }
.thanks p { color: var(--muted); font-size: 1.0625rem; line-height: 1.55; max-width: 56ch; }
.thanks p + p { margin-top: var(--s2); }
.thanks .thanks-lead + p { margin-top: 0; }
.thanks .sig { margin-top: var(--s3); color: var(--ink); }
@media (max-width: 760px) { .thanks { padding: var(--s3); } }
.thanks p.thanks-lead { color: var(--ink); font-size: var(--step-3); line-height: 1; }

/* Earp Works CTA runner strip */
.studio .earp { position: relative; overflow: hidden; padding-bottom: calc(var(--s4) + min(120px, 10.7vw)); }
.earp-run { position: absolute; left: 8px; right: 0; bottom: 0; aspect-ratio: 1120 / 120; max-height: 120px; }
.earp-run img, .earp-run canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.earp-run.rive-on img { visibility: hidden; }

/* Creator portrait (pixel art) */
.creator { margin: 0 0 var(--s5); display: flex; align-items: flex-end; gap: var(--s3); }
.creator img { width: 160px; height: 160px; image-rendering: pixelated; background: var(--paper); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--signal); }
.creator figcaption { display: flex; flex-direction: column; gap: 4px; padding-bottom: 6px; }
.creator b { font: 800 1.25rem/1 var(--display); font-stretch: 105%; letter-spacing: -0.02em; }
.studio { align-items: start; }

/* Thank-you note: full-width, two columns aligned to the quote grid */
.thanks { max-width: none; margin-left: 0; display: grid; grid-template-columns: 1fr 2fr; gap: var(--s3) var(--s5); align-items: start; padding: var(--s5); }
.thanks .thanks-lead { margin-bottom: 0; }
.thanks-body p { max-width: 60ch; }
.thanks .sig { display: flex; align-items: center; gap: 12px; margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }
.thanks .sig img { width: 48px; height: 48px; image-rendering: pixelated; background: var(--paper); border: 2px solid var(--ink); }
.thanks .sig b { display: block; font: 800 1rem/1.1 var(--display); font-stretch: 105%; color: var(--ink); }
.thanks .sig .mono { color: var(--muted); }
@media (max-width: 760px) { .thanks { grid-template-columns: 1fr; padding: var(--s3); } }

/* Talking pixel creator (sprite sheet: idle, blink, talk, wave) */
.creator { display: none; }
.me { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 0 var(--s2); margin: 0 0 var(--s3); }
.me-sprite {
  --f: 0; width: 200px; aspect-ratio: 1; grid-row: 1 / 3;
  background: url("/images/brand/brandon-sprite.webp") calc(var(--f) * 100% / 3) 0 / 400% 100% no-repeat;
  image-rendering: pixelated;
}
.me-name { grid-column: 2; display: flex; flex-direction: column; gap: 4px; padding-bottom: 14px; }
.me-name b { font: 800 1.25rem/1 var(--display); font-stretch: 105%; letter-spacing: -0.02em; }
.me-bubble {
  grid-column: 2; align-self: end; justify-self: start; position: relative; margin-bottom: var(--s2);
  background: var(--white); color: var(--ink); font: 600 0.9375rem/1.35 var(--text);
  padding: 10px 14px; min-height: 2.6em; max-width: 26ch;
  /* stepped pixel border */
  box-shadow: 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink), -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink), 6px 6px 0 0 var(--signal);
}
.me-bubble::after { content: ""; position: absolute; left: -12px; bottom: 10px; width: 9px; height: 9px; background: var(--ink); box-shadow: -6px 6px 0 0 var(--ink); }
#me-text::after { content: "\2588"; font-size: .7em; margin-left: 2px; color: var(--signal); animation: me-caret 1s steps(1) infinite; }
@keyframes me-caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #me-text::after { display: none; } }
@media (max-width: 520px) { .me-sprite { width: 140px; } .me-bubble { max-width: 20ch; font-size: .875rem; } }

/* Pixel city behind the Earp Works CTA */
.studio .earp { isolation: isolate; min-height: 320px; }
.studio .earp .pixel-city { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.studio .earp > div:first-of-type, .studio .earp .btn { position: relative; z-index: 1; }
.studio .earp > div:first-of-type { text-shadow: 0 2px 0 #14161A; }
.studio .earp .btn { box-shadow: 0 0 0 6px #14161A, 6px 6px 0 6px var(--sodium); }
.studio .earp .btn:hover { box-shadow: 0 0 0 6px #14161A, 3px 3px 0 6px var(--sodium); transform: translate(2px, 2px); }
.earp-run { z-index: 1; bottom: 6px; }
.studio .me-name b { color: var(--ink); }
.studio .me-name .mono { color: var(--muted); }
.me { grid-template-columns: auto 1fr; }
.me-name { grid-row: 1 / 3; align-self: end; }

/* Morph sprite: 6 frames */
.me { display: block; }
.me-sprite { width: 240px; background-size: 600% 100%; background-position: calc(var(--f) * 100% / 5) 0; position: relative; }
.me-sprite::after { content: ""; position: absolute; inset: 10%; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.95) 0 30%, rgba(242,181,68,.35) 55%, transparent 70%); opacity: 0; transition: opacity .12s steps(2); pointer-events: none; }
.me.flash .me-sprite::after { opacity: 1; }
@media (max-width: 520px) { .me-sprite { width: 180px; } }

/* Bezel: endless ticks, plus a tape end that slides to the index as you scroll away */
.bezel { overflow: hidden; background-repeat: repeat-x, repeat-x; background-size: 80px 18px, 16px 8px; }
.bezel-end {
  position: absolute; top: -2px; bottom: 0; left: calc(50% + var(--end, 2000px)); width: 120vw; z-index: 0;
  background: repeating-linear-gradient(90deg, rgba(20, 22, 26, .18) 0 1px, transparent 1px 8px), var(--sodium);
  border-left: 6px solid var(--ink);
}
.bezel-end::before { content: ""; position: absolute; left: -6px; top: 0; width: 14px; height: 30px; background: var(--ink); }  /* the tape's hook */
.bezel::before, .bezel::after { z-index: 1; }
