@import "./normalize.css";

:root {
  --clr-white: hsl(0, 0%, 100%);
  --clr-white-90: hsla(0, 0%, 100%, 0.9);
  --clr-white-70: hsla(0, 0%, 100%, 0.7);
  --clr-white-60: hsla(0, 0%, 100%, 0.6);
  --clr-primary: hsl(210, 100%, 20%);
  --clr-accent: hsl(211, 100%, 90%);
  --clr-accent-24: hsl(209, 100%, 94%);
  --clr-text: hsl(0, 0%, 16%);
  --clr-text-90: hsla(0, 0%, 16%, 0.9);
  --clr-text-80: hsla(0, 0%, 16%, 0.8);
  --clr-text-50: hsla(0, 0%, 16%, 0.5);
  --clr-border: hsl(0, 0%, 92%);

  --bg: hsl(0, 0%, 99%);
  --bg-0: hsla(0, 0%, 99%, 0);
  --bg-input: hsl(0, 0%, 94%);
}

/* Roboto Variable */
@font-face {
  font-family: "Roboto";
  src: url("../assets/Fonts/Roboto/Roboto-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
}

/* Roboto Condensed Variable */
@font-face {
  font-family: "Roboto Condensed";
  src: url("../assets/Fonts/Roboto_Condensed/RobotoCondensed-Variable.ttf")
    format("truetype");
  font-weight: 100 900;
  font-style: normal;
}

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

/* Common */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(57px + 40px);
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Roboto Condensed", sans-serif;
  min-height: 100dvh;
  color: var(--clr-text);
  background: var(--bg);
}

h1,
h2,
h3,
h4,
h5,
h6,
.title {
  font-family: "Roboto", sans-serif;
}

h1 {
  font-size: 28px;
  line-height: 36px;
  letter-spacing: -0.6px;
}

h2 {
  font-size: 24px;
  line-height: 32px;
  letter-spacing: -0.5px;
}

p {
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.3px;
  opacity: 0.8;
}

a {
  font-weight: 400;
  text-decoration: none;
  color: inherit;
}

img {
  width: 100%;
  height: 100%;
  user-select: none;
}

.logo {
  user-select: none;
  flex-shrink: 0;
  width: fit-content;
  height: 32px;
}

.primary-btn {
  font-size: 14px;
  font-weight: 500;
  line-height: 2.2ch;
  text-align: center;
  text-transform: uppercase;
  padding: 12px 24px;
  color: var(--clr-white);
  background: var(--clr-primary);
  border-radius: 50px;
  cursor: pointer;
  border: none;
  user-select: none;
}

section.section {
  display: grid;
  gap: 30px;
  margin-block: 80px;
}

.section__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: fit-content;
  max-width: 580px;
  padding-inline: 20px;
}

.section__badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  padding: 6px 10px;
  color: var(--clr-primary);
  background-color: var(--clr-accent);
  border-radius: 4px;
  user-select: none;
}

.section__title {
  display: flex;
  flex-direction: column;
  place-items: start;
  gap: 8px;
}

.section__content p {
  width: 95%;
}

.section__image {
  position: relative;
  display: flex;
  width: fit-content;
  padding: 10px 20px clamp(30px, 15vw, 70px) 10px;
  margin-inline: auto;
  isolation: isolate;
  user-select: none;
  overflow: hidden;
}

.section__image img {
  border-radius: clamp(20px, 11vw, 40px);
}

.section__image .image-1 {
  width: 90%;
  max-width: 400px;
  max-height: 408px;
}

.section__image .image-2 {
  position: absolute;
  right: 10px;
  bottom: 0;
  width: 80%;
  height: auto;
  max-width: 300px;
  max-height: 200px;
  border: clamp(5px, 3vw, 14px) solid var(--bg);
  transform: translate(0, 0);
  z-index: 2;
}

.section__image img {
  object-fit: cover;
}

ul.points {
  display: grid;
  gap: 12px;
  color: var(--clr-text-80);
}

