/* =============================================
   Frameshift Labs — Custom Styles
   ============================================= */

/* ---------- CSS Custom Properties ---------- */
:root {
  --brand-50: #f0f9ff;
  --brand-100: #e0f2fe;
  --brand-200: #bae6fd;
  --brand-300: #7dd3fc;
  --brand-400: #38bdf8;
  --brand-500: #0ea5e9;
  --brand-600: #0284c7;
  --brand-700: #0369a1;
  --brand-800: #075985;
  --brand-900: #0c4a6e;
  --brand-950: #082f49;
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

/* ---------- Animated Gradient Hero ---------- */
.hero-gradient {
  background: linear-gradient(135deg, var(--brand-950) 0%, var(--brand-800) 40%, var(--brand-600) 100%);
  background-size: 300% 300%;
  animation: heroShift 12s ease infinite;
  position: relative;
}

@keyframes heroShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- Gradient Orb (Hero Accent) ---------- */
.gradient-orb {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14,165,233,0.35) 0%, rgba(14,165,233,0) 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}

@media (max-width: 768px) {
  .gradient-orb {
    width: 350px;
    height: 350px;
  }
}

/* ---------- Navigation ---------- */
.nav-main {
  transition: background-color 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease;
  background-color: transparent;
}

.nav-main.scrolled {
  background-color: rgba(8, 47, 73, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.15);
}

/* ---------- Glass Card ---------- */
.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
}

.glass-card-light {
  background: rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card-light:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.10);
}

/* ---------- Gradient Buttons ---------- */
.btn-gradient {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.25s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-gradient:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.btn-gradient-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  border-radius: 0.5rem;
  background: transparent;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid rgba(255,255,255,0.4);
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
  cursor: pointer;
}

.btn-gradient-outline:hover {
  background-color: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
  transform: translateY(-1px);
}

/* ---------- Section Gradients ---------- */
.section-gradient-1 {
  background: linear-gradient(180deg, var(--brand-900) 0%, var(--brand-800) 100%);
}

.section-gradient-2 {
  background: linear-gradient(135deg, var(--brand-800) 0%, var(--brand-950) 100%);
}

.section-gradient-3 {
  background: linear-gradient(200deg, var(--brand-950) 0%, var(--brand-900) 50%, var(--brand-700) 100%);
}

.section-gradient-4 {
  background: linear-gradient(160deg, var(--brand-700) 0%, var(--brand-900) 100%);
}

.section-gradient-5 {
  background: linear-gradient(225deg, var(--brand-900) 0%, var(--brand-800) 50%, var(--brand-950) 100%);
}

.section-gradient-6 {
  background: linear-gradient(180deg, var(--brand-800) 0%, var(--brand-700) 50%, var(--brand-900) 100%);
}

.section-gradient-7 {
  background: linear-gradient(150deg, var(--brand-950) 0%, var(--brand-800) 100%);
}

.section-gradient-8 {
  background: linear-gradient(190deg, var(--brand-700) 0%, var(--brand-950) 100%);
}

.section-gradient-9 {
  background: linear-gradient(170deg, var(--brand-900) 0%, var(--brand-800) 100%);
}

/* ---------- Gradient Fade Dividers ---------- */
.gradient-fade-top {
  position: relative;
}

.gradient-fade-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(180deg, rgba(8,47,73,0.6) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.gradient-fade-bottom::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(0deg, rgba(8,47,73,0.6) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* ---------- Animated Counter ---------- */
.counter-value {
  font-variant-numeric: tabular-nums;
}

/* ---------- Bento Grid ---------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: 1.5rem;
}

.bento-grid .bento-large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-grid .bento-wide {
  grid-column: span 2;
}

@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-grid .bento-large {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 640px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-grid .bento-large,
  .bento-grid .bento-wide {
    grid-column: span 1;
  }
}

/* ---------- Numbered Steps ---------- */
.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* ---------- Compatibility Badges ---------- */
.compat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: 9999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--brand-100);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}

.compat-badge:hover {
  background: rgba(255,255,255,0.18);
}

/* ---------- Testimonial Metric ---------- */
.metric-highlight {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-300), var(--brand-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

/* ---------- FAQ Accordion ---------- */
.faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.faq-question {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  width: 100%;
  background: none;
  border: none;
  color: var(--brand-50);
  text-align: left;
  font-size: 1.125rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--brand-300);
}

.faq-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 400px;
  padding-bottom: 1.5rem;
}

/* ---------- Diagonal CTA ---------- */
.diagonal-cta {
  position: relative;
  overflow: hidden;
}

.diagonal-cta::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 0;
  right: 0;
  height: 120px;
  background: inherit;
  transform: skewY(-3deg);
  transform-origin: top left;
}

.diagonal-cta::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 0;
  right: 0;
  height: 120px;
  background: inherit;
  transform: skewY(-3deg);
  transform-origin: bottom right;
}

/* ---------- Newsletter Bar ---------- */
.newsletter-bar input[type="email"] {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.newsletter-bar input[type="email"]::placeholder {
  color: rgba(255,255,255,0.5);
}

.newsletter-bar input[type="email"]:focus {
  border-color: var(--brand-400);
}

/* ---------- Contact Form Inputs ---------- */
.form-input {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.25s ease, background-color 0.25s ease;
  width: 100%;
}

.form-input::placeholder {
  color: rgba(255,255,255,0.45);
}

.form-input:focus {
  border-color: var(--brand-400);
  background: rgba(255,255,255,0.15);
}

/* ---------- Mobile Menu ---------- */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.mobile-menu.open {
  max-height: 400px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--brand-950);
}

::-webkit-scrollbar-thumb {
  background: var(--brand-700);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-600);
}

/* ---------- Selection ---------- */
::selection {
  background: var(--brand-500);
  color: #fff;
}

/* ---------- Focus visible ---------- */
:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 2px;
}

/* ---------- Skip to Content ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--brand-600);
  color: #fff;
  border-radius: 0 0 0.5rem 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* ---------- Legal Pages ---------- */
.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--brand-50);
}

.legal-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--brand-100);
}

.legal-content p {
  margin-bottom: 1rem;
  line-height: 1.75;
  color: var(--brand-200);
}

.legal-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content ul li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
  color: var(--brand-200);
}

/* ---------- Utility ---------- */
.text-gradient {
  background: linear-gradient(135deg, var(--brand-200), var(--brand-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.animate-fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
