/* ============================================
   Handson Intelligence - Landing Page Styles
   ============================================ */

:root {
  --blue-900: #1a365d;
  --blue-700: #2b6cb0;
  --blue-600: #3182ce;
  --blue-500: #4299e1;
  --blue-100: #ebf4ff;
  --blue-50: #f0f7ff;
  --white: #ffffff;
  --gray-50: #f7fafc;
  --gray-100: #edf2f7;
  --gray-600: #718096;
  --gray-700: #4a5568;
  --gray-800: #2d3748;
  --gray-900: #1a202c;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  color: var(--gray-800);
  line-height: 1.6;
  background: var(--white);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* Language toggle: hide inactive language */
[data-lang="en"] { display: none; }
body.lang-en [data-lang="en"] { display: revert; }
body.lang-en [data-lang="ca"] { display: none; }

/* ---- Layout helpers ---- */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--gray-600);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* ---- Header / Nav ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-100);
  transition: box-shadow 0.3s;
}

.header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--blue-900);
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--blue-600);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--blue-700);
}

.lang-btn {
  background: var(--blue-100);
  color: var(--blue-700);
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.lang-btn:hover {
  background: var(--blue-500);
  color: var(--white);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-800);
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.3s;
}

/* ---- Hero ---- */
.hero {
  padding: 10rem 0 6rem;
  background:
    linear-gradient(135deg, rgba(26,54,93,0.82) 0%, rgba(43,108,176,0.75) 100%),
    url('https://images.unsplash.com/photo-1611917436955-d21c1999520c?w=1600&q=80') center/cover no-repeat;
  color: var(--white);
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.2rem;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: var(--white);
  color: var(--blue-900);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
  border-color: var(--white);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Services ---- */
.services {
  background: var(--gray-50);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s, transform 0.3s;
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.service-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.2rem;
  color: var(--blue-600);
}

.service-card h3 {
  font-size: 1.15rem;
  color: var(--blue-900);
  margin-bottom: 0.6rem;
}

.service-card p {
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---- About ---- */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text h3 {
  font-size: 1.3rem;
  color: var(--blue-900);
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--gray-700);
  margin-bottom: 1rem;
}

.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.value-item {
  background: var(--blue-50);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
}

.value-item .value-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.value-item h4 {
  font-size: 0.95rem;
  color: var(--blue-900);
  margin-bottom: 0.3rem;
}

.value-item p {
  font-size: 0.8rem;
  color: var(--gray-600);
}

/* ---- Contact ---- */
.contact {
  background: var(--gray-50);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-item-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--blue-600);
  background: var(--blue-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.contact-item h4 {
  font-size: 0.95rem;
  color: var(--blue-900);
  margin-bottom: 0.25rem;
}

.contact-item p,
.contact-item a {
  font-size: 0.9rem;
  color: var(--gray-600);
}

.contact-item a:hover {
  color: var(--blue-700);
}

.contact-cta {
  text-align: center;
  margin-top: 3rem;
}

.btn-contact {
  background: var(--blue-700);
  color: var(--white);
  font-size: 1.05rem;
  padding: 1rem 2.5rem;
}

.btn-contact:hover {
  background: var(--blue-900);
}

/* ---- Footer ---- */
.footer {
  background: var(--blue-900);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.85rem;
}

.footer a {
  color: rgba(255,255,255,0.85);
}

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

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
    border-bottom: 1px solid var(--gray-100);
  }

  .nav.open {
    max-height: 300px;
  }

  .nav a,
  .nav .lang-btn {
    padding: 1rem;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--gray-100);
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    padding: 8rem 0 4rem;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-title {
    font-size: 1.6rem;
  }
}
