/* ======================================================================================== */
/* VARIABLES */
/* ======================================================================================== */

:root {
  /* Colours */
  --grey-1: #5e5e5e;
  --grey-2: #828282;
  --grey-3: #b0b0b0;
  --grey-4: #e0e0e0;
  --grey-5: #f3f3f3;
  --hr-grey: #C8C8C8;
  --black: #231f20;
  --orange: #d34c1b;
  --green: #009900;
  --blue: #0182de;
  --pink: #ce00a2;
  --title-color: #939393;
  --subtitle-color: #555555;
  --body-color: #5e5e5e;
  --btn-color: #231f20;

  /* Fonts */
  --primary-font-family: Satoshi;
  --secondary-font-family: Libre Baskerville;

  /* Typography */

  --fs50: clamp(32px, 2vw + 1.5rem, 50px);
  --fs42: clamp(27px, 1.7vw + 1.3rem, 42px);
  --fs35: clamp(23px, 1.4vw + 1rem, 35px);
  --fs25: clamp(16px, 1vw + 0.8rem, 25px);
  --fs20: clamp(13px, 0.8vw + 0.65rem, 20px);
  --fs18: clamp(12px, 0.7vw + 0.6rem, 18px);
  --fs16: clamp(11px, 0.6vw + 0.55rem, 16px);
  --fs13: clamp(9px, 0.5vw + 0.4rem, 13px);

  --p1-rem: clamp(0.5rem, 0.75vw + 0.25rem, 1rem);
  --p2-rem: clamp(1rem, 1.5vw + 0.5rem, 2rem);
  --p3-rem: clamp(1.5rem, 2.25vw + 0.75rem, 3rem);
  --p4-rem: clamp(2rem, 3vw + 1rem, 4rem);
  --p5-rem: clamp(2.5rem, 3.75vw + 1.25rem, 5rem);
  --p6-rem: clamp(3rem, 4.5vw + 1.5rem, 6rem);
  --p8-rem: clamp(4rem, 6vw + 2rem, 8rem);
  /* --p2-rem: 2rem; */
  /* --p4-rem: 4rem; */

  --default-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Ubuntu, "Helvetica Neue", Helvetica, Arial, "PingFang SC",
    "Hiragino Sans GB", "Microsoft Yahei UI", "Microsoft Yahei",
    "Source Han Sans CN", sans-serif;
}

/* ======================================================================================== */
/* Global Styles */
/* ======================================================================================== */

body {
  font-display: swap;
}

main {
  font-family: "Satoshi", var(--default-font-family);
  font-size: var(--fs18);
  color: var(--body-color);
  padding: var(--p2-rem) var(--p4-rem) var(--p4-rem) var(--p4-rem);
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: auto;
  position: relative;
}

p {
  line-height: 130%;
}

hr {
  border-color: var(--hr-grey);
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

* {
  font-family: "Satoshi", var(--default-font-family);
}

/* ======================================================================================== */
/* All page content Styles */
/* ======================================================================================== */

.title {
  font-family: "Satoshi", var(--default-font-family);
  font-weight: 700;
  font-size: var(--fs35);
  line-height: 124%;
  color: var(--title-color);
}

.tool-title {
  font-size: var(--fs25);
  font-weight: 500;
  /* line-height: 248%; */
  padding-top: var(--p2-rem);
}

.subtitle {
  font-family: "Satoshi", var(--default-font-family);
  font-weight: 700;
  font-size: var(--fs35);
  line-height: 124%;
  color: var(--title-color);
}

.title span {
  font-family: Libre Baskerville, var(--default-font-family);
  font-style: italic;
  font-weight: 500;
}

.subtitle span {
  font-family: Libre Baskerville, var(--default-font-family);
  font-style: italic;
  font-weight: 500;
}

.img-overlay {
  position: absolute;
  inset: 0;
  transition: opacity 0.3s ease-in-out;
  background-color: rgba(255, 172, 237, 0.3);
  opacity: 0;
  border-radius: 10px;
}

/* ======================================================================================== */
/* Navigation Tabs */
/* ======================================================================================== */

.tabs {
  position: sticky;
  z-index: 9;
  background: white;
  padding: var(--p1-rem) 0;
  /* padding: var(--p1-rem) var(--p4-rem) var(--p2-rem) 0; */
  display: flex;
  align-items: center;
  gap: var(--p2-rem);
  transition: box-shadow 1s ease-in-out;
  width: calc(100vw - var(--p4-rem) - 10px);
  overflow-x: scroll;
  font-size: var(--fs20);
  font-weight: 600;
}

.tab-btn {
  padding-right: var(--p5-rem);
  color: var(--grey-1);
  cursor: pointer;
}

.tab-btn.active {
  color: var(--orange);
}

.tabs::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--grey-4);
  pointer-events: none;
}

