/* Shared styles for Fluente case study pages.
   The homepage (index.html) currently keeps its styles inline.
   TODO: When migrating off the Tailwind CDN, consolidate index.html styles here too. */

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Urbanist', sans-serif;
  background: #000;
  color: #fff;
  overflow-x: hidden;
}
html { scroll-behavior: smooth; }

/* Structural lines */
.page-frame { position: relative; }
.page-frame::before,
.page-frame::after {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.1);
  z-index: 100;
  pointer-events: none;
}
.page-frame::before { left: 24px; }
.page-frame::after { right: 24px; }
@media (min-width: 768px) {
  .page-frame::before { left: 48px; }
  .page-frame::after { right: 48px; }
}
@media (min-width: 1024px) {
  .page-frame::before { left: 96px; }
  .page-frame::after { right: 96px; }
}

.content-inset {
  padding-left: calc(24px + 20px);
  padding-right: calc(24px + 20px);
}
@media (min-width: 768px) {
  .content-inset {
    padding-left: calc(48px + 20px);
    padding-right: calc(48px + 20px);
  }
}
@media (min-width: 1024px) {
  .content-inset {
    padding-left: calc(96px + 20px);
    padding-right: calc(96px + 20px);
  }
}

.section-line { height: 1px; background: rgba(255,255,255,0.1); }

/* Gradient border for cards */
.gradient-border {
  position: relative;
  border: none !important;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0), rgba(255,255,255,0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}

/* Glass effect */
.glass {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
}

/* Gradient accents */
.gradient-text {
  background: linear-gradient(135deg, #9B69F3, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.title-gradient {
  background: linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* CTA buttons */
.btn-primary {
  background: #fff;
  color: #000;
  padding: 16px 40px;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 16px;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  will-change: transform;
}
.btn-primary:hover {
  transform: scale(1.04);
  box-shadow: 0 0 40px rgba(255,255,255,0.15);
}
.btn-primary:active {
  transform: scale(0.97);
  transition-duration: 0.09s;
}
.btn-secondary {
  background: transparent;
  color: #fff;
  padding: 16px 40px;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 16px;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.18s ease, background 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.2);
  text-decoration: none;
  will-change: transform;
}
.btn-secondary:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
}
.btn-secondary:active {
  transform: scale(0.97);
  transition-duration: 0.09s;
}
.btn-primary svg,
.btn-secondary svg {
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary:hover svg,
.btn-secondary:hover svg {
  transform: translateX(3px);
}

.section-container {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

/* Scroll animations */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Nav */
.nav-blur {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(0,0,0,0.6);
  transition: all 0.3s ease;
}
.nav-blur.scrolled {
  background: rgba(0,0,0,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Next-case cards lift on hover to signal they lead somewhere */
a.gradient-border.block {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background 0.28s ease;
  will-change: transform;
}
a.gradient-border.block:hover { transform: translateY(-5px); }

/* Reduced-motion: honor the user's system preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

.case-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
}

.section-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

/* Visible focus states for keyboard navigation */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #9B69F3;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================== */
/* Case study page specific */
/* ============================== */

.cs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,0.35);
}
.cs-breadcrumb a { color: rgba(255,255,255,0.5); text-decoration: none; transition: color 0.2s ease; }
.cs-breadcrumb a:hover { color: #fff; }

.cs-hero-title {
  font-size: clamp(2.5rem, 7vw, 96px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.cs-hero-title .serif-accent {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
}

/* Image placeholders keep real aspect ratios so the layout reads without assets */
.cs-image {
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, rgba(155,105,243,0.12), rgba(255,255,255,0.03));
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-image span { color: rgba(255,255,255,0.2); font-size: 14px; }
.cs-image.ratio-21x9 { aspect-ratio: 21/9; }
.cs-image.ratio-16x10 { aspect-ratio: 16/10; }
.cs-image.ratio-4x3 { aspect-ratio: 4/3; }
.cs-image.ratio-9x16 { aspect-ratio: 9/16; }

.cs-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
@media (min-width: 768px) {
  .cs-meta-grid { grid-template-columns: repeat(4, 1fr); }
}
.cs-meta-grid dt {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 8px;
}
.cs-meta-grid dd { font-size: 18px; font-weight: 500; }

.cs-pullquote {
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.cs-stat-number {
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 500;
  line-height: 1;
  background: linear-gradient(135deg, #9B69F3, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cs-phase-number {
  font-size: 14px;
  font-weight: 500;
  background: linear-gradient(135deg, #9B69F3, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cs-coming-soon {
  border-radius: 9999px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  background: rgba(155,105,243,0.15);
  color: #c7a9f9;
  display: inline-block;
}
