/* puntussoff — house DJ, The Hague
   Design system: near-black page (--ink) with one small functional
   accent (--signal). See the project plan for the full rationale. */

:root {
  --ink: #171310;
  --paper: #F2ECDF;
  --muted: rgba(242, 236, 223, 0.7);
  --signal: #FF6A3D;
  --line: rgba(242, 236, 223, 0.12);

  --display: "Unbounded", system-ui, sans-serif;
  --body: "Karla", system-ui, sans-serif;

  --wrap: 1160px;

  /* jewel-toned palette for the "Played so far" month grid — its own
     token set, independent from the page's core colors above (not a
     reuse of any crate-related values) */
  --month-wine: #6E1E33;
  --month-burnt-orange: #6E3312;
  --month-teal: #124F49;
  --month-plum: #432358;
  --month-forest: #1F4A34;
  --month-mustard: #5C3E10;
  --month-text-muted: #C7BEB0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* subtle full-page grain so the near-black gutters read as a material,
   not a flat void, at any viewport width */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* on wide desktop monitors, --wrap alone still leaves a lot of flat black
   gutter either side of the 1160px column; widen it in two tiers and add
   a faint warm wash (reusing --signal, no new color) so it doesn't read
   as empty */
@media (min-width: 1500px) {
  :root { --wrap: 1320px; }
  body {
    background:
      radial-gradient(ellipse 1400px 900px at 50% 0%, rgba(255, 106, 61, 0.05), transparent 60%),
      var(--ink);
  }
}
@media (min-width: 2000px) {
  :root { --wrap: 1440px; }
}

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

a { color: inherit; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  width: 100%;
  padding-left: 6vw;
  padding-right: 6vw;
}

/* skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--signal);
  color: var(--ink);
  padding: 0.7rem 1.2rem;
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* focus states, visible everywhere */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* headings */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

section h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  margin-bottom: 1.6rem;
  max-width: 20ch;
}

section {
  padding: clamp(3.2rem, 7vw, 5.5rem) 0;
}

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  min-height: 100dvh;
  min-height: 100vh; /* fallback for browsers without dvh */
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* Hero uses its own image now (crowd/dancefloor shot), separate from the
   gallery section's record-wall photo below. The overlay here is tuned
   specifically to THIS image's lighting (flat, vivid red/orange
   throughout, brightest near the top, no natural dark zone) — a future
   photo swap needs its own recalibration pass, not a copy of these
   values. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/hero-bg.jpg");
  background-size: cover;
  background-position: 50% 35%;
  animation: hero-media-in 1.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Two stacked gradients (first listed paints on top): a bottom-edge
     fade to var(--ink) so the photo dissolves into the page background
     instead of cutting off at the section boundary, layered over the
     full-frame wash (not just bottom-anchored) which tames the source's
     vivid red down to an ember tone so it doesn't clash with the rest of
     the page's near-black palette and the --signal accent. */
  background:
    linear-gradient(180deg, transparent 0%, transparent 65%, var(--ink) 100%),
    linear-gradient(
      180deg,
      rgba(23, 19, 16, 0.5) 0%,
      rgba(23, 19, 16, 0.6) 45%,
      rgba(23, 19, 16, 0.88) 100%
    );
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  animation: hero-media-in 1.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 6vw clamp(2.5rem, 7vw, 4.5rem);
  max-width: 880px;
  width: 100%;
}

.hero-content h1 {
  font-size: clamp(2.8rem, 10vw, 5.4rem);
  color: var(--paper);
}

.hero .tagline {
  margin-top: 1.3rem;
  max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.6;
  color: var(--paper);
}