ul.points li {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

ul.points li span {
  width: 20px;
  height: 20px;
}

@media (min-width: 568px) {
  h1 {
    font-size: 44px;
    line-height: 56px;
    letter-spacing: -0.9px;
  }

  .primary-btn {
    font-size: 16px;
    padding: 14px 28px;
  }

  .section__content {
    gap: 28px;
  }

  .section__badge {
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
  }

  .section__title {
    gap: 12px;
  }
}

@media (min-width: 768px) {
  html {
    scroll-padding-top: calc(77px + 60px);
  }

  h2 {
    font-size: 40px;
    line-height: 52px;
    letter-spacing: -0.8px;
  }

  p {
    font-size: 18px;
    line-height: 28px;
    letter-spacing: 0.7px;
  }

  section.section {
    grid-template-columns: 1fr 1fr;
    margin-block: 120px 70px;
  }

  .section__image {
    overflow: visible;
  }

  .section__image .image-1 {
    max-width: 500px;
    max-height: 514px;
  }

  .section__image .image-2 {
    right: -10px;
    max-width: 393px;
    max-height: 235px;
  }

  ul.points {
    font-size: 18px;
    gap: 18px;
  }

  ul.points li span {
    width: 22px;
    height: 22px;
  }
}

/* Header Section */
header {
  position: sticky;
  top: 0;
  padding: 10px 20px;
  background: var(--clr-white);
  border-bottom: 1px solid var(--clr-border);
  z-index: 10;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  max-width: 1440px;
  margin-inline: auto;
}

header button.menu-btn,
header button.close-btn {
  user-select: none;
  display: grid;
  place-content: center;
  padding: 4px;
  color: var(--clr-primary);
  background-color: var(--clr-accent);
  border-radius: 4px;
  cursor: pointer;
  border: 0;
}

header button.close-btn:active,
header button.menu-btn:active {
  color: var(--clr-accent);
  background-color: var(--clr-accent-24);
}

header button.menu-btn svg,
header button.close-btn svg {
  width: 28px;
  height: 28px;
  color: inherit;
}

header button.close-btn {
  margin-inline: auto 2rem;
}

header nav,
header nav ul {
  display: flex;
  align-items: center;
  gap: 40px;
}

header nav {
  transition: 0.3s ease-in-out, visibility 0s;
}

header nav ul {
  list-style: none;
}

@media (hover: hover) {
  header nav ul li:hover {
    background-color: var(--clr-white);
  }

  header nav ul li:hover a {
    font-weight: 700;
    color: var(--clr-primary);
  }
}

@media (min-width: 546px) {
  header .logo {
    height: 38px;
  }
}

@media (min-width: 769px) {
  header {
    padding: 15px 20px;
    overflow: hidden;
  }

  header .logo {
    height: 44px;
  }

  header button.menu-btn {
    display: none;
  }

  header button.close-btn {
    display: none;
  }

  header nav {
    display: flex;
  }
}

@media (max-width: 768px) {
  header nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    background-color: var(--clr-accent-24);
  }

  header nav:not([data-open="true"]) {
    visibility: hidden;
    transform: translateX(100%);
  }

  header nav,
  header nav ul {
    align-items: start;
  }

  header nav {
    padding-block: 2rem;
    gap: 2rem;
  }

  header nav ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  header nav ul li,
  header nav ul a {
    width: 100%;
  }

  header nav ul a {
    display: block;
    font-size: 1.4rem;
    padding: 1rem 2rem;
  }

  header nav a.primary-btn {
    width: calc(100% - (2rem * 2));
    text-align: center;
    margin-inline: auto;
  }
}

/* Hero Section */
main {
  max-width: 1440px;
  margin-inline: auto;
}

#hero {
  position: relative;
  display: grid;
  align-items: center;
  isolation: isolate;
}

#hero .hero__image {
  user-select: none;
  position: relative;
  flex-shrink: 0;
  width: 100%;
  max-height: 450px;
  margin-left: auto;
  overflow: hidden;
}

#hero .hero__image::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(var(--bg-0) 80%, var(--bg) 95%);
}

#hero .hero__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 10px 20px;
  z-index: 1;
}

#hero .hero__content h1 {
  max-width: 340px;
  margin: 0;
}

#hero .hero__content p {
  max-width: 420px;
}

#hero .hero__content .content__CTA {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

#hero .hero__content .content__CTA p {
  font-size: 14px;
  line-height: normal;
}

@media (min-width: 568px) {
  #hero {
    grid-template-columns: 50% 50%;
  }

  #hero .hero__image {
    place-self: start;
    max-height: 650px;
  }

  #hero .hero__image::before {
    background: linear-gradient(90deg, var(--bg) 0%, var(--bg-0) 20%);
  }

  #hero .hero__image img {
    float: right;
    width: auto;
    height: 100%;
  }

  #hero .hero__content {
    place-self: center;
    gap: 20px;
    max-width: 540px;
    order: -1;
  }

  #hero .hero__content h1,
  #hero .hero__content p {
    max-width: 500px;
  }

  #hero .hero__content p {
    font-size: 20px;
    line-height: 32px;
    letter-spacing: 0.8px;
  }

  #hero .hero__content .content__CTA {
    gap: 24px;
    margin-top: 28px;
  }

  #hero .hero__content .content__CTA p {
    font-size: 16px;
  }
}

/* About Section */
#about .about__content .services {
  margin-top: 8px;
  color: var(--clr-text-90);
}

