/* Cohere Brand Guidelines based Palette */
:root {
  /* Main Colors */
  --c-dark: #212121;
  --c-light: #fafafa;
  --c-neutral: #e9e6de;
  --c-subdued: #6c8486;

  /* Accent Colors */
  --c-coral: #f6795d;
  --c-sage: #73867f;
  --c-pink: #f697c4;
  --c-brown: #908473;

  /* Computed Variables */
  --bg-color: var(--c-neutral);
  --text-main: var(--c-dark);
  --text-muted: var(--c-subdued);
  --card-bg: rgba(250, 250, 250, 0.6);
  /* Translucent light for glassmorphism */
  --card-border: rgba(250, 250, 250, 0.8);

  --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Background Decorators for visual flair */
.bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.5;
  animation: float 10s ease-in-out infinite alternate;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background-color: var(--c-coral);
  top: -100px;
  left: -150px;
  opacity: 0.15;
}

@keyframes float {
  0% {
    transform: translateY(0px) scale(1);
  }

  100% {
    transform: translateY(30px) scale(1.05);
  }
}

.shape-2 {
  width: 600px;
  height: 600px;
  background-color: var(--c-sage);
  top: 40%;
  right: -200px;
  opacity: 0.15;
  animation-delay: -5s;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 800;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Utilities */
.glassmorphism {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(33, 33, 33, 0.05);
}

.accent-text {
  color: var(--c-coral);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(33, 33, 33, 0.15);
}

.btn-primary {
  background-color: var(--c-coral);
  color: var(--c-light);
}

.btn-secondary {
  background-color: var(--c-sage);
  color: var(--c-light);
}

/* Hero Section */
.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding-top: 4rem;
  padding-bottom: 2rem;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-badge {
  font-size: 0.8rem;
  text-transform: uppercase;
  background-color: var(--c-coral);
  color: var(--c-light);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.05em;
  transform: translateY(-2px);
}

.alt-badge {
  background-color: var(--c-sage);
}

/* AI Works Layout */
.works-grid {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.work-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  position: relative;
}

.work-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(33, 33, 33, 0.08);
  border-color: var(--c-pink);
}

.card-content {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.7rem;
  background-color: rgba(144, 132, 115, 0.2);
  color: var(--c-brown);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 800;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background-color: rgba(108, 132, 134, 0.1);
  color: var(--c-subdued);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.card-link {
  font-weight: 600;
  color: var(--c-coral);
  display: inline-flex;
  align-items: center;
}

.card-link:hover {
  color: var(--c-pink);
}

/* Featured Card with Video */
.featured-card {
  display: flex;
  flex-direction: row;
  min-height: 380px;
}

@media (max-width: 768px) {
  .featured-card {
    flex-direction: column;
  }
}

.featured-card .card-content {
  flex: 1;
}

.card-media {
  flex: 1;
  background-color: rgba(33, 33, 33, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--card-border);
  overflow: hidden;
}

@media (max-width: 768px) {
  .card-media {
    border-left: none;
    border-top: 1px solid var(--card-border);
    min-height: 250px;
  }
}

/* AI Utilities Grid */
.utilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 1100px) {
  .utilities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .utilities-grid {
    grid-template-columns: 1fr;
  }
}

.utility-card {
  flex-direction: column !important;
  display: flex !important;
  height: 100%;
}

.utility-card .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.utility-card .card-media {
  border-left: none;
  border-top: 1px solid var(--card-border);
  height: 180px;
  /* Force consistent height for all cards */
  flex: none;
  background-color: rgba(33, 33, 33, 0.02);
  overflow: hidden;
}

.utility-card .card-media:empty {
  display: block;
  /* Ensure placeholders show even if empty */
}

.showcase-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-media.portrait-media {
  background-color: rgba(33, 33, 33, 0.03);
}

.card-media.portrait-media .showcase-video {
  object-fit: contain;
  max-height: 380px;
}

.card-media.small-media {
  border-left: none;
  border-top: 1px solid var(--card-border);
  min-height: 160px;
  max-height: 220px;
  background-color: rgba(33, 33, 33, 0.02);
}

.small-media .showcase-video {
  max-height: 220px;
}

/* Self-hosted Services Table/Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.service-item {
  display: flex;
  align-items: center;
  padding: 1.25rem;
  gap: 1rem;
  position: relative;
  transition: all 0.2s ease;
}

.service-item:hover {
  background: var(--c-light);
  transform: scale(1.02);
  border-color: var(--c-sage);
}

.service-icon {
  font-size: 2rem;
  background: rgba(233, 230, 222, 0.8);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.service-info h4 {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.service-url {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.auth-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background-color: var(--c-brown);
  border-radius: 50%;
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid rgba(108, 132, 134, 0.2);
  margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .section {
    padding: 3rem 0;
  }
}