/* ------------------- */
/* Custom properties   */
/* ------------------- */
:root {
  --clr-cyan-400: 179 62% 43%;
  --clr-yellow-400: 71 73% 54%;
  --clr-neutral-100: 0 0% 100%;
  --clr-neutral-200: 204 43% 93%;
  --clr-neutral-300: 218 22% 67%;
  --clr-neutral-900: 0 0% 0%;

  --ff-body: "Karla", sans-serif;

  --fs-200: 0.875rem;
  --fs-300: 0.9375rem;
  --fs-400: 1rem;
  --fs-600: 1.125rem;
  --fs-800: 1.25rem;
  --fs-900: 2rem;

  --ls-200: -0.175px;
  --ls-300: -0.1875px;
  --ls-400: -0.2px;
  --ls-600: -0.225px;
  --ls-800: -0.25px;
  --ls-900: -0.4px;

  --fw-400: 400;
  --fw-700: 700;
}

@media (min-width: 50em) {
  :root {
    --fs-300: 1.125rem;
    --fs-800: 1.5rem;

    --ls-300: -0.225px;
    --ls-800: -0.3px;
  }
}

/* ------------------- */
/* Reset               */
/* ------------------- */

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

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

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

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.625;
  font-family: var(--ff-body);
  font-size: var(--fs-400);
  font-weight: var(--fw-400);
  background-color: hsl(var(--clr-neutral-200));
  letter-spacing: var(--ls-400);
}

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

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

h1,
h2,
h3 {
  line-height: 1.15;
}

/* ------------------- */
/* Composition         */
/* ------------------- */
.flex {
  display: flex;
  gap: var(--flex-gap, 1rem);
}

.grid {
  display: grid;
  gap: var(--grid-gap, 1rem);
}

/* ------------------- */
/* Utility             */
/* ------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bg-cyan-400 {
  background-color: hsl(var(--clr-cyan-400));
}
.bg-cyan-400-85 {
  background-color: hsl(var(--clr-cyan-400) / 0.85);
}
.bg-neutral-100 {
  background-color: hsl(var(--clr-neutral-100));
}

.text-cyan-400 {
  color: hsl(var(--clr-cyan-400));
}
.text-yellow-400 {
  color: hsl(var(--clr-yellow-400));
}
.text-neutral-100 {
  color: hsl(var(--clr-neutral-100));
}
.text-neutral-300 {
  color: hsl(var(--clr-neutral-300));
}

.fs-200 {
  font-size: var(--fs-200);
  letter-spacing: var(--ls-200);
}
.fs-300 {
  font-size: var(--fs-300);
  letter-spacing: var(--ls-300);
}
.fs-600 {
  font-size: var(--fs-600);
  letter-spacing: var(--ls-600);
}
.fs-800 {
  font-size: var(--fs-800);
  letter-spacing: var(--ls-800);
}
.fs-900 {
  font-size: var(--fs-900);
  letter-spacing: var(--ls-900);
}

.fw-700 {
  font-weight: var(--fw-700);
}

.text-center {
  text-align: center;
}

/* ------------------- */
/* Block               */
/* ------------------- */
.container {
  place-content: center;
  grid-template-rows: 1fr auto 1fr;
  grid-template-areas:
    "header"
    "main"
    "footer";
  min-height: 100vh;
  min-width: fit-content;
  padding: 1rem 1.5rem;
}

.container > main {
  grid-area: main;
}

.container > footer {
  grid-area: footer;
  align-self: end;
}

.content-layout {
  --grid-gap: 0;
  border-radius: 5px;
  box-shadow: 0px 15px 30px 0px hsl(212 100% 33% / 0.15);
  overflow: hidden;
  max-width: 19.4375rem;
  margin-inline: auto;
}

.content-layout > div {
  padding: 1.5rem;
}

.intro > p:first-of-type {
  margin-top: 1.5rem;
  line-height: 1.33;
}

.intro > p:last-of-type {
  margin-top: 1rem;
  line-height: 1.85;
}

.subscription > p:first-of-type {
  --flex-gap: 0.75rem;
  align-items: center;
  margin-top: 1.125rem;
  color: hsl(var(--clr-neutral-100) / 0.5);
}

.subscription > p:first-of-type > span {
  color: hsl(var(--clr-neutral-100));
  line-height: 1.15;
}

.subscription > p:last-of-type {
  margin-block: 0.25rem 1.625rem;
}

.why-us > ul {
  list-style: none;
  margin: 1.125rem 0 0;
  padding: 0;
  color: hsl(var(--clr-neutral-100) / 0.75);
  line-height: 1.43;
}

/*
 * Restore the list semantics for unordered list with `list-style` value of `none` for Safari.
 * https://developer.mozilla.org/en-US/docs/Web/CSS/list-style
 */
.why-us > ul li::before {
  content: "\200B";
}

@media (min-width: 50em) {
  .content-layout {
    grid-template-columns: 1fr 1fr;
    max-width: 39.6875rem;
  }

  .content-layout > div {
    padding: 2.5rem;
  }

  .intro {
    grid-column: 1 / -1;
  }

  .intro > p:last-of-type {
    margin-top: 0.75rem;
    font-size: var(--fs-400);
    letter-spacing: var(--ls-400);
    line-height: 1.625;
  }
}

/* ------------------- */
/* Exception           */
/* ------------------- */
.button {
  cursor: pointer;
  background-color: transparent;
  border: 0;
  padding: 0;
  font-size: var(--fs-400);
  font-weight: var(--fw-700);
  letter-spacing: var(--ls-400);
  line-height: 1.1875;
}

.button[data-type="primary"] {
  background-color: hsl(var(--clr-yellow-400));
  color: hsl(var(--clr-neutral-100));
  border-radius: 5px;
  box-shadow: 0px 10px 10px 0px hsl(var(--clr-neutral-900) / 0.1);
  width: 100%;
  padding: 0.875em 1.75em;
  transition: background-color 200ms ease-in-out;
}

.button[data-type="primary"]:hover,
.button[data-type="primary"]:focus {
  background-color: hsl(var(--clr-yellow-400) / 0.75);
}
