/* Display face: Clash Display (Indian Type Foundry via Fontshare, free for commercial use), self-hosted.
   The stylesheet lives in /css/, so font paths are relative to it. */
@font-face { font-family: "Clash Display"; src: url(../fonts/clash-display-300.woff2) format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Clash Display"; src: url(../fonts/clash-display-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
/* Body face: Lora (SIL Open Font License), self-hosted from Google Fonts. Latin subset, variable weight. */
@font-face { font-family: "Lora"; src: url(../fonts/lora-latin.woff2) format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url(../fonts/lora-italic-latin.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

/* kristoffereikrem.com — design tokens
   Palette follows the existing brand: Ground / Ink / Paper. No fixed accent;
   colour comes from the cover art. */
:root {
  --ground: #ebebeb;
  --ink: #111111;
  --paper: #ffffff;
  --muted: #5f5f5f;
  --line: #d2d2d2;
  --error: #a3220f;
  --display: "Clash Display", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --body: "Lora", Georgia, "Times New Roman", serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1440px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 300; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }

/* Accessibility helpers */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: 12px; z-index: 10; padding: 10px 14px; background: var(--ink); color: var(--paper); font-family: var(--display); font-size: 0.9rem; transform: translateY(-200%); }
.skip-link:focus { transform: none; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* Type roles */
.display { font-family: var(--display); font-weight: 300; line-height: 1.08; letter-spacing: 0; text-wrap: balance; }
.display-xl { font-size: clamp(2.2rem, 5.6vw, 5.2rem); }
.display-l  { font-size: clamp(1.9rem, 3.6vw, 3.2rem); }
.display-m  { font-size: clamp(1.35rem, 2.1vw, 1.9rem); }
.lede { font-size: clamp(1.05rem, 1.35vw, 1.25rem); line-height: 1.55; max-width: 34em; }
.small { font-size: 0.875rem; }
.muted { color: var(--muted); }
.measure { max-width: 62ch; }

/* Text links: underline that draws on hover */
.link {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .link:hover { background-size: 0% 1px; background-position: 100% 100%; }
}

/* Header */
.site-header { padding-block: 22px; }
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.brand { font-family: var(--display); font-weight: 400; font-size: 0.95rem; letter-spacing: 0.01em; white-space: nowrap; }
.nav { display: flex; gap: clamp(18px, 3vw, 44px); font-size: 0.95rem; }
.nav a { padding-block: 4px; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
@media (max-width: 640px) {
  .site-header { padding-block: 18px; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 0; }
  /* 44px tall tap targets; wraps to a second row on the narrowest phones */
  .nav { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 0 12px; font-size: 0.95rem; }
  .nav a { padding-block: 12px; }
}
@media (max-width: 360px) { .nav { font-size: 0.85rem; column-gap: 8px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  background: var(--ink); color: var(--paper);
  font-family: var(--display); font-weight: 400; font-size: 0.9rem; letter-spacing: 0.01em;
  border: 1px solid var(--ink); cursor: pointer; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-ghost { background: transparent; color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--paper); color: var(--ink); }
  .btn-ghost:hover { background: var(--ink); color: var(--paper); }
}
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.8rem; }
.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
@media (hover: hover) and (pointer: fine) {
  .btn-light:hover { background: transparent; color: var(--paper); }
}

/* Sections */
.section { padding-block: clamp(56px, 8vw, 120px); }
.section + .section { padding-top: 0; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: clamp(24px, 3vw, 40px); }

/* Hero */
.hero { padding-block: clamp(16px, 3vw, 48px) clamp(56px, 8vw, 120px); }
.hero-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(28px, 5vw, 96px); align-items: end; }
.hero-photo { height: min(100dvh - 150px, 960px); aspect-ratio: 1167 / 1776; overflow: hidden; background: var(--line); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-copy { display: grid; gap: clamp(24px, 3vw, 40px); padding-bottom: clamp(8px, 2vw, 40px); }
.tags { margin: 0; white-space: nowrap; font-size: clamp(1.9rem, min(4.8vw, 5.6vh), 4.2rem); line-height: 1.1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .hero-photo { height: auto; width: 100%; aspect-ratio: 4 / 5; }
  /* On phones the words and the listen button come first, the photo follows */
  .hero-copy { order: -1; padding-bottom: 0; }
}

/* Proof line under the hero */
.proof-section { padding-top: 0; }
.proof { border-top: 1px solid var(--line); padding-top: clamp(24px, 3vw, 40px); display: grid; gap: clamp(20px, 2.4vw, 32px); }
.proof-figures { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px clamp(20px, 3vw, 48px); }
.proof-figures li { display: grid; gap: 8px; align-content: start; }
.proof-figures strong { font-family: var(--display); font-weight: 300; font-size: clamp(2.2rem, 4.4vw, 4rem); line-height: 1; }
@media (max-width: 640px) {
  .proof-figures { grid-template-columns: 1fr; gap: 10px; }
  .proof-figures li { grid-template-columns: 5.4rem minmax(0, 1fr); align-items: baseline; gap: 12px; }
  .proof-figures strong { font-size: 1.7rem; }
}

/* Entrance: hero photo and copy settle in on load, from a visible state */
@media (prefers-reduced-motion: no-preference) {
  .hero-photo img { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); }
  .hero-copy { opacity: 1; transform: none; transition: opacity 600ms var(--ease-out) 120ms, transform 700ms var(--ease-out) 120ms; }
  @starting-style {
    .hero-photo img { opacity: 0.4; transform: scale(1.03); }
    .hero-copy { opacity: 0; transform: translateY(12px); }
  }
}

/* Listen */
.listen-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 96px); align-items: start; }
.embed { background: var(--ink); min-height: 352px; }
.embed iframe { display: block; width: 100%; height: 352px; border: 0; }
/* The Spotify player only loads when asked for (js/site.js); until then this placeholder holds its space */
.embed-facade { min-height: 352px; padding: clamp(24px, 3vw, 40px); display: grid; align-content: end; justify-items: start; gap: 14px; color: var(--paper); }
.embed-facade .muted { color: #b8b8b8; }
.platforms { list-style: none; margin: 0; padding: 0; display: grid; }
.platforms li { border-top: 1px solid var(--line); }
.platforms li:last-child { border-bottom: 1px solid var(--line); }
.platforms a { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; transition: padding-left 200ms var(--ease-out); }
.platforms a span:last-child { font-family: var(--display); font-size: 0.8rem; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .platforms a:hover { padding-left: 8px; } }
@media (max-width: 800px) { .listen-grid { grid-template-columns: 1fr; } }

/* Cover grid (work + store) */
.grid { display: grid; gap: clamp(16px, 2.4vw, 32px) clamp(16px, 2vw, 28px); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; } }
/* Selected work: the newest release takes four cells, so 13 covers fill 4 full rows (and 2 columns on phones) */
.grid-work > .card:first-child { grid-column: span 2; grid-row: span 2; align-content: start; }
.grid-work > .card:first-child .card-title { font-size: clamp(1rem, 1.5vw, 1.3rem); }
@media (max-width: 900px) { .grid-work > .card:first-child { grid-row: auto; } }