.hero .cta-row {
  margin-top: 2.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-content h1,
.hero .tagline,
.hero .cta-row {
  animation: hero-content-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero .tagline { animation-delay: 0.1s; }
.hero .cta-row { animation-delay: 0.2s; }

@keyframes hero-media-in {
  from { transform: scale(1.06); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes hero-content-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero-media,
  .hero-content h1,
  .hero .tagline,
  .hero .cta-row {
    animation: none;
  }
  .hero-media {
    display: none;
  }
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.9rem 1.5rem;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border-radius: 0;
  border: 1.5px solid var(--paper);
  color: var(--paper);
  background: transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--paper); color: var(--ink); }

.btn-solid {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--ink);
}
.btn-solid:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

@media (max-width: 420px) {
  .hero .cta-row { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; justify-content: center; white-space: normal; }
}

/* fallback for mailto links: not every browser/OS has a mail client
   registered, so mailto can click silently and do nothing. This copies
   the address instead. Icon-only button; the SVG inherits color via
   currentColor so it follows the same hover/focus treatment as the
   surrounding text without any extra styling. */
.copy-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0.2rem;
  margin: 0;
  color: var(--muted);
  cursor: pointer;
  line-height: 0;
  vertical-align: middle;
  font: inherit;
}
.copy-email:hover { color: var(--signal); }
.copy-email-icon { display: block; }
.copy-email-icon.copy-email-icon-check { display: none; }
.copy-email.is-copied .copy-email-icon.copy-email-icon-copy { display: none; }
.copy-email.is-copied .copy-email-icon.copy-email-icon-check { display: block; }

/* hidden until a successful copy reveals it briefly alongside the
   checkmark icon (see js/copy-email.js) */
.copy-email-status {
  display: none;
  margin-left: 0.35rem;
  font-size: inherit;
  line-height: normal;
}
.copy-email.is-copied .copy-email-status { display: inline; }

/* ---------------- latest set ---------------- */

.mix-block { max-width: 720px; }
.mix-block iframe { width: 100%; border: 0; }
.mix-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.mix-secondary {
  margin-top: 2.4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.mix-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

/* ---------------- gallery ---------------- */

#gallery {
  position: relative;
}

.photo-feature {
  max-width: 560px;
}
.photo-feature img {
  width: 100%;
  height: auto;
}
.photo-feature figcaption {
  margin-top: 0.9rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* widest gutters on the page live here (single centered image); on wide
   desktop, bleed a darkened copy of the same photo full width behind it
   instead of leaving flat black either side. The blur is baked offline
   into gallery-stalker-tallinn-blur.jpg rather than applied at runtime
   with a CSS filter: a 60px blur over a full-viewport-width element is
   expensive enough to visibly stall painting on modest hardware, whereas
   a pre-blurred static image costs nothing at runtime. */
@media (min-width: 1500px) {
  #gallery::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 100vw;
    height: 100%;
    transform: translateX(-50%);
    background-image: url("../images/gallery-stalker-tallinn-blur.jpg");
    background-size: cover;
    background-position: 50% 20%;
    opacity: 0.6;
    z-index: 0;
  }
  #gallery .wrap {
    position: relative;
    z-index: 1;
  }
  .photo-feature {
    max-width: 640px;
  }
}

/* ---------------- selector (bio) ---------------- */

.bio-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4vw;
  align-items: start;
}
@media (max-width: 760px) {
  .bio-grid { grid-template-columns: 1fr; gap: 2.2rem; }
}
.bio-grid p {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--paper);
  max-width: 54ch;
}

.stat-list {
  border-top: 1px solid var(--line);
}
.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 0.95rem 0;
}
.stat-row span:first-child {
  color: var(--muted);
  flex-shrink: 0;
}
.stat-row span:last-child { text-align: right; }

@media (max-width: 480px) {
  .stat-row { flex-direction: column; gap: 0.25rem; }
  .stat-row span:last-child { text-align: left; }
}

/* ---------------- current crate ---------------- */

.crate-intro {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
  max-width: none;
}
.crate-intro p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 46ch;
}
.crate-updated {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.crate-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}
@media (max-width: 900px) {
  .crate-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .crate-grid { grid-template-columns: repeat(2, 1fr); }
}

/* the crate grid is the one place the design system sanctions visual
   weight, so on wide desktop it gets to run wider than the shared --wrap
   and grow its tiles, rather than the page just leaving black either
   side of it — column count stays at 5 so the 5 tiles fill one clean row */
