/* ──────────────────────────────────────────────────────────────
   Blossom House — The Wishing Well
   Parchment overlay, slow rhythm, bioluminescent drift on /wishes/
   ──────────────────────────────────────────────────────────── */

/* The 1111 ghost digit on the homepage — positioned in the fp-why section (dark bg) */
.fp-why__wish {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-family: var(--font-sans, 'Space Grotesk', sans-serif);
    font-weight: 300;
    font-size: 1.25rem;
    letter-spacing: .4em;
    color: #C8A882;
    opacity: .75;
    user-select: none;
    z-index: 3;
    text-shadow: 0 0 14px rgba(200, 168, 130, 0.25);
    animation: bh-1111-pulse 4s ease-in-out infinite;
}
@keyframes bh-1111-pulse {
    0%, 100% { opacity: .65; text-shadow: 0 0 10px rgba(200, 168, 130, 0.2); }
    50%      { opacity: .9;  text-shadow: 0 0 20px rgba(200, 168, 130, 0.45); }
}
.fp-why__wish:hover,
.fp-why__wish:focus {
    opacity: 1 !important;
    animation: none;
    text-shadow: 0 0 24px rgba(200, 168, 130, 0.7);
}
/* Override the generic bh-wish-trigger hover filter since text-shadow handles it better */
.fp-why__wish.bh-wish-trigger:hover,
.fp-why__wish.bh-wish-trigger:focus { filter: none; }

@media (max-width: 600px) {
    .fp-why__wish { bottom: 1rem; right: 1rem; font-size: 1.05rem; letter-spacing: .3em; }
}

