:root {
    --clr-bg: #f7f3eb;
    --clr-bg-soft: #eee6d8;
    --clr-surface: #fffaf2;
    --clr-surface-transparent: rgba(255, 250, 242, 0.85);
    --clr-surface-muted: #e7dccb;
    --clr-text: #241f1a;
    --clr-text-muted: #665c52;
    --clr-text-soft: #8a7d70;
    --clr-primary: #2f5d50;
    --clr-primary-soft: #dce9df;
    --clr-primary-contrast: #ffffff;
    --clr-border-light: #d8cdbc;
    --clr-shadow-strong: rgba(36, 31, 26, 0.1);
    --clr-shadow-medium: rgba(36, 31, 26, 0.08);
    --clr-shadow-soft: rgba(36, 31, 26, 0.05);
    --clr-shadow-primary: rgba(47, 93, 80, 0.2);
    --clr-accent: #7c3aed;
    --clr-accent-soft: #f5f3ff;
    --clr-accent-contrast: #ffffff;
    --box-radius: 18px;
    --box-radius-small: 12px;
    --box-border: 1px solid var(--clr-border-light);
    --box-shadow: 0 12px 32px var(--clr-shadow-strong), 0 2px 8px var(--clr-shadow-medium);
    --transition-fast: all 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    min-height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Subtle premium grain noise overlay */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.022;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}



/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--clr-surface-transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--box-border);
    z-index: 100;
    box-shadow: 0 4px 20px var(--clr-shadow-soft);
}

.header-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--clr-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
}

.site-logo:hover {
    transform: translateY(-1px);
}

/* Language Switcher */
.lang-switcher {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--clr-text);
    background: var(--clr-bg-soft);
    border: var(--box-border);
    border-radius: var(--box-radius-small);
    padding: 6px 24px 6px 10px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23665c52'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: var(--transition-fast);
    outline: none;
}

.lang-switcher:hover {
    border-color: var(--clr-primary);
}

.lang-switcher:focus {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 2px var(--clr-shadow-primary);
}

.logo-accent {
    color: var(--clr-accent);
}

.site-navigation {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
    padding: 0;
}

.nav-link {
    display: inline-block;
    color: var(--clr-text-muted);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--box-radius-small);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--clr-primary);
    background-color: var(--clr-primary-soft);
}

.nav-link.active {
    color: var(--clr-primary-contrast);
    background-color: var(--clr-primary);
    box-shadow: 0 4px 12px var(--clr-shadow-primary);
}

.cta-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 700;
    color: var(--clr-accent-contrast);
    background-color: rgba(255, 255, 255, 0.15); /* Static channel track for the light */
    border-radius: 24px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
    transition: var(--transition-fast);
    position: relative;
    z-index: 1;
    overflow: hidden; /* Contains the rotating gradient */
}

/* Solid background covering the center */
.cta-button::after {
    content: '';
    position: absolute;
    inset: 4px; /* Thicker 4px border channel */
    border-radius: 20px;
    background-color: var(--clr-accent);
    z-index: -1;
    transition: background-color 0.3s;
}

/* Traveling gradient tail for the border */
.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    /* Gradient tail: Vibrant Solid Gold fading to transparent, occupying the back-inside quadrant */
    background: conic-gradient(from 180deg, #f59e0b 0%, #fbbf24 10%, transparent 25%);
    z-index: -2;
    opacity: 0;
    transition: opacity 0.3s ease;
    offset-path: border-box;
    animation: border-travel 2.5s linear infinite;
    will-change: offset-distance;
    filter: blur(4px);
}

@keyframes border-travel {
    0% { offset-distance: 0%; }
    100% { offset-distance: 100%; }
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.cta-button:hover::after {
    background-color: #6d28d9;
}

.cta-button:hover::before {
    opacity: 1;
}

.cta-button:active {
    transform: translateY(0) scale(0.98);
}

/* Pulse animation limited to header button */
.site-header .cta-button {
    animation: cta-attention 3s infinite ease-in-out;
}

.site-header .cta-button:hover,
.site-header .cta-button:active {
    animation: none;
}

@keyframes cta-attention {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 8px 24px rgba(124, 58, 237, 0.6);
    }
}

/* Click Particle Effect */
.click-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease-out;
}

.click-particle.animate {
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0);
    opacity: 0;
}

.main-content {
    margin-top: 80px; /* Avoid header overlap */
    padding: 60px 0 100px;
    position: relative;
    z-index: 1;
    background-image: 
        linear-gradient(to right, transparent 0%, var(--clr-bg) 25%, var(--clr-bg) 75%, transparent 100%),
        linear-gradient(to right, rgba(36, 31, 26, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(36, 31, 26, 0.06) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
}

/* Ambient gradient blobs */
.blob-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    clip-path: inset(0);
    pointer-events: none;
    z-index: -1;
}

.blob-viewport {
    position: fixed;
    top: 80px; /* Header height */
    left: 0;
    height: calc(100vh - 80px);
    width: 100vw;
}

.ambient-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(40px);
    will-change: transform;
    transform: translate(-50%, -50%);
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle,
        rgba(124, 58, 237, 0.40) 0%,
        rgba(139, 92, 246, 0.20) 35%,
        transparent 70%);
    animation: orbit-1 90s linear infinite, pulse-1 12s ease-in-out infinite alternate;
}