@media (min-width: 568px) {
  #about .about__content .services {
    width: fit-content;
    grid-template-columns: 1fr 1fr;
    row-gap: 20px;
    margin-top: 16px;
  }
}

/* Service Section */
#services {
  max-width: 1170px;
  margin: 80px auto;
}

#services .services__title {
  max-width: 580px;
  padding-inline: 20px;
}

#services .services {
  display: grid;
  justify-content: center;
  gap: 40px;
  padding-inline: 20px;
  margin-top: 32px;
  overflow-x: auto;
}

#services .services .service {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  width: 100%;
  max-width: 360px;
  background-color: var(--clr-accent-24);
  border-radius: 12px;
}

#services .service .image {
  display: flex;
  justify-content: center;
  width: 100%;
  height: fit-content;
  background-color: var(--clr-white);
  border-radius: 5px;
  overflow: hidden;
}

#services .image img {
  max-width: 303px;
  max-height: 200px;
  object-fit: cover;
}

#services .service .content {
  display: grid;
  gap: 8px;
  padding-inline: 8px;
  margin-bottom: 1rem;
}

#services .service .content h3 {
  font-size: 18px;
  letter-spacing: 0.4px;
}

#services .service .content p {
  font-size: 14px;
  letter-spacing: 0.3px;
  line-height: 20px;
}

@media (min-width: 768px) {
  #services {
    margin-block: 120px 70px;
  }

  #services .services {
    display: flex;
    justify-content: start;
    gap: 40px;
    margin-top: 60px;
  }

  #services .services .service {
    border-radius: 20px;
  }

  #services .service .content h3 {
    font-size: 20px;
  }

  #services .service .image {
    border-radius: 8px;
  }
}

/* Why Choose Us Section */
@media (min-width: 768px) {
  #why-choose-us .why-choose-us__image {
    justify-content: flex-end;
    margin-inline: 2rem 0;
  }

  #why-choose-us .why-choose-us__image .image-2 {
    right: auto;
    left: -10px;
  }

  #why-choose-us .why-choose-us__content {
    justify-self: flex-end;
    gap: 50px;
    padding-inline: 20px;
    order: -1;
  }

  #why-choose-us .points {
    gap: 20px;
    font-size: 20px;
    line-height: 28px;
    letter-spacing: 0.4px;
    max-width: 500px;
  }

  #why-choose-us .points li {
    gap: 12px;
  }
}

/* Contact Section */
#contact .contact__content {
  gap: 32px;
}

#contact h2 {
  max-width: 400px;
}

#contact form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 400px;
}

#contact form input,
#contact form textarea {
  width: 100%;
  padding: 12px 16px;
  color: var(--clr-text);
  background-color: var(--bg-input);
  border-radius: 8px;
  border: none;
}

#contact form input::placeholder,
#contact form textarea::placeholder {
  color: var(--clr-text-50);
  user-select: none;
}

#contact form textarea {
  height: 120px;
  resize: none;
}

#contact form button {
  margin-top: 4px;
  border-radius: 8px;
}

@media (min-width: 568px) {
  #contact form {
    max-width: 440px;
  }

  #contact form input,
  #contact form textarea {
    padding: 14px 18px;
  }
}

/* Footer */
footer .sides,
footer .left-side,
footer .left-side .contact-info,
footer .right-side,
footer .right-side nav {
  gap: 40px;
}

footer {
  padding: 40px;
  color: var(--clr-white-70);
  background-color: var(--clr-primary);
}

footer .container {
  display: grid;
  gap: 50px;
  max-width: 1440px;
  margin-inline: auto;
  font-weight: 500;
}

footer a {
  line-height: 24px;
  letter-spacing: 0.6px;
  color: var(--clr-white);
}

footer .sides,
footer .left-side,
footer .right-side,
footer .contact-info__group,
footer .right-side nav ul {
  display: flex;
  flex-direction: column;
}

footer .logo {
  height: 40px;
  margin-inline: auto;
}

footer .left-side .contact-info {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: 60px;
}

footer .contact-info .label {
  display: inline-block;
  text-transform: capitalize;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

footer .right-side nav {
  display: flex;
  justify-content: space-between;
  max-width: 400px;
}

footer .right-side nav .heading {
  display: inline-block;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

footer .right-side nav ul {
  list-style: none;
  gap: 6px;
  margin-top: 8px;
}

footer .copyrights {
  font-size: 14px;
  font-weight: 400;
  width: fit-content;
  margin-inline: auto;
  color: var(--clr-white-60);
}

@media (min-width: 868px) {
  footer {
    padding: 60px;
  }

  footer .logo {
    margin-inline: 0;
  }

  footer .sides {
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  footer .left-side .contact-info {
    max-width: 350px;
  }

  footer .right-side {
    justify-content: space-between;
  }
}
