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

:root {
  color-scheme: light dark;
  --body-color: #FFF;
  --text-color: #2f374f;
  --text-medium: #4E5973;
  --primary-color: #EF3939;
  --primary-text: #FFF;
  --selection-color: #EEE;
  --selection-text: #111;
  --donate-link: #EF3939;
  --border: #e1e1e1;
  --footer: #FAFAFA;
  --footer-text: #434a5f;
  --get-vivaldi-color: #FFF;
  --get-vivaldi-text: #2f374f;
  --get-vivaldi-border: rgba(0, 0, 0, 0.15);
  --shadow: rgba(0, 0, 0, 0.12);
  --shadow-hover: rgba(0, 0, 0, 0.2);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --body-color: #151515;
    --text-color: #FFF;
    --text-medium: #AAA;
    --selection-color: #222;
    --selection-text: #EEE;
    --donate-link: #FFF;
    --border: #333;
    --footer: #111;
    --footer-text: #BBB;
    --get-vivaldi-color: #313131;
    --get-vivaldi-text: #FFF;
    --get-vivaldi-border: rgba(0, 0, 0, 0.5);
    --shadow: rgba(0, 0, 0, 0.5);
    --shadow-hover: rgba(0, 0, 0, 0.75);
  }
}

html {
  font-size: 16px;
  font-family: 'InterVariable', system-ui, sans-serif;
  background: var(--body-color);
  color: var(--text-color);
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  text-size-adjust: 100%;
  text-align: left;
}

body {
  font-size: 1rem;
}

html,
body,
header,
main,
footer,
div,
img,
a {
  box-sizing: border-box;
  border: none;
  margin: 0;
  padding: 0;
}

h1 {
  font-weight: 700;
  font-size: clamp(36px, 3.75vw, 56px);
  line-height: 1.175;
  letter-spacing: -.5px;
  margin: 0 0 .5rem 0;
  text-wrap: balance;
  max-width: 1000px;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 1rem;
}

p {
  font-size: 1rem;
  margin: 1rem 0;
  color: var(--text-medium);
  max-width: 980px;
  &:last-child {
    margin-bottom: 0;
  }
}

a,
a:visited {
  color: var(--text-color);
}

a:hover {
  text-decoration: none;
}

img,
svg {
  max-width: 100%;
  vertical-align: middle;
}

svg {
  display: inline-block;
}

b {
  font-weight: 600;
}

img {
  border: none;
  outline: none;
  max-width: 100%;
  height: auto;
}

.img {
  display: block;
  width: 100%;
  border-radius: 8px;
}

.video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

main {
  padding: 0 24px;
}

::selection {
  background-color: var(--selection-color);
  color: var(--selection-text);
}

[hidden] {
  display: none;
}

.logo {
  display: flex;
  flex-direction: row;
  gap: 16px;

  img {
    display: block;
  }

  div {
    font-size: 24px;
    font-weight: 600;
    line-height: 44px;
  }
}

header {
  padding: 20px 24px;
}

.header {
  display: flex;
  flex-direction: row;

  >div {
    display: flex;
    position: relative;
    align-items: center;

    &:first-child {
      flex: 1;
    }
  }
}

.download-slot {
  display: block;
  width: max-content;
  min-width: min(180px, calc(100vw - 100px));
  max-width: calc(100vw - 100px);
  flex: 0 1 auto;
  z-index: 1;
}

.download-card {
  position: relative;
  width: 100%;
  background: var(--get-vivaldi-color);
  border-radius: 24px;
  border: 1px solid var(--get-vivaldi-border);
  filter: drop-shadow(0 2px 7px var(--shadow));

  &:hover {
    filter: drop-shadow(0 2px 7px var(--shadow-hover));
  }

  &.is-open {
    border-radius: 12px 12px 0 0;
  }
}

#get-vivaldi {
  display: flex;
  width: 100%;
  background: transparent;
  color: var(--get-vivaldi-text);
  border: none;
  border-radius: 24px;
  padding: 9px 20px;
  font: inherit;
  line-height: 20px;
  font-size: 15px;
  font-weight: 500;
  overflow-wrap: anywhere;
  cursor: pointer;
  gap: 8px;

  span,
  img {
    display: block;
  }
}

#get-vivaldi:focus-visible,
.download-content a:focus-visible {
  outline: 2px solid var(--text-color);
  outline-offset: 2px;
}

.download-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  background: var(--get-vivaldi-color);
  border-radius: 0 0 12px 12px;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows 250ms ease, opacity 200ms ease,
    visibility 0s linear 250ms;
}

