/* marcugarcia.com v2 — a walk-through, warm workshop palette */

@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('../assets/fonts/cabinet-grotesk-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('../assets/fonts/cabinet-grotesk-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('../assets/fonts/cabinet-grotesk-800.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}

:root {
  --bg: #241a15;
  --deep: #1a120e;
  --ink: #f2ead9;
  --muted: #b39c86;
  --accent: #b08d57;
  --step-body: clamp(16px, 1.1vw, 18px);
  --step-head: clamp(28px, 2.6vw, 40px);
  --margin: clamp(20px, 3vw, 44px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
}

body {
  color: var(--ink);
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: var(--step-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}
#stage:active { cursor: grabbing; }

/* ---------- title ---------- */

.title {
  position: fixed;
  top: clamp(16px, 5vh, 48px);
  left: var(--margin);
  z-index: 4;
  pointer-events: none;
  transition: opacity 500ms var(--ease-out);
}

.title h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(64px, 9vw, 150px);
  line-height: 0.86;
  letter-spacing: -0.04em;
}

.title .l1 { color: var(--accent); }
.title .l2 { color: var(--ink); }

.title .tag {
  margin: 18px 0 0 4px;
  max-width: 30ch;
  font-size: 18px;
  color: #c9b299;
}

/* ---------- captions ---------- */

.caps { position: fixed; inset: 0; z-index: 3; pointer-events: none; }

.cap {
  position: absolute;
  left: var(--margin);
  bottom: clamp(72px, 13vh, 130px);
  max-width: 36ch;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
  visibility: hidden;
}

.cap.on {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.cap h2 {
  margin: 0 0 10px;
  font-size: var(--step-head);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.cap p {
  margin: 0;
  font-size: clamp(17px, 1.25vw, 20px);
  color: var(--ink);
}

.cap p + p { margin-top: 10px; }

.cap .links {
  display: flex;
  gap: 22px;
  pointer-events: auto;
}

.cap .links a {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  transition: border-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.cap .links a:hover { color: var(--accent); border-bottom-color: var(--ink); }

.cap a { text-decoration: none; border-bottom: 2px solid var(--accent); }
.cap a:hover { color: var(--accent); }

#hum, #rewind {
  pointer-events: auto;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 20px;
  background: var(--accent);
  color: var(--deep);
  border: none;
  border-radius: 2px;
  font-family: inherit;
  font-size: var(--step-body);
  font-weight: 500;
  cursor: pointer;
  transition: transform 150ms var(--ease-out);
}
#hum:hover, #rewind:hover { transform: translateY(-1px); }
#hum:active, #rewind:active { transform: translateY(1px) scale(0.98); }
#hum.playing { background: var(--ink); }

/* ---------- rail ---------- */

.rail {
  position: fixed;
  right: clamp(14px, 2vw, 28px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rail button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 2px solid var(--muted);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.rail button:hover { border-color: var(--accent); }
.rail button.on { background: var(--accent); border-color: var(--accent); }

/* ---------- hint ---------- */

.hint {
  position: fixed;
  right: var(--margin);
  bottom: 28px;
  z-index: 4;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  transition: opacity 600ms var(--ease-out);
}
.hint.off { opacity: 0; pointer-events: none; }

/* ---------- phone ---------- */

@media (max-width: 760px) {
  .title h1 { font-size: clamp(44px, 13vw, 72px); }
  .title .tag { font-size: 16px; }
  .cap { right: var(--margin); bottom: clamp(96px, 18vh, 130px); max-width: none; }
  .cap h2 { font-size: 26px; }
  .cap p { font-size: 16px; }
  .rail { right: 14px; }
  .hint { right: 14px; bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .title, .cap, .rail button, #hum, .hint { transition: none; }
  .cap { transform: none; }
}
