/* ========================================
   FREEMAN IMC - GLOBAL STYLES
   Main stylesheet for all pages
   ======================================== */

:root{ 
  --gold:#B89B5E; 
  --ink:#0B0D10; 
  --paper:#F6F7F8; 
  --teal:#4d868a; 
}

html { 
  scroll-behavior: smooth; 
}

/* ========================================
   DARK MODE VARIABLES & OVERRIDES
   ======================================== */
html.dark {
  --paper: #0B0D10;
  --ink: #F6F7F8;
}

html.dark .bg-paper { background-color: #0B0D10 !important; }
html.dark .text-ink { color: #F6F7F8 !important; }
html.dark .bg-white { background-color: rgba(30, 30, 30, 0.9) !important; }
html.dark .bg-white\/70 { background-color: rgba(30, 30, 30, 0.7) !important; }
html.dark .bg-white\/85 { background-color: rgba(30, 30, 30, 0.85) !important; }
html.dark .bg-white\/90 { background-color: rgba(30, 30, 30, 0.9) !important; }
html.dark .bg-white\/95 { background-color: rgba(30, 30, 30, 0.95) !important; }
html.dark .border-\[rgba\(11\,13\,16\,\.10\)\] { border-color: rgba(246, 247, 248, 0.1) !important; }
html.dark .border-\[rgba\(11\,13\,16\,\.12\)\] { border-color: rgba(246, 247, 248, 0.12) !important; }
html.dark .border-\[rgba\(11\,13\,16\,\.14\)\] { border-color: rgba(246, 247, 248, 0.14) !important; }
html.dark .border-\[rgba\(11\,13\,16\,\.18\)\] { border-color: rgba(246, 247, 248, 0.18) !important; }
html.dark .text-ink\/70 { color: rgba(246, 247, 248, 0.7) !important; }
html.dark .text-ink\/75 { color: rgba(246, 247, 248, 0.75) !important; }
html.dark .text-ink\/65 { color: rgba(246, 247, 248, 0.65) !important; }
html.dark .text-ink\/60 { color: rgba(246, 247, 248, 0.6) !important; }
html.dark .text-ink\/55 { color: rgba(246, 247, 248, 0.55) !important; }
html.dark .text-ink\/50 { color: rgba(246, 247, 248, 0.5) !important; }
html.dark .text-ink\/45 { color: rgba(246, 247, 248, 0.45) !important; }
html.dark .text-ink\/80 { color: rgba(246, 247, 248, 0.85) !important; }
html.dark .nav { background: rgba(11, 13, 16, 0.16) !important; border-bottom-color: rgba(246, 247, 248, 0.1) !important; }
html.dark .comparison-card { background: rgba(30, 30, 30, 0.75) !important; }
html.dark .comparison-row:hover { background: rgba(77, 134, 138, 0.15) !important; }
html.dark .modal-content { background: linear-gradient(135deg, rgba(30, 30, 30, 0.95), rgba(20, 20, 20, 0.98)) !important; }
html.dark .chart-card { background: rgba(30, 30, 30, 0.7) !important; }

/* Dark mode section backgrounds - custom teal color #1e5e63 */
html.dark .dark-section-bg { background-color: #1e5e63 !important; }
html.dark .dark-card-bg { background: #1e5e63 !important; }
html.dark .dark-card-bg-gradient { background: linear-gradient(135deg, #1e5e63, #1a5258) !important; }

/* Dark mode: Comparison section - solid black background */
html.dark .comparison-section-bg { background: #000000 !important; }
html.dark .comparison-card { background: #1e5e63 !important; }
html.dark .comparison-card-header { background: #1e5e63 !important; }
html.dark .comparison-row { background: #1e5e63 !important; }
html.dark .comparison-row > div { background: #1e5e63 !important; }

/* Dark mode: Testimonials */
html.dark .testimonial-card { background: rgba(30, 94, 99, 0.4) !important; border-color: rgba(246, 247, 248, 0.14) !important; }
html.dark .quote-mark { color: rgba(246, 247, 248, 0.05) !important; }

/* Dark mode: Back to Top button white text */
html.dark .back-to-top-btn { color: #F6F7F8 !important; }

/* ========================================
   CUSTOM COMPONENTS
   ======================================== */

/* Divider border - visible in both light and dark modes */
.divider-border {
  border-top: 1px solid rgba(11, 13, 16, 0.25);
}
html.dark .divider-border {
  border-top: 1px solid rgba(246, 247, 248, 0.25);
}

/* Service card image with overlay title */
.service-image-container {
  position: relative;
}
.service-title-overlay {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
}
html.dark .service-title-overlay {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}

/* Dark mode: Logo swap to white version */
html.dark .logo-light { display: none !important; }
html.dark .logo-dark { display: block !important; }
.logo-dark { display: none; }

/* ========================================
   THEME TOGGLE BUTTON
   ======================================== */
.theme-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(77, 134, 138, 0.1);
  border: 1px solid rgba(77, 134, 138, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.theme-toggle:hover {
  background: rgba(77, 134, 138, 0.2);
  transform: scale(1.05);
}
.theme-toggle i {
  font-size: 18px;
  color: #4d868a;
  transition: all 0.3s ease;
  position: absolute;
}
.theme-toggle .fa-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
.theme-toggle .fa-moon {
  opacity: 0;
  transform: rotate(180deg) scale(0);
}
html.dark .theme-toggle .fa-sun {
  opacity: 0;
  transform: rotate(-180deg) scale(0);
}
html.dark .theme-toggle .fa-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* ========================================
   ANIMATIONS
   ======================================== */

/* Reveal animations */
[data-reveal]{
  opacity:0;
  transform: translateY(20px);
  filter: blur(10px);
  transition:
    opacity 1.05s cubic-bezier(.2,.75,.2,1),
    transform 1.05s cubic-bezier(.2,.75,.2,1),
    filter 1.05s cubic-bezier(.2,.75,.2,1);
  will-change: transform, opacity, filter;
}
[data-reveal].is-in{ opacity:1; transform:none; filter:none; }

/* Gold underline sweep */
.u-sweep{
  background-image: linear-gradient(90deg, var(--gold), var(--gold));
  background-repeat:no-repeat;
  background-size: 0% 2px;
  background-position: 0 100%;
  transition: background-size .35s ease;
}
.u-sweep:hover{ background-size: 100% 2px; }

/* ========================================
   NAVIGATION
   ======================================== */

/* Glassmorphism Navigation Header */
.nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 1400px;
  background: rgba(246, 247, 248, 0.40);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(11, 13, 16, 0.08);
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 rgba(11, 13, 16, 0.08), 0 2px 8px 0 rgba(11, 13, 16, 0.04);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  padding: 0 25px;
}
.nav.shrink {
  top: 10px;
  box-shadow: 0 12px 40px 0 rgba(11, 13, 16, 0.12), 0 4px 12px 0 rgba(11, 13, 16, 0.06);
  background: rgba(246, 247, 248, 0.6);
}
.nav.shrink .nav-inner { height: 58px; }
.nav-inner { height: 68px; transition: height 0.3s ease; }

/* Dark mode glass nav */
html.dark .nav {
  background: rgba(11, 13, 16, 0.3);
  border-color: rgba(246, 247, 248, 0.16);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3), 0 2px 8px 0 rgba(0, 0, 0, 0.2);
}
html.dark .nav.shrink {
  background: rgba(11, 13, 16, 0.16);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4), 0 4px 12px 0 rgba(0, 0, 0, 0.3);
}

/* ========================================
   HERO SECTIONS
   ======================================== */

/* Full height hero with video (homepage) */
.hero{ 
  position:relative; 
  overflow: clip; 
  min-height: 80vh; 
  display: flex; 
  align-items: center; 
}

/* Half height hero (internal pages) */
.hero-internal{ 
  position:relative; 
  overflow: clip; 
  min-height: 40vh; 
  display: flex; 
  align-items: center; 
}

.mantle{
  position:absolute; 
  inset:0;
  pointer-events:none;
  overflow: hidden;
}
.mantle::before{
  content:"";
  position:absolute; 
  inset:0;
  background:
    radial-gradient(980px 520px at 16% 10%, rgba(184,155,94,.15), transparent 60%),
    radial-gradient(900px 520px at 88% 18%, rgba(77,134,138,.10), transparent 62%);
  z-index: 3;
}
.hero-video{
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
  opacity: 0.6;
}
.mantle-layer{
  position:absolute; 
  inset:0;
  background-size: cover;
  background-position: center;
  will-change: transform;
  transform: translate3d(0,0,0) scale(1.05);
  filter: saturate(.92) contrast(1.05);
  opacity: .16;
  mix-blend-mode: multiply;
  z-index: 1;
}

.hero-bottom-fade{
  display: none;
}

/* ========================================
   CARDS & COMPONENTS
   ======================================== */

/* Cards hover */
.cap-card{
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
  will-change: transform;
}
.cap-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(11,13,16,.12);
  border-color: rgba(184,155,94,.55);
}

/* Service cards */
.service-card{
  transition: transform .28s ease, box-shadow .28s ease;
}
.service-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(11,13,16,.15);
}

/* Magnetic button */
.mag-btn{ 
  position: relative; 
  transform: translate3d(0,0,0); 
}

/* Chart container with glass effect */
.chart-container{ 
  position: relative; 
  height: 400px; 
}

/* Glass comparison cards */
.comparison-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(77, 134, 138, 0.3);
  box-shadow: 
    0 8px 32px rgba(77, 134, 138, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}
.comparison-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 12px 40px rgba(77, 134, 138, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}
.comparison-row {
  transition: all 0.3s ease;
}
.comparison-row:hover {
  background: rgba(77, 134, 138, 0.08);
}

/* ========================================
   MODAL STYLES
   ======================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}
.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}
.modal-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(246, 247, 248, 0.98));
  backdrop-filter: blur(20px);
  margin: 20px;
  padding: 0;
  border: 1px solid rgba(77, 134, 138, 0.2);
  border-radius: 24px;
  max-width: 800px;
  width: 90%;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}
.modal-header {
  background: linear-gradient(135deg, #4d868a, #669ea2);
  color: white;
  padding: 24px 32px;
  border-radius: 24px 24px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-body {
  padding: 32px;
  overflow-y: auto;
  max-height: calc(85vh - 80px);
}
.close {
  color: white;
  font-size: 32px;
  font-weight: 300;
  cursor: pointer;
  transition: transform 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}
.close:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2);
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(30px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   HOVER EFFECTS (HAPTICS) - Global
   ======================================== */

/* Testimonial Cards Hover */
.testimonial-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(11, 13, 16, 0.12), 0 2px 6px rgba(11, 13, 16, 0.08);
  border-color: rgba(189, 154, 88, 0.3);
}

/* Service/Feature Cards Hover */
.shadow-soft {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.shadow-soft:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(11, 13, 16, 0.1), 0 2px 5px rgba(11, 13, 16, 0.06);
}

/* Button Hover Effects */
button, .btn, a[class*="btn"], a[class*="bg-gold"] {
  transition: all 0.3s ease;
}
button:hover, .btn:hover, a[class*="btn"]:hover, a[class*="bg-gold"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(189, 154, 88, 0.3);
}

/* Link Hover Effects */
a:not(.logo):not([class*="btn"]):not([class*="bg-"]) {
  transition: color 0.2s ease, opacity 0.2s ease;
}
a:not(.logo):not([class*="btn"]):not([class*="bg-"]):hover {
  opacity: 0.8;
}

/* Navigation Links Hover */
nav a {
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}
nav a:hover {
  transform: translateY(-1px);
}

/* Icon Hover Effects */
i, svg {
  transition: transform 0.2s ease, color 0.2s ease;
}
.fa-solid:hover, .fa-regular:hover, .fa-brands:hover {
  transform: scale(1.1);
}

/* Input/Form Hover Effects */
input, textarea, select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:hover, textarea:hover, select:hover {
  border-color: rgba(189, 154, 88, 0.4);
}
input:focus, textarea:focus, select:focus {
  border-color: rgba(189, 154, 88, 0.6);
  box-shadow: 0 0 0 3px rgba(189, 154, 88, 0.1);
  outline: none;
}

/* Dark Mode Hover Adjustments */
html.dark .testimonial-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.2);
  border-color: rgba(189, 154, 88, 0.5);
}
html.dark .shadow-soft:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Cursor pointer for interactive elements */
button, a, .theme-toggle, .close, [data-reveal] {
  cursor: pointer;
}

/* ========================================
   RESPONSIVE - MOBILE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) {
  .nav {
    top: 10px;
    width: calc(100% - 20px);
    padding: 0 15px;
    border-radius: 16px;
  }
  .nav-inner {
    height: 58px;
  }
  .nav.shrink .nav-inner {
    height: 54px;
  }
  
  .hero {
    min-height: 60vh;
  }
  
  .hero-internal {
    min-height: 30vh;
  }
}