.card { display: grid; gap: 12px; }
.card-media { aspect-ratio: 1; overflow: hidden; background: var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease-out); }
.card-title { font-family: var(--display); font-weight: 400; font-size: 0.92rem; line-height: 1.35; }
.card-sub { font-size: 0.875rem; color: var(--muted); line-height: 1.4; }
@media (hover: hover) and (pointer: fine) {
  .card:hover .card-media img { transform: scale(1.03); }
}
.card:active .card-media img { transform: scale(0.99); }

/* Newsletter */
.newsletter { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 80px); align-items: start; background: var(--paper); padding: clamp(28px, 4vw, 64px); }
.nl-form { display: grid; gap: 10px; }
.nl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.nl-form label { font-family: var(--display); font-size: 0.8rem; }
.nl-form input[type="email"] {
  width: 100%; min-height: 48px; padding: 0 14px;
  background: var(--ground); border: 1px solid var(--line); color: var(--ink);
  transition: border-color 160ms var(--ease-out);
}
.nl-form input[type="email"]::placeholder { color: var(--muted); }
.nl-form input[type="email"]:focus { border-color: var(--ink); outline: none; }
.nl-note { font-size: 0.8rem; color: var(--muted); }
.nl-form button:disabled { opacity: 0.6; cursor: progress; }
.nl-error { font-size: 0.875rem; color: var(--error); }
.nl-done { display: grid; gap: 6px; align-content: start; outline: none; }
.nl-done-title { font-family: var(--display); font-weight: 400; font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.25; }
@media (max-width: 800px) { .newsletter { grid-template-columns: 1fr; } .nl-row { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { padding-block: clamp(40px, 5vw, 72px) 32px; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: end; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.9rem; }
.footer-meta { margin-top: 32px; display: flex; justify-content: space-between; gap: 16px; font-size: 0.8rem; color: var(--muted); flex-wrap: wrap; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; align-items: start; } }

/* Bio */
.bio-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 96px); align-items: start; }
.bio-copy { display: grid; gap: 1.1em; }
.bio-photos { display: grid; gap: clamp(16px, 2vw, 28px); }
.bio-photos figure { margin: 0; }
.bio-photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--line); }
.bio-photos figure:nth-child(2) { width: 80%; margin-left: auto; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; }
.facts li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts li span:last-child { font-family: var(--display); font-size: 0.85rem; text-align: right; }
@media (max-width: 800px) { .bio-grid { grid-template-columns: 1fr; } .bio-photos { grid-template-columns: 1fr 1fr; align-items: start; } .bio-photos figure:nth-child(2) { width: 100%; margin-top: 40px; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 96px); align-items: start; }
.contact-copy { display: grid; gap: clamp(20px, 2.5vw, 32px); }
.contact-ways { list-style: none; margin: 0; padding: 0; }
.contact-ways li { border-top: 1px solid var(--line); padding: 18px 0; display: grid; gap: 4px; }
.contact-ways li:last-child { border-bottom: 1px solid var(--line); }
.contact-ways a { font-family: var(--display); font-size: clamp(1.05rem, 1.6vw, 1.4rem); }
.contact-photo img { width: 100%; aspect-ratio: 4 / 5; object-position: center 35%; object-fit: cover; background: var(--line); }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } .contact-photo img { aspect-ratio: 4 / 3; } }

