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

:root {
  /* Fonts */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Raw Colors - Light Theme (with oklch fallback) */
  --color-bg-light: rgb(250, 250, 252);
  --color-card-light: rgba(255, 255, 255, 0.75);
  --color-card-border-light: rgba(0, 0, 0, 0.08);
  --color-text-light: rgb(35, 35, 42);
  --color-text-muted-light: rgb(105, 105, 115);
  --color-brand-light: rgb(85, 75, 205);
  --color-brand-hover-light: rgb(65, 58, 165);
  --color-accent-light: rgb(70, 140, 190);
  --color-scrollbar-track-light: rgb(238, 238, 242);
  --color-scrollbar-thumb-light: rgb(180, 180, 188);

  /* Raw Colors - Dark Theme (with oklch fallback) */
  --color-bg-dark: rgb(20, 22, 30);
  --color-card-dark: rgba(18, 22, 32, 0.7);
  --color-card-border-dark: rgba(255, 255, 255, 0.08);
  --color-text-dark: rgb(235, 235, 240);
  --color-text-muted-dark: rgb(165, 165, 175);
  --color-brand-dark: rgb(130, 115, 235);
  --color-brand-hover-dark: rgb(155, 140, 250);
  --color-accent-dark: rgb(100, 175, 220);
  --color-scrollbar-track-dark: rgb(18, 20, 26);
  --color-scrollbar-thumb-dark: rgb(75, 78, 88);

  /* Upgrade to oklch() in browsers that support it */
  @supports (color: oklch(0% 0 0)) {
    --color-bg-light: oklch(98% 0.005 240);
    --color-text-light: oklch(22% 0.015 240);
    --color-text-muted-light: oklch(50% 0.015 240);
    --color-brand-light: oklch(52% 0.22 262);
    --color-brand-hover-light: oklch(42% 0.20 262);
    --color-accent-light: oklch(58% 0.16 200);
    --color-scrollbar-track-light: oklch(93% 0.005 240);
    --color-scrollbar-thumb-light: oklch(75% 0.01 240);

    --color-bg-dark: oklch(14% 0.02 245);
    --color-text-dark: oklch(95% 0.01 240);
    --color-text-muted-dark: oklch(68% 0.015 240);
    --color-brand-dark: oklch(68% 0.18 250);
    --color-brand-hover-dark: oklch(75% 0.16 250);
    --color-accent-dark: oklch(78% 0.13 195);
    --color-scrollbar-track-dark: oklch(10% 0.015 245);
    --color-scrollbar-thumb-dark: oklch(35% 0.02 245);
  }

  /* CSS Dynamic Color Mappings */
  --bg-color: light-dark(var(--color-bg-light), var(--color-bg-dark));
  --card-bg: light-dark(var(--color-card-light), var(--color-card-dark));
  --card-border: light-dark(var(--color-card-border-light), var(--color-card-border-dark));
  --text-color: light-dark(var(--color-text-light), var(--color-text-dark));
  --text-muted: light-dark(var(--color-text-muted-light), var(--color-text-muted-dark));
  --brand-color: light-dark(var(--color-brand-light), var(--color-brand-dark));
  --brand-hover: light-dark(var(--color-brand-hover-light), var(--color-brand-hover-dark));
  --accent-color: light-dark(var(--color-accent-light), var(--color-accent-dark));
  
  --scrollbar-track: light-dark(var(--color-scrollbar-track-light), var(--color-scrollbar-track-dark));
  --scrollbar-thumb: light-dark(var(--color-scrollbar-thumb-light), var(--color-scrollbar-thumb-dark));

  /* Layout Spacing */
  --header-height: 80px;
  --max-width: 1200px;
  --border-radius-lg: 16px;
  --border-radius-md: 8px;
  --transition-smooth: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

  /* Set system-wide preference */
  color-scheme: light dark;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* Manual theme toggle support via data-user-color-scheme attribute */
:root[data-user-color-scheme="light"] {
  --bg-color: var(--color-bg-light);
  --card-bg: var(--color-card-light);
  --card-border: var(--color-card-border-light);
  --text-color: var(--color-text-light);
  --text-muted: var(--color-text-muted-light);
  --brand-color: var(--color-brand-light);
  --brand-hover: var(--color-brand-hover-light);
  --accent-color: var(--color-accent-light);
  --scrollbar-track: var(--color-scrollbar-track-light);
  --scrollbar-thumb: var(--color-scrollbar-thumb-light);
}

:root[data-user-color-scheme="dark"] {
  --bg-color: var(--color-bg-dark);
  --card-bg: var(--color-card-dark);
  --card-border: var(--color-card-border-dark);
  --text-color: var(--color-text-dark);
  --text-muted: var(--color-text-muted-dark);
  --brand-color: var(--color-brand-dark);
  --brand-hover: var(--color-brand-hover-dark);
  --accent-color: var(--color-accent-dark);
  --scrollbar-track: var(--color-scrollbar-track-dark);
  --scrollbar-thumb: var(--color-scrollbar-thumb-dark);
}

/* Fallback for browsers that do not support light-dark() */
@supports not (color: light-dark(white, black)) {
  :root {
    --bg-color: var(--color-bg-light);
    --card-bg: var(--color-card-light);
    --card-border: var(--color-card-border-light);
    --text-color: var(--color-text-light);
    --text-muted: var(--color-text-muted-light);
    --brand-color: var(--color-brand-light);
    --brand-hover: var(--color-brand-hover-light);
    --accent-color: var(--color-accent-light);
    --scrollbar-track: var(--color-scrollbar-track-light);
    --scrollbar-thumb: var(--color-scrollbar-thumb-light);
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --bg-color: var(--color-bg-dark);
      --card-bg: var(--color-card-dark);
      --card-border: var(--color-card-border-dark);
      --text-color: var(--color-text-dark);
      --text-muted: var(--color-text-muted-dark);
      --brand-color: var(--color-brand-dark);
      --brand-hover: var(--color-brand-hover-dark);
      --accent-color: var(--color-accent-dark);
      --scrollbar-track: var(--color-scrollbar-track-dark);
      --scrollbar-thumb: var(--color-scrollbar-thumb-dark);
    }
  }
}

