/* Overrides and fine-grained rules on top of the Tailwind CDN. Light theme only. */

:root {
  color-scheme: light;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-feature-settings: "ss01", "cv11";
}

/* Consistent focus ring (WCAG AA). Uses ink-700 for strong contrast on both gold and white. */
:focus-visible {
  outline: 2px solid #003448;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Base link texture. */
a {
  text-underline-offset: 2px;
}

/* Brand-language fade-in for sections — mirrors glivo-brand `.section-content`. */
.section-fade {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.section-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion: disable transitions and animations. */
@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;
  }
  .section-fade { opacity: 1 !important; transform: none !important; }
}

/* Selection uses the ink accent color. */
::selection {
  background: #003448;
  color: #ffffff;
}

/* Prevent the SVG logo from blowing out width inside flex containers. */
nav img,
footer img {
  max-width: 240px;
}

/* Floating sticky CTA — fades in once the user scrolls past the hero. */
.floating-cta {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.floating-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Checkout confirmation modal. */
.checkout-modal {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0s linear 0.22s;
}
.checkout-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.22s ease;
}

/* Mobile: native-feeling bottom sheet slide-up (default). */
.checkout-modal-panel {
  transform: translateY(100%);
  transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}
.checkout-modal.is-open .checkout-modal-panel {
  transform: translateY(0);
}

/* Desktop: fade + subtle scale-in. */
@media (min-width: 640px) {
  .checkout-modal-panel {
    transform: translateY(20px) scale(0.97);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.22s ease;
  }
  .checkout-modal.is-open .checkout-modal-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

body.modal-open {
  overflow: hidden;
}