/* Brands (contact page). Logos are single-colour ink files in img/brands/ */
.partners { border-top: 1px solid var(--line); padding-top: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(28px, 5vw, 96px); align-items: start; }
.partners-copy { display: grid; gap: 16px; }
.logo-wall { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.logo-wall li { display: grid; place-items: center; min-height: 120px; padding: 20px; background: var(--ground); }
.logo-wall img { width: auto; max-width: 100%; height: var(--h, 28px); }
@media (max-width: 800px) { .partners { grid-template-columns: 1fr; } .logo-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } .logo-wall li { min-height: 96px; } }

/* Store groups */
.group + .group { margin-top: clamp(48px, 6vw, 96px); }
/* A featured product across the whole row. Its image lines up with the column below, the text takes the rest */
.card-feature { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); grid-template-columns: subgrid; column-gap: normal; align-items: center; }
@supports not (grid-template-columns: subgrid) { .card-feature { column-gap: 24px; } }
.card-feature-text { grid-column: 2 / -1; display: grid; gap: 4px; justify-items: start; }
.card-feature .card-title { font-size: clamp(1.15rem, 2vw, 1.6rem); }
.card-feature .btn { margin-top: 14px; }

/* Page intro on subpages */
.page-intro { padding-block: clamp(24px, 4vw, 64px) clamp(32px, 4vw, 56px); display: grid; gap: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* Studio page */
.studio-photos { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(16px, 2vw, 28px); margin-bottom: clamp(40px, 5vw, 72px); align-items: end; }
.studio-photos figure { margin: 0; }
.studio-photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--line); }
.studio-photos figure:last-child img { aspect-ratio: 3 / 4; }
@media (max-width: 640px) { .studio-photos { grid-template-columns: 1fr; } .studio-photos figure:last-child { width: 70%; margin-left: auto; } }
.gear-groups { display: grid; gap: clamp(40px, 5vw, 72px); }
.gear-group { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(16px, 3vw, 64px); align-items: start; }
.gear-group > h2 { position: sticky; top: 24px; }
.gear { list-style: none; margin: 0; padding: 0; display: grid; }
.gear li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; padding: 18px 0; border-top: 1px solid var(--line); align-items: baseline; }
.gear li:last-child { border-bottom: 1px solid var(--line); }
.gear-name { grid-column: 1; grid-row: 1; font-family: var(--display); font-weight: 400; font-size: 1.05rem; }
.gear-why { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 0.95rem; max-width: 52ch; }
.gear-links { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 16px; font-size: 0.875rem; white-space: nowrap; align-self: start; padding-top: 4px; }
.disclosure { font-size: 0.85rem; color: var(--muted); max-width: 62ch; }
@media (max-width: 800px) {
  .gear-group { grid-template-columns: 1fr; }
  .gear-group > h2 { position: static; }
  .gear li { grid-template-columns: 1fr; }
  .gear-name, .gear-why, .gear-links { grid-column: 1; grid-row: auto; }
}