/* Legacy Scrollbar Fallback */
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  ::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
  ::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 5px;
  }
}

html {
  scroll-behavior: smooth;
  accent-color: var(--brand-color);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Utility Layouts */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
}

.section-alt {
  background-color: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

:root[data-user-color-scheme="light"] .section-alt {
  background-color: rgba(0, 0, 0, 0.025);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--border-radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--brand-color);
  color: white;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  background-color: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-color);
  border: 1.5px solid var(--card-border);
}

.btn-secondary:hover {
  background-color: var(--card-border);
  transform: translateY(-2px);
}

/* Scroll progress indicator */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-color), var(--accent-color));
  z-index: 1001;
  transition: width 0.1s ease-out;
}

/* Navigation Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
}

header.scrolled {
  height: 64px;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-color);
}

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--brand-color);
  transition: var(--transition-smooth);
}

:root[data-user-color-scheme="dark"] .logo-icon {
  color: #38bdf8;
}

.logo span {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 500;
  transition: var(--transition-smooth);
}

.nav-link:hover {
  color: var(--text-color);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  background: var(--card-border);
}

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.theme-toggle-btn .sun-icon {
  display: none;
}

:root[data-user-color-scheme="dark"] .theme-toggle-btn .moon-icon {
  display: none;
}

:root[data-user-color-scheme="dark"] .theme-toggle-btn .sun-icon {
  display: block;
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 4px;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: calc(var(--header-height) + 40px);
  display: flex;
  align-items: center;
  background-image: linear-gradient(rgba(10, 12, 20, 0.85), rgba(10, 12, 20, 0.95)), url('images/hero_bg.png');
  background-size: cover;
  background-position: center;
  color: white;
  overflow: hidden;
}

/* Hero background treatment for light mode (the image is dark by default) */
:root[data-user-color-scheme="light"] .hero {
  background-image: linear-gradient(rgba(240, 243, 248, 0.88), rgba(240, 243, 248, 0.95)), url('images/hero_bg.png');
  color: var(--text-color);
}

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

.hero-tag {
  display: inline-block;
  padding: 5px 16px;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: var(--brand-color);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  border-radius: 50px;
  margin-bottom: 24px;
}

:root[data-user-color-scheme="dark"] .hero-tag {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}

.hero h1 {
  font-size: clamp(2.4rem, 4.8vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -1.2px;
  line-height: 1.2;
  margin-bottom: 24px;
  color: #ffffff;
  background: none;
  -webkit-text-fill-color: initial;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

:root[data-user-color-scheme="light"] .hero h1 {
  color: #0f172a;
  background: none;
  -webkit-text-fill-color: initial;
  text-shadow: none;
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
}

:root[data-user-color-scheme="light"] .hero p {
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  gap: 16px;
}

/* Grid overlay for background */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 1;
}

/* Services Grid Section */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px auto;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.service-card {
  padding: 40px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--brand-color);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0%;
  background: var(--brand-color);
  transition: var(--transition-smooth);
}

