/* BASE AND RESETTING STYLES */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #fc5d66;
  --secondary: #ffc05a;
  --light: #f9fafb;
  --dark: #262d35;
}

::selection {
  background-color: var(--secondary);
}

::placeholder {
  font-family: inherit;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--primary);
}

::-webkit-scrollbar-track {
  background-color: var(--light);
}

::-webkit-scrollbar-button {
  display: none;
}

html {
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

a {
  text-decoration: none;
}

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

ul,
summary {
  list-style-type: none;
}

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

/* UTILITIES */
.text-primary {
  color: var(--primary);
}

.text-secondary {
  color: var(--secondary);
}

.container {
  max-width: 75rem;
  padding-inline: 2rem;
  margin-inline: auto;
}

.button {
  display: inline-block;
  padding: 1.25rem 2.5rem;
  border-radius: 32px;
  cursor: pointer;
  color: var(--dark);
  font-weight: 600;
  background-color: var(--secondary);
  border: 1px solid var(--secondary);
  transition: 0.25s;
  transition-property: background-color, color, border-color;
}

.button:hover {
  background-color: var(--primary);
  color: var(--light);
  border-color: var(--light);
}

.button:active {
  scale: 0.98;
}

.navbar-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6rem;
  padding-block-end: 8rem;
}

.pt-16 {
  padding-block-start: 4rem;
}

.mt-16 {
  margin-block-start: 4rem;
}

.section-header {
  max-width: 750px;
  text-align: center;
  margin-inline: auto;
  margin-block-end: 3rem;

  & h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-block-end: 1.5rem;
  }

  & p {
    font-size: 1.25rem;
    color: var(--dark);
  }
}

.heading-border {
  width: 10rem;
  height: 0.25rem;
  margin-inline: auto;
  margin-block-end: 1.5rem;
  background-color: var(--primary);
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  border-radius: 6px;
}

/* NAVBAR */
.navbar {
  position: fixed;
  padding-block: 1rem;
  color: var(--light);
  inset: 0;
  z-index: 10;
  height: fit-content;
  transition: background-color 0.25s ease-in-out;
}

.navbar.scroll {
  background-color: rgba(235, 77, 88, 0.75);
  backdrop-filter: blur(5px);
}

.navbar-background {
  display: none;
  inset: 0;
  content: '';
  position: absolute;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  background-color: rgba(0, 0, 0, 0.9);
}

.navbar-background.active {
  transform: translateX(0);
}

.navbar a {
  color: var(--light);
  transition: color 0.25s ease-in-out;

  &:hover {
    color: var(--secondary);
  }
}

.navbar i {
  display: block;
  font-size: 1.5rem;
}

.navbar img {
  position: relative;
  z-index: 20;
}

.main-menu-list {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-weight: 600;
}

.socials {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* MOBILE MENU */
.mobile-menu {
  display: none;
}

.mobile-menu-toggle {
  position: relative;
  cursor: pointer;
  z-index: 20;
}

.mobile-menu-items {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: 100vh;
  padding: 3rem 2rem;
  text-align: center;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  background-color: rgba(0, 0, 0, 0.9);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-items.active {
  transform: translateX(0);
}

.mobile-menu-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.mobile-menu-items .socials {
  justify-content: center;

  & i {
    font-size: 2rem;
  }
}

/* HERO */
.hero {
  background: #000 url('../assets/header-background.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;

  padding-block: 8rem;
  color: var(--light);
  overflow-x: hidden;
  position: relative;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  font-weight: 700;
  margin-block-end: 1rem;
}

.hero p {
  font-size: 1.2rem;
  line-height: 1.8;
  font-weight: 400;
  margin-block-end: 2rem;
}

.hero img {
  margin-inline-end: -5rem;
}

.frame-decoration {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5rem;
}

/* LEARN TOPICS */
.topics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.topic img {
  transition: scale 0.25s ease-in-out;
  border-radius: 6px;
  width: 100%;
}

.topic img:hover {
  scale: 1.025;
}

.topic h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-block: 0.5rem;
}

/* CHAPTERS CARDS */
.chapter-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 1rem 0 4rem;
}

