@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* ── Per-product grid tint ────────────────────────────────────────
   Same hex-tile geometry, recolored with the mineral's own accent.
   SVG fills can't read CSS vars, so the hex value is hardcoded here
   to match --mineral-accent above — keep the two in sync per theme. */

/* Coal - accent: ember orange (#FF6B35) */
body.theme-coal {
    --bg-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cg fill='none' stroke='%23FF6B35' stroke-width='1'%3E%3Cpath d='M28 0 56 16 56 48 28 64 0 48 0 16Z'/%3E%3Cpath d='M28 64 56 80 56 97'/%3E%3Cpath d='M28 64 0 80 0 97'/%3E%3C/g%3E%3C/svg%3E");
}

/* Calcium carbonate - accent: warm taupe (#B8A98C) */
body.theme-calcite {
    --bg-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cg fill='none' stroke='%23B8A98C' stroke-width='1'%3E%3Cpath d='M28 0 56 16 56 48 28 64 0 48 0 16Z'/%3E%3Cpath d='M28 64 56 80 56 97'/%3E%3Cpath d='M28 64 0 80 0 97'/%3E%3C/g%3E%3C/svg%3E");
}


:root {
    --primary-navy: #0B192C;
    --secondary-white: #FFFFFF;
    --accent-gray: #F3F4F6;
    --transition-speed: 0.3s;

    /* Mineral theme tokens — override these four per product page
       to re-skin the card, tag and glow for a different mineral. */
    --mineral-accent: #FF6B35;              /* ember orange — coal's combustion color */
    --mineral-accent-soft: #FFE8DC;         /* pale tint of the accent, for tag backgrounds */
    --mineral-glow: rgba(255, 107, 53, 0.35);  /* used by the load-in glow pulse */
    --mineral-shadow: rgba(11, 25, 44, 0.16);  /* card / image shadow, tinted navy */
    --card-radius: 14px;
    --pop-duration: 0.6s;
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --transition-speed: 0.01ms;
        --pop-duration: 0.01ms;
    }
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--secondary-white);
    color: var(--primary-navy);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

.navbar {
    position: fixed;
    top: 0;
    font-family: 'Montserrat', sans-serif;
    width: 100%;
    background-color: var(--secondary-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-navy);
}

.desktop-menu {
    display: none;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.desktop-menu a {
    font-weight: 600;
    font-size: 1rem;
    transition: color var(--transition-speed) ease;
}

.desktop-menu a:hover {
    color: #3b5998;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--secondary-white);
    list-style: none;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 1rem 0;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-weight: 400;
}

.dropdown-menu li a:hover {
    background-color: var(--accent-gray);
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    font-family: 'Montserrat', sans-serif ;
    cursor: pointer;
    z-index: 1001;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary-navy);
    transition: all var(--transition-speed) ease;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--secondary-white);
}
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--secondary-white);
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--primary-navy);
    color: var(--secondary-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
    z-index: 999;
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-links {
    list-style: none;
    width: 100%;
    text-align: center;
}

.mobile-links > li {
    margin: 1.5rem 0;
}

.mobile-links a, .accordion-toggle {
    font-size: 1.2em;
    font-weight: 500;
}

/* Mobile Accordion (Fancy term for mobile wala content) */
.accordion-toggle {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
}

.accordion-content {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed) ease-out;
}

.accordion-content li {
    margin: 1rem 0;
}

.accordion-content a {
    font-size: 1.1rem;
    font-weight: 400;
    color: #a0aec0;
}


.main {
    display:flex;
    flex-direction: row;
    gap: 2rem;
    max-width: 1200px;
    background-color: var(--secondary-white);
    padding: 2rem;
    box-shadow: 0 10px 26px rgba(3, 7, 20, 0.726);
    border-radius: var(--card-radius);
    margin: 18rem auto 3rem;
    align-items: flex-start;
}

.lhs {
    width: 45%;
    padding-right: 1.5rem;
    display: flex;
    justify-content: center;
}

.rhs {
    width: 55%;
    padding-left: 1.5rem;
}

/* Wraps the product image so the ember-glow pulse has something
   to sit behind without disturbing the image's own box-shadow. */
.image-frame {
    position: relative;
    width: 100%;
    max-width: 480px;
    display: flex;
    justify-content: center;
}

.image-frame::before {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: calc(var(--card-radius) + 12px);
    background: radial-gradient(circle, var(--mineral-glow) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0.7);
    animation: emberPulse var(--pop-duration) cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
    z-index: 0;
    pointer-events: none;
}

.product-image {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    height: auto;
    border-radius: var(--card-radius);
    box-shadow: 0 10px 26px var(--mineral-shadow);
    object-fit: cover;
    opacity: 0;
    transform: scale(0.85) translateY(18px);
    animation: popIn var(--pop-duration) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Small pill that names the rock/mineral classification —
   real taxonomy, not decoration. */
.mineral-tag {
    display: inline-block;
    padding: 0.3rem 0.9rem;
    margin-bottom: 0.75rem;
    border-radius: 999px;
    background-color: var(--mineral-accent-soft);
    color: var(--mineral-accent);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0;
    animation: popIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}

.product-title {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0;
    animation: popIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.product-description,
.product-uses,
.chemical-composition {
    margin-bottom: 0.75rem;
    color: #233448;
    opacity: 0;
    animation: popIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.product-description { animation-delay: 0.25s; }
.product-uses { animation-delay: 0.35s; }
.chemical-composition { animation-delay: 0.45s; }

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(18px);
    }
    60% {
        opacity: 1;
        transform: scale(1.03) translateY(-3px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes emberPulse {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }
    50% {
        opacity: 1;
        transform: scale(1.08);
    }
    100% {
        opacity: 0;
        transform: scale(1.35);
    }
}

/* Responsive: stack columns on smaller screens */
@media (max-width: 768px) {
    .main {
        flex-direction: column;
        margin: 10.5rem 1rem 2rem;
        padding: 1rem;
    }

    .lhs, .rhs {
        width: 100%;
        padding: 0;
    }

    .lhs {
        margin-bottom: 1rem;
    }

    .product-title {
        font-size: 1.6rem;
    }
}
body {
    position: relative;
    isolation: isolate;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background-image: var(--bg-grid);
    background-repeat: repeat;
    opacity: 0.5;
}

.bg-aurora {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}

.bg-aurora::before,
.bg-aurora::after {
    content: "";
    position: absolute;
    width: 60vmax;
    height: 60vmax;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
}

.bg-aurora::before {
    top: -20vmax;
    left: -15vmax;
    background: radial-gradient(circle, var(--mineral-accent) 0%, transparent 70%);
    animation: drift1 26s ease-in-out infinite alternate;
}

.bg-aurora::after {
    bottom: -25vmax;
    right: -15vmax;
    background: radial-gradient(circle, var(--mineral-glow) 0%, transparent 70%);
    animation: drift2 32s ease-in-out infinite alternate;
}

@keyframes drift1 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(8vmax, 6vmax) scale(1.15); }
}

@keyframes drift2 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-6vmax, -8vmax) scale(1.1); }
}

/* Layer 3 — slow scanline sweep, like the page is being "read" */
.bg-scanline {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.bg-scanline::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--mineral-accent), transparent);
    opacity: 0.5;
    animation: scan 7s linear infinite;
}

@keyframes scan {
    0%   { top: -2px; }
    100% { top: 100%; }
}

/* Layer 4 — ambient particle canvas, populated by tsParticles in-page;
   this just reserves the stacking slot behind the content card */
#mineral-particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .bg-aurora::before,
    .bg-aurora::after,
    .bg-scanline::before {
        animation: none;
    }
}
