/* ===== Statement Letter (home page public statement) ===== */
/* Native <dialog> rendered in the top layer, so no z-index juggling with the header. */

html.statement-letter-open {
    overflow: hidden;
}

.statement-letter {
    padding: 0;
    border: 0;
    background: transparent;
    width: min(768px, calc(100vw - 2rem));
    max-width: none;
    max-height: calc(100dvh - 2rem);
    margin: auto;
    overflow: visible;
    color: var(--color-text);
}

.statement-letter::backdrop {
    background: rgba(10, 24, 19, 0.6);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.statement-letter[open] {
    animation: statement-letter-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.statement-letter[open]::backdrop {
    animation: statement-letter-fade 0.35s ease both;
}

.statement-letter.is-closing {
    animation: statement-letter-out 0.25s ease both;
}

.statement-letter.is-closing::backdrop {
    animation: statement-letter-fade 0.25s ease reverse both;
}

@keyframes statement-letter-in {
    from { opacity: 0; transform: translateY(18px) scale(0.985); }
    to   { opacity: 1; transform: none; }
}

@keyframes statement-letter-out {
    from { opacity: 1; transform: none; }
    to   { opacity: 0; transform: translateY(10px); }
}

@keyframes statement-letter-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* The paper */
.statement-letter__sheet {
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 2rem);
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.statement-letter__scroll {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: clamp(1.75rem, 5vw, 3rem) clamp(1.5rem, 6vw, 3.5rem) clamp(2rem, 5vw, 3rem);
    outline: none;
}

.statement-letter__close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 1;
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #555;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.statement-letter__close:hover {
    background: #eef3f1;
    color: var(--color-primary);
}

.statement-letter__close:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Letterhead: logo over a short green rule */
.statement-letter__letterhead {
    padding-bottom: 1rem;
    margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
    position: relative;
}

.statement-letter__letterhead img {
    display: block;
    height: clamp(28px, 5vw, 36px);
    width: auto;
}

.statement-letter__letterhead::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 2.5rem;
    height: 2px;
    background: var(--color-primary);
}

.statement-letter__title {
    font-family: Georgia, 'Times New Roman', 'Noto Serif', serif;
    font-weight: 400;
    font-size: clamp(1.6rem, 4.5vw, 2.15rem);
    line-height: 1.2;
    color: var(--color-secondary);
    margin: 0 0 clamp(1rem, 3vw, 1.5rem);
    letter-spacing: -0.01em;
}

.statement-letter__body {
    font-family: Georgia, 'Times New Roman', 'Noto Serif', serif;
    font-size: clamp(0.98rem, 2.4vw, 1.05rem);
    line-height: 1.65;
    color: #333;
}

.statement-letter__body p {
    margin: 0 0 1em;
}

.statement-letter__body .statement-letter__signoff {
    margin: 1.75em 0 0;
}