.chapter-cards img {
  margin-block-start: 1rem;
}

.chapter-cards h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-block: 1rem;
}

/* SUMMARY */
.summary {
  color: var(--dark);
  background-color: var(--light);
  padding-block: 4rem;
}

.section-lists {
  padding: 2rem;
  border-radius: 6px;
  background-color: #fff;
}

.list {
  padding: 0.75rem;
}

.list-header {
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  font-size: 1.2rem;
  border-radius: 6px;
  margin-block: 0;
  padding: 0.5rem 1rem;
  color: var(--light);
  background-color: var(--primary);
  transition: margin 200ms ease-out;
}

.list[open] .list-header {
  margin-block-end: 1rem;
}

.list-item {
  text-align: left;
  padding-block: 1.25rem;
  border-bottom: 1px solid #f1f4f6;
}

.list-item:last-child {
  border-bottom: none;
}

/* INFO */
.info-container {
  display: flex;

  background-image: url('../assets/audience.jpg');
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
}

.info-content {
  flex: 1;
  padding: 4rem;
  color: var(--light);
  background-color: var(--primary);
}

.info-image {
  width: 50%;
}

.info-content h2 {
  font-size: 2rem;
  margin-block-end: 1rem;
  font-weight: 600;
}

.info-content p {
  font-size: 1.2rem;
  margin-block-end: 2rem;
}

.info-content ul li {
  font-size: 1.2rem;
  line-height: 2;
}

.info-content i {
  margin-inline-end: 0.5rem;
  color: var(--secondary);
}

/* TAKEAWAYS */
.takeaways-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-block: 1.5rem;
}

.takeaways-cards .card {
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
}

.takeaways-cards .card i {
  margin-inline-end: 1rem;
}

/* DETAILS & AUTHOR */
.details .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
}

.details img {
  width: min(100%, 500px);
}

.details h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-block-end: 0.5rem;
}

.details .heading-border {
  margin-inline: 0;
}

.details p {
  margin-block: 1.5rem;
}

.details + .details .container {
  flex-direction: row-reverse;
}

.details ul {
  margin-block-end: 1.5rem;
}

.details ul li {
  line-height: 2;
}

.details i {
  margin-inline-end: 0.5rem;
}

/* STATS */
.stats {
  color: var(--light);
  background: #000 url('../assets/stats-background.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.stats .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 4rem;
}

.stats img {
  width: min(100%, 500px);
}

.stats-content {
  max-width: 500px;
}

.stats-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.stats-numbers:last-of-type {
  margin-block-end: 2rem;
}

.stats-numbers .numbers {
  display: grid;
  place-items: center;
}

.stats-numbers h3 {
  font-size: 2.8rem;
  font-weight: 800;
}

.stats-numbers p {
  font-size: 0.75rem;
}

.stats-text {
  font-size: 1.2rem;
  margin-block-end: 2rem;
  text-align: center;
}

.stats .button {
  width: 200px;
  display: block;
  text-align: center;
  margin-inline: auto;
}

/* NEWSLETTER */
.newsletter {
  text-align: center;
  margin-inline: 2rem;
}

.newsletter .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 71rem;
  padding: 4rem 2rem;
  background-color: var(--light);
  border: 1px solid #eee;
  border-radius: 6px;
}

.newsletter h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--secondary);
}

.newsletter p {
  max-width: 540px;
}

.newsletter input[type='email'] {
  padding: 1.25rem 2rem;
  border: 1px solid #ccc;
  border-radius: 32px;
  width: min(100%, 400px);
}

.newsletter .button {
  margin-block: 1.5rem;
  width: min(100%, 400px);
}