@media (min-width: 1500px) {
  #crate .wrap {
    max-width: 1500px;
  }
  .crate-tile {
    min-height: 190px;
    padding: 1.4rem 1.3rem;
  }
  .crate-tile .title {
    font-size: 1.08rem;
  }
}
@media (min-width: 2000px) {
  #crate .wrap {
    max-width: 1680px;
  }
  .crate-tile {
    min-height: 210px;
  }
}

.crate-tile {
  position: relative;
  overflow: hidden;
  padding: 1.15rem 1rem;
  min-height: 158px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--paper);
  text-decoration: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.crate-tile.is-visible,
.log-group.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.crate-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.crate-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(23, 19, 16, 0.1) 0%,
    rgba(23, 19, 16, 0.75) 60%,
    rgba(23, 19, 16, 0.92) 100%
  );
}
.crate-tile .idx,
.crate-tile .title,
.crate-tile .artist {
  position: relative;
  z-index: 2;
}
.crate-tile .idx {
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.85;
}
.crate-tile .title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  margin-top: auto;
  color: var(--signal);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.15s ease;
}
.crate-tile:hover .title,
.crate-tile:focus-visible .title {
  opacity: 0.8;
}
.crate-tile .artist {
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  .crate-tile,
  .log-group {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------------- played so far ---------------- */

.log-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
@media (max-width: 860px) {
  .log-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .log-grid { grid-template-columns: 1fr; }
}

.log-group {
  padding: 1.3rem 1.2rem 1.5rem;
  color: var(--paper);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.log-group:nth-of-type(6n+1) { background: var(--month-wine); }
.log-group:nth-of-type(6n+2) { background: var(--month-burnt-orange); }
.log-group:nth-of-type(6n+3) { background: var(--month-teal); }
.log-group:nth-of-type(6n+4) { background: var(--month-plum); }
.log-group:nth-of-type(6n+5) { background: var(--month-forest); }
.log-group:nth-of-type(6n) { background: var(--month-mustard); }

.log-month {
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--paper);
  margin-bottom: 0.8rem;
}

.log-rows { list-style: none; }
.log-row {
  display: grid;
  grid-template-columns: 2.4rem 1fr auto;
  gap: 1.4rem;
  align-items: baseline;
  padding: 0.6rem 0;
}
.log-rows > li + li {
  border-top: 1px solid var(--line);
}
.log-row .log-date {
  font-weight: 700;
  color: var(--paper);
  font-size: 0.95rem;
}
.log-row .log-where {
  font-size: 1rem;
  color: var(--paper);
}
.log-row .log-context {
  display: block;
  color: var(--month-text-muted);
  font-size: 0.85rem;
  margin-top: 0.1rem;
}
.log-row .log-tag {
  font-size: 0.8rem;
  color: var(--month-text-muted);
  text-align: right;
  white-space: nowrap;
}

a.log-row {
  text-decoration: none;
  color: inherit;
}
a.log-row .log-where {
  color: var(--signal);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.15s ease;
}
a.log-row:hover .log-where,
a.log-row:focus-visible .log-where {
  opacity: 0.8;
}

@media (max-width: 560px) {
  .log-row {
    grid-template-columns: 1.8rem 1fr;
    row-gap: 0.2rem;
  }
  .log-row .log-tag {
    grid-column: 2;
    text-align: left;
  }
}

/* ---------------- footer ---------------- */

footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 3.5rem;
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}
footer a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--signal);
}
footer a:hover { color: var(--signal); }
footer .footer-links {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

/* ---------------- vinyl intro ---------------- */

#intro-stage {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  overflow: hidden;
  transition: opacity 0.35s ease;
}

#intro-stage.dismissed {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}

.turntable-container {
  position: relative;
  width: 370px;
  max-width: 86vw;
  aspect-ratio: 1 / 1;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.85));
}

.vinyl-rotate {
  animation: spinDisc 2s linear infinite;
}

@keyframes spinDisc {
  100% { transform: rotate(360deg); }
}

