/* ==========================================================================
   Memorial Tribute Website — Design System
   Inspired by ForeverMissed.com
   ========================================================================== */

/* --- CSS Custom Properties --- */
:root {
    --color-navy: #1a2332;
    --color-charcoal: #2c3e50;
    --color-dark: #1e2a3a;
    --color-gold: #c9a96e;
    --color-gold-light: #d4b87a;
    --color-gold-dark: #b8944f;
    --color-white: #ffffff;
    --color-warm-white: #fefefe;
    --color-cream: #f8f6f3;
    --color-gray-100: #f5f3f0;
    --color-gray-200: #e8e4df;
    --color-gray-300: #d4d0cb;
    --color-gray-400: #a09b94;
    --color-gray-500: #7a7570;
    --color-gray-600: #5a6677;
    --color-gray-700: #3d4a5c;
    --color-error: #c0392b;
    --color-error-bg: #fdf0ef;
    --color-success: #27ae60;
    --color-success-bg: #eafaf1;

    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 50%;

    --transition: 0.3s ease;
    --max-width: 1100px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-gray-600);
    background-color: var(--color-cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: var(--color-gold);
    text-decoration: none;
}

/* --- Skip Link --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--color-navy);
    color: var(--color-white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    z-index: 9999;
    font-weight: 500;
}

.skip-link:focus {
    top: 1rem;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-charcoal) 50%, var(--color-dark) 100%);
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201, 169, 110, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(201, 169, 110, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 3rem 1.5rem;
    max-width: 700px;
}

.hero__photo-frame {
    margin: 0 auto 1.5rem;
    width: 160px;
    height: 160px;
    border-radius: var(--radius-full);
    border: 3px solid var(--color-gold);
    padding: 3px;
    box-shadow: 0 0 30px rgba(201, 169, 110, 0.2);
}

.hero__photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-charcoal), var(--color-navy));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: var(--radius-full);
}
}

.hero__initials {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-gold);
    letter-spacing: 0.05em;
}

.hero__name {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.hero__dates {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    color: var(--color-gray-300);
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.hero__epitaph {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--color-gold-light);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.9;
}

/* ==========================================================================
   TABS NAVIGATION
   ========================================================================== */
.tabs {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: var(--color-warm-white);
    border-bottom: 1px solid var(--color-gray-200);
    box-shadow: var(--shadow-sm);
}

.tabs__btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-gray-500);
    border-radius: 100px;
    transition: all var(--transition);
    background: transparent;
    border: 1px solid transparent;
}

.tabs__btn:hover {
    color: var(--color-charcoal);
    background: var(--color-gray-100);
}

.tabs__btn:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

.tabs__btn--active {
    color: var(--color-navy);
    background: var(--color-cream);
    border-color: var(--color-gray-200);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.tabs__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ==========================================================================
   MAIN CONTENT & PANELS
   ========================================================================== */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.panel--active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: 1.5rem;
}

/* --- Loading & Error States --- */
.panel__loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-gray-500);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--color-gray-200);
    border-top-color: var(--color-gold);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.panel__error {
    padding: 2rem 0;
}

.error-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--color-error-bg);
    border: 1px solid rgba(192, 57, 43, 0.15);
    border-radius: var(--radius-lg);
}

.error-card__icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}

.error-card__message {
    color: var(--color-error);
    font-weight: 500;
    margin-bottom: 1rem;
}

/* ==========================================================================
   ABOUT PANEL
   ========================================================================== */
.about {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .about {
        grid-template-columns: 1fr 280px;
    }
}

.about__biography-section {
    min-width: 0;
}

.about__biography {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--color-gray-700);
}

.about__biography p {
    margin-bottom: 1.25rem;
}

.about__biography p:last-child {
    margin-bottom: 0;
}

.about__sidebar {
    position: relative;
}

.about__life-details {
    background: var(--color-warm-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.about__sidebar-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-gold);
}

.about__details-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about__detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.about__detail-item dt {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-gray-500);
}

.about__detail-item dd {
    font-size: 0.95rem;
    color: var(--color-gray-700);
    font-weight: 500;
}

/* ==========================================================================
   TRIBUTES PANEL
   ========================================================================== */
.tributes__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tributes__list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* --- Tribute Card --- */
.tribute-card {
    background: var(--color-warm-white);
    border: 1px solid var(--color-gray-200);
    border-left: 4px solid var(--color-gold);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}

.tribute-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.tribute-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tribute-card__author {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-navy);
}

.tribute-card__date {
    font-size: 0.82rem;
    color: var(--color-gray-400);
    font-weight: 400;
}

.tribute-card__message {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--color-gray-600);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.tribute-card__photo {
    margin-top: 1rem;
    border-radius: var(--radius-md);
    max-height: 300px;
    object-fit: cover;
    width: 100%;
}

.tribute-card__photo-placeholder {
    margin-top: 1rem;
    padding: 2rem;
    background: var(--color-gray-100);
    border: 1px dashed var(--color-gray-300);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--color-gray-400);
    font-size: 0.85rem;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
    background: var(--color-warm-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
}

.empty-state__icon {
    margin-bottom: 1.25rem;
    opacity: 0.7;
}

