/* Complete redesign with MIMARU-inspired colors and typography */

/* Custom fonts and base styles */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy-dark: #ff119c;
  --navy: #2c4a6f;
  --cream: #f5f0e8;
  --warm-cream: #4408e9;
  --white: #ffffff;
  --black: #0a0a0a;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
.font-serif {
  font-family: "Cormorant Garamond", Georgia, serif;
}

.font-sans {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Custom color classes */
.bg-navy-dark {
  background-color: var(--navy-dark);
}

.bg-cream {
  background-color: var(--cream);
}

.bg-warm-cream {
  background-color: var(--warm-cream);
}

.text-navy {
  color: var(--navy-dark);
}

.text-navy-dark {
  color: var(--navy-dark);
}

.text-cream {
  color: var(--cream);
}

/* Text balance for better typography */
.text-balance {
  text-wrap: balance;
}

/* Form elements styling */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  font-family: inherit;
}

input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--cream);
}

/* Flip card effect */
.flip-card {
  perspective: 1000px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
}

/* Expand card effect */
.expand-card {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.expand-card .expand-card-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease 0.1s;
}

.expand-card.expanded .expand-card-content {
  max-height: 500px;
  opacity: 1;
  margin-top: 1rem;
}

.expand-card .expand-toggle {
  cursor: pointer;
}

/* Hover lift effect */
.hover-lift {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--cream);
}

::-webkit-scrollbar-thumb {
  background: var(--navy-dark);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--navy);
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--navy-dark);
  outline-offset: 3px;
}

/* Prevent layout shift from images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Smooth transitions */
a,
button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Cookie popup z-index */
#cookiePopup {
  z-index: 9999;
}

/* Backdrop blur support */
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
  .backdrop-blur-sm {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

/* Loading animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subtle scale on hover for images */
.group:hover img {
  transform: scale(1.05);
}

/* Text selection */
::selection {
  background-color: var(--navy-dark);
  color: var(--cream);
}

::-moz-selection {
  background-color: var(--navy-dark);
  color: var(--cream);
}

/* Link underline animation */
a:not(.no-underline) {
  position: relative;
}

a:not(.no-underline)::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: currentColor;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:not(.no-underline):hover::after {
  width: 100%;
}

/* Header backdrop blur */
header {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Responsive typography adjustments */
@media (max-width: 768px) {
  .text-5xl {
    font-size: 2.5rem;
  }

  .text-6xl {
    font-size: 3rem;
  }

  .text-7xl {
    font-size: 3.5rem;
  }
}

/* Print styles */
@media print {
  header,
  footer,
  #cookiePopup {
    display: none;
  }
}

/* Reduced motion support */
@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;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --navy-dark: #000000;
    --cream: #ffffff;
  }
}
