* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "DM Sans", system-ui, sans-serif;
  color: #1a1a2e;
}
h1,
h2,
h3,
h4 {
  font-family: "Cormorant Garamond", Georgia, serif;
}

/* SVG noise texture for grain */
.grain-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.03;
  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");
  pointer-events: none;
  z-index: 1;
}

/* Scroll fade-in animation */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Accordion */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-item.open .faq-answer {
  max-height: 600px;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}
.faq-icon {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Tab active states */
.tab-btn {
  transition:
    background-color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.tab-btn.active {
  background-color: #2b3480;
  color: #fff;
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* Custom button hover */
.btn-primary {
  background: linear-gradient(135deg, #2b3480 0%, #3a4699 100%);
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(43, 52, 128, 0.25),
    0 2px 8px rgba(43, 52, 128, 0.15);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-primary:focus-visible {
  outline: 3px solid #c8bfe0;
  outline-offset: 2px;
}

.btn-secondary {
  border: 2px solid #d4726a;
  color: #d4726a;
  transition:
    background-color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-secondary:hover {
  background-color: #d4726a;
  color: #fff;
  transform: translateY(-2px);
}
.btn-secondary:active {
  transform: translateY(0);
}
.btn-secondary:focus-visible {
  outline: 3px solid #f0c4c0;
  outline-offset: 2px;
}

/* Card lift */
.card-lift {
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 32px rgba(43, 52, 128, 0.08),
    0 4px 12px rgba(43, 52, 128, 0.04);
}

/* Nav link underline */
.nav-link {
  position: relative;
  transition: color 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #d4726a;
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-link:hover::after,
.nav-link:focus-visible::after {
  width: 100%;
}
.nav-link:hover {
  color: #2b3480;
}

/* Mobile menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-menu.open {
  transform: translateX(0);
}

/* Form focus */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #4a58b0;
  box-shadow: 0 0 0 3px rgba(74, 88, 176, 0.12);
}

/* Image treatments */
.img-treatment {
  position: relative;
  overflow: hidden;
}
.img-treatment::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(30, 37, 86, 0.15),
    transparent 60%
  );
  pointer-events: none;
}
