/* ── Base & Typography ── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(123, 45, 59, 0.15);
  color: #7B2D3B;
}

/* ── Input autofill override ── */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #FDF8F6 inset !important;
  -webkit-text-fill-color: #3D3835 !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ── Focus visible for accessibility ── */
:focus-visible {
  outline: 2px solid #7B2D3B;
  outline-offset: 2px;
}

/* ── Smooth section anchor offset ── */
section[id] {
  scroll-margin-top: 80px;
}

/* ── Subtle grain texture overlay (optional enhancement) ── */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ── Animation keyframes ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-slow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

/* ── Mobile menu transition ── */
#mobile-menu {
  animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Card hover lift effect ── */
.hover-lift {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(123, 45, 59, 0.1);
}

/* ── Button ripple effect ── */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:active::after {
  width: 200px;
  height: 200px;
}

/* ── Print styles ── */
@media print {
  body { background: white; }
  #navbar, #hero, #approach, footer { display: none; }
  section { padding: 20px 0; }
}
