/* Portföljen — clean, minimal */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #1a1d1c;
  --ink-soft: #6b7370;
  --line: #e4e6e4;
  --accent: #1a1d1c;

  --font-display: "Bricolage Grotesque", "Helvetica Neue", sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  padding: clamp(24px, 5vw, 64px);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
}

/* ---- Startsida ---- */

.page-head {
  margin-bottom: clamp(24px, 4vw, 40px);
  text-align: center;
}

.page-head h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.02em;
}

.page-head .lede {
  margin: 10px auto 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.5;
  max-width: 52ch;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.card:hover,
.card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
  outline: none;
}

.card .illo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, #ffffff);
  border-radius: 8px;
  margin: 16px 0;
  padding: 8px 0;
}

.card .illo svg {
  width: clamp(110px, 14vw, 170px);
  height: auto;
}

.card .kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.card .kicker .tag {
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, #ffffff);
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 8%, #ffffff);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.card .body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.5vw, 28px);
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.card .body p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ---- Demosidor ---- */

.demo .back {
  display: inline-block;
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  margin-bottom: clamp(32px, 5vw, 48px);
}

.demo .back:hover,
.demo .back:focus-visible {
  color: var(--accent);
  outline: none;
}

.demo-head .kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.demo-head h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 6vw, 56px);
  letter-spacing: -0.02em;
}

.demo-head .lede {
  margin-top: 14px;
  max-width: 56ch;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.features {
  margin-top: clamp(28px, 4vw, 40px);
}

.features li {
  list-style: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.5;
}

.coming-soon {
  margin-top: clamp(32px, 5vw, 48px);
  padding: clamp(24px, 4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
}

.coming-soon .illo {
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, #ffffff);
  border-radius: 8px;
  width: 148px;
  height: 148px;
  margin: 0 auto 16px;
}

.coming-soon .illo svg {
  width: 104px;
  height: auto;
}

.coming-soon h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
}

.coming-soon p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* Desktop: hela startsidan ryms i viewporten utan scroll */
@media (min-width: 861px) {
  body:not(.demo) {
    padding: 32px 48px;
  }

  body:not(.demo) .wrap {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    min-height: 600px;
  }

  body:not(.demo) .grid {
    flex: 1;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    min-height: 0;
  }

  body:not(.demo) .card {
    aspect-ratio: auto;
    min-height: 0;
  }

  body:not(.demo) .card .illo {
    min-height: 0;
  }

  body:not(.demo) .card .illo svg {
    max-height: 100%;
  }
}

/* ---- Responsivt ---- */

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

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .card { aspect-ratio: auto; min-height: 160px; gap: 20px; }
}
