/* AIFlows Design System */
:root {
  --primary: #753a8d;
  --bg-light: #f5f1f6;
  --secondary: #bca8c4;
  --accent: #bc9cc7;
  --hover: #b090c4;
  --white: #ffffff;
  --text-dark: #1a1a1a;
  --text-gray: #4a4a4a;
  --gradient-main: linear-gradient(135deg, var(--primary) 0%, #5e2d73 100%);
  /* Slightly deeper gradient */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(117, 58, 141, 0.15), 0 8px 10px -6px rgba(117, 58, 141, 0.1);
  --radius: 12px;
  --header-height: 80px;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.1;
  /* Tighter headings */
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

p {
  margin-bottom: 1rem;
  color: var(--text-gray);
}

.container {
  width: 90%;
  max-width: 1100px;
  /* Slightly constrained for better reading measure */
  margin: 0 auto;
  padding: 0 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  /* Pill shape for modern feel */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--gradient-main);
  color: var(--white);
  border: none;
  box-shadow: 0 4px 15px rgba(117, 58, 141, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(117, 58, 141, 0.4);
  filter: brightness(1.1);
}

.btn-lg {
  padding: 1.25rem 3rem;
  font-size: 1.1rem;
}

/* Header */
header {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 48px;
  /* Slightly larger logo */
}

.lang-selector {
  display: flex;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  background: rgba(117, 58, 141, 0.05);
  /* Subtle bg for language pill */
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--secondary);
  transition: color 0.3s ease;
  font-weight: 600;
}

.lang-btn:hover,
.lang-btn.active {
  color: var(--primary);
}

.lang-divider {
  color: #ddd;
}

/* Hero Section */
.hero {
  padding: calc(var(--header-height) + 3rem) 0 5rem;
  /* Reduced top padding */
  text-align: center;
  background: radial-gradient(circle at top right, #fbf0ff 0%, #ffffff 60%);
  position: relative;
  overflow: hidden;
}

/* Abstract Tech Element CSS-only */
.hero-bg-element {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(188, 156, 199, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.75rem;
  margin-bottom: 1.25rem;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero p.hero-desc {
  font-size: 1.25rem;
  max-width: 750px;
  margin: 0 auto 2.5rem;
  color: var(--text-gray);
  line-height: 1.7;
}

.cta-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.microcopy {
  font-size: 0.85rem;
  color: var(--hover);
  font-weight: 500;
  opacity: 0.9;
}

/* Institutional */
.institutional {
  padding: 5rem 0;
  background-color: var(--white);
}

.institutional-grid {
  display: grid;
  gap: 4rem;
  align-items: center;
}

.institutional .divider {
  width: 60px;
  height: 4px;
  background: var(--accent);
  margin-bottom: 1.5rem;
  border-radius: 2px;
}

.inst-img {
  max-width: 250px;
  /* Reduced visual weight */
  display: block;
  margin: 0 auto;
  opacity: 0.9;
}

@media (min-width: 768px) {
  .institutional-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

/* Ecosystem */
.ecosystem {
  padding: 6rem 0;
  background-color: #fcf9fd;
  /* Very subtle purple tint */
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 3rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--white);
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.4s ease;
  border: 1px solid rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.card-icon {
  color: var(--primary);
  margin-bottom: 1.5rem;
  background: rgba(117, 58, 141, 0.05);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-gray);
  line-height: 1.5;
  margin-bottom: 0;
}

/* Target Audience */
.audience {
  padding: 6rem 0;
  background-color: var(--white);
}

.audience-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.audience-list {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.audience-list li {
  padding-left: 2.5rem;
  position: relative;
  font-weight: 500;
  font-size: 1.1rem;
}

.audience-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23753a8d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Why AIFlows */
.why {
  padding: 6rem 0;
  background: var(--primary);
  /* Adding a subtle pattern or gradient for depth */
  background: linear-gradient(135deg, var(--primary) 0%, #4a245e 100%);
  color: var(--white);
}

.why h2 {
  color: var(--white);
  text-align: center;
  margin-bottom: 4rem;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 3rem;
}

.why-item {
  text-align: center;
  position: relative;
}

.why-number {
  font-size: 4rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.1);
  /* Subtle watermark effect */
  display: block;
  line-height: 1;
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
}

.why-title {
  position: relative;
  z-index: 1;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-top: 2rem;
  /* Give space for the number */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Methodology */
.methodology {
  padding: 6rem 0;
  background-color: var(--bg-light);
}

.methodology-header {
  text-align: center;
  margin-bottom: 4rem;
}

.methodology-header .subtitle {
  font-size: 1.1rem;
  color: var(--hover);
  font-weight: 500;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .steps {
    flex-direction: row;
    gap: 2rem;
  }
}

.step {
  flex: 1;
  background: var(--white);
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
  border-bottom: 3px solid transparent;
}

.step:hover {
  transform: translateY(-5px);
  border-bottom-color: var(--primary);
}

.step-num {
  background: rgba(117, 58, 141, 0.1);
  color: var(--primary);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-weight: 800;
  font-size: 1.25rem;
}

.step-label {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-dark);
}

/* Footer CTA */
.footer-cta {
  padding: 7rem 0;
  text-align: center;
  background: var(--white);
}

.footer-cta h2 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
}

.footer-cta p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Footer */
footer {
  background: #23112b;
  /* Very dark purple */
  color: #a8a8a8;
  padding: 4rem 0 2rem;
  font-size: 0.9rem;
}

footer h4 {
  color: var(--secondary);
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}

footer p {
  color: #bbb;
  margin-bottom: 0.5rem;
}

.copyright {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  font-size: 0.85rem;
}

/* Responsive Media Queries */
@media (max-width: 991px) {
  :root {
    --header-height: 70px;
  }

  html {
    font-size: 15px;
    /* Slightly smaller base font */
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .institutional-grid {
    gap: 3rem;
  }

  .container {
    width: 92%;
  }
}

@media (max-width: 768px) {
  header .container {
    padding: 0 1rem;
  }

  .hero {
    padding: calc(var(--header-height) + 2rem) 0 4rem;
    text-align: center;
  }

  .hero h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .hero p.hero-desc {
    font-size: 1.1rem;
  }

  .btn {
    width: 100%;
    max-width: 400px;
    justify-content: center;
  }

  .institutional {
    padding: 3rem 0;
  }

  .institutional-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
  }

  .inst-img {
    max-width: 180px;
    margin-bottom: 1rem;
  }

  .ecosystem {
    padding: 4rem 0;
  }

  .section-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }

  .audience {
    padding: 4rem 0;
  }

  .audience-list {
    min-width: 100%;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .why h2 {
    margin-bottom: 2.5rem;
  }

  .methodology {
    padding: 4rem 0;
  }

  .footer-cta {
    padding: 5rem 0;
  }

  .footer-cta h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .hero-bg-element {
    width: 300px;
    height: 300px;
  }

  .lang-selector {
    display: none;
    /* Often simpler to hide or move to hamburger on mobile, but user didn't ask for hamburger. I'll keep it visible if it fits, or adjust. */
  }

  /* Better mobile header with lang selector */
  header .container {
    flex-direction: row;
    gap: 1rem;
  }

  .logo img {
    height: 36px;
  }

  .lang-selector {
    display: flex;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
}