.empty-state__title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
}

.empty-state__subtitle {
    font-size: 0.95rem;
    color: var(--color-gray-500);
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   TRIBUTE FORM
   ========================================================================== */
.tribute-form-wrapper {
    margin-top: 2rem;
}

.tribute-form-card {
    background: var(--color-warm-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.tribute-form-card__title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: 0.35rem;
}

.tribute-form-card__subtitle {
    font-size: 0.9rem;
    color: var(--color-gray-500);
    margin-bottom: 2rem;
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-gray-700);
    margin-bottom: 0.4rem;
}

.form-required {
    color: var(--color-gold);
}

.form-optional {
    font-weight: 400;
    color: var(--color-gray-400);
    font-size: 0.85rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    color: var(--color-gray-700);
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    transition: border-color var(--transition), box-shadow var(--transition);
    line-height: 1.5;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

.form-input[aria-invalid="true"],
.form-textarea[aria-invalid="true"] {
    border-color: var(--color-error);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.08);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.35rem;
}

.form-help {
    font-size: 0.8rem;
    color: var(--color-gray-400);
    margin-top: 0.3rem;
    display: block;
}

.form-counter {
    font-size: 0.8rem;
    color: var(--color-gray-400);
}

.form-field-error {
    font-size: 0.82rem;
    color: var(--color-error);
    margin-top: 0.35rem;
    display: block;
}

/* File Upload */
.form-file {
    position: relative;
}

.form-file__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.form-file__label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px dashed var(--color-gray-200);
    border-radius: var(--radius-md);
    color: var(--color-gray-500);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
}

.form-file__label:hover {
    border-color: var(--color-gold);
    background: rgba(201, 169, 110, 0.03);
}

