/*
Theme Name: flomotion Child
Theme URI: https://flomotion.design
Description: Custom child theme for flomotion — Motion Design Studio Köln. Based on Hello Elementor with full design system.
Author: Florian Schnippering
Author URI: https://flomotion.design
Template: hello-elementor
Version: 1.0.0
Text Domain: flomotion-child
*/

/* ─── Design Tokens ─── */
:root {
  /* Colors */
  --fm-bg: #FAF8F5;
  --fm-bg-dark: #1A1A1A;
  --fm-bg-warm: #F1EDEA;
  --fm-fg: #1A1A1A;
  --fm-fg-light: #F0EEEB;
  --fm-muted: #999;
  --fm-muted-dark: #666;
  --fm-border: rgba(0, 0, 0, 0.08);
  --fm-border-light: rgba(255, 255, 255, 0.1);
  --fm-surface: #F1EDEA;

  /* Palette */
  --fm-sage: #8A9770;
  --fm-lavender: #BBA7E4;
  --fm-cyan: #5CBCBC;
  --fm-rose: #D4AFA0;
  --fm-blue: #4A66CC;
  --fm-yellow: #EDD047;

  /* Fluid Typography */
  --fm-f-display: clamp(2.4rem, 8vw, 10rem);
  --fm-f-h1: clamp(2rem, 5vw, 5.5rem);
  --fm-f-h2: clamp(1.5rem, 3vw, 3rem);
  --fm-f-h3: clamp(1.25rem, 2vw, 1.75rem);
  --fm-f-body: clamp(0.9rem, 1vw, 1.05rem);

  /* Spacing */
  --fm-section-gap: clamp(2.5rem, 6vh, 5rem);
  --fm-container-pad: clamp(1.5rem, 4vw, 5rem);

  /* Transitions */
  --fm-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fm-duration: 0.6s;
}

/* ─── Global Reset & Base ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background-color: var(--fm-bg);
  color: var(--fm-fg);
  line-height: 1.6;
  margin: 0;
  overflow-x: hidden;
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.fm-editorial,
.fm-font-editorial {
  font-family: 'Playfair Display', serif;
  font-style: italic;
}

.fm-mono {
  font-family: 'Geist Mono', 'SF Mono', 'Fira Code', monospace;
}

/* ─── Elementor Overrides ─── */
.elementor-section.elementor-section-boxed > .elementor-container {
  max-width: 1600px;
}

.elementor-widget-heading .elementor-heading-title {
  letter-spacing: -0.02em;
}

/* ─── Section Styles ─── */
.fm-section-light {
  background-color: var(--fm-bg);
  color: var(--fm-fg);
}

.fm-section-dark {
  background-color: var(--fm-bg-dark);
  color: var(--fm-fg-light);
}

.fm-section-warm {
  background-color: var(--fm-bg-warm);
  color: var(--fm-fg);
}

/* ─── Button Styles ─── */
.fm-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.75rem;
  background: var(--fm-bg-dark);
  color: white;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.fm-btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
}

.fm-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.75rem;
  background: transparent;
  color: currentColor;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.fm-btn-outline:hover {
  border-color: var(--fm-cyan);
  color: var(--fm-cyan);
}

/* ─── Card Styles ─── */
.fm-card {
  padding: 1.75rem;
  border-radius: 1rem;
  border: 1px solid var(--fm-border);
  transition: border-color 0.5s ease;
}

.fm-card:hover {
  border-color: var(--fm-cyan);
}

.fm-card-dark {
  border-color: var(--fm-border-light);
}

.fm-card-dark:hover {
  border-color: var(--fm-lavender);
}

/* ─── Project Grid ─── */
.fm-project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .fm-project-grid {
    grid-template-columns: 1fr;
  }
}

.fm-project-item {
  text-decoration: none;
  color: inherit;
  display: block;
}

.fm-project-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 1rem;
}

.fm-project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.fm-project-item:hover .fm-project-thumb img {
  transform: scale(1.03);
}

.fm-project-thumb .fm-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  transition: background 0.5s ease;
}

.fm-project-item:hover .fm-overlay {
  background: rgba(0, 0, 0, 0.05);
}

/* ─── Client Logo Grid ─── */
.fm-logo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--fm-border);
  border-radius: 1rem;
  overflow: hidden;
}

