/* ========================================
   mpol.ch - Homepage Styles
   Conversion-optimized design for Swiss IT consulting
   ======================================== */

/* CSS Variables */
:root {
  --primary: #1a3a5c;
  --primary-light: #2a5a8c;
  --primary-dark: #0d1f33;
  --accent: #e8491d;
  --accent-hover: #c73a15;
  --green: #27ae60;
  --light-bg: #f8f9fa;
  --white: #ffffff;
  --text: #333333;
  --text-light: #666666;
  --border: #e0e0e0;
  --shadow: 0 2px 15px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 8px;
  --transition: all 0.3s ease;
  --max-width: 1200px;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

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

body {
  font-family: var(--font-main);
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

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

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

ul {
  list-style: none;
}

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

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

h1 { font-size: 2.8rem; margin-bottom: 1rem; }
h2 { font-size: 2.2rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
h4 { font-size: 1.2rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

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

.section-title h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent);
}

.section-title p {
  color: var(--text-light);
  font-size: 1.15rem;
  max-width: 700px;
  margin: 1rem auto 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(232, 73, 29, 0.3);
}

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

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

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

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

.btn-sm {
  padding: 10px 20px;
  font-size: 0.9rem;
}

.btn-lg {
  padding: 18px 42px;
  font-size: 1.1rem;
}

/* ========================================
   Header / Navigation
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 10px rgba(0,0,0,0.05);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  height: 75px;
}

.nav-logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  margin-left: 10px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: var(--white);
  padding: 160px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 700px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
  backdrop-filter: blur(5px);
}

.hero h1 {
  color: var(--white);
  font-size: 3.2rem;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.hero-stat h3 {
  color: var(--white);
  font-size: 2.4rem;
  margin-bottom: 4px;
}

.hero-stat p {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 0;
}

/* ========================================
   Trust Bar
   ======================================== */
.trust-bar {
  background: var(--light-bg);
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
}

.trust-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 500;
}

.trust-item svg {
  width: 24px;
  height: 24px;
  fill: var(--green);
  flex-shrink: 0;
}

/* ========================================
   Services Section
   ======================================== */
.services {
  padding: 100px 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transition: var(--transition);
}

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

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.service-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--white);
}

