/*
 * Main stylesheet for Intern Solutions presentation site.
 * Designed to be responsive and visually appealing on modern browsers,
 * leveraging CSS scroll snapping and subtle animations. Chrome, Firefox,
 * Safari and Edge support these features. Font Awesome is used for
 * illustrative icons and Google Fonts provides elegant typography.
 */

/* Root variables for colors and sizing */
:root {
  --font-primary: 'Poppins', sans-serif;
  --color-light: #ffffff;
  --color-dark: #0f172a;
  --color-gray: #f5f6fa;
  --gradient-inicio: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
  --gradient-nosotros: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  --gradient-clientes: linear-gradient(135deg, #240b36, #c31432);
  --gradient-staff: linear-gradient(135deg, #0052d4, #4364f7, #6fb1fc);
  --gradient-contacto: linear-gradient(135deg, #56ab2f, #a8e063);
  --nav-height: 64px;
  --max-content-width: 1000px;
  --transition-duration: 0.6s;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  font-family: var(--font-primary);
  color: var(--color-light);
  background-color: var(--color-dark);
}

/* Reset default list styles */
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #ffd700;
}

/* Navbar styling */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(15, 23, 42, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .logo {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
}

.navbar nav ul {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* Make the nav container grow to take available space */
/* Remove flex-grow from nav to avoid pushing the menu into the logo */
.navbar nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.navbar nav a {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0;
  position: relative;
}

.navbar nav a.active::after,
.navbar nav a:hover::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--gradient-staff);
  border-radius: 1px;
}

/* Scroll container */
.container {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100vh;
  scroll-behavior: smooth;
  /* snap-points fallback for old browsers */
  scroll-snap-points-y: repeat(100vh);
}

/* Each slide fills the viewport */
.slide {
  height: 100vh;
  width: 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: calc(var(--nav-height) + 2rem) 1.5rem 2rem;
  box-sizing: border-box;
}

/* Background gradients for each slide */
.slide-inicio {
  background: var(--gradient-inicio);
}

.slide-nosotros {
  background: var(--gradient-nosotros);
}

.slide-clientes {
  background: var(--gradient-clientes);
}

.slide-staff {
  background: var(--gradient-staff);
}

.slide-contacto {
  background: var(--gradient-contacto);
}

/* Content container inside slides */
.content {
  max-width: var(--max-content-width);
  margin: 0 auto;
}

.content h1,
.content h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.content h1 {
  font-size: clamp(2rem, 5vw + 1rem, 4rem);
}

.content h2 {
  font-size: clamp(1.5rem, 3vw + 1rem, 3rem);
}

.content p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Call to action button */
.cta-button {
  display: inline-block;
  background-image: var(--gradient-staff);
  color: var(--color-light);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Clients section */
.clients-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.client-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.1rem;
  color: var(--color-light);
  transition: transform 0.3s ease, background 0.3s ease;
  cursor: default;
}

.client-card i {
  font-size: 1.6rem;
  color: #ffd700;
}

.client-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.2);
}

/* Team section */
.team {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

.member {
  max-width: 200px;
  text-align: center;
}

.member img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.member:hover img {
  transform: scale(1.05);
}

.member h3 {
  margin: 0.5rem 0 0.3rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.member p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.8;
}

/* Contact form */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto;
  margin-top: 2rem;
}

.contact-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-form label {
  font-size: 0.9rem;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-light);
  font-size: 0.9rem;
  resize: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.3);
}

/* Make the textarea span full width */
.contact-form .form-group:nth-child(3) {
  grid-column: 1 / -1;
}

.submit-button {
  grid-column: 1 / -1;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-dark);
  background: var(--color-light);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-top: 1rem;
}

.submit-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .navbar nav ul {
    gap: 1rem;
  }
  .team {
    gap: 2rem;
  }
  .member img {
    width: 120px;
    height: 120px;
  }
  .contact-form {
    grid-template-columns: 1fr;
  }
  .content p {
    font-size: 0.95rem;
  }
}

/* Reveal animations using IntersectionObserver */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-duration) ease,
    transform var(--transition-duration) ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}