/* vibedog . one quiet scene, now with the tape actually rolling */

@font-face { font-family: 'Familjen Grotesk'; src: url('/assets/fonts/familjen-grotesk-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Familjen Grotesk'; src: url('/assets/fonts/familjen-grotesk-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/assets/fonts/geist-mono-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('/assets/fonts/instrument-serif-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('/assets/fonts/instrument-serif-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  /* palette sampled off the clip: lake sky, deep water, cream highlight, puppy gold */
  --sky:   #ecd3a8;
  --deep:  #1e1610;
  --water: #4a4a52;
  --ink:   #2a1c10;
  --cream: #fbf4e8;
  --gold:  #f2b560;
  --glass: rgba(42, 28, 16, .3);
  --line:  rgba(248, 241, 228, .22);
  --pad:   clamp(20px, 4vw, 56px);
  --ease:  cubic-bezier(.16, 1, .3, 1);
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans:  'Familjen Grotesk', ui-sans-serif, system-ui, sans-serif;
  --mono:  'Geist Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
  margin: 0;
  overflow-x: clip;
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: #6b5640;
}

img, svg, canvas, video { -webkit-user-select: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; }
::selection { background: var(--gold); color: var(--ink); text-shadow: none; }

/* ---------- the clip ---------- */

.photo {
  position: fixed;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  background: #d9b98a url('/assets/vibe-poster4.jpg') 62% 50% / cover no-repeat;
}
.photo video {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.2s var(--ease), transform 2.8s var(--ease);
}
.photo video.in { opacity: 1; transform: scale(calc(1.035 * var(--beat, 1))); }
@media (min-width: 901px) {
  .photo video { transform-origin: 0% 40%; }
  .photo video.in { transform: scale(calc(1.14 * var(--beat, 1))); transition: opacity 1.2s var(--ease), transform .18s ease-out; }
}

/* ---------- layout ---------- */

.scene {
  position: relative;
  z-index: 3;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: var(--pad);
}

.top { display: flex; align-items: center; gap: 14px; }
.mark {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .34em;
}
.chip {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink);
  padding: 6px 10px 5px;
  border: 1px solid rgba(42, 28, 16, .3);
  border-radius: 999px;
  background: rgba(248, 241, 228, .28);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

/* ---------- type ---------- */

.mask { display: block; overflow: hidden; padding: 0 .04em .32em; margin: 0 -.04em -.26em; }
.line { display: block; transform: translateY(110%); }
.ready .line { animation: rise 1.2s var(--ease) both; }
.ready .say .mask:nth-child(2) .line { animation-delay: .09s; }
.ready .say .mask:nth-child(3) .line { animation-delay: .18s; }
.ready .say .mask:nth-child(4) .line { animation-delay: .27s; }
.ready .soft .line { animation-delay: .5s; }
@keyframes rise { from { transform: translateY(110%); } to { transform: none; } }

.say {
  margin: clamp(20px, 6vh, 80px) 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(50px, 6vw, 108px);
  line-height: 1.12;
  letter-spacing: -.012em;
  max-width: 9.5em;
  text-shadow: 0 2px 34px rgba(42, 24, 10, .45);
}
.say em { font-style: italic; color: var(--gold); }
.soft {
  margin: 14px 0 0;
  font-size: clamp(17px, 1.45vw, 22px);
  opacity: .86;
  text-shadow: 0 1px 14px rgba(42, 24, 10, .5);
}

/* ---------- bottom: the deck and the links ---------- */

.bottom {
  margin-top: auto;
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  opacity: 0;
  transform: translateY(18px);
}
.ready .bottom { animation: up 1.1s var(--ease) .55s both; }
@keyframes up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.deck {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(430px, 100%);
  padding: 14px 20px 14px 14px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(22px) saturate(1.35); backdrop-filter: blur(22px) saturate(1.35);
  box-shadow: 0 20px 60px -24px rgba(30, 18, 8, .6);
}

.play {
  position: relative;
  flex: none;
  width: 64px; height: 64px;
  border: 0; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink);
  background: var(--cream);
  cursor: pointer;
  transition: transform .45s var(--ease), background .45s var(--ease);
}
.play::after {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(248, 241, 228, .55);
  transform: scale(var(--kick, 1));
  opacity: calc((var(--kick, 1) - 1) * 6);
  transition: transform .12s linear, opacity .12s linear;
}
.play:hover { transform: scale(1.05); }
.play:active { transform: scale(.97); }
.play[aria-pressed="true"] { background: var(--gold); }
.play__icon { width: 26px; height: 26px; fill: currentColor; }
.play__icon--go { margin-left: 3px; }
.play__icon--stop { display: none; }
.play[aria-pressed="true"] .play__icon--go { display: none; }
.play[aria-pressed="true"] .play__icon--stop { display: block; }
.play.idle { animation: nudge 2.6s var(--ease) 2.2s infinite; }
@keyframes nudge { 0%, 70%, 100% { transform: none; } 80% { transform: scale(1.07); } 90% { transform: scale(.99); } }

.deck__body { flex: 1; min-width: 0; }
.bottom > * { max-width: 100%; }
.deck p { margin: 0; }
.deck__head {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  opacity: .72;
  white-space: nowrap;
}
.deck__title {
  margin-top: 5px !important;
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity .9s var(--ease);
}
.deck__title.turning { opacity: 0; }
.deck__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 8px; }
.deck__time { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; opacity: .8; font-variant-numeric: tabular-nums; }
.dim { opacity: .55; }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.eq i { width: 3px; height: 3px; border-radius: 2px; background: var(--cream); opacity: .9; transition: height .08s linear; }
.deck__rule { margin-top: 9px; height: 2px; border-radius: 2px; background: rgba(248, 241, 228, .2); overflow: hidden; }
.deck__rule i { display: block; height: 100%; width: 0; background: var(--cream); border-radius: 2px; }

.links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: 100%; }
.btn {
  display: inline-flex; align-items: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--cream);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  background: var(--glass);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  transition: transform .45s var(--ease), background .45s var(--ease);
}
.btn:hover { transform: translateY(-2px); background: rgba(42, 28, 16, .45); }
.btn:active { transform: scale(.97); }
.btn--buy { background: var(--cream); color: var(--ink); border-color: transparent; padding: 0 24px; }
.btn--buy:hover { background: #fff; }
.ca {
  min-width: 0;
  max-width: 100%;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px dashed rgba(248, 241, 228, .4);
  background: transparent;
  color: var(--cream);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  opacity: .85;
  text-shadow: 0 1px 10px rgba(42, 24, 10, .55);
  transition: opacity .45s var(--ease), border-color .45s var(--ease);
}
.ca:hover { opacity: 1; border-color: var(--cream); }
.ca.copied { opacity: 1; border-style: solid; border-color: var(--gold); color: var(--gold); }


/* ---------- marquee between the screens ---------- */

.marquee {
  position: relative;
  z-index: 4;
  overflow: hidden;
  padding: 22px 0 24px;
  background: var(--deep);
  border-top: 1px solid rgba(251, 244, 232, .08);
  border-bottom: 1px solid rgba(251, 244, 232, .08);
}
.marquee__track { display: flex; width: max-content; animation: slide 46s linear infinite; }
.marquee span {
  flex: none;
  padding-right: .4em;
  font-family: var(--serif);
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.1;
  white-space: nowrap;
  color: var(--cream);
}
.marquee em { font-style: italic; color: var(--gold); }
.marquee i { font-style: normal; color: var(--gold); padding: 0 .25em; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- second screen: the tape ---------- */

.side {
  position: relative;
  z-index: 4;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(64px, 10vh, 120px) var(--pad);
  overflow: hidden;
  background: #2a2219;
}
.side__photo { position: absolute; inset: 0; }
.side__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 0% 50%;
  transform: scale(1.06);
  transition: transform 2.4s var(--ease);
}
.side.in .side__photo img { transform: none; }
.side__inner {
  position: relative;
  width: min(520px, 100%);
  padding: clamp(24px, 3vw, 36px);
  border-radius: 26px;
  background: rgba(24, 18, 12, .42);
  border: 1px solid rgba(248, 241, 228, .16);
  -webkit-backdrop-filter: blur(24px) saturate(1.2); backdrop-filter: blur(24px) saturate(1.2);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .7);
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
.in .side__inner, .side__inner.in { opacity: 1; transform: none; }
.kicker { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; opacity: .7; }
.side__title {
  margin: 14px 0 22px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 5vw, 76px);
  line-height: 1.06;
}
.side__title em, .end__big em { font-style: italic; color: var(--gold); }
[data-reveal] .line { transform: translateY(110%); animation: none; }
[data-reveal].in .line { animation: rise 1.2s var(--ease) .15s both; }
[data-reveal].in .mask + .mask .line { animation-delay: .24s; }

