/* CSS RESETS */

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

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body,
h1,
h2 h3,
p {
  margin-block-end: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul {
  list-style: none;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  line-height: 1.65;
  text-wrap: balance;
}

h1,
h2,
h3 {
  line-height: 1.15; /* Set shorter line heights on headings and interactive elements */
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

.visually-hidden:not(:focus):not(:active) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0); /* Legacy property for Internet Explorer */
  clip-path: inset(50%);
  white-space: nowrap;
}

/* FONTS */

/* karla-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "Karla";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/karla-v32-latin-regular.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* karla-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "Karla";
  font-style: normal;
  font-weight: 700;
  src: url("../fonts/karla-v32-latin-700.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* CUSTOM VARIABLES */

:root {
  /* COLORS */

  --clr-white: #ffffff;
  --clr-gray: #9aa7be;
  --clr-teal-100: #e6eff5;
  --clr-teal-400: #4abfbd;
  --clr-teal-500: #2ab3b1;
  --clr-green: #c0df33;
  --clr-transparent: transparent;

  /* TYPOGRAPHY */

  --ff-main: "Karla", sans-serif;
  --fs-body: 1rem;

  /* SPACINGS */

  --space-0: 0;
  --space-100: 0.5rem;
  --space-200: 1rem;
  --space-300: 1.5rem;
  --space-400: 2rem;
  --space-500: 2.5rem;

  /* BORDER RADIUS */

  --rounded-xs: 5px;
  --rounded-sm: 8px;
  
  
  /* BOX SHADOW */

  --shadow-sm: 0px 15px 30px rgba(0, 81, 171, 0.15);
  --shadow-btn: 0px 10px 10px rgba(0,0,0, 0.0973);

}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-400);
  background-color: var(--clr-teal-100);
  font-family: var(--ff-main);
  font-size: var(--fs-body);
}

.price-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-inline-size: 39.688rem;
  border-radius: var(--rounded-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.header, .subscription, .why {
  padding: var(--space-500);
}

.header {
  background-color: var(--clr-white);
}

.header__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.0104em;
  color: var(--clr-teal-500);
  margin-block-end: var(--space-300);
}

.header__highlight {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.0138em;
  color: var(--clr-green);
  margin-block-end: var(--space-100);
}

.header__description {
  color: var(--clr-gray);
  letter-spacing: -0.0312em;
}

.subscription {
  display: flex;
  flex-direction: column;
  background-color: var(--clr-teal-500);
  color: var(--clr-white);
  padding-block: clamp(var(--space-300), 0.5458rem + 4.0712vw, var(--space-500));
}

.subscription__title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.0138em;
  margin-block-end: var(--space-200);
}

.subscription__price {
  display: flex;
  align-items: center;
  gap: var(--space-100);
  color: rgba(255, 255, 255, 0.5);
}

.subscription__price-highlight {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.0125em;
  color: var(--clr-white);
}

.subscription__feature {
  display: inline-block;
  letter-spacing: -0.03125em;
  margin-block-end: var(--space-400);
}

.subscription__link {
  text-align: center;
  padding: var(--space-100);
  border-radius: var(--rounded-xs);
  text-decoration: none;
  background-color: var(--clr-green);
  color: inherit;
  font-weight: 700;
  border: 2px solid var(--clr-transparent);
  box-shadow: var(--shadow-btn);
  transition: color 0.3s, background-color 0.3s, border-color 0.3s;
}

.subscription__link:hover {
  color: var(--clr-green);
  background-color: var(--clr-transparent);
  border: 2px solid var(--clr-green);
}

.subscription__link:focus-visible {
  outline: 2px solid var(--clr-green);
  outline-offset: 2px;
}

.why {
  background-color: var(--clr-teal-400);
  color: var(--clr-white);
  padding-block: clamp(var(--space-300), 0.5458rem + 4.0712vw, var(--space-500));
}

.why__title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.0138em;
  margin-block-end: var(--space-200);
}

.why__list {
  font-size: 0.875rem;
  line-height: 1.45;
  opacity: 0.75;
}

@media screen and (min-width: 48em) {
  
  .price-grid {
    grid-template-columns: 1fr 1fr;
  }

  .header {
    grid-column: span 2;
  }

  .subscription__feature {
    margin-block-end: auto;
  }

}
