/*
Theme Name:   Bricks Child
Template:     bricks
Version:      1.0.0
Description:  Avada Digital child theme for Bricks Builder
*/

/* ─── Bricks body fix ────────────────────────────────────── */
body.brx-body {
  min-height: 100vh;
}

/* ─── text-basic fills its parent width ──────────────────── */
/* Bricks wraps text-basic in a div — ensure it stretches so
   text-align:center inside works correctly */
.brxe-text-basic {
  width: 100%;
}

/* ─── Hero minimum height ────────────────────────────────── */
.hero-gradient {
  min-height: 75vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ─── Header CTA button — never wrap ────────────────────── */
#brx-header .btn-primary {
  white-space: nowrap;
  padding: 0.6875rem 1.375rem;
  font-size: 0.8125rem; /* 13px fixed — keeps it compact in nav */
}

/* ─── Logo sharpness ─────────────────────────────────────── */
/* Force GPU compositing layer for crisp subpixel rendering */
#brx-header img,
#brx-footer img {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  image-rendering: auto;
  /* Prevent any parent max-width from constraining logo */
  max-width: none !important;
  height: 56px !important;
  width: auto !important;
}

/* ─── Global base ────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px; /* anchor rem units */
}

body {
  font-family: 'Inter', sans-serif;
  font-size: var(--text-base);
  color: var(--text-body);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Headings ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.brxe-heading {
  font-family: 'Montserrat', sans-serif;
  color: var(--text-title);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-4xl); font-weight: 800; line-height: 1.1; }
h2 { font-size: var(--text-3xl); font-weight: 800; line-height: 1.15; }
h3 { font-size: var(--text-2xl); font-weight: 700; line-height: 1.2; }
h4 { font-size: var(--text-xl);  font-weight: 600; line-height: 1.3; }
h5 { font-size: var(--text-lg);  font-weight: 600; }
h6 { font-size: var(--text-base); font-weight: 600; }

/* ─── Links ──────────────────────────────────────────────── */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--secondary);
}

/* ─── Bricks flex-direction override ─────────────────────── */
/* Bricks loads .brxe-block { flex-direction:column } after child theme.
   Use _direction native setting on elements instead where possible.
   This class allows an explicit row override when needed. */
.brxe-block.is-row {
  flex-direction: row !important;
}

/* ─── Smooth scroll ──────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ─── Selection colour ───────────────────────────────────── */
::selection {
  background: var(--primary);
  color: var(--white);
}

/* ─── Focus ring (accessibility) ────────────────────────── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ─── Sticky header support ──────────────────────────────── */
#brx-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--transition-base), background var(--transition-base);
}
#brx-header.scrolled {
  box-shadow: var(--shadow-md);
}

/* ─── Nav link hover ─────────────────────────────────────── */
.brxe-nav-menu a {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-title);
  position: relative;
  transition: color var(--transition-fast);
}
.brxe-nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}
.brxe-nav-menu a:hover,
.brxe-nav-menu .current-menu-item > a {
  color: var(--primary);
}
.brxe-nav-menu a:hover::after,
.brxe-nav-menu .current-menu-item > a::after {
  width: 100%;
}

/* ─── Image naturalness ──────────────────────────────────── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ─── Scroll reveal (IntersectionObserver driven) ────────── */
/* .reveal, .reveal-left, .reveal-right defined in CF stylesheet */
/* JS observer in functions.php enqueues scroll-reveal.js      */

/* ─── Keyframe animations ────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.4); opacity: 0.7; }
}
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ─── Gradient hero background ───────────────────────────── */
.hero-gradient {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1e3a56 50%, #1f4a6e 100%);
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
}
@media (prefers-reduced-motion: reduce) {
  .hero-gradient { animation: none; }
}

/* ─── Stat number (large display text) ───────────────────── */
.stat-number {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: var(--text-4xl);
  color: var(--primary);
  line-height: 1;
}
.stat-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.theme-inverted .stat-label,
.section-dark .stat-label {
  color: rgba(255,255,255,0.6);
}

/* ─── Service / portfolio card hover border ──────────────── */
.service-card {
  border: 1px solid rgba(22,46,72,0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  background: var(--white);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
  cursor: default;
}
.service-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

/* ─── Testimonial card ───────────────────────────────────── */
.testimonial-card {
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border-left: 4px solid var(--primary);
}

/* ─── Form inputs (Fluent Forms) ─────────────────────────── */
.ff-el-form-control,
.ff_form_wrap input[type="text"],
.ff_form_wrap input[type="email"],
.ff_form_wrap input[type="tel"],
.ff_form_wrap textarea {
  border: 1.5px solid rgba(22,46,72,0.15);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: var(--text-sm);
  color: var(--text-title);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
}
.ff-el-form-control:focus,
.ff_form_wrap input:focus,
.ff_form_wrap textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,143,192,0.15);
}
.ff-btn-submit {
  background: var(--primary) !important;
  border: none !important;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  border-radius: var(--radius-md) !important;
  padding: 0.875rem 2rem !important;
  transition: background var(--transition-base), transform var(--transition-fast) !important;
}
.ff-btn-submit:hover {
  background: var(--secondary) !important;
  transform: translateY(-2px) !important;
}

/* ─── Responsive image fill ──────────────────────────────── */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-ratio-16-9 { aspect-ratio: 16 / 9; overflow: hidden; }
.img-ratio-4-3  { aspect-ratio: 4 / 3;  overflow: hidden; }
.img-ratio-1-1  { aspect-ratio: 1 / 1;  overflow: hidden; }
