/* ==========================================================================
   CSS Variables & Theme Setup (Outback Trust)
   ========================================================================== */
:root {
  /* Colors */
  --color-primary: #0A2342;
  --color-primary-light: #153E75;
  --color-primary-dark: #051221;
  --color-secondary: #C45A1D;
  --color-secondary-light: #DE7232;
  --color-secondary-dark: #9E4513;

  --color-background: #F7F9FC;
  --color-surface: #FFFFFF;
  --color-text-main: #1C2025;
  --color-text-muted: #5C6777;
  --color-border: #E0E6ED;

  --color-success: #2E7D32;
  --color-warning: #F57C00;
  --color-error: #D32F2F;

  /* Typography */
  --font-heading: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  
  /* Animations */
  --easing-standard: cubic-bezier(0.4, 0.0, 0.2, 1);
  --easing-decelerate: cubic-bezier(0.0, 0.0, 0.2, 1);
  --easing-accelerate: cubic-bezier(0.4, 0.0, 1, 1);
  --easing-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --duration-short: 200ms;
  --duration-medium: 400ms;
  --duration-long: 800ms;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  /* Layout */
  --container-width: 1200px;
  --header-height: 80px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-main);
  background-color: var(--color-background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--header-height);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary-dark);
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.02em;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-short) var(--easing-standard);
}

a:hover {
  color: var(--color-secondary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   Custom Cursor (High-End Effect)
   ========================================================================== */
@media (pointer: fine) {
  body {
    cursor: none;
  }
  .cursor-dot, .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
  }
  .cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-secondary);
  }
  .cursor-ring {
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(196, 90, 29, 0.4);
    transition: width 0.3s var(--easing-elastic), height 0.3s var(--easing-elastic), background-color 0.3s, border-color 0.3s;
  }
  /* Active/Hover states for cursor */
  body.cursor-hover .cursor-ring {
    width: 56px;
    height: 56px;
    background-color: rgba(196, 90, 29, 0.1);
    border-color: transparent;
  }
}

/* ==========================================================================
   Typography
   ========================================================================== */
.h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.1; }
.h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
.h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
.text-lead { font-size: 1.25rem; color: var(--color-text-muted); font-weight: 400; }
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }

/* Advanced Text Reveal (Split Words) */
.word-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.1em; /* Prevent descender clipping */
}
.word {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform var(--duration-long) var(--easing-standard), opacity var(--duration-long) var(--easing-standard);
  will-change: transform, opacity;
}
.word.active {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.section {
  padding: var(--spacing-xl) 0;
  position: relative;
}

.section-light { background-color: var(--color-surface); }
.section-dark { 
  background-color: var(--color-primary-dark); 
  color: var(--color-surface);
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 {
  color: var(--color-surface);
}

.grid { display: grid; gap: var(--spacing-md); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ==========================================================================
   Components
   ========================================================================== */
/* Advanced Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  overflow: hidden;
  z-index: 1;
  transition: color 0.4s var(--easing-standard), border-color 0.4s var(--easing-standard), transform 0.4s var(--easing-elastic), box-shadow 0.4s var(--easing-standard);
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.15);
  transform: translateX(-100%);
  transition: transform 0.5s var(--easing-standard);
  z-index: -1;
}

.btn:hover::after {
  transform: translateX(0);
}

.btn-primary {
  background-color: var(--color-secondary);
  color: var(--color-surface);
  box-shadow: 0 4px 14px rgba(196, 90, 29, 0.2);
}

.btn-primary:hover {
  color: var(--color-surface);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(196, 90, 29, 0.4);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-outline::after {
  background: var(--color-primary);
}

.btn-outline:hover {
  color: var(--color-surface);
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(10, 35, 66, 0.15);
}

.btn-outline-light {
  background-color: transparent;
  border-color: var(--color-surface);
  color: var(--color-surface);
}
.btn-outline-light::after {
  background: var(--color-surface);
}
.btn-outline-light:hover {
  color: var(--color-primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

/* 3D Magnetic Cards */
.card {
  background: var(--color-surface);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.04);
  position: relative;
  transform-style: preserve-3d;
  transition: box-shadow 0.4s var(--easing-standard), border-color 0.4s ease;
  will-change: transform;
}

.card:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  border-color: var(--color-border);
  z-index: 2;
}

/* Pseudo-element for inner glow on hover */
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(196,90,29,0.03) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.card:hover::before {
  opacity: 1;
}

.card > * {
  transform: translateZ(20px); /* Push content out for 3D effect */
}

.card-icon {
  width: 54px;
  height: 54px;
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
  transition: transform 0.4s var(--easing-elastic);
}
.card:hover .card-icon {
  transform: scale(1.1) translateZ(30px);
}

/* Forms */
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-weight: 600; margin-bottom: 0.5rem; color: var(--color-primary-dark); font-size: 0.9rem; letter-spacing: 0.5px; text-transform: uppercase;}
.form-control {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: #FCFDFE;
  transition: all 0.3s ease;
}
.form-control:focus {
  outline: none;
  background: var(--color-surface);
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 4px rgba(196, 90, 29, 0.1);
}

