/* ========================================
   FreiheitImKopf - Custom Styles
   ======================================== */

/* CSS Custom Properties */
:root {
    --color-gold: #b48a61;
    --color-rose: #d0356d;
    --color-cream: #fef9fa;
    --color-dark: #151515;
    --color-earth: #978574;
    --color-sand: #f5efe6;
    --color-muted: #6b6b6b;
}

/* ---- Base ---- */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--color-gold);
    color: white;
}

/* ---- Scroll Progress Bar ---- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-rose));
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ---- Typography ---- */
.font-heading {
    font-feature-settings: "liga" 1, "kern" 1;
}

/* Font weight utilities */
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }

/* Prose / Article content styling */
.prose {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--color-muted);
}

.prose h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.prose h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

.prose p {
    margin-bottom: 1.25rem;
}

.prose a {
    color: var(--color-gold);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s;
}

.prose a:hover {
    color: var(--color-dark);
}

.prose ul, .prose ol {
    margin: 1.25rem 0;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose ul li {
    list-style-type: disc;
}

.prose ol li {
    list-style-type: decimal;
}

.prose blockquote {
    border-left: 3px solid var(--color-gold);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    background: var(--color-sand);
    border-radius: 0 0.75rem 0.75rem 0;
}

.prose img {
    border-radius: 1rem;
    margin: 2rem 0;
}

.prose hr {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 2.5rem 0;
}

/* ---- Line Clamp ---- */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Animations ---- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(30px, -20px); }
    50% { transform: translate(-10px, 20px); }
    75% { transform: translate(20px, 10px); }
}

@keyframes drift-reverse {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-20px, 15px); }
    50% { transform: translate(15px, -25px); }
    75% { transform: translate(-10px, -10px); }
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

@keyframes scroll-dot {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(8px); opacity: 0; }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-drift {
    animation: drift 15s ease-in-out infinite;
}

.animate-drift-reverse {
    animation: drift-reverse 18s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse-slow 8s ease-in-out infinite;
}

.animate-scroll-dot {
    animation: scroll-dot 1.5s ease-in-out infinite;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ---- Decorative ---- */
.section-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-rose));
    margin: 0 auto;
}

/* Gold-Rose gradient text */
.text-gradient {
    background: linear-gradient(135deg, var(--color-gold), var(--color-rose));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glassmorphism utility */
.glass {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ---- Micro-Interactions ---- */
.btn-primary, .btn-secondary {
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.btn-primary:active, .btn-secondary:active {
    transform: scale(0.97);
}

/* ---- Form Styles (Accessible Focus) ---- */
input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(180, 138, 97, 0.15);
}

a:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

/* ---- Scrollbar (Webkit + Firefox) ---- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--color-earth);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-earth) var(--color-cream);
}

/* ---- AOS Overrides ---- */
[data-aos] {
    transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1) !important;
}

/* ---- 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;
    }

    .animate-float, .animate-fade-in-up, .animate-pulse {
        animation: none !important;
    }

    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .text-hero {
        font-size: 2.5rem;
    }

    .text-display {
        font-size: 3rem;
    }

    .prose h2 {
        font-size: 1.5rem;
    }

    .prose h3 {
        font-size: 1.25rem;
    }
}

/* ---- Print ---- */
@media print {
    header, footer, .scroll-to-top, .scroll-progress, [data-aos] {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
}
