@font-face {
  font-family: "K4inoa Hand";
  src: url("../fonts/K4inoaHand.woff2") format("woff2"),
    url("../fonts/K4inoaHand.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.hand-font {
  font-family: "K4inoa Hand", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================
   Base / Theme — gallery system
   One typeface, hairline dividers, lots of air.
   Per-section accent is set via body[data-section]
   and used sparingly (active states, small marks).
   ============================================ */
:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #111110;
  --text-muted: #78766f;
  --line: rgba(17, 17, 16, 0.1);
  --line-strong: rgba(17, 17, 16, 0.22);
  --accent: #111110;
  --nav-h: 52px;
  --container-max: 1360px;
  --prose-max: 640px;
  --gap: clamp(10px, 1.6vw, 20px);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica,
    Arial, sans-serif;
}

/* Per-section accent hooks — subtle, used only for small marks. */
body[data-section="music"] {
  --accent: #b34a2e;
}
body[data-section="fuego"] {
  --accent: #b34a2e;
}
body[data-section="apps"] {
  --accent: #2e5db3;
}
body[data-section="k4"] {
  --accent: #7a4fb3;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-top: var(--nav-h);
  -webkit-font-smoothing: antialiased;
}

body.has-player-bar {
  padding-bottom: 66px;
}

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

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

.prose {
  max-width: var(--prose-max);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid var(--text);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  border-radius: 999px;
}

.btn:hover {
  background: var(--text);
  color: var(--bg);
}

.btn.btn-solid {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.btn.btn-solid:hover {
  opacity: 0.82;
}

.label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 10px;
}

h1, h2, h3 {
  line-height: 1.1;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  font-weight: 600;
}

h1 { font-size: clamp(28px, 4.4vw, 44px); }
h2 { font-size: clamp(20px, 2.6vw, 26px); }
h3 { font-size: 15px; font-weight: 600; }

p {
  color: var(--text-muted);
  margin: 0 0 16px;
}

/* ============================================
   Top nav — thin, hides on scroll down, shows on
   scroll up. Small peek-tab visible while hidden.
   ============================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: transform 0.28s ease;
}

.site-nav.is-hidden {
  transform: translateY(-100%);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
}

.logo img {
  height: 20px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.nav-links a.has-icon {
  padding: 4px 0 2px;
  display: flex;
  align-items: center;
}

.nav-icon-img {
  max-height: 22px;
  max-width: 46px;
  height: auto;
  width: auto;
  display: block;
}

.nav-peek {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, -100%);
  width: 44px;
  height: 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-top: none;
  border-radius: 0 0 10px 10px;
  z-index: 999;
  cursor: pointer;
  transition: transform 0.28s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-peek::after {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 1px;
}

.site-nav.is-hidden ~ .nav-peek {
  transform: translate(-50%, 0);
}

/* ============================================
   Landing page — signature + doorway grid
   ============================================ */
.landing {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 6vw, 64px) clamp(16px, 4vw, 48px);
  gap: clamp(28px, 6vw, 56px);
}

.signature img {
  height: clamp(44px, 7vw, 72px);
  width: auto;
  display: block;
}

.doorways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  width: 100%;
  max-width: 720px;
}

.doorways.is-single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 360px;
}

.doorway {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doorway-frame {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}

.doorway-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doorway-frame.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 12px;
}

/* ============================================
   Section header (Music / Fuego / Apps / K4)
   ============================================ */
.section-header {
  padding: clamp(40px, 8vw, 88px) 0 clamp(20px, 4vw, 36px);
}

.section-title-img {
  height: clamp(60px, 15vw, 144px);
  width: auto;
  display: block;
}

/* Compact, centered section title (Fuego, Apps). */
.section-title-img.is-compact {
  height: clamp(32px, 6vw, 56px);
  margin: 0 auto;
}

/* Apps page: short Drummakid description + App Store button. */
.app-blurb {
  max-width: 420px;
  margin: 0 auto;
  padding-bottom: clamp(48px, 10vw, 112px);
  text-align: center;
}