.download-card.is-open .download-panel {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

#vivaldi-download>div {
  min-height: 0;
  overflow: hidden;

  p {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.333;
  }

  >div {
    padding: 12px;
    text-align: center;

    img {
      display: block;
      margin: 0 auto 4px auto;
    }
  }
}

.download-content p {
  font-size: 14px;
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .download-panel {
    transition: none;
  }
}

@media (max-width: 640px) {
  header .download-slot {
    display: none;
  }
}

.preheader {
  display: block;
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 1rem;
}

.herocontent {
  width: 100%;
  display: flex;
  flex-direction: column;
  >div {
    display: flex;
    align-items: center;
  }
}

.herotext {
  padding: 48px 0;
  text-wrap: pretty;
}

.news {
  --news-gap: 32px;
  margin: 0 0 40px 0;
  padding: 4px 0 16px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max(320px, calc((100% - 2 * var(--news-gap)) / 3));
  gap: var(--news-gap);
  overflow-x: hidden;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}

.newsitem {
  display: flex;
  flex-direction: column;
  min-width: 320px;
  gap: 24px;
  scroll-snap-align: start;
  overflow-wrap: anywhere;
}

.news-carousel {
  padding-top: 24px;
}

.news-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.news-controls[hidden] {
  display: none;
}

.news-controls button {
  min-width: 40px;
  min-height: 40px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--body-color);
  color: var(--text-color);
  line-height: 18px;
  cursor: pointer;
  text-align: center;

  svg {
    display: block;
    margin: auto;
  }
}

.news-controls button[aria-disabled="true"] {
  opacity: .45;
  cursor: default;
}

.news:focus-visible,
.news-controls button:focus-visible {
  outline: 2px solid var(--text-color);
  outline-offset: 2px;
}

.more {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 48px;
  align-items: center;
  text-align: center;

  a {
    font-weight: 500;
  }
}

footer {
  border-top: 1px solid var(--border);
  background: var(--footer);
  color: var(--footer-text);
  margin-top: 40px;
  font-size: 14px;
  line-height: 20px;
  padding: 24px;
  
  >div {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
  }
}

@media (min-width: 1024px) {

  header,
  main,
  footer {
    padding-left: 3vw;
    padding-right: 3vw;
  }

  .hero {
    padding-top: 12px;
  }

  .herocontent {
    gap: 48px;
  }

  .herocontent,
  .more {
    flex-direction: row;
  }

  .herotext {
    width: 45%;
  }

  .heroimage {
    width: 55%;
  }

  .img {
    border-radius: 12px;
  }

  .news {
    --news-gap: 48px;
  }

  .more {
    text-align: left;
  }

  .more .col:first-child {
    flex: 1;
  }

  .more .col:last-child {
    text-align: right;
  }
}

@media (min-width: 1280px) {
  .news {
    --news-gap: 64px;
  }

  .herocontent {
    gap: 64px;
  }

  .herotext {
    width: 45%;
  }

  .heroimage {
    width: 55%;
  }

  .news-controls button {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (min-width: 1640px) {
  .herocontent {
    gap: 80px;
  }
  header > div,
  main > div,
  footer > div {
    max-width: 2940px;
    margin: auto;
  }
  .herotext {
    width: 40%;
  }

  .heroimage {
    width: 60%;
  }
  .news-controls {
    margin-bottom: 16px;
  }
}

@media (min-width: 1800px) {
  .newsitem h2 {
    font-size: 1.75rem;
  }
}

.center {
  text-align: center;
}

.more {
  padding: 20px 0 40px 0;
}

.donations {
  svg {
    margin-right: 2px;
  }
  
  span {
    display: inline-block;
  }
  
  a {
    color: var(--donate-link);
    font-weight: 500;
  }
  
  a:hover {
    text-decoration: none;
  }
}

@media (min-width: 1921px) {
  h1 {
    font-size: clamp(36px, 3.25vw, 92px);
  }
  h2 {
    font-size: 1.75rem;
  }
  p, .preheader {
    font-size: 1.2rem;
  }
  .hero p {
    font-size: 1.2rem;
  }
  .news-carousel {
    padding-top: 32px;
  }
  .newsitem h2 {
    font-size: 2rem;
    margin-top: 6px;
  }
}

@media (min-width: 2100px) {
  .hero p, p, .preheader {
    font-size: 1.25rem;
  }
  .newsitem h2 {
    font-size: 2.5rem;
  }
}