/* ── 404 page · a page of lostness, a wish makes sense ─────── */
.page-404 { position: relative; }
.page-404__whisper {
    margin: var(--space-lg) 0 0;
    font-size: .95rem;
    color: var(--color-ink-muted, #6b6860);
    font-style: italic;
    max-width: 480px;
}
.page-404__wish {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-family: var(--font-sans, 'Space Grotesk', sans-serif);
    font-weight: 300;
    font-size: 1.1rem;
    letter-spacing: .4em;
    color: #C8A882;
    opacity: .4;
    user-select: none;
    z-index: 3;
    animation: bh-1111-pulse-light 5s ease-in-out infinite;
}
.page-404__wish:hover,
.page-404__wish:focus {
    opacity: 1 !important;
    animation: none;
    text-shadow: 0 0 18px rgba(200, 168, 130, 0.5);
}
@keyframes bh-1111-pulse-light {
    0%, 100% { opacity: .35; }
    50%      { opacity: .6; }
}
@media (max-width: 600px) {
    .page-404__wish { bottom: 1.25rem; right: 1.25rem; font-size: .95rem; letter-spacing: .3em; }
}

/* ── Origins footer · you read all 16 chapters of Blossom ──── */
.origins-footer__whisper {
    font-family: var(--font-serif, Georgia, serif);
    font-style: italic;
    font-size: .95rem;
    color: rgba(255, 255, 255, 0.55);
    margin: .5rem 0 1rem;
    letter-spacing: .01em;
}
.origins-footer__wish {
    display: block;
    font-family: var(--font-sans, 'Space Grotesk', sans-serif);
    font-weight: 300;
    font-size: 1.1rem;
    letter-spacing: .45em;
    color: #C8A882;
    opacity: .55;
    margin: 0 auto 1.5rem;
    user-select: none;
    text-align: center;
    animation: bh-1111-pulse-dark 4s ease-in-out infinite;
}
.origins-footer__wish:hover,
.origins-footer__wish:focus {
    opacity: 1 !important;
    animation: none;
    text-shadow: 0 0 24px rgba(200, 168, 130, 0.6);
}
@keyframes bh-1111-pulse-dark {
    0%, 100% { opacity: .5;  text-shadow: 0 0 8px rgba(200, 168, 130, 0.15); }
    50%      { opacity: .8;  text-shadow: 0 0 18px rgba(200, 168, 130, 0.35); }
}

/* ── Story signoff · the kettle is on · earned wish ────────── */
.story-wish-well {
    margin: 4rem auto 2rem;
    max-width: 320px;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(200, 168, 130, 0.2);
}
.story-wish-well__line {
    display: block;
    color: #C8A882;
    font-size: 1.5rem;
    opacity: .4;
    margin-bottom: 1.25rem;
    line-height: 1;
}
.story-wish-well__digit {
    display: block;
    font-family: var(--font-sans, 'Space Grotesk', sans-serif);
    font-weight: 300;
    font-size: 1.3rem;
    letter-spacing: .45em;
    color: #C8A882;
    opacity: .6;
    margin: 0 auto 1rem;
    user-select: none;
    animation: bh-1111-pulse-light 4s ease-in-out infinite;
}
.story-wish-well__digit:hover,
.story-wish-well__digit:focus {
    opacity: 1 !important;
    animation: none;
    text-shadow: 0 0 22px rgba(200, 168, 130, 0.55);
}
.story-wish-well__whisper {
    font-family: var(--font-serif, Georgia, serif);
    font-style: italic;
    font-size: .95rem;
    color: var(--color-ink-muted, #6b6860);
    margin: 0;
    letter-spacing: .01em;
}

/* The 1111 ghost digit becomes clickable — soft reveal on hover */
.bh-wish-trigger {
    cursor: pointer;
    position: relative;
    transition: filter .3s ease, opacity .3s ease;
}
.bh-wish-trigger:hover,
.bh-wish-trigger:focus {
    filter: drop-shadow(0 0 12px rgba(200, 168, 130, 0.6));
    opacity: 1 !important;
}
.bh-wish-trigger::after {
    content: '✦ make a wish';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 8px);
    font-size: .65rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #C8A882;
    opacity: 0;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity .3s ease;
    font-family: var(--font-sans, 'Space Grotesk', sans-serif);
}
.bh-wish-trigger:hover::after,
.bh-wish-trigger:focus::after { opacity: .85; }

/* ── Overlay ─────────────────────────────────────────────────── */
.bh-wish-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.bh-wish-overlay.is-open {
    display: flex;
    animation: bh-wish-fade-in .5s ease;
}
.bh-wish-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(26, 22, 18, 0.88), rgba(26, 22, 18, 0.96));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.bh-wish-modal {
    position: relative;
    background: #F9F7F4;
    border: 1px solid #E4E0DA;
    border-radius: 14px;
    padding: 3rem 2.5rem 2.5rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 20px 80px rgba(200, 168, 130, 0.15), 0 0 0 1px rgba(200, 168, 130, 0.08);
    animation: bh-wish-rise .6s cubic-bezier(0.22, 1, 0.36, 1);
}
.bh-wish-close {
    position: absolute;
    top: .75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: #A8A49E;
    cursor: pointer;
    line-height: 1;
    padding: .25rem .5rem;
    transition: color .2s;
}
.bh-wish-close:hover { color: #1A1A18; }

.bh-wish-glyph {
    font-size: 2rem;
    color: #C8A882;
    margin: 0 0 1rem;
    line-height: 1;
    animation: bh-wish-glow 3s ease-in-out infinite;
}
.bh-wish-glyph--large {
    font-size: 3rem;
    animation: bh-wish-glow-strong 2s ease-in-out infinite;
}

.bh-wish-modal h2 {
    font-size: 1.6rem;
    font-weight: 400;
    color: #1A1A18;
    margin: 0 0 .75rem;
    font-family: var(--font-serif, Georgia, serif);
}
.bh-wish-sub {
    color: #6b6860;
    font-size: .95rem;
    line-height: 1.6;
    margin: 0 0 1.5rem;
    font-style: italic;
}
.bh-wish-sub strong { color: #C8A882; font-style: normal; }

.bh-wish-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #E4E0DA;
    border-radius: 6px;
    font-family: var(--font-serif, Georgia, serif);
    font-size: 1.05rem;
    color: #1A1A18;
    background: #fff;
    resize: vertical;
    min-height: 80px;
    transition: border-color .2s;
}
.bh-wish-form textarea:focus {
    outline: none;
    border-color: #C8A882;
    box-shadow: 0 0 0 3px rgba(200, 168, 130, 0.12);
}
.bh-wish-count {
    text-align: right;
    font-size: .75rem;
    color: #A8A49E;
    margin: .25rem 0 1rem;
    font-family: var(--font-sans, 'Space Grotesk', sans-serif);
}

.bh-wish-email-label {
    display: block;
    text-align: left;
    margin: 1rem 0;
}
.bh-wish-email-label span {
    display: block;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #8B8680;
    margin-bottom: .5rem;
    font-family: var(--font-sans, 'Space Grotesk', sans-serif);
}
.bh-wish-email-label em {
    font-weight: 400;
    color: #A8A49E;
    text-transform: none;
    letter-spacing: 0;
}
.bh-wish-email-label input {
    width: 100%;
    padding: .75rem .9rem;
    border: 1px solid #E4E0DA;
    border-radius: 4px;
    font-size: .95rem;
    font-family: inherit;
}
.bh-wish-email-label input:focus { outline: none; border-color: #C8A882; }

.bh-wish-turnstile { margin: 1rem 0; display: flex; justify-content: center; }

.bh-wish-error {
    color: #991b1b;
    font-size: .85rem;
    margin: .5rem 0;
    min-height: 1.2em;
}
.bh-wish-submit { width: 100%; margin-top: .5rem; padding: .95rem; }
.bh-wish-warning {
    font-size: .75rem;
    color: #8B8680;
    font-style: italic;
    margin: 1rem 0 0;
    letter-spacing: .02em;
}

/* Confirmation stage */
.bh-wish-stage--confirmation {
    padding: 1rem 0;
    animation: bh-wish-confirm-in .7s cubic-bezier(0.22, 1, 0.36, 1);
}
.bh-wish-stage--confirmation h2 {
    font-size: 2rem;
    color: #1A1A18;
    margin: 0 0 1rem;
}
.bh-wish-echo {
    color: #6b6860;
    font-size: .85rem;
    font-style: italic;
    line-height: 1.6;
    margin: 1.5rem 0 2rem;
}

/* ── Keyframes ───────────────────────────────────────────────── */
@keyframes bh-wish-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes bh-wish-rise {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes bh-wish-confirm-in {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes bh-wish-glow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(200, 168, 130, 0.4)); }
    50% { filter: drop-shadow(0 0 16px rgba(200, 168, 130, 0.7)); }
}
@keyframes bh-wish-glow-strong {
    0%, 100% { filter: drop-shadow(0 0 12px rgba(200, 168, 130, 0.5)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 24px rgba(200, 168, 130, 0.85)); transform: scale(1.05); }
}

/* ── /wishes/ — slow drift display ───────────────────────────── */
.bh-wishes-main { background: linear-gradient(180deg, #F9F7F4 0%, #F5F1E8 100%); min-height: 80vh; }

.bh-wishes-drift {
    position: relative;
    margin: 3rem 0;
    min-height: 400px;
    padding: 2rem 0;
    overflow: hidden;
}
.bh-wish-drop {
    font-family: var(--font-serif, Georgia, serif);
    font-size: 1.2rem;
    color: #1A1612;
    line-height: 1.6;
    padding: 1.25rem 1.5rem;
    margin: 0 auto 1.25rem;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(200, 168, 130, 0.2);
    border-radius: 10px;
    text-align: center;
    font-style: italic;
    animation: bh-wish-drop-in 1s ease both;
    animation-delay: calc(var(--wish-i, 0) * 0.08s);
    opacity: 0;
}
/* Subtle bucket tinting — not shouting, just a whisper of differentiation */
.bh-wish-drop--connection { border-color: rgba(92, 58, 122, 0.25); background: rgba(248, 240, 250, 0.5); }
.bh-wish-drop--creation   { border-color: rgba(200, 168, 130, 0.35); background: rgba(255, 248, 232, 0.5); }
.bh-wish-drop--healing    { border-color: rgba(30, 107, 92, 0.25); background: rgba(232, 248, 244, 0.5); }
.bh-wish-drop--space      { border-color: rgba(139, 134, 128, 0.3); background: rgba(249, 247, 244, 0.7); }
.bh-wish-drop--prosperity { border-color: rgba(139, 96, 16, 0.3); background: rgba(255, 250, 235, 0.55); }

@keyframes bh-wish-drop-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile */
@media (max-width: 600px) {
    .bh-wish-modal { padding: 2.25rem 1.5rem 1.75rem; border-radius: 12px; }
    .bh-wish-modal h2 { font-size: 1.35rem; }
    .bh-wish-stage--confirmation h2 { font-size: 1.6rem; }
    .bh-wish-drop { font-size: 1.05rem; padding: 1rem 1.25rem; }
}
