/* ===========================================
   AIL Lab - Main Stylesheet
   AI Learning Laboratory
   =========================================== */

/* CSS Custom Properties (Brand Colors) */
:root {
  /* Primary Colors */
  --color-deep-blue: #1E40AF;
  --color-deep-blue-hover: #1E3A8A;
  --color-bright-blue: #3B82F6;
  --color-slate: #475569;
  --color-slate-light: #64748B;

  /* Secondary Colors */
  --color-amber: #F59E0B;
  --color-amber-hover: #D97706;
  --color-emerald: #10B981;
  --color-light-gray: #F1F5F9;
  --color-white: #FFFFFF;
  --color-dark: #1E293B;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --section-padding: 80px 20px;
  --container-max-width: 1200px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-slate);
  background-color: var(--color-white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-bright-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-deep-blue);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-dark);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

/* Container */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===========================================
   HEADER
   =========================================== */
.header {
  background: var(--color-white);
  padding: 16px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img, .logo svg {
  height: 40px;
  width: auto;
}

.header-tagline {
  font-size: 0.875rem;
  color: var(--color-slate-light);
  font-weight: 500;
  display: none;
}

@media (min-width: 768px) {
  .header-tagline {
    display: block;
  }
}

/* ===========================================
   HERO SECTION
   =========================================== */
.hero {
  padding: 140px 20px 100px;
  background: linear-gradient(135deg, var(--color-light-gray) 0%, var(--color-white) 100%);
  text-align: center;
}

.hero h1 {
  max-width: 800px;
  margin: 0 auto 24px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-slate);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-highlight {
  color: var(--color-deep-blue);
  font-weight: 600;
}

/* ===========================================
   VALUE PROPOSITIONS
   =========================================== */
.value-props {
  padding: var(--section-padding);
  background: var(--color-white);
}

.value-props h2 {
  text-align: center;
  margin-bottom: 48px;
}

.value-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .value-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.value-card {
  text-align: center;
  padding: 32px 24px;
  background: var(--color-light-gray);
  border-radius: var(--radius-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.value-icon {
  width: 64px;
  height: 64px;
  background: var(--color-deep-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.value-icon svg {
  width: 32px;
  height: 32px;
  stroke: white;
  fill: none;
  stroke-width: 2;
}

.value-card h3 {
  color: var(--color-dark);
  margin-bottom: 12px;
}

.value-card p {
  color: var(--color-slate);
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* ===========================================
   EMAIL SIGNUP SECTION
   =========================================== */
.email-signup {
  padding: var(--section-padding);
  background: var(--color-deep-blue);
  text-align: center;
}

.email-signup h2 {
  color: var(--color-white);
  margin-bottom: 16px;
}

.email-signup p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 500px;
  margin: 0 auto 32px;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 450px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .signup-form {
    flex-direction: row;
  }
}

.signup-form input[type="email"] {
  flex: 1;
  padding: 16px 20px;
  font-size: 1rem;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  outline: none;
  transition: border-color 0.2s ease;
}

.signup-form input[type="email"]:focus {
  border-color: var(--color-amber);
}

.signup-form input[type="email"]::placeholder {
  color: var(--color-slate-light);
}

/* ===========================================
   BUTTONS
   =========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-family);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

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

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

.btn-amber {
  background: var(--color-amber);
  color: var(--color-dark);
}

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

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

.btn-white:hover {
  background: var(--color-light-gray);
  color: var(--color-deep-blue);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-deep-blue);
  color: var(--color-deep-blue);
}

.btn-outline:hover {
  background: var(--color-deep-blue);
  color: var(--color-white);
}

/* ===========================================
   FOOTER
   =========================================== */
.footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 20px;
  text-align: center;
}

.footer-logo {
  margin-bottom: 16px;
}

.footer-logo img, .footer-logo svg {
  height: 32px;
  width: auto;
  margin: 0 auto;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  font-size: 0.875rem;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.5);
}

.footer p {
  font-size: 0.875rem;
  margin-bottom: 8px;
}

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

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

/* ===========================================
   POPUP / MODAL
   =========================================== */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 100%;
  padding: 40px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-xl);
}

.popup-overlay.active .popup {
  transform: translateY(0);
}

.popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: var(--color-light-gray);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.popup-close:hover {
  background: #E2E8F0;
}

.popup-close svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-slate);
}

.popup h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  padding-right: 24px;
}

.popup p {
  color: var(--color-slate);
  margin-bottom: 24px;
}

.popup-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.popup-form input[type="email"] {
  padding: 14px 16px;
  font-size: 1rem;
  border: 2px solid var(--color-light-gray);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  outline: none;
  transition: border-color 0.2s ease;
}

.popup-form input[type="email"]:focus {
  border-color: var(--color-deep-blue);
}

/* ===========================================
   FORM MESSAGES
   =========================================== */
.form-message {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-top: 12px;
  display: none;
}

.form-message.success {
  background: #D1FAE5;
  color: #065F46;
  display: block;
}

.form-message.error {
  background: #FEE2E2;
  color: #991B1B;
  display: block;
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero {
    padding: 120px 20px 60px;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .value-props {
    padding: 60px 20px;
  }

  .email-signup {
    padding: 60px 20px;
  }

  .popup {
    padding: 32px 24px;
  }
}