.tracks { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.tracks li {
  counter-increment: t;
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 11px 0 12px;
  border-top: 1px solid rgba(248, 241, 228, .12);
  font-size: 16px;
  cursor: pointer;
  transition: color .45s var(--ease), padding-left .45s var(--ease);
}
.tracks li::before { content: counter(t, decimal-leading-zero); font-family: var(--mono); font-size: 11px; opacity: .5; }
.tracks li:hover { padding-left: 6px; }
.tracks .name b { font-weight: 400; }
.tracks .name small { margin-left: 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; opacity: .55; }
.tracks .len { font-family: var(--mono); font-size: 11.5px; opacity: .6; font-variant-numeric: tabular-nums; }
.tracks li.on { color: var(--gold); }
.tracks li.on::before { opacity: 1; }
.tracks li .bar { position: absolute; left: 0; bottom: -1px; height: 1px; width: 0; background: var(--gold); }
.tracks li.on .bar { width: var(--p, 0%); }

.end {
  position: relative;
  z-index: 4;
  padding: clamp(80px, 16vh, 180px) var(--pad) var(--pad);
  background: var(--deep);
  text-align: center;
}
.end__big {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(64px, 12vw, 200px);
  line-height: 1;
  letter-spacing: -.02em;
}
.end__big .mask { display: inline-block; }
.end__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 40px; }
.end__links .btn { cursor: pointer; font-family: inherit; }
.end__small { margin: 28px 0 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em; opacity: .6; }