.service-card h3 {
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.service-card .learn-more {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.service-card .learn-more:hover {
  gap: 10px;
}

/* ========================================
   Use Cases / References Section
   ======================================== */
.use-cases {
  padding: 100px 0;
  background: var(--light-bg);
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

a.case-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.case-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.case-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.case-card-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  padding: 24px 28px;
}

.case-card-header .case-tag {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.case-card-header h3 {
  color: var(--white);
  font-size: 1.2rem;
}

.case-card-body {
  padding: 24px 28px;
}

.case-card-body p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.case-results {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.case-result {
  text-align: center;
}

.case-result .number {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
}

.case-result .label {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

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

.cta-section p {
  opacity: 0.9;
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 32px;
}

.cta-section .btn {
  margin: 0 8px;
}

/* ========================================
   Benefits Section
   ======================================== */
.benefits {
  padding: 100px 0;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.benefit-card {
  text-align: center;
  padding: 30px 20px;
}

.benefit-icon {
  width: 70px;
  height: 70px;
  background: var(--light-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.benefit-icon svg {
  width: 32px;
  height: 32px;
  fill: var(--primary);
}

.benefit-card h4 {
  margin-bottom: 8px;
}

.benefit-card p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ========================================
   Blog / Article Preview
   ======================================== */
.blog-section {
  padding: 100px 0;
  background: var(--light-bg);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.blog-card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card-image svg {
  width: 48px;
  height: 48px;
  fill: rgba(255,255,255,0.4);
}

.blog-card-content {
  padding: 24px;
}

.blog-card-tag {
  display: inline-block;
  background: var(--light-bg);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.blog-card-content h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.blog-card-content h3 a {
  color: var(--primary-dark);
}

.blog-card-content h3 a:hover {
  color: var(--accent);
}

.blog-card-content p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

/* ========================================
   Contact Section
   ======================================== */
.contact-section {
  padding: 100px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info h2 {
  margin-bottom: 16px;
}

.contact-info > p {
  color: var(--text-light);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-detail-icon {
  width: 48px;
  height: 48px;
  background: var(--light-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-detail-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--primary);
}

.contact-detail h4 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.contact-detail p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.contact-form {
  background: var(--light-bg);
  padding: 40px;
  border-radius: var(--radius);
}

.contact-form h3 {
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(42, 90, 140, 0.1);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.form-consent input[type="checkbox"] {
  width: auto;
  margin-top: 4px;
}

.form-consent label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 400;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  font-size: 0.9rem;
  margin-top: 12px;
  line-height: 1.7;
}

.footer h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer ul li {
  margin-bottom: 8px;
}

.footer ul li a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

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

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

/* ========================================
   Page Header (for subpages)
   ======================================== */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 140px 0 60px;
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  font-size: 2.6rem;
}

.page-header p {
  opacity: 0.85;
  max-width: 700px;
  margin: 10px auto 0;
  font-size: 1.1rem;
}

.breadcrumb {
  margin-bottom: 16px;
  font-size: 0.9rem;
}

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

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

.breadcrumb span {
  color: rgba(255,255,255,0.5);
  margin: 0 8px;
}

/* ========================================
   Article Page Content
   ======================================== */
.article-content {
  padding: 60px 0 100px;
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
}

.article-body h2 {
  margin-top: 48px;
  margin-bottom: 16px;
  font-size: 1.8rem;
}

.article-body h3 {
  margin-top: 32px;
  margin-bottom: 12px;
}

.article-body p {
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-body ul, .article-body ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-body li {
  list-style: disc;
  margin-bottom: 8px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-body ol li {
  list-style: decimal;
}

.article-sidebar-cta {
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 48px;
  text-align: center;
}

.article-sidebar-cta h3 {
  margin-top: 0;
}

.article-sidebar-cta p {
  color: var(--text-light);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ========================================
   Use Case Detail Page
   ======================================== */
.usecase-content {
  padding: 60px 0 100px;
}

.usecase-body {
  max-width: 900px;
  margin: 0 auto;
}

.usecase-highlight {
  background: var(--light-bg);
  border-left: 4px solid var(--accent);
  padding: 24px 28px;
  margin: 32px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.usecase-highlight h4 {
  margin-bottom: 8px;
}

.usecase-body h2 {
  margin-top: 48px;
  margin-bottom: 16px;
}

.usecase-body h3 {
  margin-top: 28px;
  margin-bottom: 12px;
}

.usecase-body p {
  font-size: 1.05rem;
  line-height: 1.8;
}

.usecase-body ul {
  margin: 16px 0;
  padding-left: 24px;
}

.usecase-body ul li {
  list-style: disc;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.usecase-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0;
}

.usecase-result-card {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.usecase-result-card .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
}

.usecase-result-card .label {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ========================================
   Floating CTA
   ======================================== */
.floating-cta {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  pointer-events: none;
}

.floating-cta.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.floating-cta .btn {
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========================================
   Cookie Banner
   ======================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary-dark);
  color: var(--white);
  padding: 20px;
  z-index: 10000;
  display: none;
}

.cookie-banner.show {
  display: block;
}

.cookie-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.cookie-banner .btn {
  white-space: nowrap;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html { font-size: 15px; }

  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }

  .hero { padding: 130px 0 70px; }
  .hero h1 { font-size: 2.4rem; }
  .hero-stats { flex-direction: column; gap: 24px; }

  .nav-links {
    position: fixed;
    top: 75px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-150%);
    transition: var(--transition);
    gap: 16px;
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-cta {
    margin-left: 0;
  }

  .services-grid,
  .use-cases-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    text-align: center;
  }

  .usecase-results-grid {
    grid-template-columns: 1fr;
  }

  .trust-items {
    gap: 20px;
  }

  .cookie-banner .container {
    flex-direction: column;
    text-align: center;
  }

  .page-header { padding: 120px 0 50px; }
  .page-header h1 { font-size: 2rem; }
}

@media (max-width: 480px) {
  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 { font-size: 2rem; }
}

/* ========================================
   Animation / Utility Classes
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mt-4 { margin-top: 4rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 4rem; }
