/* Martin Tejerina — ambient musician site
   Ported from the Claude Design handoff. Tokens and values kept 1:1. */

:root {
  --bg: #0e0f11;
  --text: #e8e6e2;
  --text-2: #c9c7c2;
  --muted: #8a8a8a;
  --faint: #7a7a7a;
  --faint-2: #6e6e6e;
  --border: #2a2b2d;
  --serif: 'EB Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html {
  background: var(--bg);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
::selection { background: #3a3a3a; color: var(--text); }
img { display: block; max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; }
  .reveal { opacity: 1 !important; }
}

/* ---------- keyframes ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes driftGlow {
  0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
  50%  { transform: translate3d(-3%, 2%, 0) scale(1.06); opacity: 1; }
  100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
}
@keyframes grainFlickerHero {
  0%   { opacity: 0.06; }
  20%  { opacity: 0.09; }
  40%  { opacity: 0.055; }
  60%  { opacity: 0.08; }
  80%  { opacity: 0.06; }
  100% { opacity: 0.06; }
}

/* ---------- reveal ---------- */
.reveal { opacity: 0; }
.reveal.in { animation: fadeUp 1.5s cubic-bezier(0.22, 0.61, 0.36, 1) forwards; }
.d1 { animation-delay: 0.18s; }
.d2 { animation-delay: 0.36s; }

/* ---------- shared link ---------- */
.quiet-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 300;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 0.55s ease-in-out, color 0.55s ease-in-out;
}
.quiet-link:hover,
.quiet-link:focus-visible { background-size: 100% 1px; color: var(--text); }
.link-13 { font-size: 13px; letter-spacing: 0.02em; }

/* ---------- layout / sections ---------- */
.section {
  position: relative;
  padding: clamp(84px, 13vh, 150px) 7vw;
  margin: 0 auto;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* film grain (global) */
.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.05;
  pointer-events: none;
  z-index: 50;
  mix-blend-mode: overlay;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8vh 7vw 10vh;
  overflow: hidden;
  scroll-snap-align: start;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('img/hero.jpg');
  background-size: cover;
  background-position: center;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(14,15,17,0.55) 0%,
    rgba(11,12,13,0.82) 55%,
    rgba(11,12,13,0.94) 100%);
}
.hero-glow {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  background: radial-gradient(circle at 82% 12%,
    oklch(0.34 0.012 70 / 0.85) 0%,
    oklch(0.22 0.009 60 / 0.35) 32%,
    transparent 62%);
  animation: driftGlow 26s ease-in-out infinite;
  will-change: transform, opacity;
}
.hero__grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.07;
  pointer-events: none;
  mix-blend-mode: overlay;
  animation: grainFlickerHero 1.6s steps(2) infinite;
}
.hero__content { position: relative; max-width: 720px; }
.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 8vw, 84px);
  letter-spacing: 0.03em;
  line-height: 1.05;
  margin: 0 0 28px;
  color: var(--text);
}
.hero__subtitle {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.7;
  color: var(--muted);
  max-width: 480px;
  margin: 0;
  letter-spacing: 0.01em;
}

/* ---------- menu ---------- */
.menu { position: fixed; top: 5vh; right: 7vw; z-index: 60; }
.menu__toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.menu__toggle span {
  display: block;
  width: 26px;
  height: 1px;
  background: var(--text);
}
.menu__nav {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 18px;
  display: none;
  flex-direction: column;
  gap: 14px;
  align-items: flex-end;
  background: rgba(14,15,17,0.92);
  padding: 22px 26px;
  border: 1px solid var(--border);
}
.menu.open .menu__nav { display: flex; }
.menu__nav a {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--text-2);
}

/* ---------- section headings ---------- */
.h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
}
.h2--listen { font-size: clamp(24px, 3vw, 32px); margin: 0 0 4vh; }
.h2--radio  { font-size: clamp(22px, 2.8vw, 28px); margin: 0 0 4vh; color: var(--text-2); }
.h2--about  { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 6vh; }

/* ---------- listen ---------- */
.releases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 340px));
  gap: 6vh 5vw;
  justify-content: center;
}
.releases > div { text-align: center; }
.release__cover {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 0 auto 18px;
}
.release__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(19px, 2.2vw, 23px);
  margin: 0 0 6px;
  color: var(--text);
}
.release__meta {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}
.release__links { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: center; }
.release__links a { color: var(--text-2); font-size: 14px; }

.appears {
  border-top: 1px solid var(--border);
  margin-top: 3vh;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}
.appears__cover { width: 64px; height: 64px; flex: none; object-fit: cover; }
.appears__body { flex: 1; min-width: 200px; }
.appears__label {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 11px;
  color: var(--faint);
  margin: 0 0 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.appears__text {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  letter-spacing: 0.02em;
}
.appears__text .title {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--text-2);
}

/* ---------- radio & selections ---------- */
.radio__body { max-width: 620px; }
.radio__copy {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--muted);
  margin: 0 0 34px;
  letter-spacing: 0.01em;
}
.radio__copy a { color: var(--muted); }
.playlists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 200px));
  gap: 24px;
}
.playlist { text-decoration: none; display: block; }
.playlist__cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin-bottom: 12px;
}
.playlist__cover img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- about ---------- */
.about { padding: clamp(92px, 14vh, 160px) 7vw; }
.about__body { max-width: 640px; }
.about__body p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(17px, 1.9vw, 20px);
  line-height: 1.85;
  color: var(--text-2);
  letter-spacing: 0.01em;
  margin: 0 0 28px;
}
.about__body p:last-child { margin: 0; }

/* ---------- footer ---------- */
.footer {
  position: relative;
  padding: clamp(64px, 10vh, 120px) 7vw;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer__copy {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 11px;
  color: var(--faint-2);
  margin: 0;
  letter-spacing: 0.03em;
}

/* ---------- contact page ---------- */
.contact {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vh 7vw;
}
.contact__back { position: fixed; top: 5vh; left: 7vw; font-size: 13px; letter-spacing: 0.02em; }
.contact__inner { max-width: 640px; }
.contact__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: 0.03em;
  margin: 0 0 32px;
  color: var(--text);
}
.contact__lead {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(17px, 1.9vw, 20px);
  line-height: 1.85;
  color: var(--text-2);
  margin: 0 0 40px;
  letter-spacing: 0.01em;
}
.contact__email {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 26px);
  color: var(--text);
}