@media (max-width: 900px) {
  .side { display: block; min-height: 0; padding: 0 0 72px; }
  .side__photo { position: relative; }
  .side__photo img { height: auto; aspect-ratio: 4 / 3; object-position: 42% 60%; }
  .side__inner { width: auto; margin: -56px var(--pad) 0; }
}

/* ---------- phones ---------- */

@media (max-width: 900px) {
  body { background: linear-gradient(to bottom, #ecd3a8 0%, #8c6c4c 50%, #3b2c1f 100%); }
  .photo {
    position: absolute;
    inset: 64px 0 auto 0;
    height: min(112vw, 60svh);
    background-position: 52% 50%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 72%, transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 72%, transparent 100%);
  }
  .photo video { object-position: 52% 50%; }
  .say {
    margin-top: calc(min(112vw, 60svh) - 120px);
    font-size: clamp(38px, 10.6vw, 60px);
    line-height: 1.08;
    max-width: 100%;
  }
  .bottom { padding-top: 28px; }
  .deck { width: 100%; }
  .links { width: 100%; }
  .btn--buy { flex: 1; justify-content: center; }
  .ca { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .line, .bottom { transform: none !important; opacity: 1 !important; animation: none !important; }
  .photo video { opacity: 1; transform: none; transition: none; }
  .play.idle { animation: none; }
  .marquee__track { animation: none; }
  [data-reveal] .line, .side__inner { transform: none !important; opacity: 1 !important; animation: none !important; }
}

/* ---------- the ending: he sits at the end of the dock ---------- */
.end {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
  padding-top: clamp(70px, 13vh, 150px);
  background: #d9b07a;
}
.end__photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 60%;
  transform: scale(1.08);
  transition: transform 7s cubic-bezier(.2, .7, .2, 1);
}
.end.in .end__photo { transform: none; }
.end > *:not(.end__photo) { position: relative; }
.end__big { color: var(--ink); text-shadow: 0 2px 40px rgba(255, 236, 200, .6); }
.end__big em { color: #b4661c; }
.end__links { margin-top: auto; padding-top: 40px; }
.end__links .btn:not(.btn--buy) { background: rgba(30, 20, 12, .45); }
.end__small { color: var(--cream); opacity: .85; text-shadow: 0 1px 10px rgba(0, 0, 0, .5); }
@media (max-width: 900px) {
  .end { min-height: 92svh; padding-top: 64px; }
  .end__photo { object-position: 50% 96%; }
  .end__links { gap: 8px; }
  .end__links .btn { height: 40px; padding: 0 14px; font-size: 14px; }
  .end__links .btn--buy { flex: none; padding: 0 18px; }
  #again { display: none; }
}

.end__live { display: block; }

/* less text on the first screen */
.say { font-size: clamp(38px, 3.7vw, 64px); line-height: 1.1; max-width: none; }
@media (min-width: 901px) { .say { margin-top: auto; } .bottom { margin-top: 0; padding-top: 30px; } }
@media (max-width: 900px) { .say { font-size: clamp(32px, 9vw, 46px); } }

/* second ribbon runs the other way, in cream */
.marquee--rev { background: var(--cream); border-color: rgba(42, 28, 16, .1); }
.marquee--rev .marquee__track { animation-direction: reverse; animation-duration: 52s; }
.marquee--rev span { color: var(--ink); }
.marquee--rev em, .marquee--rev i { color: #b4661c; }

/* the tracklist: rows are buttons, not text */
.tracks li { -webkit-user-select: none; user-select: none; }
.tracks li.off { cursor: default; opacity: .42; }
.tracks li.off:hover { padding-left: 0; }
