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

body {
  margin: 0;
  font-family: monospace;
  background: #fff;
  color: #222;
}

nav {
  font-family: monospace;
  font-size: 0.85em;
  padding: 12px 20px;
  border-bottom: 1px solid #e0e0e0;
}

nav a {
  color: inherit;
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}

main {
  max-width: 700px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

h1 {
  font-size: 1.4em;
  font-weight: normal;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

h2 {
  font-size: 0.95em;
  font-weight: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #aaa;
  margin: 0 0 16px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 12px;
}

.desc {
  font-size: 0.85em;
  color: #aaa;
  margin: 0 0 20px;
}

/* ---- Carousel ---- */
.section-carousel {
  margin-bottom: 72px;
}

.carousel-wrapper {
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.carousel-wrapper.dragging {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-track.no-transition {
  transition: none;
}

.slide {
  min-width: 100%;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.slide-label {
  font-size: 1.1em;
  color: #fff;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

/* Dots */
.dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e0e0e0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.dot.active {
  background: #222;
  transform: scale(1.3);
}

/* ---- Pinch to zoom ---- */
.section-pinch {
  margin-bottom: 40px;
}

.zoom-wrapper {
  width: 100%;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 360px;
  touch-action: none;
}

.zoom-target {
  width: 300px;
  height: 300px;
  background: #222;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.05s ease;
  cursor: zoom-in;
  user-select: none;
  touch-action: none;
}

.zoom-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.zoom-grid {
  display: grid;
  grid-template-columns: repeat(3, 28px);
  grid-template-rows: repeat(3, 28px);
  gap: 6px;
}

.zoom-cell {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.zoom-label {
  font-size: 0.6em;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.06em;
  text-align: center;
}

.zoom-scale-display {
  font-size: 1em;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
