/* ========================================
   CUSTOM PROPERTIES
   ======================================== */
:root {
  --color-bg:         #ffffff;
  --color-bg-alt:     #f7f7f7;
  --color-text:       #1a1a1a;
  --color-text-muted: #888888;
  --color-accent:     #111111;
  --color-highlight:  #4a9e9e;
  --color-border:     #e8e8e8;

  --font-sans:  'DM Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'DM Serif Display', Georgia, serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;

  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-7:  3rem;
  --space-8:  5rem;

  --container-max: 1080px;
  --container-pad: clamp(1rem, 5vw, 2rem);
  --radius-sm: 4px;
  --radius-md: 8px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 200ms;
}

/* ========================================
   RESET
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
  padding-block: var(--space-7) var(--space-6);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-7);
}

.site-header__name {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1.2;
}

.site-header__role {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  letter-spacing: 0.02em;
}

/* ========================================
   PROJECTS GRID
   ======================================== */
main {
  padding-bottom: var(--space-8);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-7);
}

/* ========================================
   PROJECT CARD
   ======================================== */
.project-card {
  display: flex;
  flex-direction: column;
}

.project-card--featured {
  grid-column: 1 / -1;
}

.project-card__video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #111;
}

.project-card__video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-cover {
  position: absolute;
  inset: 0;
  background-color: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  overflow: hidden;
}

.video-cover__logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  transition: transform 400ms ease, opacity 400ms ease;
  pointer-events: none;
}

.video-cover:hover .video-cover__logo {
  transform: scale(0.88);
  opacity: 0.6;
}

.video-cover__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 350ms ease;
  pointer-events: none;
}

.video-cover:hover .video-cover__overlay {
  opacity: 1;
}

.video-cover__genre {
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.video-cover__title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.video-cover__sub {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

.video-cover__play {
  position: absolute;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 350ms ease, transform 350ms ease, background 200ms ease;
  cursor: pointer;
}

.video-cover__play svg {
  width: 18px;
  height: 18px;
  margin-left: 3px;
}

.video-cover:hover .video-cover__play {
  opacity: 1;
  transform: translateY(0);
}

.video-cover__play:hover {
  background: rgba(255, 255, 255, 0.22);
}

.video-cover.is-gone {
  display: none;
}

.project-card__spotify-wrapper {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.project-card__spotify-wrapper iframe {
  width: 100%;
  height: 352px;
  display: block;
}

.project-card__artwork {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.project-card__artwork--1 {
  background: linear-gradient(135deg, #1a3a4a 0%, #2d6e7e 55%, #4a9e9e 100%);
}

.project-card__artwork--2 {
  background: linear-gradient(135deg, #1a1a2e 0%, #3d3d6b 55%, #6b6ba8 100%);
}

.project-card__artwork--3 {
  background: linear-gradient(135deg, #2c2c20 0%, #5a5a3c 55%, #8a8a5c 100%);
}

.project-card__artwork--4 {
  background: linear-gradient(135deg, #1a0a2e 0%, #4a1a5e 55%, #8a3a9e 100%);
}

.project-card__body {
  padding-top: var(--space-4);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-card__genre {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-highlight);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}

.project-card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: var(--space-3);
}

.project-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  flex: 1;
}

/* ========================================
   AUDIO PLAYER
   ======================================== */
.audio-player {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-top: var(--space-4);
}

.audio-player__btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-accent);
  color: #ffffff;
  border-radius: 50%;
  transition: transform var(--duration) var(--ease-out), opacity var(--duration) ease;
}

.audio-player__btn:hover {
  transform: scale(1.08);
  opacity: 0.85;
}

.audio-player__btn svg {
  width: 16px;
  height: 16px;
}

.audio-player .icon-pause {
  display: none;
}

.audio-player.is-playing .icon-play {
  display: none;
}

.audio-player.is-playing .icon-pause {
  display: block;
}

.audio-player__track {
  flex: 1;
}

.audio-player__progress-bar {
  position: relative;
  height: 3px;
  background-color: var(--color-border);
  border-radius: 9999px;
  cursor: pointer;
}

.audio-player__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background-color: var(--color-accent);
  border-radius: inherit;
  width: 0%;
  transition: width 0.1s linear;
  pointer-events: none;
}

.audio-player__thumb {
  position: absolute;
  top: 50%;
  right: -5px;
  width: 11px;
  height: 11px;
  background-color: var(--color-accent);
  border-radius: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity var(--duration) ease;
  pointer-events: none;
}

.audio-player:hover .audio-player__thumb,
.audio-player.is-playing .audio-player__thumb {
  opacity: 1;
}

.audio-player__time {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.audio-player__source {
  display: none;
}

/* ========================================
   CLIENTS / LOGOS
   ======================================== */
.clients {
  padding-block: var(--space-7);
  border-top: 1px solid var(--color-border);
  background-color: var(--color-bg);
}

.clients__label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: var(--space-6);
}

.clients__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2.5rem 4rem;
}

.clients__item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
}

.clients__item img {
  height: 100%;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  filter: grayscale(1) opacity(0.5);
  mix-blend-mode: multiply;
  transition: filter 300ms ease, opacity 300ms ease;
}

/* Mercedes & Comdirect have dark backgrounds — invert to show on white page */
.clients__item img[alt="Mercedes-Benz"],
.clients__item img[alt="Comdirect"] {
  filter: grayscale(1) invert(1) opacity(0.5);
}


.clients__item:hover img {
  filter: grayscale(0) opacity(1) !important;
  mix-blend-mode: normal;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-6);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.site-footer__email {
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1px;
  transition: color var(--duration) ease, border-color var(--duration) ease;
}

.site-footer__email:hover {
  color: var(--color-highlight);
  border-color: var(--color-highlight);
}

.site-footer__copy {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding-block: var(--space-5);
    margin-bottom: var(--space-5);
  }
}