.app-photo {
  display: block;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 0 auto 24px;
  border: 1px solid var(--line);
}

.app-blurb h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px;
}

.app-blurb p {
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 22px;
}

.section-header .nod {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}

.section-header .nod:hover {
  color: var(--text);
}

/* ============================================
   Music — cover grid + bottom player (no swipe
   viewer here; clicking a cover loads it into
   the player instead of opening a lightbox)
   ============================================ */
.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--gap);
  padding-bottom: clamp(40px, 8vw, 80px);
}

.track-tile {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  position: relative;
}

.track-cover {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg);
}

.track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.track-meta {
  padding: 8px 10px 10px;
}

.track-meta .title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-meta .artist {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-tile .now-playing {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.track-tile.is-current .now-playing {
  display: flex;
}

.track-tile.is-current .track-cover {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: none;
  align-items: center;
  gap: 14px;
  padding: 10px clamp(16px, 4vw, 32px);
}

.player-bar.is-visible {
  display: flex;
}

.player-track {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 160px;
  flex-shrink: 0;
}

.player-cover {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg);
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.player-meta {
  min-width: 0;
}

.player-meta .title {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-meta .artist {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.player-btn {
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.player-btn:hover {
  background: var(--bg);
}

.player-btn.play-pause {
  width: 32px;
  height: 32px;
  border: 1px solid var(--text);
}

.player-seek {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.player-seek .time {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  width: 32px;
}

.player-seek .time.end {
  text-align: right;
}

.player-volume {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  width: 110px;
}

.player-bar input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--line-strong);
  outline: none;
  cursor: pointer;
}

.player-bar input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
}

.player-bar input[type="range"]::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: none;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
}

@media (max-width: 700px) {
  .player-track {
    width: auto;
  }
  .player-volume {
    display: none;
  }
}

/* ============================================
   Masonry gallery + swipeable single-piece view
   ============================================ */
.masonry {
  display: flex;
  gap: var(--gap);
  align-items: flex-start;
  padding-bottom: clamp(40px, 8vw, 80px);
}

.masonry-col {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  flex: 1;
  min-width: 0;
}

.piece {
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
}

.piece img {
  width: 100%;
  height: auto;
  display: block;
}

.piece-caption {
  padding: 10px 12px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.piece.is-audio {
  display: flex;
  flex-direction: column;
}

.piece.is-audio .piece-play {
  position: relative;
}

.piece.is-audio .piece-play::after {
  content: "▶";
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.gallery-empty {
  padding: 40px 0 80px;
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 860px) {
  .masonry {
    gap: calc(var(--gap) * 0.8);
  }
}

/* Viewer overlay */
.viewer {
  position: fixed;
  inset: 0;
  background: rgba(250, 250, 249, 0.98);
  z-index: 2000;
  display: none;
  flex-direction: column;
}

.viewer.is-open {
  display: flex;
}

.viewer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(16px, 4vw, 32px);
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.viewer-close {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--text);
  padding: 4px 8px;
}

.viewer-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 0;
  padding: 0 clamp(8px, 3vw, 24px);
}

.viewer-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewer-arrow:hover {
  background: var(--text);
  color: var(--bg);
}

.viewer-media {
  flex: 1;
  height: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.viewer-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.viewer-audio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 420px;
}

.viewer-audio img {
  max-width: 320px;
  max-height: 50vh;
  object-fit: contain;
  border: 1px solid var(--line);
}

.viewer-audio-title {
  text-align: center;
}

.viewer-audio-title h3 {
  margin-bottom: 4px;
}

.viewer-audio-title p {
  margin: 0;
  font-size: 12px;
}

.viewer-caption {
  text-align: center;
  padding: 14px 0 22px;
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .viewer-arrow {
    width: 34px;
    height: 34px;
  }
}

/* ============================================
   Footer
   ============================================ */
footer {
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
}