@media (max-width: 768px) {
  .fm-logo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.fm-logo-cell {
  background: var(--fm-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 2rem;
  aspect-ratio: 3 / 2;
  transition: background 0.3s ease;
}

.fm-logo-cell:hover {
  background: var(--fm-surface);
}

.fm-logo-cell img {
  max-width: 80%;
  max-height: 48px;
  object-fit: contain;
  opacity: 0.4;
  filter: grayscale(100%);
  transition: opacity 0.3s ease;
}

.fm-logo-cell:hover img {
  opacity: 0.7;
}

/* ─── Service Cards ─── */
.fm-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .fm-services-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Marquee Animation ─── */
@keyframes fm-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.fm-marquee {
  display: flex;
  white-space: nowrap;
  animation: fm-marquee 35s linear infinite;
}

.fm-marquee-item {
  margin: 0 2.5rem;
  font-size: 0.875rem;
  color: rgba(153, 153, 153, 0.6);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fm-marquee-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

/* ─── Category Filter Buttons ─── */
.fm-filter-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--fm-surface);
  color: var(--fm-muted-dark);
}

.fm-filter-btn:hover,
.fm-filter-btn.active {
  background: var(--fm-bg-dark);
  color: white;
}

/* ─── Contact Form ─── */
.fm-form {
  background: var(--fm-bg-warm);
  padding: 2rem 2.5rem;
  border-radius: 1rem;
}

.fm-form input,
.fm-form select,
.fm-form textarea {
  width: 100%;
  background: var(--fm-bg);
  border: 1px solid var(--fm-border);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-family: 'Space Grotesk', sans-serif;
  transition: border-color 0.3s ease;
  outline: none;
  -webkit-appearance: none;
}

.fm-form input:focus,
.fm-form select:focus,
.fm-form textarea:focus {
  border-color: var(--fm-fg);
}

.fm-form label {
  display: block;
  font-size: 0.6875rem;
  font-family: 'Geist Mono', monospace;
  color: var(--fm-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

/* ─── Availability Badge ─── */
.fm-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border-radius: 9999px;
  font-size: 0.875rem;
}

.fm-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--fm-sage);
  border-radius: 50%;
  animation: fm-pulse 2s ease-in-out infinite;
}

@keyframes fm-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─── Stats ─── */
.fm-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.fm-stat-number {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.fm-stat-label {
  color: var(--fm-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ─── Footer ─── */
.fm-footer {
  background: var(--fm-bg-dark);
  color: var(--fm-fg-light);
}

.fm-footer a {
  color: rgba(240, 238, 235, 0.5);
  text-decoration: none;
  transition: color 0.3s ease;
}

.fm-footer a:hover {
  color: var(--fm-fg-light);
}

/* ─── Vimeo Embed Responsive ─── */
.fm-video-wrap {
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.fm-video-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.fm-video-portrait {
  aspect-ratio: 9 / 16;
}

/* ─── Scroll Animations ─── */
.fm-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--fm-ease), transform 0.7s var(--fm-ease);
}

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

/* ─── Utility Classes ─── */
.fm-container {
  max-width: 1600px;
  margin: 0 auto;
  padding-left: var(--fm-container-pad);
  padding-right: var(--fm-container-pad);
}

.fm-text-muted {
  color: var(--fm-muted);
}

.fm-text-accent {
  color: var(--fm-cyan);
}

.fm-grayscale {
  filter: grayscale(100%);
}

.fm-rounded-xl {
  border-radius: 0.75rem;
}

.fm-rounded-2xl {
  border-radius: 1rem;
}

/* ─── Hide default Elementor page title ─── */
.page .entry-header,
.elementor-page .page-header {
  display: none;
}

/* ─── Responsive fine-tuning ─── */
@media (max-width: 768px) {
  .fm-stats {
    gap: 0.5rem;
  }

  .fm-stat-number {
    font-size: 2rem;
  }
}


/* Force container backgrounds and layout for Elementor */
.elementor-element.e-con[data-settings*="background_background"] {
    transition: none !important;
}

/* Ensure HTML widget content is visible */
.elementor-widget-html .elementor-widget-container {
    width: 100%;
}

/* Fix boxed container width */
.e-con.e-con-boxed > .e-con-inner {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}