.service-card:hover::after {
  height: 100%;
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(108, 92, 231, 0.1);
  color: var(--brand-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.service-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: 16px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.service-features {
  list-style: none;
  padding-left: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.service-features li svg {
  width: 14px;
  height: 14px;
  color: var(--accent-color);
  fill: currentColor;
}

/* About / Methodology Section */
.about-split {
  display: flex;
  gap: 60px;
  align-items: center;
}

.about-text {
  flex: 1;
}

.about-text h2 {
  font-size: 2.5rem;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.about-text p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.about-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(0, 206, 201, 0.1);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.about-feature-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.about-feature-text h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.about-feature-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.about-image {
  flex: 1;
  position: relative;
}

.about-image img {
  width: 100%;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--card-border);
}

/* Case Studies Section */
.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 30px;
}

.case-card {
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  transition: var(--transition-smooth);
}

.case-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  border-color: var(--brand-color);
}

.case-card-body {
  padding: 40px;
}

.case-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(108, 92, 231, 0.1);
  color: var(--brand-color);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 16px;
}

.case-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.case-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.case-stats {
  display: flex;
  gap: 32px;
  border-top: 1px solid var(--card-border);
  padding-top: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--brand-color);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Contact / Lead Section */
.contact-split {
  display: flex;
  gap: 60px;
  align-items: stretch;
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-info h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.contact-info p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 20px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-color);
}

.contact-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.contact-method-text h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.contact-method-text p {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0;
}

.contact-form-panel {
  flex: 1.2;
  padding: 50px;
}

.form-group {
  margin-bottom: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  border: 1.5px solid var(--card-border);
  background: transparent;
  color: var(--text-color);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-color);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

/* Custom styled branded dropdown */
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 48px;
}

select.form-control option {
  background: var(--bg-color);
  color: var(--text-color);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Validation styling */
.form-control:user-invalid {
  border-color: #ff7675;
}

.error-message {
  display: none;
  color: #ff7675;
  font-size: 0.8rem;
  margin-top: 4px;
}

.form-control:user-invalid + .error-message {
  display: block;
}

.form-submit-btn {
  width: 100%;
}

.form-status {
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--border-radius-md);
  font-size: 0.9rem;
  text-align: center;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(85, 239, 196, 0.15);
  color: #00b894;
  border: 1px solid rgba(85, 239, 196, 0.3);
}

.form-status.error {
  display: block;
  background: rgba(255, 118, 117, 0.15);
  color: #d63031;
  border: 1px solid rgba(255, 118, 117, 0.3);
}

/* Footer Section */
footer {
  background: var(--bg-color);
  color: var(--text-muted);
  padding: 80px 0 40px 0;
  border-top: 1px solid var(--card-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand h3 {
  font-size: 1.25rem;
  color: var(--text-color);
  margin-bottom: 20px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--brand-color);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--card-border);
  padding-top: 40px;
  font-size: 0.85rem;
}

/* Floating Actions */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  z-index: 999;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--brand-hover);
  transform: translateY(-3px);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Responsive Overrides */
@media (max-width: 992px) {
  .about-split, .contact-split {
    flex-direction: column;
    gap: 40px;
  }
  .about-image {
    order: -1;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  section {
    padding: 70px 0;
  }
  
  header {
    height: 70px;
  }
  
  .menu-toggle {
    display: block;
    z-index: 1002;
  }
  
  .menu-toggle svg {
    width: 24px;
    height: 24px;
  }
  
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-color);
    border-left: 1px solid var(--card-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 40px 40px 40px;
    gap: 24px;
    transition: var(--transition-smooth);
    z-index: 1001;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
  }
  
  nav.active {
    right: 0;
  }
  
  .hero {
    padding-top: 100px;
    text-align: center;
  }
  
  .hero-actions {
    justify-content: center;
    flex-direction: column;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

/* Animations & Transitions - CSS Scroll Driven Animations */
@media (prefers-reduced-motion: no-preference) {
  /* Scroll Reveal Entry Effects using Native View Timeline */
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-card {
      from {
        opacity: 0;
        transform: translateY(40px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .service-card, .case-card, .about-feature, .contact-method {
      animation: reveal-card auto linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 35%;
    }

    @keyframes fade-slide-in {
      from {
        opacity: 0;
        transform: translateX(-30px);
      }
      to {
        opacity: 1;
        transform: translateX(0);
      }
    }

    .about-text, .contact-info {
      animation: fade-slide-in auto linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 30%;
    }
  }
  
  /* Fallback JS-driven animation classes (active only when native CSS view timeline is unsupported) */
  @supports not ((animation-timeline: view()) and (animation-range: entry)) {
    .reveal-element {
      opacity: 0;
      transform: translateY(30px);
      transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    
    .reveal-element.active {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
