/* ========= GOOGLE FONTS ========= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* ========= VARIABLES ========= */
:root {
  --header-height: 3.5rem;

  /* Colors */
  --primary-color: hsl(180, 80%, 45%);
  --primary-color-alt: hsl(180, 80%, 40%);
  --title-color: hsl(0, 0%, 95%);
  --text-color: hsl(0, 0%, 85%);
  --body-color-opaque: hsl(220, 18%, 12%);
  --container-color: hsla(220, 18%, 18%, 0.8);
  --container-color-alt: hsla(220, 18%, 14%, 0.9);
  --border-color: hsla(220, 18%, 22%, 0.8);

  /* Font and typography */
  --body-font: 'Poppins', sans-serif;
  --h1-font-size: 2.5rem;
  --h2-font-size: 1.5rem;
  --h3-font-size: 1.25rem;
  --normal-font-size: 1rem;
  --small-font-size: .875rem;

  /* Font weight */
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* z-index */
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-background: -1;
}

/* ========= BASE ========= */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  color: var(--text-color);
  background: var(--body-color-opaque);
}

h1, h2, h3, h4 {
  color: var(--title-color);
  font-weight: var(--font-semibold);
}

ul { list-style: none; }
a { text-decoration: none; }
img { max-width: 100%; height: auto; }
button { font-family: var(--body-font); }

/* ========= 3D CANVAS BACKGROUND ========= */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-background);
}

/* ========= REUSABLE CSS CLASSES ========= */
.container {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding: 4.5rem 0 2rem;
}

.section__title {
  font-size: var(--h2-font-size);
  text-align: center;
  margin-bottom: 3rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ========= HEADER & NAV ========= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-fixed);
  transition: background .3s, box-shadow .3s;
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav__list { display: flex; column-gap: 3rem; }
.nav__link {
  color: var(--title-color);
  font-weight: var(--font-medium);
  transition: color .3s;
  text-shadow: 0 0 5px hsla(0, 0%, 0%, 0.5);
}
.nav__link:hover { color: var(--primary-color); }

.scroll-header {
  background-color: hsla(220, 18%, 10%, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 8px hsla(0, 0%, 0%, 0.2);
}

/* ========= HERO SECTION ========= */
.hero {
  height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.hero__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero h1 {
  font-size: var(--h1-font-size);
  font-weight: var(--font-bold);
  line-height: 1.2;
  text-shadow: 0 2px 10px hsla(0, 0%, 0%, 0.5);
}

.hero h1 span { color: var(--primary-color); }

.hero__description {
    font-size: 0.95rem;
    line-height: 1.8;
    max-width: 700px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* ========= TYPEWRITER ANIMATION ========= */
.typewriter-title {
    font-family: 'Courier New', Courier, monospace !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.typewriter-prefix {
    color: var(--primary-color);
    font-weight: var(--font-bold);
    text-shadow: 0 0 10px var(--primary-color);
}

.typewriter-text {
    color: var(--title-color);
    text-shadow: 0 0 5px hsla(0, 0%, 0%, 0.5);
}

.typewriter-text .highlight {
    color: var(--primary-color);
}

.typewriter-cursor {
    color: var(--primary-color);
    font-weight: var(--font-bold);
    text-shadow: 0 0 10px var(--primary-color);
    animation: blink 0.7s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.button {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--body-color-opaque);
  padding: 1rem 1.75rem;
  border-radius: .5rem;
  font-weight: var(--font-bold);
  transition: transform .3s, box-shadow .3s;
  box-shadow: 0 4px 15px hsla(180, 80%, 45%, 0.4);
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px hsla(180, 80%, 45%, 0.6);
}

/* Glassmorphism Sections */
.services__container, .about__container, .references, .contact__container, .footer {
    background-color: var(--container-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2.5rem;
}

/* ========= SERVICES ========= */
.services__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: var(--container-color-alt);
  padding: 2rem;
  border-radius: .75rem;
  border: 1px solid transparent;
  transition: transform .3s, border-color .3s;
}

.service-card:hover {
  transform: translateY(-.5rem);
  border-color: var(--primary-color);
}

.service-card h3 {
  font-size: var(--h3-font-size);
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* ========= ABOUT SECTION ========= */
.about__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: center;
    gap: 3rem;
}
.about__img { border-radius: .75rem; justify-self: center;  }
.about__text p { margin-bottom: 1rem; }

/* ========= REFERENCES (HORIZONTAL SLIDER) ========= */
.references {
    padding: 4rem 0;
}

.slider {
    overflow: hidden;
    position: relative;
    width: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.slide-track {
    display: flex;
    /* (width of slide + margin) * number of slides */
    width: calc((250px + 40px) * 10); 
    animation: scroll 40s linear infinite;
}

.slide {
    width: 250px;
    height: 150px;
    margin: 0 20px;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Use contain to see the whole logo */
    border-radius: 1rem;
    filter: grayscale(1) brightness(0.8);
    transition: filter 0.3s;
}

.slide:hover {
    transform: scale(1.05);
}

.slide:hover img {
    filter: grayscale(0) brightness(1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-290px * 5));
    }
}


/* ========= CONTACT ========= */
.contact__container { text-align: center; }
.contact__container p { margin-bottom: 1.5rem; }
.contact__container .email {
    color: var(--primary-color);
    font-size: var(--h3-font-size);
    font-weight: var(--font-medium);
}

/* ========= FOOTER ========= */
.footer { padding: 2rem 0; }
.footer__container { text-align: center; }
.footer__copy { font-size: var(--small-font-size); color: var(--text-color); }

/* ========= MEDIA QUERIES ========= */
@media screen and (max-width: 992px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
@media screen and (max-width: 768px) {
  :root { --h1-font-size: 2rem; --h2-font-size: 1.25rem; --h3-font-size: 1rem; }
  .services__container, .about__container { padding: 1.5rem; }
}

/* ========= NAV MOBILE ========= */

.nav__toggle,
.nav__close {
    font-size: 1.5rem;
    color: var(--title-color);
    cursor: pointer;
    display: none;
}

@media screen and (max-width: 768px) {
    .nav {
        justify-content: flex-end;
    }

    .nav__toggle {
        display: block;
    }

    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100%;
        background-color: hsla(220, 18%, 12%, 0.7);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        transition: right .3s;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 6rem 0;
    }

    /* Show menu */
    .show-menu {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        row-gap: 3rem;
        text-align: center;
    }

    .nav__link {
        font-size: var(--h2-font-size);
    }

    .nav__close {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1.5rem;
        font-size: 2rem;
    }
}