/* Sustainable Light Theme Overrides */
:root {
    --primary-color: #2e7d32;       /* Nature Green */
    --secondary-color: #0288d1;     /* Sky Blue */
    --bg-light: #ffffff;            /* Clean White */
    --bg-alt: #f1f8e9;              /* Very light green for boxes */
    --text-main: #333333;           /* Dark Gray */
    --text-muted: #555555;          /* Medium Gray */
    --accent: #ff9800;              /* Sun Orange */
    --font-ui: 'Inter', 'Roboto', 'Helvetica Neue', sans-serif;
}

body {
    background: var(--bg-light);
    color: var(--text-main);
    font-family: var(--font-ui);
    transition: font-size 0.3s ease;
}

/* Base Font Toggle Overrides */
body.font-small { font-size: 14px !important; }
body.font-medium { font-size: 16px !important; }
body.font-large { font-size: 18px !important; }

/* Header & Toggles */
#header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 10000;
    padding: 15px 40px;
}

.header-toggles {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    gap: 15px;
    z-index: 99999;
    align-items: center;
}

@media screen and (min-width: 981px) {
    #header {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 0 60px !important;
        height: 100px !important;
        background: #fff !important;
        position: sticky !important;
        top: 0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
        border: none !important;
    }

    #header h1 {
        position: static !important;
        transform: none !important;
        margin: 0 40px 0 0 !important;
        padding: 0 !important;
        z-index: 10000 !important;
        width: auto !important;
        height: auto !important;
        border: none !important;
    }

    #logo {
        display: block !important;
        border: none !important;
    }

    #logo img {
        height: 55px !important;
        width: auto !important;
        display: block !important;
    }

    #nav {
        background: transparent !important;
        margin-left: 0 !important;
        margin-right: auto !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        position: static !important;
        display: flex !important;
        width: auto !important;
    }

    #nav:after {
        display: none !important;
    }

    #nav > ul {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }

    #nav > ul > li {
        margin: 0 15px !important;
        padding: 0 !important;
        display: block !important;
        border: none !important;
    }
    
    #nav ul li a {
        padding: 10px 5px !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
        border: none !important;
        white-space: nowrap !important;
    }

    .header-toggles {
        position: static !important;
        display: flex !important;
        align-items: center !important;
        gap: 15px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }
}

.top-email {
    color: white;
    background: var(--primary-color);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.85em;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.3);
    transition: all 0.3s ease;
}
.top-email:hover {
    background: #1b5e20;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.5);
    color: white !important;
}

.toggle-group {
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.05);
    padding: 6px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
}

.toggle-btn {
    cursor: pointer;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8em;
    padding: 4px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.toggle-btn:hover {
    color: var(--primary-color);
    background: rgba(46, 125, 50, 0.1);
}

.toggle-btn.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 6px rgba(46, 125, 50, 0.3);
}

/* Nav Improvements */
#nav {
    background: transparent;
}
#nav ul li a {
    color: var(--text-main) !important;
    font-weight: 600;
    transition: color 0.3s ease;
}
#nav ul li:hover a, #nav ul li.current a {
    color: var(--primary-color) !important;
}

#logo img {
    height: 60px;
    vertical-align: middle;
}

#logo {
    color: var(--text-main) !important;
}

/* Banner overrides removed - handled via inline HTML for exact Kimi replica */
#banner {
    min-height: auto;
    height: auto !important;    /* Override Arcana's fixed 28em */
    text-align: left !important;
}
#banner header {
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    position: relative !important;  /* Override Arcana position:absolute */
    bottom: auto !important;
    left: auto !important;
    width: auto !important;         /* Let flex control the width */
    color: inherit !important;
}
#banner h2 {
    /* Reset Arcana defaults — hero title controls its own style */
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    margin-bottom: 0;
    line-height: inherit;
    text-shadow: none;
    letter-spacing: inherit;
}

/* Banner Hero Responsive Styles */
#hero-title {
    display: block !important;         /* Override Arcana's inline-block on h2 */
    font-size: clamp(2.2em, 8vw, 4em) !important;
    text-align: left;
    font-weight: 800;
    color: #3b3b3b;
    line-height: 1.2 !important;      /* Explicit — not inherited */
    letter-spacing: 2px;
    margin: 0 0 20px 0 !important;
}

#hero-subtitle {
    font-size: clamp(1em, 2vw, 1.15em) !important;
    line-height: 1.8;
    color: #666;
    margin-top: 30px !important; /* Clear space from title */
    text-align: left;
    max-width: 520px;
}

#banner .banner-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

#banner header {
    flex: 1 1 0;
    min-width: 0;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 10;
}

