/* home.css */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
    --spice-box-shadow:                 rgba(201, 095, 046, 0.3);
    --locked-feature-background:        rgba(255, 243, 205, 0.3);
    --yellow:      rgba(255, 193, 7, 0.9);
    --white:       #fff;
    --cream:       #FAF7F2;
    --red:         #C0392B;
    --cream-dark:  #F0EBE1;
    --charcoal:    #1C1B19;
    --warm-mid:    #6B6560;
    --spice:       #C95F2E;
    --spice-deep:  #A34820;
    --spice-pale:  #FCEEE7;
    --sage:        #4A6741;
    --sage-pale:   #EBF1E8;

    --transition-speed: 0.4s;
    --animation-speed: 0.5s;
    --transition:  1.2s cubic-bezier(0.22, 1, 0.36, 1);
    --translateY-hover: translateY(-3px);
    --box-shadow: 0 8px 28px var(--spice-box-shadow);
    --spice-rgb: 201, 95, 46;
    --spice-pale-rgb: 252, 238, 231;

    /* Change Bootstrap's primary color to match our spice theme (for components that rely on it, like form controls) */
    --bs-primary-rgb: var(--spice-rgb) ;
}

/* ── Body ────────────────────────────────────── */
/* Bootstrap light-mode override for this page */
body {
    background-color: var(--cream) !important;
    color: var(--charcoal);
    overflow-x: hidden; /* Cleanly lock horizontal scrolling */
}

/* ── Navigation bar ────────────────────────────────────── */
/* Create a new class purely for the background */
.glass {
    background-color: rgba(var(--white-rgb), 0.5);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Dropdown Refinement */
.dropdown-menu {
    background-color: var(--cream);
    border: 1px solid var(--spice) !important;
    min-width: 200px;
    margin-top: 10px !important;
}

.dropdown-item {
    letter-spacing: 1px;
    padding: 8px 20px;
}

.dropdown-item:hover {
    background-color: var(--spice);
    color: var(--cream) !important;
}

.dropdown-toggle::after {
    vertical-align: middle;
    border-top: 0.2em solid;
    border-right: 0.2em solid transparent;
    border-left: 0.2em solid transparent;
    color: var(--spice);
}

/* ── Utility overrides ────────────────────────────────────── */
.text-spice         { color: var(--spice); }
.bg-spice           { background-color: var(--spice); }
.bg-cream           { background-color: var(--cream); }
.bg-cream-dark      { background-color: var(--cream-dark); }
.text-warm-mid      { color: var(--warm-mid); }
.border-spice       { border-color: var(--spice) !important; }

/* ── Animations ─────────────────────────────────────── */
@keyframes softPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.pulse-once {
    animation: softPulse 0.8s ease-in-out;
    animation-iteration-count: 1;
    animation-delay: 2s; /* Starts right after it reveals */
}
.pop {
    animation: scaleIn var(--animation-speed) cubic-bezier(0.165, 0.84, 0.44, 1.2) forwards;
}

/* ── Reveal animations ────────────────────────────────────── */
.reveal            { opacity: 0; transform: translateY(28px); transition: opacity var(--transition), transform var(--transition); }
.reveal-visible    { opacity: 1; transform: translateY(0); }
.reveal-left       { opacity: 0; transform: translateX(-40px); transition: opacity var(--transition), transform var(--transition); }
.reveal-right      { opacity: 0; transform: translateX(40px);  transition: opacity var(--transition), transform var(--transition); }
.reveal-visible-side { opacity: 1; transform: translate(0); }
.reveal-pop        { opacity: 0; transform: scale(0.88); transition: opacity 0.55s cubic-bezier(0.34,1.56,0.64,1), transform 0.55s cubic-bezier(0.34,1.56,0.64,1); }
.reveal-pop-visible { opacity: 1; transform: scale(1); }

/* ── Forms ──────────────────────────────────────────────────────────────────────────────────────── */
.form-control:focus {
    border-color: var(--spice-pale) !important; /* Changes the inner input border */
    /* Creates the smooth, semi-transparent brand halo (30% opacity) */
    box-shadow: 0 0 0 0.25rem rgba(var(--spice-pale-rgb), 0.3) !important; 
    /* Keeps the background consistent if Bootstrap tries to change it */
    background-color: var(--white); 
}

/* ── CTA buttons ──────────────────────────────────────────── */
.btn-coolsine-primary {
    background: var(--spice);
    color: var(--white);
    border: 1.5px solid var(--spice);
    transition: all var(--ss-transition-speed) ease;
}
.btn-coolsine-primary:hover {
    background: transparent;
    color: var(--spice);
    border: 1.5px solid var(--spice);
}
.btn-coolsine-primary:active, 
.btn-coolsine-primary:focus, 
.btn-coolsine-primary:focus-visible {
    background-color: var(--spice-deep) !important;
    border-color: var(--spice-deep) !important;
    color: var(--white) !important;
}

.btn-coolsine-primary-outline {
    background: transparent;
    color: var(--spice);
    border: 1.5px solid var(--spice);
    transition: all var(--ss-transition-speed) ease;
}
.btn-coolsine-primary-outline:hover {
    background: var(--spice);
    color: var(--white);
}
.btn-coolsine-primary-outline:active, 
.btn-coolsine-primary-outline:focus, 
.btn-coolsine-primary-outline:focus-visible {
    background-color: var(--spice-deep) !important;
    border-color: var(--spice-deep) !important;
    color: var(--white) !important;
    box-shadow: var(--box-shadow) !important;
    transform: translateY(0); /* Snaps down slightly to feel mechanical */
}
.btn-coolsine-primary:disabled,
.btn-coolsine-primary.disabled {
    background-color: var(--spice-deep) !important;
    border-color: var(--spice-deep) !important;
    color: var(--white) !important;
    opacity: 0.5 !important;
    pointer-events: auto !important;
    cursor:  not-allowed !important; 
    transform: none !important;
    box-shadow: none !important;
}

.btn-bright {
    background: var(--spice-pale);
    color: var(--spice-deep);
    border: none;
    transition: all var(--ss-transition-speed) ease;
}
.btn-bright:hover {
    background: var(--spice-deep);
    color: var(--white);
    box-shadow: var(--box-shadow);
}
.btn-bright:active, 
.btn-bright:focus, 
.btn-bright:focus-visible {
    background-color: var(--spice-deep) !important;
    border-color: var(--spice-deep) !important;
    color: var(--white) !important;
    box-shadow: var(--box-shadow) !important;
}

.btn-check:checked + .btn-coolsine-primary-outline {
    background-color: var(--spice) !important;
    border-color: var(--spice) !important;
    color: var(--white) !important;
}
.btn-check:focus + .btn-coolsine-primary-outline {
    border-color: var(--spice) !important;
    box-shadow: var(--box-shadow) !important;
}

/* ── Badges ────────────────────────────────────────────────────────────────────────────────────────────────── */
.badge-spice {
    background: var(--spice);
    color: var(--white);
}

.badge-success {
    background: var(--bs-success-bg-subtle);
    color: var(--bs-success);
}

/* ── Links ────────────────────────────────────────────────────────────────────────────────────────────────── */
/* Base class for the link */
.link-coolsine {
    text-decoration: none;
    color: var(--spice);
    /* link-underline-opacity-0: Hide the underline initially */
    text-decoration-color: var(--spice);
    transition: all var(--ss-transition-speed) ease;
}
/* Hover state behavior */
.link-coolsine:hover {
    color: var(--spice);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--spice);
}
.link-coolsine:active {
    color: var(--spice-deep) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--spice-deep);
}

