/* svensvensven – Sven Johansson CV site
 * v0 PoC · 2026-04-30
 * Pure static. No build. Edit, save, FTP. */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }

/* ---------- Tokens (dark-only palette) ---------- */
:root {
  --bg: #15140F;
  --ink: #F0EFE8;
  --ink-soft: rgba(240, 239, 232, 0.55);
  --rule: rgba(240, 239, 232, 0.18);
  --tile-bg: #2A2A2A;
  --tile-bg-soft: #1A1A1A;
  --tile-text: rgba(240, 239, 232, 0.6);

  --u: 8px;                  /* base spacing unit */
  --gutter: clamp(16px, 4vw, 48px);

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Antonio', 'Jost', 'Futura', 'Trebuchet MS', ui-sans-serif, system-ui, sans-serif;

  --maxw: 1440px;
  --maxw-text: 720px;
}

/* Wordmark is now a pre-inverted transparent PNG — no blend-mode tricks needed */

/* ---------- Body & typography ---------- */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-feature-settings: 'ss01', 'cv11';
}

.mono-caps {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

.body-text {
  font-size: 16px;
  line-height: 1.65;
  max-width: var(--maxw-text);
}

.body-text + .body-text { margin-top: calc(var(--u) * 2); }

/* ---------- Layout primitives ---------- */
.frame {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: calc(var(--u) * 4) 0;
}

/* ---------- Page header (sticky bar, top of every page) ---------- */
.page-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--gutter);
  background: var(--bg);
  /* subtle border on scroll only – uncomment if you want it */
  /* border-bottom: 1px solid var(--rule); */
}

.topmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.topmark a:hover { opacity: 0.7; }

.topnav {
  display: flex;
  gap: calc(var(--u) * 3);
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
}
.topnav a { opacity: 0.78; transition: opacity 200ms ease; }
.topnav a:hover { opacity: 1; }
.topnav a.is-current { opacity: 1; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
@media (max-width: 540px) {
  .page-header {
    padding: 14px var(--gutter);
    border-bottom: 1px solid var(--rule);
  }
  .topnav {
    gap: calc(var(--u) * 2.5);
    font-size: 13px;
    font-weight: 600;
  }
  .topnav a { opacity: 1; }
  .topmark { font-size: 13px; }
}

/* ---------- Hero (homepage) ---------- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  align-items: stretch;
  padding: var(--gutter);
  gap: var(--gutter);
}

.hero__mark {
  align-self: end;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hero__mark img {
  display: block;
  width: 100%;
  max-width: 720px;
  /* PNG strokes are very thin once scaled down — stack drop-shadows to thicken to readable width on dark bg */
  filter:
    drop-shadow(1px 0 0 white) drop-shadow(-1px 0 0 white)
    drop-shadow(0 1px 0 white) drop-shadow(0 -1px 0 white)
    brightness(1.6) contrast(1.4);
  opacity: 1 !important;
  animation: none !important;
  height: auto;
  position: relative;
  z-index: 1;
  /* PNG is transparent + white strokes; no blend mode needed */
}
@media (max-width: 768px) {
  .hero__mark img { max-width: 80vw; }
}

.hero__mark img {
  opacity: 0;
  transform: translateY(8px);
  animation: hero-fade-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 100ms forwards;
}

@keyframes hero-fade-in {
  to { opacity: 1; transform: translateY(0); }
}

.hero__side {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 2);
  font-size: 14px;
  letter-spacing: 0.02em;
  /* Menu now lives in .page-header above hero – no overlap possible */
  opacity: 0;
  animation: hero-fade-in 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) 700ms forwards;
}

.hero__portrait {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  background: var(--tile-bg) center/cover no-repeat;
  margin-bottom: calc(var(--u) * 4);
}

.hero__side > .hero__role,
.hero__side > .hero__credits {
  flex: 0 0 auto;
}

