/* CSS RESET, source: https://www.joshwcomeau.com/css/custom-css-reset/ */
/*
  1. Use a more-intuitive box-sizing model.
*/
*,
*::before,
*::after {
  box-sizing: border-box;
}
/*
    2. Remove default margin
  */
* {
  margin: 0;
}
/*
    3. Allow percentage-based heights in the application
  */
html,
body {
  height: 100%;
}
/*
    Typographic tweaks!
    4. Add accessible line-height
    5. Improve text rendering
  */
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
/*
    6. Improve media defaults
  */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}
/*
    7. Remove built-in form typography styles
  */
input,
button,
textarea,
select {
  font: inherit;
}
/*
    8. Avoid text overflows
  */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* Variables */

:root {
  --col-background-sedan: hsl(31, 77%, 52%);
  --col-background-suvs: hsl(184, 100%, 22%);
  --col-background-luxury: hsl(179, 100%, 13%);
  --col-neutral-one: hsla(0, 0%, 100%, 0.75);
  --col-neutral-second: hsl(0, 0%, 95%);

  --font-primary: 400 15px "Lexend Deca", sans-sefir;
  --font-heading: 700 2.5rem "Big Shoulders Display", sans-sefir;
}

main {
  display: flex;
  justify-content: center;
}

.container {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-wrap: wrap;
  border-radius: 0.7rem;
  overflow: hidden;
}

@media (width > 1050px) {
  .container {
    flex-direction: row;
  }
  body {
    place-content: center;
    display: grid;
  }
}

.card {
  padding: 2.5rem;
  width: 350px;
  min-height: 420px;
  display: grid;
  grid-template-rows: 1fr 1fr 2fr 1fr;
}

.card.sedan {
  background-color: var(--col-background-sedan);
  color: var(--col-background-sedan);
}

.card.suvs {
  background-color: var(--col-background-suvs);
  color: var(--col-background-suvs);
}

.card.luxury {
  background-color: var(--col-background-luxury);
  color: var(--col-background-luxury);
}

.card p {
  font: var(--font-primary);
  color: var(--col-neutral-one);
  padding-right: 2rem;
  line-height: 1.5rem;
  margin-bottom: 1.5rem;
}

.card button {
  border: 2px solid transparent;
  border-radius: 5rem;
  overflow: hidden;
  border-color: transparent;
  background-color: var(--col-neutral-second);
  font: var(--font-primary);
  color: inherit;
  font-weight: bold;
  width: 150px;
  height: 55px;
  margin: 5px 0;
}

.card button:hover {
  color: white;
  background-color: transparent;
  border-color: white;
  cursor: pointer;
}

.card__icon {
  display: block;
  width: 64px;
  height: 40px;
}

.card__title {
  font: var(--font-heading);
  color: var(--col-neutral-second);
  text-transform: uppercase;
  font-size: 2.5rem;
}

/* Front mentor styles */
.attribution {
  display: flex;
  justify-content: center;
  color: hsl(0, 0%, 0%);
  font-size: 11px;
  text-align: center;
}

.attribution a {
  color: hsl(228, 45%, 44%);
}