.form-file__input:focus + .form-file__label {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

/* Form Errors Summary */
.form-errors {
    background: var(--color-error-bg);
    border: 1px solid rgba(192, 57, 43, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.form-errors p {
    color: var(--color-error);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.form-errors ul {
    list-style: none;
    padding: 0;
}

.form-errors ul li {
    color: var(--color-error);
    font-size: 0.85rem;
    padding: 0.2rem 0;
    padding-left: 1rem;
    position: relative;
}

.form-errors ul li::before {
    content: "•";
    position: absolute;
    left: 0;
}

/* Form Actions */
.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

/* --- Tribute Success --- */
.tribute-success {
    text-align: center;
    padding: 2rem 1rem;
}

.tribute-success__icon {
    margin-bottom: 1rem;
}

.success-circle {
    stroke-dasharray: 160;
    stroke-dashoffset: 160;
    animation: strokeCircle 0.6s ease forwards;
}

.success-check {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: strokeCheck 0.4s ease 0.4s forwards;
}

@keyframes strokeCircle {
    to { stroke-dashoffset: 0; }
}

@keyframes strokeCheck {
    to { stroke-dashoffset: 0; }
}

.tribute-success__title {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
}

.tribute-success__text {
    font-size: 0.95rem;
    color: var(--color-gray-500);
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   GALLERY PANEL
   ========================================================================== */
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery__item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.gallery__item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.gallery__item:focus-visible {
    outline: 3px solid var(--color-gold);
    outline-offset: 2px;
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery__item-placeholder {
    width: 100%;
    height: 100%;
    background: var(--color-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray-400);
    font-size: 0.82rem;
}

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox[hidden] {
    display: none;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
}

.lightbox__image {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 3;
    color: var(--color-white);
    font-size: 2rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    transition: background var(--transition);
}

.lightbox__close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    color: var(--color-white);
    font-size: 2.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    transition: background var(--transition);
}

.lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav--prev {
    left: 1.5rem;
}

.lightbox__nav--next {
    right: 1.5rem;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn--primary {
    background: var(--color-gold);
    color: var(--color-white);
    box-shadow: 0 2px 8px rgba(201, 169, 110, 0.3);
}

.btn--primary:hover {
    background: var(--color-gold-dark);
    box-shadow: 0 4px 16px rgba(201, 169, 110, 0.4);
    transform: translateY(-1px);
}

.btn--primary:active {
    transform: translateY(0);
}

.btn--outline {
    background: transparent;
    color: var(--color-gold);
    border: 1.5px solid var(--color-gold);
}

.btn--outline:hover {
    background: rgba(201, 169, 110, 0.08);
}

.btn--ghost {
    background: transparent;
    color: var(--color-gray-500);
    padding: 0.7rem 1rem;
}

.btn--ghost:hover {
    color: var(--color-gray-700);
    background: var(--color-gray-100);
}

.btn--lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn__spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--color-white);
    border-radius: var(--radius-full);
    animation: spin 0.7s linear infinite;
}

.btn__spinner[hidden] {
    display: none;
}

.btn:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background: var(--color-navy);
    color: var(--color-gray-300);
    padding: 3rem 1.5rem;
    text-align: center;
    margin-top: 2rem;
}

.footer__inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer__message {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--color-gold-light);
    margin-bottom: 1rem;
}

.footer__divider {
    width: 40px;
    height: 1px;
    background: var(--color-gold);
    margin: 0 auto 1rem;
    opacity: 0.5;
}

.footer__sub {
    font-size: 0.85rem;
    color: var(--color-gray-400);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 767px) {
    .hero {
        min-height: 350px;
    }

    .hero__content {
        padding: 2.5rem 1rem;
    }

    .hero__photo-frame {
        width: 130px;
        height: 130px;
    }

    .hero__initials {
        font-size: 1.5rem;
    }

    .tabs {
        gap: 0.125rem;
        padding: 0.5rem 0.5rem;
    }

    .tabs__btn {
        padding: 0.6rem 1rem;
        font-size: 0.82rem;
    }

    .tabs__icon {
        display: none;
    }

    .main-content {
        padding: 1.5rem 1rem 3rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .tribute-form-card {
        padding: 1.5rem;
    }

    .tributes__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .gallery__grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.5rem;
    }

    .lightbox__nav {
        width: 40px;
        height: 40px;
        font-size: 1.8rem;
    }

    .lightbox__nav--prev {
        left: 0.75rem;
    }

    .lightbox__nav--next {
        right: 0.75rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .gallery__grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* --- Print --- */
@media print {
    .tabs, .lightbox, .tribute-form-wrapper, .btn {
        display: none !important;
    }

    .panel {
        display: block !important;
    }

    .hero {
        background: none;
        color: #000;
        min-height: auto;
        padding: 1rem;
    }

    .hero__name, .hero__dates {
        color: #000;
    }
}

/* ==========================================================================
   ANIMATED CANDLE
   ========================================================================== */
.hero__candle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: center;
}

.hero__candle--left {
    left: 2.5rem;
}

.hero__candle--right {
    right: 2.5rem;
}

@media (max-width: 767px) {
    .hero__candle--left {
        left: 0.75rem;
    }
    .hero__candle--right {
        right: 0.75rem;
    }
    .candle__body {
        height: 35px;
        width: 12px;
    }
    .candle__flame {
        width: 10px;
        height: 20px;
    }
}

.candle {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.candle__body {
    width: 16px;
    height: 50px;
    background: linear-gradient(180deg, #f5e6c8 0%, #e8d5a8 50%, #d4c08a 100%);
    border-radius: 3px 3px 4px 4px;
    box-shadow: inset -2px 0 4px rgba(0,0,0,0.1);
}

.candle__wick {
    width: 2px;
    height: 10px;
    background: #333;
    border-radius: 1px;
}

.candle__flame {
    position: relative;
    width: 14px;
    height: 28px;
    margin-bottom: -2px;
    animation: flicker 3s ease-in-out infinite alternate;
}

.candle__flame-inner {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 90%, #fff 0%, #ffdd57 25%, #ff9500 50%, #ff6600 75%, transparent 100%);
    border-radius: 50% 50% 35% 35% / 70% 70% 30% 30%;
    filter: blur(0.5px);
    animation: flameDance 2s ease-in-out infinite alternate;
}

.candle__glow {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255, 200, 50, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: glow 4s ease-in-out infinite alternate;
}

@keyframes flicker {
    0%, 100% { transform: scaleY(1) rotate(0deg); }
    25% { transform: scaleY(1.05) rotate(-1deg); }
    50% { transform: scaleY(0.95) rotate(1deg); }
    75% { transform: scaleY(1.02) rotate(-0.5deg); }
}

@keyframes flameDance {
    0% { transform: skewX(0deg) scaleX(1); }
    25% { transform: skewX(-2deg) scaleX(0.95); }
    50% { transform: skewX(1deg) scaleX(1.02); }
    75% { transform: skewX(-1deg) scaleX(0.98); }
    100% { transform: skewX(0.5deg) scaleX(1); }
}

@keyframes glow {
    0% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    100% { opacity: 0.9; transform: translateX(-50%) scale(1.1); }
}

/* ==========================================================================
   MUSIC PLAYER
   ========================================================================== */
.music-player {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--color-navy);
    padding: 0.6rem 1rem 0.6rem 0.6rem;
    border-radius: 100px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(201, 169, 110, 0.3);
    transition: all var(--transition);
}

.music-player:hover {
    box-shadow: var(--shadow-xl);
    border-color: var(--color-gold);
}

.music-player__btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--color-gold);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}

.music-player__btn:hover {
    background: var(--color-gold-dark);
    transform: scale(1.05);
}

.music-player__btn:focus-visible {
    outline: 2px solid var(--color-gold-light);
    outline-offset: 2px;
}

.music-player__icon--pause[hidden] {
    display: none;
}

.music-player__label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-gray-300);
    white-space: nowrap;
}

.music-player--playing .music-player__btn {
    animation: pulse-soft 2s ease-in-out infinite;
}

@keyframes pulse-soft {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 169, 110, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(201, 169, 110, 0); }
}

@media (max-width: 767px) {
    .music-player {
        bottom: 1rem;
        right: 1rem;
        padding: 0.5rem 0.85rem 0.5rem 0.5rem;
    }

    .music-player__btn {
        width: 32px;
        height: 32px;
    }

    .music-player__label {
        font-size: 0.75rem;
    }
}
