@font-face {
  font-family: "Klarna Headline";
  src: url("/assets/fonts/KlarnaHeadline-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Klarna Text";
  src: url("/assets/fonts/KlarnaText-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Klarna Text";
  src: url("/assets/fonts/KlarnaText-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #fff;
  --muted: #969391;
  --accent: #ffb3c7;
  --line: #333;
  --max: 1300px;
  --pad-x: 75px;
  --pad-y: 1.55rem;
  --header-h: 70px;
  --font-text: "Klarna Text", Arial, Helvetica, sans-serif;
  --font-display: "Klarna Headline", Arial, Helvetica, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--accent);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

.site-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-image: url("/images/grid.png");
  background-repeat: repeat-y;
  background-position: center top;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.site-header__inner,
.site-footer__inner,
.centered {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.25rem);
  letter-spacing: 0.01em;
  color: var(--fg);
}

.brand__name:hover {
  color: var(--accent);
}

.brand__klarna {
  display: inline-flex;
  vertical-align: middle;
}

.brand__klarna .fill {
  fill: #fff;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--fg);
}

.site-nav {
  display: flex;
  align-items: center;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  font-size: 0.95rem;
  border-bottom: 1px dotted transparent;
  padding-bottom: 2px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.site-nav__list a:hover,
.site-nav__list a.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.site-nav__list a[target="_blank"]::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-left: 0.3em;
  background: url("/icons/open-1.svg") center / contain no-repeat;
  vertical-align: middle;
  opacity: 0.7;
}

main {
  flex: 1;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero__media {
  position: absolute;
  inset: 0;
  background: #000;
}

.hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem var(--pad-x) 5rem;
  animation: rise 0.9s ease both;
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: 0.95;
  color: var(--fg);
  margin: 0 0 0.35em;
  max-width: 12ch;
}

.hero__lead {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.75rem);
  color: var(--accent);
  margin: 0 0 0.75em;
  max-width: 28ch;
}

.hero__text {
  max-width: 36rem;
  color: #ddd;
  margin-bottom: 1.75rem;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  background: #fff;
  color: #000;
  font-family: var(--font-text);
  font-weight: 500;
  border: 1px solid #fff;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.button:hover {
  background: transparent;
  color: #fff;
  transform: translateY(-1px);
}

.button--ghost {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.button--ghost:hover {
  background: #fff;
  color: #000;
}

/* Sections */
.section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--line);
}

.section--tight {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.split {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.split--reverse {
  flex-direction: row-reverse;
}

.split__text,
.split__media {
  flex: 1 1 50%;
  min-width: 0;
}

.split__text h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  max-width: 14ch;
}

.split__text h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--accent);
  margin-bottom: 0.8em;
}

.split__text p {
  max-width: 34rem;
  color: #ddd;
}

.split__media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  animation: fade-in 1s ease both;
}

.lace {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.lace img {
  width: 100%;
  height: auto;
  object-fit: cover;
  animation: fade-in 1.1s ease both;
}

.lace--end img {
  object-position: top right;
}

.page-header {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  margin: 0;
}

.page-body {
  padding: 2.5rem 0 4rem;
}

.site-footer {
  margin-top: auto;
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--line);
  background: #000;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__nav a {
  color: #fff;
  border-bottom: 1px dotted transparent;
}

.site-footer__nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.site-footer p {
  max-width: 56rem;
  margin: 0;
  line-height: 1.5;
}

.site-footer a {
  color: #fff;
  border-bottom: 1px dotted #fff;
}

.site-footer a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Blog list */
.blog-container {
  padding: 2rem 0 4rem;
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.blog-card {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.blog-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

.blog-title a:hover {
  color: var(--accent);
}

.blog-preview p {
  margin: 0;
  color: #000;
  max-width: 42rem;
}

/* Article shell extras */
.romlicontainer {
  max-width: 800px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 1000px) {
  :root {
    --pad-x: 50px;
  }
}

@media (max-width: 800px) {
  :root {
    --pad-x: 25px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #000;
    border-bottom: 1px solid var(--line);
    padding: 1rem var(--pad-x) 1.25rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .hero {
    min-height: 70vh;
  }

  .hero__content {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .split,
  .split--reverse {
    flex-direction: column;
    gap: 2rem;
  }

  .split__media {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