.orbit-wrap {
    flex: 0 0 auto;
    width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

@media screen and (max-width: 980px) {
    #banner {
        padding: 60px 0 40px 0 !important;
    }
    #banner .banner-inner {
        display: block !important;
        text-align: center !important;
    }
    #banner header {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 0 30px 0 !important;
        z-index: 100 !important;
        position: relative !important;
    }
    .orbit-wrap {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 auto !important;
        z-index: 1 !important;
        overflow: hidden !important;
    }
    /* Shrink orbit container to fit nicely below content */
    .orbit-container {
        width: 260px !important;
        height: 260px !important;
        transform: none !important;
        margin: 0 auto !important;
    }
    #hero-title {
        text-align: center !important;
        margin-bottom: 15px !important;
        font-size: clamp(2em, 9vw, 3em) !important;
    }
    #hero-subtitle {
        text-align: center !important;
        margin: 20px auto !important;
        max-width: 90% !important;
        padding: 0 !important;
    }
    #hero-badge {
        margin: 0 auto 20px auto !important;
    }
    #hero-buttons {
        justify-content: center !important;
    }
    #hero-buttons .button {
        width: auto !important;
        min-width: 200px !important;
    }
    #hero-stats {
        justify-content: center !important;
    }
}

/* Very small phones */
@media screen and (max-width: 480px) {
    #banner {
        padding: 40px 0 30px 0 !important;
    }
    #hero-title {
        font-size: clamp(1.8em, 10vw, 2.5em) !important;
    }
    /* Hide orbit on very small screens to save vertical space */
    .orbit-wrap {
        display: none !important;
    }
    #hero-stats {
        gap: 20px !important;
    }
}



/* Box & Cards */
.box {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
    border-color: rgba(46, 125, 50, 0.2);
}

.box h3 {
    color: var(--primary-color);
    font-weight: 700;
}
.box p {
    color: var(--text-muted);
    line-height: 1.6;
}
.box i.icon {
    color: var(--primary-color) !important;
    background: var(--bg-alt);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    line-height: 60px;
    font-size: 1.5em;
    margin-bottom: 20px;
}

/* Wrapper Styles */
.wrapper.style1 { background: var(--bg-light); }
.wrapper.style2 { background: #f8fcf8; } /* Slight green tint */
.wrapper.style3 { background: #f1f8e9; } 

/* Fixes for internal page text */
.wrapper h2, .wrapper h3 {
    color: var(--primary-color) !important;
    font-weight: 700;
}
.wrapper p {
    color: var(--text-muted) !important;
}

/* Main Content Text Fixes for Solutions and About */
ul, li {
    color: var(--text-muted);
}
strong {
    color: var(--text-main);
}

/* Footer improvements */
#footer {
    background: #f1f8e9; /* Light sustainable background */
    border-top: 1px solid rgba(46, 125, 50, 0.1);
    padding: 60px 0;
}
#footer h3 {
    color: var(--primary-color);
}
#footer ul.links li a {
    color: var(--text-muted);
}
#footer ul.links li a:hover {
    color: var(--secondary-color);
}
.icons li a {
    color: var(--primary-color) !important;
}
.icons li a:hover {
    color: var(--secondary-color) !important;
}
.copyright .menu li {
    color: var(--text-muted);
}

/* Make body fully block Arcana's dark backgrounds */
#page-wrapper {
    background: transparent;
}

/* Orbit Animations ported from Kimi */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes spin-slow-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(46, 125, 50, 0.4); transform: scale(1); }
    50% { box-shadow: 0 0 40px rgba(46, 125, 50, 0.8); transform: scale(1.05); }
}

.orbit-container {
    position: relative;
    width: 480px;
    height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

@media screen and (max-width: 980px) {
    .orbit-center {
        width: 60px !important;
        height: 60px !important;
    }
    .orbit-center i {
        font-size: 1.4em !important;
    }
    .orbit-ring-1 { width: 120px !important; height: 120px !important; border-width: 1px !important; }
    .orbit-ring-2 { width: 190px !important; height: 190px !important; border-width: 1px !important; }
    .orbit-ring-3 { width: 260px !important; height: 260px !important; border-width: 1px !important; }
    .orbit-icon-wrapper-1, .orbit-icon-wrapper-2, .orbit-icon-wrapper-3 {
        width: 150px !important;
        height: 150px !important;
    }
    .orbit-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }
}

.orbit-center {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-glow 3s infinite;
    z-index: 10;
}

.orbit-center i {
    font-size: 2.5em;
    color: white;
}

.orbit-ring-1 {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.4);
    animation: spin-slow 20s linear infinite;
}

.orbit-ring-2 {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    animation: spin-slow-reverse 30s linear infinite;
}

.orbit-icon-wrapper-1 {
    position: absolute;
    width: 260px;
    height: 260px;
    animation: spin-slow 15s linear infinite;
}
.orbit-icon-wrapper-2 {
    position: absolute;
    width: 260px;
    height: 260px;
    animation: spin-slow-reverse 20s linear infinite;
}
.orbit-icon-wrapper-3 {
    position: absolute;
    width: 260px;
    height: 260px;
    animation: spin-slow 25s linear infinite;
}

.orbit-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.icon-top { top: -25px; left: 50%; transform: translateX(-50%); }
.icon-right { top: 50%; right: -25px; transform: translateY(-50%); }
.icon-bottom { bottom: -25px; left: 50%; transform: translateX(-50%); }

/* Grain overlay exactly from Kimi */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Responsive fixes for English texts */
body.lang-en #hero-title {
    font-size: clamp(1.8em, 7.5vw, 3.5rem) !important;
}

@media screen and (max-width: 480px) {
    body.lang-en #hero-title {
        font-size: clamp(1.6em, 9vw, 2.2em) !important;
    }
}
