/*
 * AIchemy Website Stylesheet
 *
 * This CSS defines a simple, modern layout inspired by clean design
 * examples from playbook.com, uxpert.com and basicagency.com. It uses
 * a restrained colour palette, generous spacing and responsive
 * typography to create a pleasant reading experience across devices.
 */

/* Import Google fonts for headings and body text */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');

/* Root variables for colours and reusable measurements */
:root {
  --color-primary: #4f46e5; /* Indigo accent colour for buttons and highlights */
  --color-primary-hover: #4338ca; /* Darker shade for hover states */
  --color-text: #333333; /* Primary text colour */
  --color-muted: #555555; /* Secondary text colour */
  --color-bg: #ffffff; /* Main background colour */
  --color-section-bg: #f9f9fb; /* Light grey for alternating sections */
  --max-width: 1100px; /* Maximum width for content containers */
}

/* Global reset and base styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  margin-top: 0;
  color: var(--color-text);
}

p {
  margin: 0 0 1rem;
  color: var(--color-muted);
}

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

/* Navigation bar */
nav {
  width: 100%;
  background: var(--color-bg);
  border-bottom: 1px solid #e5e7eb; /* Light grey border for separation */
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.5rem 1rem;
}

/* Brand styling */
.brand {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
}

/* Emphasise the AI portion of the logo */
.brand-ai {
  color: var(--color-primary);
  letter-spacing: 0.05em;
}

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

.nav-links a {
  font-weight: 600;
  color: var(--color-text);
  transition: color 0.2s ease;
}

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

/* Hero section */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('../assets/hero-bg.png');
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
}

/* Overlay to darken the hero background for better contrast */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #ffffff;
  line-height: 1.2;
}

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

.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.2s ease;
}

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

/* Section styles */
section {
  padding: 4rem 1rem;
}

.section-alt {
  background: var(--color-section-bg);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Feature grid */
.features {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.feature {
  flex: 1 1 250px;
  text-align: center;
  padding: 1rem;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.feature h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Section titles */
.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

/* Workshop agenda layout */
.agenda {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.agenda-item {
  flex: 1 1 300px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1.5rem;
}

.agenda-item h4 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.agenda-item ul {
  padding-left: 1.2rem;
  list-style-type: disc;
}

/* Blog post cards */
.posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.post-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.post-card h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.post-card p {
  flex-grow: 1;
}

.post-card a {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  align-self: flex-start;
}

/* Contact form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-family: 'Open Sans', sans-serif;
}

.contact-form button {
  background: var(--color-primary);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.contact-form button:hover {
  background: var(--color-primary-hover);
}

/* Footer */
footer {
  background: var(--color-section-bg);
  padding: 2rem 1rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .nav-links {
    gap: 1rem;
  }
  .features {
    flex-direction: column;
    gap: 3rem;
  }
  .agenda {
    flex-direction: column;
  }
}