/* ── Cards ────────────────────────────────────────────────────────────────────────────────────────────────── */
.card-coolsine {
    background: var(--white);
    border: 1px solid var(--spice);
    box-shadow: var(--box-shadow);
}
.card-coolsine .card-header {
    background-color: var(--spice);
    color: var(--white);
}

/* ── Checkboxes ────────────────────────────────────────────────────────────────────────────────────────────────── */
/* 1. Base State: Subtle border color */
.form-check-input {
    border-color: var(--cream-dark);
}
/* 2. Checked State: Fill background */
.form-check-input:checked {
    background-color: var(--spice);
    border-color: var(--spice);
}
/* 3. Focus State: Match the glow ring */
.form-check-input:focus {
    border-color: var(--spice-pale);
    box-shadow: 0 0 0 0.25rem rgba(var(--spice-rgb), 0.3);
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { background: var(--charcoal); color: rgba(255,255,255,0.55); }
.site-footer a { color: rgba(255,255,255,0.55); text-decoration: none; transition: all var(--ss-transition-speed) ease; }
.site-footer a:hover { color: #fff; }
.footer-brand { color: #fff; }
.social-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    display: inline-flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.6);
    transition: all var(--ss-transition-speed) ease;
    text-decoration: none;
}
.social-btn:hover { background: var(--spice); color: #fff; border-color: var(--spice); }

/* ── Divider ornament ─────────────────────────────────────── */
.ornament {
    text-align: center;
    color: var(--cream-dark);
    letter-spacing: 0.5rem;
    margin: 0;
    padding: 2rem 0;
}

/* Social link in base (keep compatible) */
.social-link {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6); text-decoration: none;
    transition: all var(--ss-transition-speed) ease;
}
.social-link:hover { background: var(--spice); color: #fff; }

/* ── Touch Action ─────────────────────────────────────── */
.disable-zoom-tap {
    touch-action: manipulation;
}

/* Apply this to cards when trial is ended */
.locked-feature-bg {
    background: var(--locked-feature-background);
    backdrop-filter: blur(4px);
    border: 1px solid var(--yellow);
}

/* Apply this to the very last data row when trial is ended */
.trial-cutoff {
    mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    opacity: 0.6;
}