.link {
  color: var(--pink);
}

/* ======================================================================================== */
/* Projects Section Styles */
/* ======================================================================================== */

.projects-container {
  margin-top: var(--p2-rem);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: var(--p4-rem);
}

.project-card {
  /* width: 30%; */
  cursor: pointer;
}

.project-card > div {
  position: relative;
  height: clamp(250px, 40vw, 400px);
  overflow: hidden;
}

.project-card img {
  position: relative;
  border-radius: 10px;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card .title {
  font-size: var(--fs25);
  font-weight: 500;
  line-height: 248%;
}

.project-card .subtitle {
  font-size: var(--fs18);
  font-weight: 400;
  line-height: 131%;
  font-style: italic;
  color: var(--subtitle-color);
}

.project-card hr {
  margin: 1rem 0;
}

.project-card .tag {
  font-size: var(--fs16);
  font-weight: 400;
  line-height: 135%;
  width: min-content;
  color: var(--grey-1);
  /* border: 1px solid var(--grey-3); */
  padding: 0.2rem 0.5rem;
  border-radius: 30px;
  background-color: var(--grey-5);

  text-wrap-mode: nowrap;
}

/* .project-card .tag:hover {
  color: var(--orange);
} */

.project-card:hover .img-overlay {
  opacity: 1;
}

/* ======================================================================================== */
/* Home - Subscribe Section Styles */
/* ======================================================================================== */

.newsletter-container {
  margin-top: var(--p5-rem);
  margin-bottom: var(--p3-rem);
  display: grid;
  grid-template-columns: 1fr 1.3fr;
}

.newsletter-container input,
.latest-newsletter-container input {
  /* width: 28rem;  */
  width: 60%;
  display: inline;
  /* inline */
  height: 2.75rem;
  /* h-11 */
  border: 1px solid var(--grey-3);
  /* border with custom color */
  padding: 1rem 1rem;
  /* margin-right: 2.75rem; */
  margin-top: var(--p4-rem);
  border-radius: 10px;
}

::placeholder {
  color: var(--grey-2);
  /* font-size: var(--fs18); */
  font-weight: 400;
}

.subscribe {
  color: var(--black);
  font-size: var(--fs25);
  font-weight: 500;
  padding: var(--p1-rem);
  position: relative;
  display: inline;
}

.subscribe::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-repeat: no-repeat;
  filter: opacity(0);
  transition: filter 0.3s ease-in-out;
  mix-blend-mode: multiply;
  background-image: url("../img/hover/subscribe-bg.svg");
}

.subscribe:hover::before {
  filter: opacity(1);
}

.newsletter-container .img-container {
  position: relative;
  cursor: pointer;
}

.newsletter-container .nl-img {
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  height: 40vh;
  width: 60vw;
  object-fit: cover;
}

.newsletter-container .img-container:hover .img-overlay {
  opacity: 0.7;
  border-radius: 10px;
}

@media (hover: none) {
  *:hover .img-overlay {
    opacity: 0 !important;
  }

  .newsletter-container .nl-img {
    width: 100%;
  }

  .tabs,
  .tools-nav {
    flex-wrap: wrap;
  }
}
