/* ═══════════════════════════════════════
   HARMONY DAILY — The Sanctuary
   ═══════════════════════════════════════ */

:root {
    --parchment: #EDE8E0;
    --card-bg: rgba(250, 248, 245, 0.95);
    --card-border: rgba(245, 241, 235, 0.7);
    --card-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
    --text-primary: #2d3436;
    --text-muted: #6b7280;
    --text-dim: #9ca3af;
    --teal: #3D8B84;
    --teal-soft: rgba(61, 139, 132, 0.08);
    --teal-border: rgba(61, 139, 132, 0.15);
    --gold: #D4AF37;
    --gold-soft: rgba(212, 175, 55, 0.08);
    --gold-border: rgba(212, 175, 55, 0.15);
    --dark-gold: #8B6B3D;
    --serif: 'Playfair Display', Georgia, serif;
    --sans: 'Inter', system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background: var(--parchment);
    color: var(--text-primary);
    font-family: var(--sans);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ── Page Header ── */
.hd-page-header {
    text-align: center;
    padding: 6rem 1rem 2rem;
    position: relative;
}

.hd-title {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    margin: 0 0 0.5rem;
}

.hd-subtitle {
    font-family: var(--sans);
    font-size: 0.8125rem;
    font-weight: 300;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
}

/* ── Continuous Toggle ── */
.continuous-toggle {
    position: fixed;
    top: 5rem;
    right: 1rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 2rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    min-height: 44px;
    user-select: none;
    -webkit-user-select: none;
}

.continuous-toggle:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.continuous-toggle.active {
    color: var(--teal);
    border-color: var(--teal-border);
    background: rgba(61, 139, 132, 0.06);
}

.continuous-toggle .toggle-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-dim);
    transition: background 0.3s ease;
}

.continuous-toggle.active .toggle-dot {
    background: var(--teal);
    box-shadow: 0 0 6px rgba(61, 139, 132, 0.4);
}

/* ── Feed Container ── */
.hd-feed {
    max-width: 520px;
    margin: 0 auto;
    padding: 0 0.75rem 2rem;
}

@media (max-width: 639px) {
    .hd-feed {
        scroll-snap-type: y proximity;
        max-width: 100%;
    }
}

/* ── Post Card ── */
.hd-post {
    margin-bottom: 4rem;
    scroll-snap-align: start;
}

@media (max-width: 639px) {
    .hd-post {
        margin-bottom: 0;
        min-height: 100vh;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
        padding-bottom: 2rem;
    }
}

/* ── Post Divider ── */
.hd-post-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--teal));
    border: none;
    margin: 0 2rem 2rem;
    opacity: 0.4;
    border-radius: 1px;
}

@media (max-width: 639px) {
    .hd-post-divider {
        margin: 2rem 1rem;
    }
}

/* ── Video Container ── */
.hd-video-wrap {
    position: relative;
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    background: #1a1a1a;
    box-shadow: var(--card-shadow);
    cursor: pointer;
}

.hd-video-wrap video {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Play Button Overlay ── */
.hd-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.08);
    transition: opacity 0.5s ease;
    z-index: 2;
}

.hd-play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.hd-play-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    animation: breathe 2s infinite ease-in-out;
    transition: transform 0.2s ease;
}

.hd-play-btn:hover {
    transform: scale(1.08);
}

.hd-play-btn svg {
    width: 28px;
    height: 28px;
    fill: white;
    margin-left: 3px;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 0.85;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* ── Video Progress Bar ── */
.hd-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    z-index: 3;
    cursor: pointer;
}

.hd-progress-fill {
    height: 100%;
    background: var(--gold);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 0 1.5px 1.5px 0;
}

