@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/plex-regular.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/plex-medium.woff') format('woff');
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fffffe;
  --ink: #4d4c4b;
  --blue: #4a59bb;
  --border: #e2e8f0;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  background-image: url('assets/dots.png');
  background-repeat: repeat;
  background-size: 400px 840px;
}

.dot-light {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle, var(--blue) 1.4px, transparent 1.6px) 0 0 / 40px 40px;
  mask-image: radial-gradient(250px circle at var(--pointer-x) var(--pointer-y), #000, transparent);
  opacity: 0;
  transition: opacity 260ms ease;
}
.dot-light[data-active] { opacity: .75; }
main {
  position: relative;
  width: min(calc(100% - 48px), 354px);
  min-height: 874px;
  margin-inline: auto;
  padding-bottom: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.photo-stage {
  --reveal: 0;
  position: relative;
  width: min(100vw, 402px);
  height: 349px;
  flex: none;
  display: grid;
  justify-items: center;
  isolation: isolate;
}
.photo-print {
  position: absolute;
  top: 73px;
  left: 50%;
  translate: -50% 0;
  width: 210.4px;
  height: 242.8px;
  rotate: -2.5deg;
  border-radius: 1px;
  background: linear-gradient(#faf9f2, #e7e5da);
  box-shadow: 0 2px 4px #1d28594d;
}
.photo-crop {
  position: absolute;
  overflow: hidden;
  left: 12.53px;
  top: 11.58px;
  width: 185.72px;
  height: 193.10px;
}
.photo-crop img { position: absolute; width: 193.09px; height: auto; left: -4.27px; top: -57.28px; }
.photo-canvas, .tape, .note-fade { pointer-events: none; }
.photo-canvas { position: absolute; inset: 0; display: none; width: 100%; height: 100%; }
.photo-stage[data-ready] .photo-canvas { display: block; }
.photo-stage[data-ready] :is(.photo-print, .tape) { visibility: hidden; }
.tape {
  position: absolute;
  top: 61px;
  left: calc(50% - 46px);
  width: 72px;
  height: 21px;
  rotate: 7deg;
  border-radius: 1px;
  background: linear-gradient(#eae1c2bf, #eee7cda8, #cebf94ba);
  box-shadow: 0 1px 1px #49452f1f, inset 0 1px #ffffff55;
}
.note-fade {
  position: absolute;
  top: 87px;
  width: min(100%, 372px);
  height: 202px;
  background: radial-gradient(ellipse closest-side, var(--paper) 61%, transparent);
  opacity: var(--reveal);
}
.note {
  position: absolute;
  top: 142px;
  width: min(100%, 231px);
  margin: 0;
  text-align: center;
  font: 13px/23px var(--mono);
  opacity: var(--reveal);
}
.photo-button {
  position: absolute;
  top: 45px;
  width: min(100%, 250px);
  height: 281px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.photo-button:active { cursor: grabbing; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.intro { width: 100%; text-align: center; font-family: var(--mono); }
.intro h1 { margin: 0 0 8px; font-size: clamp(19px, 6vw, 24px); line-height: 31px; font-weight: 500; letter-spacing: -.7px; color: var(--blue); }
.intro p { margin: 0; font-size: 15px; line-height: 22px; }
.apps { list-style: none; display: grid; gap: 12px; padding: 0; margin: 26px 0 12px; width: 100%; }
.card {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 84px;
  padding: 12px 14px 12px 12px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 22px;
  color: inherit;
  text-decoration: none;
}
.app-icon {
  flex: 0 0 58px;
  height: 58px;
  overflow: hidden;
  mask: url('assets/icon-mask.svg') no-repeat;
}
.app-icon img { display: block; }
.card-copy { flex: 1; min-width: 0; display: grid; gap: 3px; }
.card-copy strong { font-size: 18px; line-height: 22px; font-weight: 600; }
.card-copy > span { font-size: 12px; line-height: 17px; }
.coming-soon { justify-content: center; color: #a1a1a1; font-weight: 600; }
.portfolio { display: inline-flex; min-height: 44px; align-items: center; gap: 5px; padding-inline: 8px; color: var(--blue); font-size: 14px; font-weight: 500; text-decoration: none; }
@media (hover: hover) {
  a.card:hover { border-color: var(--blue); }
  .portfolio:hover { text-decoration: underline; text-underline-offset: 3px; }
}
@media (max-width: 360px) {
  main { width: calc(100% - 32px); }
  .card { gap: 8px; padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .dot-light { display: none; }
}
