/* Hear & No Judge — palette & layout from design reference */

:root {
    --dark-cocoa: #583722;
    --powder-blue: #bdd7de;
    --white: #ffffff;
    --light-bg: #f4f8f9;
    --text-main: #333333;
    --text-muted: #555555;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --shadow-form: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--light-bg);
    background-image: url("1.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
}

a {
    color: var(--dark-cocoa);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* —— Top bar —— */
.site-header {
    background-color: var(--powder-blue);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-bottom: 4px solid var(--dark-cocoa);
}

@media (min-width: 640px) {
    .site-header {
        padding: 1.25rem 2.5rem;
    }
}

.logo {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

.logo__link {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-cocoa);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
}

.logo__link:hover {
    color: var(--white);
    text-decoration: none;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    align-items: center;
}

.site-nav a {
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.site-nav a:hover {
    color: var(--white);
    text-decoration: none;
}

.hnj-lang-select {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.45rem 2rem 0.45rem 0.75rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--dark-cocoa);
    background-color: var(--white);
    color: var(--dark-cocoa);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23583722' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    min-width: 7.5rem;
}

.hnj-lang-select:hover {
    background-color: var(--light-bg);
}

.hnj-lang-select:focus {
    outline: 2px solid var(--dark-cocoa);
    outline-offset: 2px;
}

@media (max-width: 639px) {
    .hnj-lang-select {
        width: 100%;
        max-width: 220px;
    }
}

/* —— Page width —— */
.page-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.25rem 2.5rem;
}

@media (min-width: 640px) {
    .page-inner {
        padding: 0 2.5rem 3rem;
    }
}

/* —— Hero —— */
.hero {
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    padding: 1.75rem;
    margin: 1.25rem 0;
    border: 2px solid var(--powder-blue);
    border-radius: var(--radius-md);
    align-items: stretch;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .hero {
        flex-direction: row;
        align-items: center;
        padding: 2.5rem;
        margin: 1.25rem 0;
    }
}

.hero__visual {
    flex: 1;
    min-height: 200px;
    background-color: var(--powder-blue);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(88, 55, 34, 0.08) 10px,
        rgba(88, 55, 34, 0.08) 20px
    );
}

@media (min-width: 768px) {
    .hero__visual {
        min-height: 260px;
        margin-right: 0;
    }
}

.hero__visual-label {
    font-weight: 700;
    color: var(--dark-cocoa);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    padding: 0 1rem;
}

.hero__text {
    flex: 1;
}

.eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hero__title {
    margin: 0 0 1rem;
    color: var(--dark-cocoa);
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 700;
    line-height: 1.2;
}

