/* Showroom – ingång. Neutral grafit, så att stilarna får vara färgen. */

@font-face { font-family: "SR Inter"; src: url("../1-ritningen/fonts/inter-tight.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "SR Mono"; src: url("../1-ritningen/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #0f0f10;
  --card: #151517;
  --text: #ededec;
  --muted: #a1a19f;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.18);
  --gutter: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --cut: cubic-bezier(0.76, 0, 0.24, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  font: 400 16px/1.55 "SR Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 6px; }

/* ---------------------------------------------------------------- topp och intro */
.ix-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 26px var(--gutter);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.ix-brand { font-weight: 560; letter-spacing: -0.01em; }
.ix-brand span { margin-left: 8px; color: var(--muted); font-weight: 400; }
.ix-meta { color: var(--muted); font-family: "SR Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: 0.04em; }

.ix-main { max-width: 1520px; margin: 0 auto; padding: 0 var(--gutter); }
.ix-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 24px 48px;
  align-items: end;
  padding: clamp(48px, 9vh, 110px) 0 clamp(32px, 5vh, 56px);
}
.ix-intro h1 { font-size: clamp(36px, 5vw, 76px); line-height: 1.02; letter-spacing: -0.04em; font-weight: 460; }
.ix-intro p { color: var(--muted); font-size: clamp(16px, 1.2vw, 18px); max-width: 42ch; }

/* ---------------------------------------------------------------- kort */
.ix-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); }
.ix-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  transition: border-color 0.4s, transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
  isolation: isolate;
}
.ix-card:hover { border-color: var(--line-2); transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); }
.pv {
  position: relative;
  aspect-ratio: 540 / 600;
  overflow: hidden;
  transition: transform 1.2s var(--ease);
  transform-origin: 50% 60%;
}
.ix-card:hover .pv { transform: scale(1.02); }
.ix-card-meta {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: baseline;
  padding: 22px 22px 24px;
  border-top: 1px solid var(--line);
  background: var(--card);
}
.ix-num { font-family: "SR Mono", ui-monospace, monospace; font-size: 12px; color: var(--muted); }
.ix-card h2 { font-size: clamp(24px, 2vw, 30px); font-weight: 520; letter-spacing: -0.03em; }
.ix-card-meta p { grid-column: 2 / 4; color: var(--muted); font-size: 15px; max-width: 44ch; }
.ix-tech { grid-column: 2 / 4; margin-top: 8px; font-family: "SR Mono", ui-monospace, monospace; font-size: 11.5px; letter-spacing: 0.04em; color: #8c8c8a; }
.ix-go {
  grid-column: 3;
  grid-row: 1;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  align-self: center;
  transition: background-color 0.4s, border-color 0.4s;
}
.ix-go::before, .ix-go::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--text); transition: transform 0.6s var(--ease), background-color 0.3s; }
.ix-go::before { width: 14px; height: 1.5px; margin: -0.75px 0 0 -7px; }
.ix-go::after { width: 7px; height: 7px; margin: -3.5px 0 0 -1px; background: none; border-top: 1.5px solid var(--text); border-right: 1.5px solid var(--text); transform: rotate(45deg); }
.ix-card:hover .ix-go { background: var(--text); border-color: var(--text); }
.ix-card:hover .ix-go::before { background: var(--bg); transform: translateX(3px); }
.ix-card:hover .ix-go::after { border-color: var(--bg); transform: translateX(3px) rotate(45deg); }

.ix-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  max-width: 1520px;
  margin: clamp(48px, 8vh, 90px) auto 0;
  padding: 24px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------------------------------------------------------------- förhandsvideo */
.pv { background: #0b0b0c; }
.pv video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.ix-card:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.ix-saved {
  grid-column: 2 / 4;
  justify-self: start;
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 12px;
  color: var(--text);
}
.ix-saved::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #7ee2a8; vertical-align: 1px; }
.ix-intro-side { display: grid; gap: 16px; }
.ix-intro-side strong { color: var(--text); font-weight: 560; }
.ix-resume { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; color: var(--text); }
.ix-resume[hidden] { display: none; }
.ix-resume-open { text-decoration: underline; text-underline-offset: 3px; }
.ix-resume-forget {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.ix-resume-forget:hover { color: var(--text); }

/* ---------------------------------------------------------------- övergång */
.ix-wipe {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  pointer-events: none;
  visibility: hidden;
  background: var(--wipe-bg, #000);
  color: var(--wipe-fg, #fff);
  clip-path: inset(var(--t, 50%) var(--r, 50%) var(--b, 50%) var(--l, 50%) round 22px);
}
.ix-wipe span { font: 600 clamp(38px, 8vw, 112px) / 1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: -0.04em; opacity: 0; transform: translateY(20px); transition: opacity 0.5s 0.25s, transform 0.8s var(--ease) 0.2s; }
.ix-wipe.is-on { visibility: visible; }
.ix-wipe.is-full span { opacity: 1; transform: none; }
.ix-wipe[data-id="rymden"] span { font-weight: 250; }
.ix-wipe[data-id="materialet"] span { font-family: "Iowan Old Style", Georgia, serif; font-weight: 400; font-style: italic; }

/* ---------------------------------------------------------------- intro */
.js.motion .ix-intro > *, .js.motion .ix-cards > li { animation: rise 1.1s var(--ease) both; }
.js.motion .ix-intro p { animation-delay: 0.08s; }
.js.motion .ix-cards > li:nth-child(1) { animation-delay: 0.16s; }
.js.motion .ix-cards > li:nth-child(2) { animation-delay: 0.26s; }
.js.motion .ix-cards > li:nth-child(3) { animation-delay: 0.36s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- responsivt */
@media (max-width: 1100px) {
  .ix-cards { grid-template-columns: 1fr 1fr; }
  .ix-cards > li:last-child { grid-column: 1 / -1; }
  .ix-cards > li:last-child .pv { aspect-ratio: 16 / 9; }
}
@media (max-width: 760px) {
  .ix-top { flex-direction: column; align-items: flex-start; gap: 4px; padding: 20px var(--gutter); }
  .ix-intro { grid-template-columns: 1fr; padding-top: 40px; }
  .ix-cards { grid-template-columns: 1fr; }
  .ix-cards > li:last-child .pv { aspect-ratio: 540 / 600; }
  .ix-card-meta { padding: 18px 18px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.001ms !important; }
}