/* SOCIALS */
.social {
  text-align: center;
  font-size: 1.25rem;
  padding: 4rem 2rem;
  margin-inline-end: 0;
  color: var(--light);
  background-color: var(--dark);
}

.social i {
  color: var(--light);
  transition: color 0.25s ease-in-out;
}

.social i:hover {
  color: var(--secondary);
}

.social p {
  margin-block-end: 2rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* FOOTER */
.footer {
  padding: 0.5rem 2rem;
  color: var(--light);
  background-color: var(--dark);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer a {
  color: var(--light);
  transition: color 0.25s ease-in-out;
}

.footer a:hover {
  color: var(--secondary);
}

.footer-links {
  display: flex;
  gap: 1rem;
  margin-block-end: 1rem;
}

.copyright {
  opacity: 0.5;
  font-size: 0.75rem;
  margin-block-end: 1rem;
}

/* CONTACT */
.inner-header {
  height: 250px;
  padding-block-start: 8rem;
  color: var(--light);
  background-color: var(--primary);
}

.inner-header .container,
.contact-form .container,
.location .container {
  max-width: 60rem;
}

.inner-header h1 {
  font-size: 2.5rem;
  margin-block-end: 1rem;
}

.contact-form {
  margin-inline: auto;
}

.contact-form p,
.location p {
  margin-block-end: 3rem;
  font-size: 1.2rem;
  line-height: 2;
  text-wrap: pretty;
}

.contact-form p a {
  color: var(--primary);
  text-wrap: nowrap;
}

.contact-form input,
.contact-form textarea {
  display: block;
  font-size: medium;
  width: 100%;
  margin-block: 1.5rem;
  padding: 1.25rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.contact-form .button {
  width: 100%;
  font-size: inherit;
}

.contact-form textarea {
  height: 250px;
  resize: none;
}

.location h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-block-end: 1rem;
  color: var(--dark);
}

.map {
  overflow: hidden;
  position: relative;
  height: 0;
  margin-block-end: 3rem;
  padding-block-end: 50%;
  border-radius: 6px;
}

.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 6px;
}

/* MEDIA QUERIES */
@media (width < 75em) {
  .hero-flex {
    gap: 2rem;
  }

  .hero img {
    max-width: 480px;
    margin-inline-end: 0;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .topics {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (width < 62em) {
  .navbar-background {
    display: block;
  }

  .main-menu-items {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .hero {
    text-align: center;
  }

  .hero-flex {
    flex-direction: column;
  }

  .hero img {
    margin-block-start: 2rem;
    max-width: 100%;
  }

  .topics {
    grid-template-columns: repeat(2, 1fr);
  }

  .chapter-cards {
    grid-template-columns: 1fr;
  }

  .info-container {
    flex-direction: column;
  }

  .info-content {
    padding: 2rem;

    & h2 {
      font-size: 1.5rem;
    }

    & p,
    & ul li {
      font-size: 1rem;
    }
  }

  .info-image {
    display: none;
  }

  .takeaways-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .details .container,
  .details + .details .container,
  .stats .container {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .details .heading-border {
    margin-inline: auto;
  }

  .details ul {
    text-align: left;
  }
}

@media (width < 48em) {
  .hero {
    padding-block: 8rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .topics,
  .takeaways-cards {
    grid-template-columns: 1fr;
  }

  .footer .container {
    flex-direction: column;
  }
}

@media (width < 36em) {
  .hero h1 {
    font-size: 2rem;
  }

  .section-header h2,
  .details h2 {
    font-size: 1.5rem;
  }

  .section-header p {
    font-size: 1rem;
  }

  .section-lists {
    padding-inline: 0.5rem;
  }

  .list-header {
    font-size: 1rem;
  }

  .stats-numbers {
    flex-direction: column;
    gap: 1.5rem;
  }

  .stats-text {
    font-size: 1rem;
  }

  .newsletter h2 {
    font-size: 1.75rem;
  }
}
