@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    --primary-color: #e2c073; /* Antique gold */
    --primary-color-dark: #b5952f;
    --bg-dark: #0f0a18; /* Deep mystical purple/black */
    --bg-card: #1f162c; /* Opaque solid color to stop lag */
    --text-main: #e0d8ea;
    --text-muted: #a39eb5;
    --accent: #8b5cf6; /* magical purple */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.25rem;
    line-height: 1.8;
    min-height: 100vh;
    margin: 0;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, #brand, #brander {
    font-family: 'Cinzel Decorative', cursive;
    color: var(--primary-color);
    text-shadow: 0 0 15px rgba(226, 192, 115, 0.2);
    font-weight: 400;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--accent) !important;
}

.text-bg-primary, .badge.bg-warning {
    background: linear-gradient(135deg, #302416, #161109) !important;
    border: 1px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

.badge.text-bg-dark {
    background: var(--bg-card) !important;
    border: 1px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
}

/* Optimized mystical cards (no backdrop blur) */
.bg-light, .bg-white, .card, footer {
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
    border: 1px solid rgba(226, 192, 115, 0.15) !important;
}

.text-dark, .text-muted {
    color: var(--text-muted) !important;
}

/* Better text contrast for readability */
.text-white, strong, b {
    color: #fff;
}
p, .card-text, .fs-5, td {
    color: #f0ebf5;
    line-height: 1.8;
}

a.text-dark {
    color: var(--primary-color) !important;
}

/* Pricing tables */
table td {
    padding: 10px 5px;
    border-bottom: 1px solid rgba(226, 192, 115, 0.1);
}

/* Message generator buttons */
.msg-btn {
    background: rgba(226, 192, 115, 0.08);
    border: 1px solid rgba(226, 192, 115, 0.35);
    color: var(--primary-color);
    font-size: 1.1rem;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.msg-btn:hover {
    background: rgba(226, 192, 115, 0.2);
    border-color: var(--primary-color);
    color: #fff;
}
.msg-btn-active {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #111 !important;
    font-weight: 600;
}

/* ======= MODERN THEME OVERRIDE ======= */
.btn-primary, .btn-primary-dark {
    background: linear-gradient(135deg, #2a164a, #160f29) !important;
    color: var(--primary-color) !important;
    border: 1px solid var(--primary-color) !important;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(226, 192, 115, 0.1);
    transition: 0.5s;
}

.btn-primary-dark:hover, .btn-primary:hover {
    box-shadow: 0 8px 25px rgba(226, 192, 115, 0.3);
    transform: translateY(-2px);
    color: #fff !important;
}

/* Nav */
header > nav {
    background-color: rgba(15, 10, 24, 0.95) !important;
    border-bottom: 1px solid rgba(226, 192, 115, 0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}
/* Fix Hamburger Menu Icon for Dark Mode */
.navbar-toggler {
    border-color: rgba(226, 192, 115, 0.5) !important;
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28226, 192, 115, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}
.navButton {
    background: transparent !important;
    border: 1px solid transparent !important;
    transition: 0.3s !important;
    margin: 0 5px;
}
.navButton a {
    color: var(--text-main) !important;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
}
.navButton:hover {
    border-bottom: 1px solid var(--primary-color) !important;
}
.navButton:hover a {
    color: var(--primary-color) !important;
}

#brand, #brander { 
    color: var(--primary-color) !important; 
    font-size: 40px;
    white-space: nowrap;
    text-decoration: none;
}
@media (min-width: 992px) {
    #brand { font-size: 50px; transform: translateY(-10px); }
}

/* General Layout adjustments */
html {
    max-width: 1200px;
    margin: 0 auto;
}

.basic-article {
    animation: slideIn 0.8s ease-out forwards;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 30px 15px;
    padding: 50px 20px;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid rgba(226, 192, 115, 0.15);
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

/* Section spacing for clarity */
section {
    margin-bottom: 30px !important;
}
section .container {
    max-width: 1000px;
}

.basic-article > article, .basic-article > div {
    flex: 0 0 calc(50% - 24px);
    max-width: fit-content;
    margin: auto 0;
}

.img-wrapper {
    width: 600px;
    height: 400px;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(226, 192, 115, 0.2);
}
.img-wrapper-zoom:hover > img {
    transform: scale(1.05);
}
.img-wrapper img {
    transition: 0.8s ease-in-out;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.flex-row-reverse { flex-direction: row-reverse; }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 990px) {
    .basic-article { flex-direction: column-reverse !important; }
    .basic-article > * { flex: 1; max-width: 100%; margin: 0 auto; }
    .img-wrapper { width: 100%; height: 350px; }
}

/* Custom shadows */
.shadow-sm { box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important; }
.shadow { box-shadow: 0 8px 25px rgba(0,0,0,0.5) !important; }
.shadow-lg { box-shadow: 0 15px 35px rgba(0,0,0,0.7) !important; }

/* Invert SVG icons for esoteric look */
.card-body img[src$=".svg"], .p-5 img[src$=".svg"] {
    filter: invert(80%) sepia(20%) saturate(300%) hue-rotate(352deg) brightness(93%) contrast(87%);
}

/* Expander fixes */
#about_me {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.line-max {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 5em; 
    transition: max-height 0.8s ease-in-out; 
}
.line-max.expanded {
    max-height: 1000px !important;
}

/* Softer Marketing CTA Pulse */
@keyframes pulseCTA {
    0% { box-shadow: 0 0 0 0 rgba(226, 192, 115, 0.3); }
    50% { box-shadow: 0 0 0 15px rgba(226, 192, 115, 0); }
    100% { box-shadow: 0 0 0 0 rgba(226, 192, 115, 0); }
}

.btn-cta-marketing {
    background: linear-gradient(135deg, #2a164a, #160f29) !important;
    border: 1px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    font-family: 'Cinzel Decorative', cursive;
    font-weight: 400;
    font-size: 1.4rem;
    padding: 15px 35px;
    border-radius: 5px;
    letter-spacing: 2px;
    animation: pulseCTA 4s infinite;
    transition: all 0.5s ease;
    display: inline-block;
}
.btn-cta-marketing:hover {
    transform: translateY(-2px);
    color: #fff !important;
    box-shadow: 0 0 20px rgba(226, 192, 115, 0.4);
    text-decoration: none;
    border-color: #fff !important;
}

/* Marketing CTA Pulse - Softer */
@keyframes pulseCTA {
    0% { box-shadow: 0 0 0 0 rgba(226, 192, 115, 0.3); }
    50% { box-shadow: 0 0 0 10px rgba(226, 192, 115, 0); }
    100% { box-shadow: 0 0 0 0 rgba(226, 192, 115, 0); }
}

.btn-cta-marketing {
    background: linear-gradient(135deg, #302416, #161109) !important;
    border: 1px solid #e2c073;
    color: #e2c073 !important;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.3rem;
    padding: 12px 30px;
    border-radius: 5px; /* Ornate sharp edges instead of pills */
    letter-spacing: 2px;
    animation: pulseCTA 4s infinite;
    transition: all 0.5s ease;
    display: inline-block;
}
.btn-cta-marketing:hover {
    transform: translateY(-2px);
    color: #fff !important;
    box-shadow: 0 0 20px rgba(226, 192, 115, 0.4);
    text-decoration: none;
    border-color: #fff;
}

/* ======= MODERN THEME OVERRIDE ======= */
body.theme-modern {
    background-color: #f5f3f0 !important;
    color: #111 !important;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
/* Nuclear option: force ALL text black in light mode */
body.theme-modern * {
    color: #111 !important;
    text-shadow: none !important;
}

/* --- OVERRIDE INLINE DARK STYLES --- */
/* Hero section & Order section */
body.theme-modern section:first-of-type,
body.theme-modern #Order {
    background: #fff !important;
    border-color: rgba(0,0,0,0.08) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06) !important;
}

/* Remove radial gradients from background overlays */
body.theme-modern section:first-of-type > div.position-absolute,
body.theme-modern #Order > div.position-absolute {
    background: transparent !important;
}

/* The warning box in Order section */
body.theme-modern #Order > div > div.mx-auto.mt-4.p-4 {
    background: rgba(0,0,0,0.03) !important;
    border-color: rgba(0,0,0,0.08) !important;
}

/* Hero image wrapper */
body.theme-modern section:first-of-type .img-wrapper {
    border-color: rgba(0,0,0,0.1) !important;
    background: #f0f0f0 !important;
}

/* Message generator preview box */
body.theme-modern #msgPreview {
    background: rgba(124, 58, 237, 0.05) !important;
    border-color: rgba(124, 58, 237, 0.25) !important;
    color: #111 !important;
}
/* ---------------------------------- */

/* Exceptions - things that must keep their own color */
body.theme-modern .badge,
body.theme-modern .badge * {
    color: #fff !important;
    text-shadow: none !important;
}
body.theme-modern .text-primary,
body.theme-modern .text-primary * {
    color: #7c3aed !important;
}
body.theme-modern .btn-cta-marketing,
body.theme-modern .btn-cta-marketing * {
    color: #fff !important;
}
body.theme-modern .msg-btn { 
    color: #5b21b6 !important; 
    border-color: rgba(91,33,182,0.4) !important;
    background: rgba(91,33,182,0.06) !important;
}
body.theme-modern .msg-btn-active { 
    color: #111 !important; 
    background: #7c3aed !important;
    border-color: #7c3aed !important;
}
body.theme-modern a { color: #5b21b6 !important; }
body.theme-modern .text-muted { color: #555 !important; }
body.theme-modern .bg-light,
body.theme-modern .bg-white,
body.theme-modern .card,
body.theme-modern footer {
    background: #fff !important;
    color: #1a1a2e !important;
    border-color: rgba(0,0,0,0.08) !important;
}
body.theme-modern .text-dark,
body.theme-modern a.text-dark {
    color: #1a1a2e !important;
}
body.theme-modern header > nav {
    background: rgba(255,255,255,0.98) !important;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
/* Hamburger menu in light mode */
body.theme-modern .navbar-toggler {
    border-color: rgba(0,0,0,0.1) !important;
}
body.theme-modern .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.65%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}
body.theme-modern .navButton a { color: #1a1a2e !important; }
body.theme-modern .navButton:hover { border-color: #7c3aed !important; }
body.theme-modern .navButton:hover a { color: #7c3aed !important; }
body.theme-modern #brand,
body.theme-modern #brander {
    color: #1a1a2e !important;
    text-shadow: none;
}
body.theme-modern .basic-article {
    background: #fff !important;
    border-color: rgba(0,0,0,0.06) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06) !important;
}
body.theme-modern .btn-primary,
body.theme-modern .btn-primary-dark {
    background: linear-gradient(135deg, #7c3aed, #5b21b6) !important;
    color: #fff !important;
    border: none !important;
}
body.theme-modern .btn-cta-marketing {
    background: linear-gradient(135deg, #7c3aed, #5b21b6) !important;
    color: #fff !important;
    border: none !important;
    animation: pulseCTAModern 4s infinite;
}
@keyframes pulseCTAModern {
    0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.3); }
    50% { box-shadow: 0 0 0 12px rgba(124, 58, 237, 0); }
    100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
}
body.theme-modern .btn-outline-primary {
    border-color: #7c3aed !important;
    color: #7c3aed !important;
}
body.theme-modern .btn-outline-primary:hover {
    background: #7c3aed !important;
    color: #fff !important;
}
body.theme-modern .shadow-sm { box-shadow: 0 2px 10px rgba(0,0,0,0.06) !important; }
body.theme-modern .shadow { box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important; }
body.theme-modern .shadow-lg { box-shadow: 0 8px 30px rgba(0,0,0,0.1) !important; }
body.theme-modern .img-wrapper { box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important; border-color: rgba(0,0,0,0.08) !important; }
body.theme-modern .card-body img[src$=".svg"] {
    filter: none;
    opacity: 0.6;
}
/* Pricing table readable in light mode */
body.theme-modern table td { border-bottom: 1px solid #eee; padding: 8px 0; }