.hero__role { font-weight: 500; }
.hero__credits {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; align-items: end; }
  .hero__mark {
    font-size: clamp(56px, 18vw, 96px);
    align-items: center;
    text-align: center;
  }
  .hero__mark img { margin: 0 auto; max-width: 70vw; }
  .hero__side { padding-bottom: calc(var(--u) * 2); }
  .hero__portrait { aspect-ratio: 3 / 4; max-height: 60vh; flex: 0 0 auto; margin-bottom: calc(var(--u) * 3); }
}

/* Reduced motion: skip the cascade */
@media (prefers-reduced-motion: reduce) {
  .hero__mark img,
  .hero__side {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ---------- Selected work grid (homepage) ---------- */
.grid-section {
  padding: calc(var(--u) * 12) var(--gutter) calc(var(--u) * 8);
}

.grid-section__label {
  margin-bottom: calc(var(--u) * 4);
  color: var(--ink-soft);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: auto;
  gap: calc(var(--u) * 3);
}

.tile {
  position: relative;
  display: block;
  background: var(--tile-bg) center/cover no-repeat;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  transition: transform 220ms ease, opacity 220ms ease;
}

.tile:hover { transform: translateY(-2px); }

/* Fallback text shown if no cover image is set */
.tile::before {
  content: attr(data-artist) " – " attr(data-album);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--u) * 2);
  text-align: center;
  color: var(--tile-text);
  font-size: 13px;
  letter-spacing: 0.04em;
  z-index: 0;
  opacity: 1;
  transition: opacity 200ms;
}

/* When a cover image is loaded successfully, the JS adds .has-cover and the fallback fades out */
.tile.has-cover::before { opacity: 0; }

.tile__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: calc(var(--u) * 1.5) calc(var(--u) * 2);
  background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0));
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 2;
}

.tile:hover .tile__meta { opacity: 1; transform: translateY(0); }

@media (hover: none) {
  .tile__meta { opacity: 1; transform: translateY(0); }
}

/* Tile sizes – editorial weight by column span; aspect 1:1 to match album-cover natural ratio */
.tile--lg   { grid-column: span 7;  aspect-ratio: 1 / 1; }
.tile--md   { grid-column: span 5;  aspect-ratio: 1 / 1; }
.tile--sm   { grid-column: span 4;  aspect-ratio: 1 / 1; }
/* "wide" stays as a horizontal letterbox closer; uses contain so the square cover shows complete on dark bg */
.tile--wide {
  grid-column: span 12;
  aspect-ratio: 32 / 9;
  background-size: contain;
  background-color: var(--tile-bg);
}

@media (max-width: 900px) {
  .tile--lg { grid-column: span 12; }
  .tile--wide { grid-column: span 12; aspect-ratio: 16 / 7; }
  .tile--md, .tile--sm { grid-column: span 6; }
}
@media (max-width: 540px) {
  .tile--lg, .tile--md, .tile--sm { grid-column: span 12; }
  .tile--wide { grid-column: span 12; aspect-ratio: 21 / 9; }
}

/* ---------- Section link / CTA (used below work grid + after about excerpt) ---------- */
.section-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: opacity 200ms;
}
.section-link:hover { opacity: 0.6; }

.section-cta {
  margin-top: calc(var(--u) * 5);
  text-align: right;
}

/* ---------- About excerpt (homepage) ---------- */
.about-excerpt {
  padding: calc(var(--u) * 10) var(--gutter) calc(var(--u) * 6);
  border-top: 1px solid var(--rule);
  margin-top: calc(var(--u) * 6);
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}
.about-excerpt__label {
  color: var(--ink-soft);
  margin-bottom: calc(var(--u) * 4);
}
.about-excerpt__text {
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: -0.005em;
  max-width: 760px;
  margin-bottom: calc(var(--u) * 5);
}
.about-excerpt__text em { font-style: italic; }