.lede {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* —— FAQ —— */
.faq-block {
    text-align: left;
    padding: 1.5rem 1.25rem;
    background-color: rgba(189, 215, 222, 0.35);
    margin: 1.25rem 0;
    border-radius: var(--radius-md);
    color: var(--dark-cocoa);
    border: 1px dashed var(--dark-cocoa);
}

.faq-block__intro {
    margin: 0 0 1rem;
    font-weight: 700;
    font-size: 1.15rem;
    text-align: center;
}

.faq-item {
    margin: 0 0 0.65rem;
    border: 1px solid rgba(88, 55, 34, 0.25);
    border-radius: var(--radius-sm);
    background: var(--white);
    overflow: hidden;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-item summary {
    padding: 0.85rem 1rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-weight: 700;
    opacity: 0.6;
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item p {
    margin: 0;
    padding: 0 1rem 1rem;
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 400;
    line-height: 1.55;
}

/* —— Compose —— */
.main {
    margin: 0;
}

.compose {
    display: flex;
    justify-content: center;
    padding: 1.25rem 0 1rem;
}

.compose__card {
    width: 100%;
    max-width: 800px;
    background-color: var(--powder-blue);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-form);
    text-align: center;
}

@media (min-width: 520px) {
    .compose__card {
        padding: 2.25rem 2.5rem;
    }
}

.compose__heading {
    margin: 0 0 1.25rem;
    color: var(--dark-cocoa);
    font-size: 1.5rem;
    font-weight: 700;
}

.compose__form {
    margin: 0;
    text-align: left;
}

.compose__textarea {
    width: 100%;
    margin: 0 0 1.15rem;
    padding: 1rem 1.1rem;
    min-height: 140px;
    font: inherit;
    font-size: 1rem;
    color: var(--text-main);
    background-color: var(--white);
    border: 2px solid var(--dark-cocoa);
    border-radius: var(--radius-sm);
    resize: vertical;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.compose__textarea::placeholder {
    color: #888;
}

.compose__textarea:focus {
    outline: none;
    border-color: var(--dark-cocoa);
    box-shadow: 0 0 0 3px rgba(88, 55, 34, 0.15);
}

.compose__row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.compose__label-inline {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dark-cocoa);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.compose__controls {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

@media (min-width: 520px) {
    .compose__controls {
        flex-direction: row;
        align-items: stretch;
        flex-wrap: wrap;
    }

    .compose__select {
        flex: 1;
        min-width: 160px;
    }

    .btn--primary {
        flex: 0 0 auto;
        min-width: 200px;
    }
}

.compose__select {
    padding: 0.75rem 1rem;
    font: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    background: var(--white);
    border: 2px solid var(--dark-cocoa);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.compose__select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(88, 55, 34, 0.12);
}

.btn {
    font: inherit;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.9rem 1.75rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.btn--primary {
    background-color: var(--dark-cocoa);
    color: var(--white);
}

.btn--primary:hover {
    transform: scale(1.03);
    background-color: #3e2716;
}

.btn--primary:active {
    transform: scale(1);
}

.btn--primary:focus-visible {
    outline: 2px solid var(--dark-cocoa);
    outline-offset: 3px;
}

.form-message {
    margin: 1rem 0 0;
    font-size: 0.9rem;
    min-height: 1.35em;
    text-align: center;
}

.form-message.is-error {
    color: #8b2500;
}

.form-message.is-ok {
    color: #1b5e20;
}

/* —— Feed —— */
.feed {
    padding: 2rem 0 1rem;
}

.feed__toolbar {
    margin-bottom: 1.5rem;
}

.feed__title {
    margin: 0 0 1.25rem;
    text-align: center;
    color: var(--dark-cocoa);
    font-size: 1.65rem;
    font-weight: 700;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.filter-tag {
    font: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    border: 2px solid var(--dark-cocoa);
    background: var(--white);
    color: var(--dark-cocoa);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.filter-tag:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(88, 55, 34, 0.12);
}

.filter-tag.is-active {
    color: var(--white);
    background: var(--dark-cocoa);
    border-color: var(--dark-cocoa);
}

.filter-tag:focus-visible {
    outline: 2px solid var(--powder-blue);
    outline-offset: 2px;
}

.posts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 700px) {
    .posts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .posts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.grid-span {
    grid-column: 1 / -1;
}

.empty-state {
    margin: 0;
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    background: var(--white);
    border: 2px dashed var(--dark-cocoa);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-height: 180px;
    padding: 1.2rem 1.1rem 1rem;
    background-color: var(--white);
    border: 2px solid var(--powder-blue);
    border-radius: var(--radius-md);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    animation: card-in 0.5s ease forwards;
    opacity: 0;
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    box-shadow: 0 5px 15px rgba(88, 55, 34, 0.15);
    border-color: var(--dark-cocoa);
}

.card.is-hidden {
    display: none;
}

.card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.card__meta {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #888;
}

.card__pill {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    line-height: 1.2;
}

.card--family .card__pill {
    background: #fce4ec;
    color: #ad1457;
}

.card--work .card__pill {
    background: #e8f5e9;
    color: #2e7d32;
}

.card--love .card__pill {
    background: #ede7f6;
    color: #5e35b1;
}

.card--health .card__pill {
    background: #e3f2fd;
    color: #1565c0;
}

.card--other .card__pill {
    background: #f0f4f5;
    color: #4b5563;
}

.card__body {
    margin: 0 0 1rem;
    flex: 1;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-main);
    white-space: pre-wrap;
    word-break: break-word;
}

.card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-top: 0.75rem;
    margin-top: auto;
    border-top: 1px solid rgba(88, 55, 34, 0.12);
}

.react-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.35rem 0.5rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.react-btn:hover {
    color: var(--dark-cocoa);
    background: rgba(189, 215, 222, 0.35);
}

.react-btn:focus-visible {
    outline: 2px solid var(--dark-cocoa);
    outline-offset: 2px;
}

.react-btn__count {
    font-weight: 600;
    color: #666;
}

/* —— Footer —— */
.site-footer {
    background-color: var(--dark-cocoa);
    color: var(--powder-blue);
    text-align: center;
    padding: 1.5rem 1.25rem;
    margin-top: 2.5rem;
}

.site-footer__inner {
    max-width: 1000px;
    margin: 0 auto;
}

.site-footer p {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    line-height: 1.55;
}

.site-footer p:last-child {
    margin-bottom: 0;
}

.site-footer__copy {
    font-size: 0.8rem;
    opacity: 0.95;
}

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem 0.75rem;
    margin-bottom: 1rem;
}

.site-footer__legal a {
    color: var(--white);
    font-size: 0.82rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.site-footer__legal a:hover {
    color: var(--powder-blue);
}

.site-footer a {
    color: var(--white);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* —— Donation strip (between FAQ and compose) —— */
.donation-strip {
    margin: 0.25rem 0 1.75rem;
    padding: 1rem 1.15rem;
    background: linear-gradient(135deg, rgba(88, 55, 34, 0.97), rgba(70, 44, 28, 0.98));
    border-radius: var(--radius-lg);
    border: 2px solid rgba(189, 215, 222, 0.35);
    box-shadow: var(--shadow-form);
}

@media (min-width: 640px) {
    .donation-strip {
        padding: 1.1rem 1.5rem;
    }
}

.donation-strip__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem 1.25rem;
}

.donation-strip__text {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--powder-blue);
}

.donation-strip__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    color: var(--dark-cocoa);
    background: linear-gradient(135deg, #eef6f8, var(--powder-blue));
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.18),
        0 0 18px rgba(189, 215, 222, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.donation-strip__btn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.22),
        0 0 22px rgba(189, 215, 222, 0.5);
    text-decoration: none;
    color: var(--dark-cocoa);
}

.donation-strip__icon {
    font-size: 1rem;
    line-height: 1;
}

.donation-strip--no-link .donation-strip__inner {
    justify-content: center;
    text-align: center;
}

@media (max-width: 639px) {
    .donation-strip {
        padding: 0.85rem 1rem;
        margin-bottom: 1.25rem;
    }

    .donation-strip__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    .donation-strip__text {
        flex: 0 0 auto;
        text-align: center;
        font-size: 0.875rem;
        line-height: 1.4;
    }

    .donation-strip__btn {
        flex: 0 0 auto;
        justify-content: center;
        width: 100%;
        padding: 0.55rem 1rem;
    }
}