@font-face {
    font-family: 'Apfel Grotezk';
    src: url('/images/fonts/apfelGrotezk/ApfelGrotezk-Regular.woff2') format('woff2'),
         url('/images/fonts/apfelGrotezk/ApfelGrotezk-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

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

:root {
    --ink: #121212;
    --mute: #8a8a8a;
    --line: #d6d6d6;
    --bg: #ffffff;
}

body {
    font-family: 'Apfel Grotezk', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-nav {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.15rem clamp(1.25rem, 4vw, 2.5rem);
}

.nav-brand {
    font-family: Cormorant, 'Playfair Display', Georgia, serif;
    font-weight: 500;
    font-size: 1.85rem;
    letter-spacing: 0.04em;
    line-height: 1;
    color: var(--ink);
}

.page {
    width: min(22rem, calc(100% - 2.5rem));
    margin: 0 auto;
    padding: 1.25rem 0 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.portrait {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center 38%;
    display: block;
    margin-bottom: 1.15rem;
}

.about {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.about p {
    font-size: 1rem;
    line-height: 1.35;
}

.about-intro {
    font-size: 1.05rem;
}

.about-intro strong {
    font-weight: 700;
}

.signup {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 11.5rem;
    justify-content: center;
}

.signup-fields {
    display: flex;
    flex-direction: column;
    width: 100%;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.signup.is-done .signup-fields {
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
}

.signup.is-done .signup-fields.is-gone {
    display: none;
}

.signup-success {
    font-size: 1.15rem;
    line-height: 1.4;
    color: var(--ink);
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.signup-success[hidden] {
    display: none;
}

.signup.is-done .signup-success {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.signup input + input,
.signup input + button {
    margin-top: 0.65rem;
}

.signup input {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    outline: none;
    text-align: left;
    -webkit-appearance: none;
    appearance: none;
}

.signup input::placeholder {
    color: #9a9a9a;
}

.signup input:focus {
    border-color: #999;
}

.signup button {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background: #000;
    border: none;
    border-radius: 8px;
    padding: 0.9rem 1rem;
    cursor: pointer;
}

.signup button:hover:not(:disabled) {
    background: #222;
}

.signup button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.form-status {
    font-size: 0.9rem;
    color: var(--mute);
}

.form-status[hidden] {
    display: none;
}

.form-status.is-error {
    color: #8a2f2f;
}

.disclaimer {
    width: 100%;
    margin-top: 0.45rem;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--mute);
    text-align: center;
}

.form-status:not([hidden]) {
    margin-top: 0.45rem;
}

/* —— Full-width page footer —— */
.site-footer {
    width: 100%;
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding: 1.35rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
}

.footer-inner {
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    width: 100%;
}

.footer-left {
    text-align: left;
}

.footer-left p {
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--mute);
}

.footer-left p + p {
    margin-top: 0.15rem;
}

.footer-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.15rem;
}

.footer-icons a,
.footer-icons .icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    color: var(--mute);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.footer-icons a:hover,
.footer-icons .icon-btn:hover {
    color: var(--ink);
}

.footer-icons svg {
    width: 100%;
    height: 100%;
    display: block;
}

.fib-link {
    width: 1.55rem !important;
    height: 1.15rem !important;
}

.fib-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(58%) opacity(0.95);
    display: block;
}

.fib-link:hover img {
    filter: brightness(0) saturate(100%) opacity(0.85);
}

.footer-right {
    margin-left: auto;
    text-align: right;
    flex-shrink: 0;
}

.kudos {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
}

.kudos-what {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.35rem);
    font-size: 0.75rem;
    color: var(--mute);
    text-decoration: underline;
    text-underline-offset: 2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    white-space: nowrap;
}

.kudos:hover .kudos-what,
.kudos:focus-within .kudos-what {
    opacity: 1;
    pointer-events: auto;
}

.kudos-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--mute);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.35rem 0.75rem 0.35rem 0.55rem;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.kudos-btn:hover {
    color: var(--ink);
    border-color: #999;
}

.kudos-plus {
    font-size: 1rem;
    line-height: 1;
}

.kudos-count {
    min-width: 1ch;
}

.kudos-thanks {
    position: absolute;
    right: 0;
    top: calc(100% + 0.3rem);
    font-size: 0.8rem;
    color: var(--mute);
    white-space: nowrap;
}

.kudos-thanks[hidden] {
    display: none;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%) translateY(8px);
    background: #121212;
    color: #fff;
    font-size: 0.85rem;
    padding: 0.55rem 0.9rem;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 20;
    pointer-events: none;
}

.toast.toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.kudos-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.kudos-page-inner {
    width: min(22rem, calc(100% - 2.5rem));
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
    padding: 2rem 0 4rem;
}

.kudos-page-inner p {
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--ink);
}

.kudos-page-inner a {
    color: var(--mute);
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 520px) {
    .site-nav {
        padding: 0.95rem 1rem;
    }

    .nav-brand {
        font-size: 1.55rem;
    }

    .page {
        width: min(22rem, calc(100% - 2rem));
        padding: 0.85rem 0 2rem;
    }

    .portrait {
        margin-bottom: 1rem;
        aspect-ratio: 3 / 2;
    }

    .about {
        gap: 0.55rem;
        margin-bottom: 1.1rem;
    }

    .about p {
        font-size: 0.95rem;
        line-height: 1.32;
    }

    .footer-left {
        min-width: 0;
        flex: 1;
    }

    .footer-left p {
        font-size: 0.75rem;
        line-height: 1.35;
    }

    .footer-icons {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .kudos-btn {
        font-size: 0.82rem;
        padding: 0.3rem 0.65rem 0.3rem 0.45rem;
    }

    .kudos-page-inner {
        width: min(22rem, calc(100% - 2rem));
        padding: 1.5rem 0 3rem;
    }

    .kudos-page-inner p {
        font-size: 1rem;
        line-height: 1.4;
    }

    .signup input,
    .signup button {
        font-size: 16px; /* avoid iOS input zoom */
    }
}