.tonearm-animated {
  animation: needleDrop 2.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes needleDrop {
  0%   { transform: rotate(0deg); }
  18%  { transform: rotate(-2deg) scale(1.02); }
  72%  { transform: rotate(11.5deg) scale(1.02); }
  86%  { transform: rotate(11.5deg) scale(0.99); }
  94%  { transform: rotate(11.7deg) scale(1.005); }
  100% { transform: rotate(11.8deg) scale(1); }
}

.emitter-point {
  position: absolute;
  left: 67.4%;
  top: 62.8%;
  width: 0;
  height: 0;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--signal);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.1);
}

.emitter-point .ripple-1 {
  width: 140px;
  height: 140px;
  animation: ripplePulse 1.4s cubic-bezier(0.1, 0.8, 0.3, 1) 2.2s forwards;
}

.emitter-point .ripple-2 {
  width: 190px;
  height: 190px;
  animation: ripplePulse 1.4s cubic-bezier(0.1, 0.8, 0.3, 1) 2.45s forwards;
}

@keyframes ripplePulse {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.1);
    border-color: var(--signal);
  }
  50% { opacity: 0.6; }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
    border-color: var(--signal);
  }
}

.fx-item {
  position: absolute;
  font-size: 24px;
  color: var(--signal);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(255, 120, 50, 0.85));
  user-select: none;
}

.note-1 { animation: floatNote1 1.5s cubic-bezier(0.2, 0.8, 0.4, 1) 2.25s forwards; }
.note-2 { animation: floatNote2 1.5s cubic-bezier(0.2, 0.8, 0.4, 1) 2.4s forwards; font-size: 28px; }
.note-3 { animation: floatNote3 1.5s cubic-bezier(0.2, 0.8, 0.4, 1) 2.55s forwards; }

@keyframes floatNote1 {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-15deg); }
  20%  { opacity: 1; transform: translate(-65px, -35px) scale(1.1) rotate(10deg); }
  100% { opacity: 0; transform: translate(-110px, -95px) scale(0.7) rotate(25deg); }
}

@keyframes floatNote2 {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(15deg); }
  25%  { opacity: 1; transform: translate(25px, -55px) scale(1.2) rotate(-12deg); }
  100% { opacity: 0; transform: translate(65px, -130px) scale(0.8) rotate(-20deg); }
}

@keyframes floatNote3 {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  25%  { opacity: 1; transform: translate(-25px, -70px) scale(1.15) rotate(-5deg); }
  100% { opacity: 0; transform: translate(-40px, -145px) scale(0.6) rotate(15deg); }
}

.zap-1 { animation: zapBurst1 0.8s ease-out 2.25s forwards; }
.zap-2 { animation: zapBurst2 0.8s ease-out 2.38s forwards; }

@keyframes zapBurst1 {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  30%  { opacity: 1; transform: translate(-55px, -18px) scale(1.2); }
  100% { opacity: 0; transform: translate(-85px, -35px) scale(0.3); }
}

@keyframes zapBurst2 {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  30%  { opacity: 1; transform: translate(45px, -20px) scale(1.3); }
  100% { opacity: 0; transform: translate(75px, -40px) scale(0.3); }
}

.liquid-portal-wave {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--signal) 0%, var(--signal) 40%, transparent 100%);
  box-shadow: 0 0 60px var(--signal), 0 0 120px var(--signal);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.1);
  animation: portalSurge 1.05s cubic-bezier(0.6, 0.05, 0.2, 1) 2.85s forwards;
}

@keyframes portalSurge {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.8);
    filter: blur(4px);
  }
  65% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(50);
    filter: blur(12px);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(90);
    filter: blur(25px);
  }
}

.skip-btn {
  margin-top: 2rem;
  background: rgba(242, 236, 223, 0.06);
  border: 1px solid rgba(242, 236, 223, 0.15);
  color: var(--muted);
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-family: var(--body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.skip-btn:hover {
  background: rgba(242, 236, 223, 0.15);
  color: var(--paper);
  border-color: rgba(242, 236, 223, 0.4);
}
