@charset "UTF-8";

/* Gemensam grund för de tre demosidorna. Temafärger och typografi ligger i
   respektive demo-*.css. */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll {
  overflow: hidden;
}

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

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.demo-skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  padding: 10px 14px;
  background: #fff;
  color: #111;
  font: 600 13px/1 "Inter Tight", Arial, sans-serif;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s;
}

.demo-skip:focus {
  transform: translateY(0);
}

.demo-bar {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(16px, 4vw, 40px);
  background: #111;
  color: #f6f3ec;
  font: 500 12px/1.45 "Inter Tight", Arial, sans-serif;
  letter-spacing: 0.01em;
}

.demo-bar a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.demo-bar a:hover {
  color: #fff;
}

.demo-bar__note {
  flex: 1;
  margin: 0;
  text-align: center;
  color: rgba(246, 243, 236, 0.72);
}

.demo-bar__note strong {
  color: #fff;
  font-weight: 600;
}

.demo-container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.demo-container--narrow {
  width: min(860px, calc(100% - 48px));
  margin-inline: auto;
}

.demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 14px 22px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: 600 13px/1 "Inter Tight", Arial, sans-serif;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.demo-btn:hover {
  transform: translateY(-2px);
}

.demo-btn--solid {
  background: currentColor;
}

.demo-btn--solid span {
  color: var(--btn-text, #fff);
}

.demo-btn--block {
  width: 100%;
}

.demo-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}

.demo-menu-toggle span,
.demo-menu-toggle span::before,
.demo-menu-toggle span::after {
  display: block;
  width: 18px;
  height: 1.5px;
  margin-inline: auto;
  background: currentColor;
  content: "";
  transition: transform 0.2s, opacity 0.2s;
}

.demo-menu-toggle span {
  position: relative;
}

.demo-menu-toggle span::before {
  position: absolute;
  top: -6px;
}

.demo-menu-toggle span::after {
  position: absolute;
  top: 6px;
}

.demo-menu-toggle[aria-expanded="true"] span {
  background: transparent;
}

.demo-menu-toggle[aria-expanded="true"] span::before {
  transform: translateY(6px) rotate(45deg);
}

.demo-menu-toggle[aria-expanded="true"] span::after {
  transform: translateY(-6px) rotate(-45deg);
}

.demo-success {
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid currentColor;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
}

.demo-success h3 {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.demo-success p {
  margin: 0 0 20px;
  line-height: 1.6;
  opacity: 0.78;
}

.demo-success button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.demo-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.demo-field label {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.demo-field input,
.demo-field select,
.demo-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  outline: none;
}

.demo-field textarea {
  min-height: 120px;
  resize: vertical;
}

.demo-field input:focus,
.demo-field select:focus,
.demo-field textarea:focus {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.14);
}

.demo-field input::placeholder,
.demo-field textarea::placeholder {
  color: currentColor;
  opacity: 0.45;
}

.demo-form-note {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.5;
  opacity: 0.62;
}

.demo-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.82rem;
  line-height: 1.5;
  opacity: 0.8;
}

.demo-check input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: currentColor;
}

.demo-footer {
  padding: 30px 0;
  border-top: 1px solid currentColor;
  font-size: 0.78rem;
}

.demo-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.demo-footer a {
  text-underline-offset: 3px;
}

@media (max-width: 720px) {
  .demo-container,
  .demo-container--narrow {
    width: min(100% - 32px, 1180px);
  }

  .demo-bar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4px 14px;
    padding-block: 9px;
    font-size: 11px;
  }

  .demo-bar__note {
    order: 3;
    flex-basis: 100%;
    text-align: left;
  }

  .demo-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .demo-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.icon-asterisk {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
  background-color: currentColor;
  -webkit-mask: url("assets/icon-asterisk.svg") center / contain no-repeat;
  mask: url("assets/icon-asterisk.svg") center / contain no-repeat;
  vertical-align: -0.12em;
}
