/* Reset */

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

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

h1,
h2,
h3,
h4,
button,
input,
label {
  line-height: 1;
}

h1,
h2,
h3,
h4 {
  letter-spacing: -0.03em;
  text-wrap: balance;
  font-weight: 500;
}

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

input,
button,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

:target {
  scroll-margin-block: 5ex;
}

/* Styles */

:root {
  --accent: #ff726c;

  --bg: #176eb2;
  --bg-dark: #125d98;
  --bg-hover: #2278ba;

  --text-rgb: 245, 240, 223;

  --text: rgba(var(--text-rgb), 1);
  --text-muted: rgba(var(--text-rgb), 0.8);

  --border: rgba(var(--text-rgb), 0.5);
  --link-decoration: rgba(var(--text-rgb), 0.5);

  --grid-lines: rgba(var(--text-rgb), 0.12);
  --grid-lines-light: rgba(var(--text-rgb), 0.08);

  --padding: 1.25rem;

  @media (min-width: 600px) {
    --padding: 2rem;
  }

  @media (min-width: 900px) {
    --padding: 3rem;
  }
}

html {
  scrollbar-color: var(--text-muted) transparent;
}

body {
  font-family:
    Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", source-sans-pro,
    sans-serif;
  min-height: 100vh;
  line-height: 1.4;
  background: var(--bg-dark);
  color: var(--text);

  background-image:
    linear-gradient(var(--grid-lines) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-lines) 1px, transparent 1px);
  background-position: center top;
  background-size: 0.75rem 0.75rem;
}

a {
  color: inherit;
  text-decoration-color: var(--link-decoration);
  text-decoration-thickness: 2px;
}

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

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.125rem;
}

.wrapper {
  max-width: 70rem;
  margin: 0 auto;
  background: var(--bg);
  padding: var(--padding);

  @media (min-width: 70rem) {
    border-inline: 1px solid var(--border);
  }
}

.nav {
  font-size: 1.25rem;
  margin-top: 0.5rem;
}

.intro {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 45ch;
  margin-top: 1rem;
}

.group {
  margin-top: 2rem;
}

.group__name {
  margin-bottom: 0.5rem;
}

.group__models {
  display: grid;
  gap: 1rem;

  @media (min-width: 600px) {
    grid-template-columns: 1fr 1fr;
  }
  @media (min-width: 900px) {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.model {
  text-align: center;
  padding: 1rem;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.model:hover {
  background-color: var(--bg-hover);
}

.model__name {
  text-transform: uppercase;
}

.model__description {
  color: var(--text-muted);
  line-height: 1.1;
  display: grid;
  gap: 0.5rem;
}

.model__img-wrapper {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-lines-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-lines-light) 1px, transparent 1px);
  background-size: 0.75rem 0.75rem;
  background-position: bottom right;
  border: 1px solid var(--border);
}

.model__img {
  aspect-ratio: 16/9;
  padding: 1rem;
  object-fit: contain;

  /*filter: invert(1) grayscale(1) contrast(1.25);
  mix-blend-mode: screen;*/
}

.model__links {
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.model:hover a {
  text-decoration-color: var(--accent);
}

footer {
  margin-top: var(--padding);
}

/* Thumb */

.thumb {
  width: 50rem;
  background: var(--bg-dark);
  padding: 1.5rem;
  border: 1px solid var(--border);
  aspect-ratio: 16/9;
  margin: 5rem;

  h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .model__img-wrapper {
    padding: 1rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;

    img {
      width: calc(100% + 2rem);
      max-width: calc(100% + 2rem);
      height: 12rem;
    }

    img:nth-child(even) {
      margin-left: -2rem;
    }
    img:nth-child(odd) {
      margin-right: -2rem;
    }
  }
}
