/* Explain: Custom component styles for various UI elements. */
.site-header {
    background: var(--nav-bg);
    backdrop-filter: blur(18px);
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--sage-dark);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.section-kicker::before {
    display: inline-block;
    width: 2.4rem;
    height: 1px;
    background: var(--accent-color);
    content: "";
}

.glass-panel {
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.arch-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: var(--surface-color);
    box-shadow: var(--shadow-soft);
}

.arch-frame::after {
    position: absolute;
    inset: 1.1rem;
    border: 1px solid var(--background-color);
    border-radius: inherit;
    content: "";
    pointer-events: none;
}

.arch-frame-large {
    height: min(74vh, 720px);
    min-height: 500px;
    border-radius: 999px 999px 2.5rem 2.5rem;
}

.arch-frame-medium {
    height: 620px;
    max-width: 450px;
    border-radius: 999px 999px 2.1rem 2.1rem;
}

.floating-note {
    position: absolute;
    right: -1.5rem;
    bottom: 4rem;
    display: flex;
    max-width: 250px;
    align-items: center;
    gap: 0.85rem;
    border-radius: 999px;
    padding: 1rem 1.2rem;
    color: var(--text-color);
    font-size: 0.82rem;
    font-weight: 600;
}

.story-card {
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.story-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-soft);
    transform: translateY(-6px);
}

.category-card {
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.category-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-soft);
    transform: translateY(-4px);
}

.filter-chip {
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--glass-bg);
    padding: 0.65rem 1.15rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 300ms ease;
}

.filter-chip:hover {
    border-color: var(--accent-color);
    color: var(--text-color);
}

.filter-chip.is-active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

.form-label {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--text-color);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.form-status.success {
    color: var(--sage-dark);
}

.form-status.error {
    color: #9B4A3D;
}

.writer-tab {
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--glass-bg);
    padding: 0.55rem 1.15rem;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 600;
    transition: all 300ms ease;
}

.writer-tab:hover {
    border-color: var(--accent-color);
    color: var(--text-color);
}

.writer-tab.is-active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

.update-item {
    border-left: 3px solid var(--accent-color);
}

@media (max-width: 767px) {
    .section-kicker::before {
        width: 1.6rem;
    }

    .arch-frame-large,
    .arch-frame-medium {
        height: 510px;
        min-height: 0;
    }

    .arch-frame-large {
        margin-right: auto;
        margin-left: auto;
        width: min(100%, 450px);
    }

    .floating-note {
        position: relative;
        right: auto;
        bottom: auto;
        margin: -2.5rem auto 0;
    }
}

/* Rising steam over the hero tea cup (homepage) */
.tea-steam {
    position: absolute;
    left: 50%;
    bottom: 38%;
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    transform: translateX(-50%);
    pointer-events: none;
}

.tea-steam span {
    display: block;
    width: 0.5rem;
    height: 6.5rem;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 248, 230, 0) 0%, rgba(255, 244, 214, 0.55) 45%, rgba(255, 248, 230, 0) 100%);
    filter: blur(7px);
    opacity: 0;
    animation: tea-steam-rise 7s ease-in-out infinite;
}

.tea-steam span:nth-child(2) {
    height: 8.5rem;
    animation-delay: 1.7s;
}

.tea-steam span:nth-child(3) {
    height: 5.5rem;
    animation-delay: 3.4s;
}

@keyframes tea-steam-rise {
    0% {
        opacity: 0;
        transform: translateY(1.5rem) scaleX(1);
    }

    25% {
        opacity: 0.7;
    }

    70% {
        opacity: 0.3;
    }

    100% {
        opacity: 0;
        transform: translateY(-4.5rem) scaleX(1.7);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tea-steam span {
        animation: none;
        opacity: 0.3;
    }
}