/*
 * Global Stylesheet for Intellicortex Website
 *
 * This stylesheet defines a simple, modern theme following the
 * design guidelines provided by the user. The palette uses neutral
 * colours—deep blues, charcoals and off‑whites—with clean typography
 * and generous spacing. The layout is responsive and adapts to
 * different screen sizes via flexbox and CSS grid.
 */

/* Import Google fonts. These fonts will gracefully fall back to
   system fonts if the network is unavailable. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+Pro:wght@400;600&display=swap');

/* CSS Variables for easy theme management */
:root {
  /* Updated palette for a more futuristic look. The primary colours are slightly darker and the accent is a vibrant blue to give the site a contemporary feel. */
  --color-primary: #0e1e33;      /* deep navy for backgrounds and headings */
  --color-secondary: #1d2e44;    /* rich blue‑grey for secondary elements */
  --color-accent: #3fa9f5;       /* vibrant azure for buttons and highlights */
  --color-light: #f5f9fc;        /* off‑white background for a clean aesthetic */
  --color-dark: #07121f;         /* dark blue for footers */
  --color-text: #24344d;         /* dark slate for body text */
  --color-muted: #5e6d81;        /* muted grey‑blue for secondary text */
  --header-height: 64px;
}

/* Reset margin and padding on core elements */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-light);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

a:hover {
  color: var(--color-primary);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Source Serif Pro', Georgia, serif;
  color: var(--color-primary);
  margin-bottom: 0.5em;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background-color: var(--color-light);
  border-bottom: 1px solid #e6e9ed;
  z-index: 999;
}

/* Brand container holds the logo and company name. The brand is now wrapped in an anchor
   (with the class `.logo-link`) to allow users to return to the homepage by clicking
   anywhere on the logo or the name. */
.logo-link {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
}

.logo-link img {
  height: 32px;
  width: 32px;
  margin-right: 0.5rem;
}

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

.navbar nav a {
  font-weight: 500;
  color: var(--color-text);
  padding: 0.5rem;
}

.navbar nav a:hover {
  color: var(--color-primary);
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s ease-in-out;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--color-primary);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}

.btn-secondary:hover {
  background-color: var(--color-accent);
  color: #fff;
}

/* Hero Section */
.hero {
  position: relative;
  background-image: url('../assets/images/hero.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 6rem 1rem;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Slightly lighter overlay for the hero image so the photo remains visible */
  /* A slightly stronger overlay to enhance text contrast on the hero image */
  background: rgba(14, 30, 51, 0.55);
  z-index: 0;
}

.hero .hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero .hero-content h1 {
  color: #fff;
  font-size: 3rem;
}

.hero .hero-content p {
  color: #f0f4f8;
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

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

/* Section Wrapper */
.section {
  padding: 4rem 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

/* 3 Column Grid */
.grid-three {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.grid-three .grid-item {
  background: #fff;
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.grid-three .grid-item i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-accent);
}

.grid-three .grid-item h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  color: var(--color-primary);
}

.grid-three .grid-item p {
  font-size: 0.95rem;
  color: var(--color-muted);
}

/* Feature Grid (4 columns) */
.grid-four {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.grid-four .feature {
  background: #fff;
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.grid-four .feature i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-accent);
}

.grid-four .feature h4 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: var(--color-primary);
}

.grid-four .feature p {
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* Cards */
.card {
  background: #fff;
  padding: 2rem;
  border-radius: 6px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.card h3 {
  font-size: 1.5rem;
}

.card p {
  color: var(--color-muted);
  flex-grow: 1;
}

.card .card-cta {
  align-self: flex-start;
}

/* Credibility Strip */
.credibility {
  background-color: var(--color-secondary);
  color: #fff;
  padding: 1.5rem 1rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.credibility span {
  position: relative;
  padding: 0 1rem;
}

.credibility span:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 1.5rem;
  background: rgba(255, 255, 255, 0.3);
}

/* Footer */
footer {
  background-color: var(--color-dark);
  color: #d1d6dc;
  padding: 3rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

footer .footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

footer .footer-brand {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

footer .footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

footer .footer-links a {
  color: #d1d6dc;
  font-size: 0.9rem;
}

footer .footer-links a:hover {
  color: #fff;
}

footer .legal {
  font-size: 0.8rem;
  color: #8f9bad;
  line-height: 1.4;
}

/* General styles for content pages */
.content-header {
  background-image: url('../assets/images/technology.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 4rem 1rem;
  text-align: center;
  position: relative;
}

.content-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 35, 66, 0.6);
  z-index: 0;
}

.content-header h1 {
  position: relative;
  z-index: 1;
  font-size: 2.5rem;
  color: #fff;
}

.content-section {
  padding: 3rem 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.content-section h2 {
  margin-bottom: 1rem;
  font-size: 1.8rem;
  color: var(--color-primary);
}

.content-section p {
  margin-bottom: 1.5rem;
  color: var(--color-muted);
}

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.split .half {
  flex: 1 1 300px;
}

/* Timeline style for structural plasticity */
.timeline {
  position: relative;
  margin: 2rem 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--color-accent);
}

.timeline-item {
  margin-bottom: 1.5rem;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -0.7rem;
  top: 0.4rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background-color: var(--color-accent);
}

/* Card grid for research page */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

@media (max-width: 768px) {
  /* ✅ stop sticky header on mobile (prevents “occupying screen”) */
  .navbar{
    position: static;          /* overrides sticky */
    top: auto;
  }

  /* compact layout */
  .navbar{
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
  }

  /* nav becomes a compact wrapped row */
  .navbar nav{
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .navbar nav a{
    padding: 0.35rem 0.4rem;
    font-size: 0.95rem;
  }

  /* keep the contact button from stretching too much */
  .navbar nav .btn{
    padding: 0.5rem 0.9rem;
  }
}