.blob-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle,
        rgba(238, 230, 216, 0.95) 0%,
        rgba(224, 208, 184, 0.60) 30%,
        rgba(224, 208, 184, 0.20) 55%,
        transparent 75%);
    animation: orbit-2 110s linear infinite, pulse-2 17s ease-in-out infinite alternate;
}

/* Pulsating Animations */
@keyframes pulse-1 {
    0%   { transform: translate(-50%, -50%) scale(0.85); opacity: 0.75; }
    100% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

@keyframes pulse-2 {
    0%   { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.65; }
}

/* Orbit Animations */
@keyframes orbit-1 {
    0%   { top: 0; left: 0; }
    25%  { top: 0; left: 100%; }
    50%  { top: 100%; left: 100%; }
    75%  { top: 100%; left: 0; }
    100% { top: 0; left: 0; }
}

@keyframes orbit-2 {
    0%   { top: 100%; left: 100%; }
    25%  { top: 100%; left: 0; }
    50%  { top: 0; left: 0; }
    75%  { top: 0; left: 100%; }
    100% { top: 100%; left: 100%; }
}

.content-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Typography & Layout inside MD pages */
h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 42px;
    font-weight: 800;
    color: var(--clr-primary);
    line-height: 1.15;
    margin-bottom: 24px;
}

h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--clr-primary);
    margin-top: 40px;
    margin-bottom: 16px;
}

h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--clr-text);
    margin-top: 32px;
    margin-bottom: 12px;
}

p {
    font-size: 16px;
    color: var(--clr-text-muted);
    margin-bottom: 20px;
    line-height: 1.7;
}

/* Hero Section Style (Custom markup in MD) */
.hero {
    text-align: center;
    padding: 40px 0 60px;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    color: var(--clr-primary);
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--clr-text-muted);
    max-width: 650px;
    margin: 0 auto 32px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    color: var(--clr-primary);
    background-color: var(--clr-primary-soft);
    border: 1px solid #c5d7ca;
    border-radius: 24px;
    text-decoration: none;
    transition: var(--transition-fast);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background-color: #cbded0;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin: 48px 0;
}

.feature-card {
    background-color: var(--clr-surface-transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--box-border);
    border-radius: var(--box-radius);
    padding: 32px;
    box-shadow: 0 4px 14px var(--clr-shadow-soft);
    transition: var(--transition-fast);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--clr-shadow-strong);
    border-color: #cbd5e1;
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--clr-accent);
}

.feature-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--clr-primary);
    margin-bottom: 12px;
}

.feature-desc {
    font-size: 14px;
    color: var(--clr-text-muted);
    line-height: 1.6;
}

/* Callouts & Quotes */
blockquote {
    border-left: 4px solid var(--clr-accent);
    background-color: var(--clr-surface-transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 0 var(--box-radius-small) var(--box-radius-small) 0;
    padding: 16px 24px;
    margin: 24px 0;
}

blockquote p {
    font-style: italic;
    color: var(--clr-text);
    margin-bottom: 0;
}

/* Lists */
ul, ol {
    margin-left: 24px;
    margin-bottom: 24px;
}

li {
    margin-bottom: 8px;
    color: var(--clr-text-muted);
}

/* Site Footer */
.site-footer {
    border-top: var(--box-border);
    background-color: var(--clr-surface);
    padding: 40px 0;
    position: relative;
    z-index: 10;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    font-size: 14px;
    color: var(--clr-text-soft);
    margin-bottom: 0;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--clr-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-fast);
}

.footer-link:hover {
    color: var(--clr-primary);
}

/* Custom 404 Style */
.not-found {
    text-align: center;
    padding: 80px 0;
}

.not-found h1 {
    font-size: 80px;
    margin-bottom: 12px;
    color: var(--clr-accent);
}

.not-found p {
    font-size: 18px;
    margin-bottom: 32px;
}

/* Mobile Responsive */
@media (max-width: 850px) {
    .site-header {
        height: auto;
        padding: 8px 0;
    }
    
    .header-container {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        align-items: center;
        padding: 8px 16px;
        gap: 8px 0;
    }
    
    .site-logo {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }
    
    .header-cta {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }
    
    .site-navigation {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
    }

    .lang-switcher {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        font-size: 12px;
        padding: 5px 22px 5px 8px;
    }
    
    .nav-list {
        gap: 12px;
    }
    
    .nav-link {
        font-size: 14px;
        padding: 6px 8px;
    }
    
    .main-content {
        margin-top: 100px;
        padding: 40px 0 60px;
    }
    .hero-title {
        font-size: 38px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
        gap: 12px 20px;
    }
    
    h1 {
        font-size: 32px;
    }
}