/* ── Mute Button ── */
.hd-mute {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hd-video-wrap:hover .hd-mute,
.hd-video-wrap.playing .hd-mute {
    opacity: 1;
}

.hd-mute:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* ── No-Video Placeholder ── */
.hd-no-video {
    position: relative;
    width: 100%;
    min-height: 200px;
    aspect-ratio: 16 / 9;
    border-radius: 1rem;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(61, 139, 132, 0.15), rgba(212, 175, 55, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.hd-no-video-inner {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--text-primary);
    opacity: 0.7;
    line-height: 1.4;
}

.hd-no-video-artist {
    font-family: var(--sans);
    font-style: normal;
    font-size: 0.875rem;
    color: var(--teal);
    margin-top: 0.75rem;
}

/* ── Song Info (below video, before caption) ── */
.hd-song-info {
    text-align: center;
    padding: 1.25rem 0 0.5rem;
}

.hd-day-label {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.hd-song-name {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.375rem;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.hd-song-name::before {
    content: '🎵 ';
    font-style: normal;
}

.hd-artist {
    font-family: var(--sans);
    font-size: 0.8125rem;
    color: var(--teal);
    font-weight: 400;
}

/* ── Caption Section (the reveal) ── */
.hd-caption {
    overflow: hidden;
    transition: max-height 0.8s ease, opacity 0.8s ease;
}

.hd-caption.hidden-caption {
    max-height: 0;
    opacity: 0;
}

.hd-caption.revealed {
    max-height: 3000px;
    opacity: 1;
}

.hd-caption-inner {
    padding: 1rem 0.5rem 2rem;
}

/* Pull quote */
.hd-quote {
    border-left: 3px solid var(--gold);
    padding: 0.75rem 1rem;
    margin: 1rem 0 1.25rem;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.0625rem;
    color: var(--text-primary);
    line-height: 1.5;
    background: var(--gold-soft);
    border-radius: 0 0.5rem 0.5rem 0;
}

/* Caption paragraphs */
.hd-caption-text {
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.hd-caption-text p {
    margin: 0 0 0.875rem;
}

.hd-caption-text p:last-child {
    margin-bottom: 0;
}

/* Daily Tune callout */
.hd-tune {
    background: var(--teal-soft);
    border: 1px solid var(--teal-border);
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    margin: 1.25rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.hd-tune-icon {
    flex-shrink: 0;
    font-size: 1rem;
}

/* Today's Invitation callout */
.hd-invitation {
    background: var(--gold-soft);
    border: 1px solid var(--gold-border);
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 1.25rem 0;
}

.hd-invitation-label {
    font-family: var(--sans);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--dark-gold);
    margin-bottom: 0.5rem;
}

.hd-invitation-text {
    font-family: var(--serif);
    font-size: 1.0625rem;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Signature */
.hd-signature {
    text-align: right;
    font-family: var(--serif);
    font-style: italic;
    font-size: 0.9375rem;
    color: var(--text-muted);
    padding: 1rem 0.5rem 0;
}

/* ── Shimmer Loading ── */
.hd-shimmer-wrap {
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.hd-shimmer {
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite ease-in-out;
}

.hd-shimmer-1 { width: 65%; }
.hd-shimmer-2 { width: 45%; }
.hd-shimmer-3 { width: 55%; }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── End of Archive ── */
.hd-end {
    text-align: center;
    padding: 3rem 1rem;
    font-family: var(--serif);
    font-style: italic;
    font-size: 0.9375rem;
    color: var(--text-dim);
}

/* ── Up Next Pill ── */
.hd-up-next {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 2rem;
    padding: 0.75rem 1.25rem;
    font-family: var(--sans);
    font-size: 0.8125rem;
    color: var(--text-muted);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 200;
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
}

.hd-up-next.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.hd-up-next-label {
    color: var(--teal);
    font-weight: 500;
}

/* ── CTA Sections ── */
.hd-section {
    padding: 4rem 1rem;
    text-align: center;
}

.hd-section-inner {
    max-width: 520px;
    margin: 0 auto;
}

.hd-section-divider {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--teal));
    margin: 0 auto 2rem;
    border-radius: 1px;
}

.hd-section-label {
    font-family: var(--sans);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 1rem;
}

.hd-section-title {
    font-family: var(--serif);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
    font-weight: 400;
}

.hd-section-text {
    font-family: var(--sans);
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 2rem;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.hd-cta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.hd-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-family: var(--sans);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    min-height: 44px;
    transition: all 0.2s ease;
}

.hd-cta-primary {
    background: var(--teal);
    color: white;
}

.hd-cta-primary:hover {
    background: #347a73;
    box-shadow: 0 4px 16px rgba(61, 139, 132, 0.3);
}

.hd-cta-secondary {
    background: transparent;
    color: var(--teal);
    border: 1px solid var(--teal-border);
}

.hd-cta-secondary:hover {
    background: var(--teal-soft);
}

/* ── Responsive ── */
@media (max-width: 639px) {
    .hd-page-header {
        padding: 5.5rem 0.75rem 1.5rem;
    }

    .hd-title {
        font-size: 1.25rem;
    }

    .hd-video-wrap {
        border-radius: 0.75rem;
    }

    .hd-section {
        padding: 3rem 0.75rem;
    }

    .continuous-toggle {
        top: 4.5rem;
        right: 0.5rem;
        padding: 0.375rem 0.75rem;
        font-size: 0.6875rem;
    }
}

@media (min-width: 640px) {
    .hd-title {
        font-size: 1.75rem;
    }
}