/* ---------- Artist hub pages ---------- */
.artist__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 8vw, 96px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: calc(var(--u) * 3);
}
.artist__intro {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: calc(var(--u) * 8);
  max-width: 720px;
}
.artist__section-label {
  margin-top: calc(var(--u) * 8);
  margin-bottom: calc(var(--u) * 4);
  color: var(--ink-soft);
}
.artist__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--u) * 4);
  margin-bottom: calc(var(--u) * 4);
}
@media (max-width: 900px) { .artist__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .artist__grid { grid-template-columns: 1fr; } }
.artist__record { display: block; transition: opacity 200ms ease; }
.artist__record:hover { opacity: 0.75; }
.artist__record-cover {
  aspect-ratio: 1 / 1;
  background: var(--tile-bg) center/cover no-repeat;
  margin-bottom: calc(var(--u) * 1.5);
}
.artist__record-title { font-size: 14px; font-weight: 500; letter-spacing: 0.02em; }
.artist__record-meta { color: var(--ink-soft); font-size: 12px; letter-spacing: 0.04em; margin-top: 2px; }

.artist__singles {
  list-style: none;
  display: grid;
  max-width: 760px;
  border-top: 1px solid var(--rule);
}
.artist__singles li {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: calc(var(--u) * 2);
  padding: calc(var(--u) * 1.75) 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
  font-size: 14px;
}
.artist__singles .year { color: var(--ink-soft); font-size: 13px; letter-spacing: 0.04em; }
.artist__singles .title em { font-style: italic; }
.artist__singles .role { color: var(--ink-soft); font-size: 12px; letter-spacing: 0.04em; text-align: right; }
.artist__singles a { border-bottom: 1px solid var(--rule); padding-bottom: 1px; }
.artist__singles a:hover { color: var(--ink); border-color: var(--ink); }
@media (max-width: 540px) {
  .artist__singles li { grid-template-columns: 60px 1fr; }
  .artist__singles .role { grid-column: 1 / -1; text-align: left; padding-left: 60px; }
}

/* /artists/ index */
.artists-index {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: calc(var(--u) * 1);
  max-width: 720px;
  border-top: 1px solid var(--rule);
}
.artists-index li {
  padding: calc(var(--u) * 2) 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.artists-index a:hover { color: var(--ink-soft); }
@media (max-width: 540px) {
  .artists-index { grid-template-columns: 1fr; }
}

/* Cross-link from record page back to artist hub */
.record__artist-link {
  margin-top: calc(var(--u) * 4);
  font-size: 14px;
}
.record__artist-link a {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
}
.record__artist-link a:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Footer ---------- */
.footer {
  padding: calc(var(--u) * 6) var(--gutter) calc(var(--u) * 6);
  border-top: 1px solid var(--rule);
  margin-top: calc(var(--u) * 8);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.footer__line {
  display: flex;
  flex-wrap: wrap;
  gap: 0 calc(var(--u) * 2);
  align-items: center;
}

.footer a:hover { color: var(--ink); }

.footer__why {
  margin-left: auto;
  opacity: 0.55;
  font-size: 14px;
}
.footer__why:hover { opacity: 1; }

/* ---------- Inner page (record / about / contact / why / work index) ---------- */
.page {
  max-width: var(--maxw-text);
  margin: 0 auto;
  padding: calc(var(--u) * 16) var(--gutter) calc(var(--u) * 8);
}

.page--wide {
  max-width: var(--maxw);
}

.page__back {
  margin-top: calc(var(--u) * 6);
  font-size: 13px;
  color: var(--ink-soft);
}
.page__back a { border-bottom: 1px solid var(--rule); padding-bottom: 1px; }
.page__back a:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Record detail ---------- */
.record__cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--tile-bg) center/cover no-repeat;
  margin-bottom: calc(var(--u) * 4);
  position: relative;
}

.record__cover::before {
  content: attr(data-artist) " – " attr(data-album);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--u) * 2);
  text-align: center;
  color: var(--tile-text);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.record__cover.has-cover::before { display: none; }

