/* Ubicon – statisk startsida */

@font-face {
  font-family: "Viga";
  src: url("../fonts/viga-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Glegoo";
  src: url("../fonts/glegoo-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Droid Serif";
  src: url("../fonts/droid-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --purple: #9c2592;
  --purple-label: #894ba1;
  --navy: #201d6a;
  --lilac: #e5e1ef;
  --hero-bg: #e8e8e8;
  --topbar: #1c0012;
  --footer: #111010;
  --text: #000;

  --font-display: "Viga", Arial, sans-serif;
  --font-title: "Glegoo", Georgia, serif;
  --font-body: "Droid Serif", Georgia, serif;

  --page-width: 940px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #6f6f6f url("../img/bg-wall.png") repeat;
  color: var(--text);
  font: 14px/1.5 Helvetica, Arial, sans-serif;
}

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

h1,
h2,
p,
ul {
  margin: 0;
}

/* ---------- Sidram ---------- */

.page {
  max-width: var(--page-width);
  margin: 0 auto 30px;
  background: #fff;
  box-shadow: 1px 1px 8px #000;
}

.topbar {
  height: 40px;
  background: var(--topbar);
}

.header {
  padding: 10px 10px 0;
}

.header__logo {
  width: 267px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  container-type: inline-size;
  margin-bottom: 10px;
  background: var(--hero-bg);
  overflow: hidden;
}

.hero__image {
  width: 100%;
}

.hero__title {
  position: absolute;
  top: 17%;
  left: 53.8%;
  width: 44%;
  color: var(--purple);
  font-family: var(--font-display);
  font-size: clamp(22px, 3.94cqi, 37px);
  font-weight: 400;
  line-height: 1.18;
}

.news {
  position: absolute;
  bottom: 10px;
  left: 0;
  display: flex;
  width: min(375px, 42%);
  min-height: 87px;
  overflow: hidden;
}

.news__label {
  position: relative;
  z-index: 1;
  flex: 0 0 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--purple-label);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.news__text {
  flex: 1;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.7) url("../img/newsbg.png") repeat-x 0 0 / 100% 100%;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.5;
}

@media (prefers-reduced-motion: no-preference) {
  .news__text {
    animation: news-in 700ms cubic-bezier(0.22, 1, 0.36, 1) 600ms both;
  }
}

@keyframes news-in {
  from {
    transform: translateX(-100%);
  }
}

/* ---------- Puff ---------- */

.feature {
  display: grid;
  grid-template-columns: 1fr 40.1%;
  min-height: 200px;
  margin-bottom: 10px;
  background: var(--lilac);
}

.feature__body {
  padding: 21px 21px 40px;
  background: url("../img/bubbles.png") repeat-x left bottom;
}

.feature__title {
  max-width: 400px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 2.1em;
  font-weight: 400;
  line-height: 1.16;
}

.feature__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

/* ---------- Tjänstekort ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  padding: 2px 15px 40px;
}

.card__image {
  width: 100%;
  aspect-ratio: 295 / 195;
  object-fit: cover;
}

.card__title {
  padding: 12px 0 11px;
  color: var(--purple);
  font-family: var(--font-title);
  font-size: 1.7em;
  font-weight: 400;
  line-height: 1.2;
}

.card__list {
  padding: 0;
  list-style: none;
  font-family: var(--font-body);
}

.card__list li {
  padding-left: 20px;
  background: url("../img/check.png") no-repeat 3px 0.5em;
}

/* ---------- Citat ---------- */

.quotes {
  padding: 22px 20px;
  background: #5b2a57 url("../img/bgcitat.jpg") center / cover;
}

.quotes__list {
  padding: 0;
  list-style: none;
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

/* ---------- Sidfot ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 40px;
  padding: 30px 10px;
  background: var(--footer);
}

.footer__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 16.8px;
  text-decoration: none;
  text-transform: uppercase;
}

.footer__link:hover,
.footer__link:focus-visible {
  text-decoration: underline;
}

.footer__icon {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ---------- Mindre skärmar ---------- */

@media (max-width: 760px) {
  .cards {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .card__image {
    max-width: 480px;
  }
}

@media (max-width: 700px) {
  .hero__title {
    position: static;
    width: auto;
    padding: 20px 16px 16px;
    font-size: 26px;
  }

  .news {
    position: static;
    width: auto;
    margin: 0 16px 16px;
  }

  .feature {
    grid-template-columns: 1fr;
  }

  .feature__title {
    font-size: 26px;
  }

  .feature__image {
    height: auto;
    aspect-ratio: 377 / 200;
  }
}

@media (max-width: 480px) {
  .header {
    padding-left: 16px;
  }

  .header__logo {
    width: 220px;
  }

  .cards {
    padding-inline: 16px;
  }

  .footer {
    flex-direction: column;
    align-items: center;
  }
}