/* Links page (the link-in-bio target): profile, newest release and listening links fit the first phone screen.
   Softer than the rest of the site on purpose: warm neutrals, small radii, and colour from the newest cover. */
.page-links {
  --ground: #f2eee8;
  --paper: #fcfaf6;
  --ink: #2a231e;
  --muted: #6b645b;
  --line: #e4dcd1;
  --line-strong: #b8ada0;
  position: relative;
  overflow-x: clip;
}
/* A blurred copy of the newest cover glows behind the top of the page */
.lp-glow { position: absolute; z-index: -1; top: -120px; left: 50%; width: min(100%, 820px); height: auto; aspect-ratio: 1; transform: translateX(-50%); filter: blur(80px) saturate(1.15); opacity: 0.28; pointer-events: none; }
.links-page { width: min(100% - 2 * var(--gutter), 560px); margin-inline: auto; display: grid; gap: 36px; padding-block: 52px clamp(48px, 6vw, 80px); }
.lp-profile { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 18px; align-items: center; }
.lp-avatar { display: block; width: 80px; height: 80px; border-radius: 50%; overflow: hidden; background: var(--line); }
/* Crop the studio photo in on the face */
.lp-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; transform: scale(2.3); transform-origin: 50% 24%; }
.lp-name { font-family: var(--display); font-weight: 400; font-size: 1.5rem; line-height: 1.15; }
.lp-sub { line-height: 1.4; }
.lp-stack { display: grid; gap: 10px; }
.lp-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; transition: transform 160ms var(--ease-out), border-color 160ms var(--ease-out); }
.lp-card img { width: 104px; height: 104px; object-fit: cover; background: var(--line); border-radius: 4px; }
.lp-card-text { display: grid; gap: 2px; justify-items: start; }
.lp-card-title { font-family: var(--display); font-weight: 400; font-size: 1.05rem; line-height: 1.3; }
.lp-card .btn { margin-top: 8px; }
.lp-card:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .lp-card:hover { border-color: var(--line-strong); } }
.page-links .btn, .page-links .nl-form input[type="email"] { border-radius: 6px; }
.links-page .newsletter { grid-template-columns: 1fr; gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; }
.links-page .newsletter h2 { margin-bottom: 10px; }
.links-page .disclosure { margin-top: 12px; }
.links-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.links-list a { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 52px; padding: 12px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; transition: transform 160ms var(--ease-out), border-color 160ms var(--ease-out); }
.links-list a:active { transform: scale(0.98); }
.links-list a span:last-child { font-family: var(--display); font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .links-list a:hover { border-color: var(--line-strong); } }
.links-page h2 { margin-bottom: 12px; }
.links-page .display-m { font-size: 1.3rem; }

/* Instagram embeds: let the official embed size itself, keep our grid rhythm */
.ig-grid .instagram-media { margin: 0 !important; min-width: 0 !important; max-width: none !important; width: 100% !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; background: var(--paper); }
.ig-fallback { display: grid; place-items: center; aspect-ratio: 9 / 16; max-height: 520px; padding: 24px; text-align: center; font-family: var(--display); }
