:root {
    --color-primary: #7C3AED;
    --color-secondary: #4C1D95;
    --color-accent: #A78BFA;
    --color-bg: #FAFAFA;
    --color-text: #1E1B4B;
    --color-card: #FFFFFF;
    --color-border: #E9E5F5;
}

/* =========================================
   SMOOTH SCROLL & BASE
   ========================================= */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   CUSTOM SCROLLBAR
   ========================================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) var(--color-bg);
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse-violet {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(167, 139, 250, 0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-violet {
    animation: pulse-violet 2s ease-in-out infinite;
}

/* =========================================
   DECORATIVE ELEMENTS
   ========================================= */
.ornament-line {
    display: inline-block;
    width: 60px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-accent), transparent);
}

.ornament-diamond::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    transform: rotate(45deg);
    margin: 0 12px;
    vertical-align: middle;
}

.section-divider {
    width: 80px;
    height: 2px;
    background: linear-gradient(to right, var(--color-primary), var(--color-accent));
    margin: 0 auto;
}

.violet-gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================
   FOCUS STATES (ACCESSIBILITY)
   ========================================= */
*:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
    border-color: var(--color-primary);
}

/* =========================================
   SELECTION
   ========================================= */
::selection {
    background-color: var(--color-accent);
    color: white;
}

::-moz-selection {
    background-color: var(--color-accent);
    color: white;
}

/* =========================================
   UTILITY CLASSES
   ========================================= */
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.writing-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* =========================================
   ALPINE.JS CLOAK
   ========================================= */
[x-cloak] {
    display: none !important;
}

/* =========================================
   GOOGLE MAPS EMBED
   ========================================= */
.rounded-2xl iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: inherit;
}

/* =========================================
   MASONRY GALLERY SUPPORT
   ========================================= */
.columns-1 { column-count: 1; }

@media (min-width: 640px) {
    .sm\:columns-2 { column-count: 2; }
}

@media (min-width: 1024px) {
    .lg\:columns-3 { column-count: 3; }
}

/* =========================================
   SUBTLE BACKGROUND PATTERNS
   ========================================= */
.pattern-dots {
    background-image: radial-gradient(var(--color-border) 1px, transparent 1px);
    background-size: 20px 20px;
}

.pattern-lines {
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(233, 229, 245, 0.15) 10px,
        rgba(233, 229, 245, 0.15) 11px
    );
}

/* =========================================
   SHIMMER LOADING EFFECT
   ========================================= */
.shimmer {
    background: linear-gradient(
        90deg,
        var(--color-card) 25%,
        var(--color-border) 50%,
        var(--color-card) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* =========================================
   FORM STYLING ENHANCEMENTS
   ========================================= */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(22%) sepia(80%) saturate(3000%) hue-rotate(260deg);
    cursor: pointer;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237C3AED' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 40px;
}

/* =========================================
   HOVER EFFECTS
   ========================================= */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(30, 27, 75, 0.08);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
}

/* =========================================
   PROSE OVERRIDE
   ========================================= */
.prose p {
    margin-bottom: 1em;
    line-height: 1.8;
}

.prose h2, .prose h3 {
    font-family: 'DM Serif Display', serif;
    color: var(--color-text);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.prose ul {
    list-style-type: disc;
    padding-left: 1.5em;
}

.prose li {
    margin-bottom: 0.5em;
}

/* =========================================
   PRINT STYLES
   ========================================= */
@media print {
    header,
    footer,
    .fixed,
    [x-data] button,
    .no-print {
        display: none !important;
    }

    body {
        background: white;
        color: black;
        font-size: 12pt;
    }

    main {
        padding: 0;
    }

    a {
        text-decoration: underline;
        color: black;
    }

    .shadow-lg,
    .shadow-xl,
    .shadow-2xl {
        box-shadow: none;
    }

    section {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}

/* =========================================
   REDUCED MOTION
   ========================================= */
@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;
    }
}