.record__title {
  font-size: clamp(28px, 4.4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: calc(var(--u) * 1);
}

.record__year {
  color: var(--ink-soft);
  font-weight: 400;
}

.record__credits {
  color: var(--ink);
  margin-top: calc(var(--u) * 2);
}
.record__credits dt { color: var(--ink-soft); }
.record__credits dd { margin: calc(var(--u) * 0.5) 0 calc(var(--u) * 2) 0; }

.awards {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--u) * 1) calc(var(--u) * 2);
  margin: calc(var(--u) * 3) 0;
}

.award {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.award--won { border-color: var(--ink); }
.award--nom { color: var(--ink-soft); }

.press {
  margin: calc(var(--u) * 5) 0;
  padding: calc(var(--u) * 4) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.press__heading {
  color: var(--ink-soft);
  margin-bottom: calc(var(--u) * 3);
}
.press__quotes {
  list-style: none;
  display: grid;
  gap: calc(var(--u) * 1.5);
}
.press__quotes li {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: calc(var(--u) * 2);
  align-items: baseline;
  font-size: 14px;
  line-height: 1.5;
}
.press__score {
  color: var(--ink);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.press__quote {
  color: var(--ink);
}
.press__source {
  color: var(--ink-soft);
  font-style: normal;
}
.press__chips {
  margin-top: calc(var(--u) * 3);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
@media (max-width: 540px) {
  .press__quotes li { grid-template-columns: 60px 1fr; gap: calc(var(--u) * 1.5); }
  .press__score { font-size: 11px; }
}

.spotify {
  margin: calc(var(--u) * 4) 0;
}
.spotify iframe {
  width: 100%;
  border-radius: 12px;
  border: 0;
}

/* ---------- About / Contact ---------- */
.about__bio {
  font-size: 18px;
  line-height: 1.65;
  margin-bottom: calc(var(--u) * 6);
}

.about__awards-row {
  display: grid;
  gap: calc(var(--u) * 3);
  border-top: 1px solid var(--rule);
  padding-top: calc(var(--u) * 4);
}

.about__award-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: calc(var(--u) * 2);
  font-size: 14px;
}
.about__award-row dt {
  color: var(--ink-soft);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.contact__lines {
  font-size: 18px;
  line-height: 2;
}

.contact__lines a {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
}
.contact__lines a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ---------- Work index (full discography list) ---------- */
.work__year-group {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: calc(var(--u) * 4);
  padding: calc(var(--u) * 3) 0;
  border-top: 1px solid var(--rule);
}
.work__year-group:last-child { border-bottom: 1px solid var(--rule); }

.work__year {
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding-top: 4px;
}

.work__list {
  display: grid;
  gap: calc(var(--u) * 1);
  list-style: none;
}

.work__item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: calc(var(--u) * 2);
  padding: calc(var(--u) * 1) 0;
  font-size: 16px;
}
.work__item a:hover { color: var(--ink-soft); }

.work__role {
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.04em;
}

@media (max-width: 540px) {
  .work__year-group { grid-template-columns: 1fr; gap: calc(var(--u) * 2); }
  .work__item { grid-template-columns: 1fr; }
}

/* ---------- Why (easter egg) ---------- */
.why {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--u) * 12) var(--gutter);
  gap: calc(var(--u) * 10);
}
.why__line {
  max-width: 36ch;
  text-align: center;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.4;
  font-weight: 500;
}
.why__mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--u) * 2);
  width: 100%;
  max-width: 760px;
}
.why__photo {
  aspect-ratio: 3 / 4;
  background: var(--tile-bg) center/cover no-repeat;
  transition: transform 220ms ease;
}
.why__photo:nth-child(2n) { transform: translateY(calc(var(--u) * 2)); }
.why__photo:hover { transform: translateY(-2px); }
.why__photo:nth-child(2n):hover { transform: translateY(calc(var(--u) * 2 - 2px)); }
@media (max-width: 540px) {
  .why__mosaic { grid-template-columns: repeat(2, 1fr); gap: calc(var(--u) * 1.5); }
}
