/*
  Josh's Custom CSS Reset
  https://www.joshwcomeau.com/css/custom-css-reset/
*/

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

*:not(dialog) {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/* GENERAL STYLES AND LAYOUT */

:root {
  --white: hsl(0, 0%, 100%);
  --gray-500: hsl(218, 22%, 67%);
  --teal-500: hsl(179, 62%, 43%);
  --teal-400: hsl(179, 48%, 52%);
  --green-400: hsl(71, 73%, 54%);
  --teal-100: hsl(204, 43%, 93%);
}

@font-face {
  font-family: "Karla Regular";
  font-weight: 400;
  font-display: swap;
  src: url(./assets/fonts/Karla-Regular-subset.woff2) format(woff2);
}

@font-face {
  font-family: "Karla Bold";
  font-weight: 700;
  font-display: swap;
  src: url(./assets/fonts/Karla-Bold-subset.woff2) format(woff2);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  font-family: "Karla Regular", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--white);
  background-color: var(--teal-100);
}

main {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 40px;
}

/* UTILITIES */
.sr-only {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: 0;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* GRID COMPONENT */
.component {
  display: grid;
  grid-template-rows: auto 1fr 1fr;
  max-width: 24rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 4px hsla(0, 0%, 0%, 0.25);
}

.component h2,
.component h3,
.component strong {
  font-family: "Karla Bold", sans-serif;
  font-weight: 700;
  line-height: 1.15;
}

.component h2 {
  font-size: 1.5rem;
  color: var(--teal-500);
  margin-bottom: 1.5rem;
}

.component h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.component strong {
  font-size: 2rem;
}

.component a {
  font-family: "Karla Bold", sans-serif;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
  color: var(--white);
  padding: 8px;
  background-color: var(--green-400);
  border: 2px solid var(--green-400);
  border-radius: 5px;
  box-shadow: 0 10px 10px hsla(0, 0%, 0%, 0.1);
}

.component a:hover {
  color: var(--green-400);
  background-color: var(--white);
}

.component ul {
  font-size: 0.875rem;
  line-height: 1.45;
  list-style: none;
  opacity: 75%;
  padding: 0;
}

.pitch {
  color: var(--gray-500);
  background-color: var(--white);
  padding: 40px;
}

.pitch h3 {
  color: var(--green-400);
  margin-bottom: 0.5rem;
}

.subscription,
.features {
  padding: 24px 40px;
}

.subscription {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--teal-500);
}

.price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.period {
  opacity: 50%;
}

.features {
  background-color: var(--teal-400);
}

@media (min-width: 48em) {
  .component {
    grid-template: auto auto / 1fr 1fr;
    max-width: 40rem;
  }

  .pitch {
    grid-column: span 2;
  }

  .subscription,
  .features {
    padding: 40px;
  }
}

/* FOOTER */
footer {
  font-size: 0.875rem;
  line-height: 1.45;
  text-align: center;
  color: slategray;
  padding: 0 40px 24px;
}
.attribution a {
  color: var(--teal-500);
}