/* Header (Glassmorphism) */
.header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: var(--header-height);
  background: var(--color-surface); /* Solid initially or transparent based on design, we'll make it clean */
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: height 0.4s var(--easing-standard), background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.header.scrolled {
  height: 70px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.3);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.5px;
}
.logo-text span { color: var(--color-secondary); }

.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-link {
  font-weight: 600;
  color: var(--color-text-main);
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 1px;
  position: relative;
  padding: 0.5rem 0;
}

/* Underline hover effect for nav */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0%;
  height: 2px;
  background: var(--color-secondary);
  transition: width 0.3s var(--easing-standard);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}
.nav-link:hover, .nav-link.active {
  color: var(--color-secondary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

/* Footer */
.footer {
  background-color: var(--color-primary-dark);
  color: rgba(255,255,255,0.6);
  padding: var(--spacing-xl) 0 var(--spacing-md);
  position: relative;
  overflow: hidden;
}
/* Subtle geometric background in footer */
.footer::before {
  content: '';
  position: absolute;
  bottom: -20%; right: -10%;
  width: 50vw; height: 50vw;
  background: radial-gradient(circle, rgba(196,90,29,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  position: relative; z-index: 2;
}

.footer h3 {
  color: var(--color-surface);
  font-size: 1.125rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.footer a { color: rgba(255,255,255,0.6); transition: color 0.3s; display: inline-block;}
.footer a:hover { color: var(--color-secondary); transform: translateX(5px); }
.footer ul li { margin-bottom: 0.75rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: var(--spacing-md);
  text-align: center;
  font-size: 0.875rem;
  position: relative; z-index: 2;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  background-color: var(--color-primary-dark);
  color: var(--color-surface);
  overflow: hidden;
  padding-top: var(--header-height);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero .text-lead {
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--spacing-lg);
  font-size: clamp(1.125rem, 2vw, 1.5rem);
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

#particle-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  opacity: 0.5;
  mix-blend-mode: screen;
}

/* Trust Band */
.trust-band {
  background-color: var(--color-primary);
  color: var(--color-surface);
  padding: 1.5rem 0;
  border-bottom: 4px solid var(--color-secondary);
  position: relative;
  z-index: 10;
}
.trust-band .container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

/* General Animations (Reveal) */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--duration-long) var(--easing-standard), transform var(--duration-long) var(--easing-standard);
  will-change: transform, opacity;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Sticky CTA (Mobile) */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; width: 100%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  z-index: 999;
  padding: 1rem var(--spacing-sm);
  border-top: 1px solid rgba(0,0,0,0.05);
}
.sticky-cta .btn { width: 100%; }

/* Responsive */
@media (max-width: 992px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0; width: 100%;
    height: calc(100vh - var(--header-height));
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(15px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
  }
  .nav-links.show { display: flex; }
  .mobile-menu-btn { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .sticky-cta { display: block; }
  body { padding-bottom: 80px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

/* Accessibility & Performance Override */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .word { opacity: 1 !important; transform: none !important; }
  #particle-canvas { display: none !important; }
  .card { transform: none !important; }
  .cursor-dot, .cursor-ring { display: none !important; }
  body { cursor: auto !important; }
}
