/*
FoundryPress Club
Public + Hub Styles

PHP-only JSON membership app.
No framework. No build tools.
*/

/* =========================================================
   1. Design Tokens
   ========================================================= */

:root {
    --fp-bg: #f6f4ef;
    --fp-surface: #ffffff;
    --fp-surface-soft: #fbfaf7;
    --fp-text: #1f2933;
    --fp-muted: #667085;
    --fp-border: #e5e0d7;

    --fp-primary: #1f4f46;
    --fp-primary-dark: #163a33;
    --fp-primary-soft: #e7f1ee;

    --fp-danger: #b42318;
    --fp-danger-soft: #fff0ee;

    --fp-warning: #92400e;
    --fp-warning-soft: #fff8e6;

    --fp-success: #11683a;
    --fp-success-soft: #e7f8ef;

    --fp-radius-sm: 10px;
    --fp-radius: 16px;
    --fp-radius-lg: 22px;

    --fp-shadow: 0 14px 40px rgba(31, 41, 51, 0.08);
    --fp-shadow-soft: 0 8px 24px rgba(31, 41, 51, 0.06);

    --fp-width: 1080px;
    --fp-width-wide: 1240px;
}

/* =========================================================
   2. Base
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--fp-bg);
    color: var(--fp-text);
    line-height: 1.5;
}

a {
    color: var(--fp-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
}

p {
    line-height: 1.65;
}

h1,
h2,
h3 {
    line-height: 1.15;
}

h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 48px);
    letter-spacing: -0.035em;
}

h2 {
    margin: 0 0 14px;
    font-size: 26px;
    letter-spacing: -0.02em;
}

h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.fpclub-muted {
    color: var(--fp-muted);
}

.fpclub-section {
    margin-top: 22px;
}

/* =========================================================
   3. Header / Navigation
   ========================================================= */

.fpclub-site-header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--fp-border);
}

.fpclub-header-inner {
    max-width: var(--fp-width-wide);
    margin: 0 auto;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.fpclub-brand {
    font-weight: 900;
    font-size: 20px;
    color: var(--fp-text);
    letter-spacing: -0.02em;
}

.fpclub-brand:hover {
    color: var(--fp-primary);
    text-decoration: none;
}

.fpclub-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.fpclub-nav a {
    color: var(--fp-text);
    font-weight: 800;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 999px;
}

.fpclub-nav a:hover {
    background: var(--fp-primary-soft);
    color: var(--fp-primary);
    text-decoration: none;
}

/* =========================================================
   4. Main Layout
   ========================================================= */

.fpclub-main {
    max-width: var(--fp-width);
    margin: 0 auto;
    padding: 42px 22px;
}

.fpclub-narrow {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.fpclub-hero {
    background:
        radial-gradient(circle at top right, rgba(31, 79, 70, 0.12), transparent 34%),
        var(--fp-surface);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius-lg);
    padding: 46px;
    box-shadow: var(--fp-shadow);
}

.fpclub-hero h1 {
    max-width: 760px;
    font-size: clamp(38px, 6vw, 62px);
}

.fpclub-hero p {
    max-width: 760px;
    margin: 0 0 24px;
    color: var(--fp-muted);
    font-size: 19px;
}

/* =========================================================
   5. Cards / Grids
   ========================================================= */

.fpclub-card {
    background: var(--fp-surface);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    padding: 28px;
    box-shadow: var(--fp-shadow-soft);
}

.fpclub-card + .fpclub-card {
    margin-top: 22px;
}

.fpclub-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.fpclub-feature {
    background: var(--fp-surface-soft);
    border: 1px solid var(--fp-border);
    border-radius: 14px;
    padding: 20px;
}

.fpclub-feature p {
    margin: 0;
    color: var(--fp-muted);
}

.fpclub-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.fpclub-kicker {
    margin: 0 0 8px;
    color: var(--fp-muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* =========================================================
   6. Forms
   ========================================================= */

.fpclub-form {
    display: grid;
    gap: 17px;
}

.fpclub-field {
    display: grid;
    gap: 7px;
}

.fpclub-field label {
    font-weight: 800;
}

.fpclub-field small {
    display: block;
    color: var(--fp-muted);
    line-height: 1.45;
}

.fpclub-field input,
.fpclub-field textarea,
.fpclub-field select,
.fpclub-table input,
.fpclub-table textarea,
.fpclub-table select {
    width: 100%;
    min-height: 42px;
    padding: 11px 12px;
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius-sm);
    background: #fff;
    color: var(--fp-text);
    font: inherit;
}

.fpclub-field textarea,
.fpclub-table textarea {
    min-height: 88px;
    resize: vertical;
}

.fpclub-field input:focus,
.fpclub-field textarea:focus,
.fpclub-field select:focus,
.fpclub-table input:focus,
.fpclub-table textarea:focus,
.fpclub-table select:focus {
    outline: 3px solid rgba(31, 79, 70, 0.16);
    border-color: var(--fp-primary);
}

.fpclub-field input[type="checkbox"] {
    width: auto;
    min-height: auto;
    margin-right: 8px;
}

.fpclub-field label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

/* =========================================================
   7. Buttons / Actions
   ========================================================= */

.fpclub-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.fpclub-button,
button.fpclub-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    background: var(--fp-primary);
    color: #fff;
    padding: 12px 18px;
    font-weight: 900;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
}

.fpclub-button:hover {
    background: var(--fp-primary-dark);
    color: #fff;
    text-decoration: none;
}

.fpclub-button-secondary {
    background: var(--fp-primary-soft);
    color: var(--fp-primary);
}

.fpclub-button-secondary:hover {
    background: #d8e9e4;
    color: var(--fp-primary-dark);
}

.fpclub-small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    background: var(--fp-primary-soft);
    color: var(--fp-primary);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.fpclub-small-button:hover {
    background: #d8e9e4;
    color: var(--fp-primary-dark);
    text-decoration: none;
}

.fpclub-small-button-danger {
    background: var(--fp-danger-soft);
    color: var(--fp-danger);
}

.fpclub-small-button-danger:hover {
    background: #ffdcd7;
    color: var(--fp-danger);
}

.fpclub-inline-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.fpclub-inline-actions form {
    display: inline-flex;
    margin: 0;
}

/* =========================================================
   8. Flash Messages
   ========================================================= */

.fpclub-flash-wrap {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.fpclub-flash {
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid var(--fp-border);
    background: #fff;
    font-weight: 700;
}

.fpclub-flash-success {
    background: var(--fp-success-soft);
    color: var(--fp-success);
    border-color: #bde8cf;
}

.fpclub-flash-error {
    background: var(--fp-danger-soft);
    color: var(--fp-danger);
    border-color: #ffd0ca;
}

.fpclub-flash-warning {
    background: var(--fp-warning-soft);
    color: var(--fp-warning);
    border-color: #f7dfa7;
}

/* =========================================================
   9. Member Profiles
   ========================================================= */

.fpclub-profile-head {
    display: flex;
    gap: 22px;
    align-items: center;
    margin-bottom: 24px;
}

.fpclub-profile-avatar,
.fpclub-member-avatar {
    width: 96px;
    height: 96px;
    flex: 0 0 96px;
    border-radius: 999px;
    background: var(--fp-primary-soft);
    color: var(--fp-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    font-weight: 900;
    overflow: hidden;
    text-decoration: none;
}

.fpclub-profile-avatar img,
.fpclub-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fpclub-member-list {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.fpclub-member-card {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--fp-border);
    border-radius: 14px;
    background: var(--fp-surface-soft);
}

.fpclub-member-card h2 {
    margin: 0 0 5px;
    font-size: 21px;
}

.fpclub-member-card p {
    margin: 0;
}

.fpclub-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.fpclub-photo-card {
    margin: 0;
    border: 1px solid var(--fp-border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--fp-surface-soft);
}

.fpclub-photo-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.fpclub-photo-card figcaption {
    padding: 10px 12px;
    color: var(--fp-muted);
    font-size: 14px;
}

/* =========================================================
   10. Message Boards
   ========================================================= */

.fpclub-board-list,
.fpclub-thread-list,
.fpclub-reply-list {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.fpclub-board-card,
.fpclub-thread-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--fp-border);
    border-radius: 14px;
    background: var(--fp-surface-soft);
}

.fpclub-board-card h2,
.fpclub-thread-card h2 {
    margin: 0 0 6px;
    font-size: 21px;
}

.fpclub-board-card p,
.fpclub-thread-card p {
    margin: 0;
}

.fpclub-board-meta {
    flex: 0 0 auto;
    align-self: center;
    color: var(--fp-muted);
    font-weight: 900;
    font-size: 14px;
    white-space: nowrap;
}

.fpclub-reply-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--fp-border);
    border-radius: 14px;
    background: var(--fp-surface-soft);
}

.fpclub-reply-author {
    display: grid;
    gap: 8px;
    align-content: start;
    color: var(--fp-muted);
    font-size: 14px;
}

.fpclub-reply-author strong {
    color: var(--fp-text);
}

.fpclub-member-avatar-small {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    font-size: 24px;
}

.fpclub-reply-body {
    line-height: 1.7;
    overflow-wrap: anywhere;
}

/* =========================================================
   11. Hub Admin
   ========================================================= */

.fpclub-hub-shell {
    max-width: var(--fp-width-wide);
    margin: 0 auto;
    padding: 32px 22px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
}

.fpclub-hub-sidebar {
    align-self: start;
    position: sticky;
    top: 22px;
}

.fpclub-hub-nav {
    display: grid;
    gap: 8px;
    background: var(--fp-surface);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    padding: 12px;
    box-shadow: var(--fp-shadow-soft);
}

.fpclub-hub-nav a {
    display: block;
    padding: 11px 13px;
    border-radius: 10px;
    color: var(--fp-text);
    font-weight: 900;
}

.fpclub-hub-nav a:hover,
.fpclub-hub-nav a.is-active {
    background: var(--fp-primary-soft);
    color: var(--fp-primary);
    text-decoration: none;
}

.fpclub-hub-main {
    min-width: 0;
}

.fpclub-stat {
    margin: 0;
    font-size: 34px;
    font-weight: 900;
    color: var(--fp-primary);
}

/* =========================================================
   12. Tables
   ========================================================= */

.fpclub-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 18px;
    border: 1px solid var(--fp-border);
    border-radius: 14px;
    background: var(--fp-surface);
}

.fpclub-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.fpclub-table th,
.fpclub-table td {
    padding: 14px 13px;
    border-bottom: 1px solid var(--fp-border);
    text-align: left;
    vertical-align: top;
}

.fpclub-table tr:last-child td {
    border-bottom: 0;
}

.fpclub-table th {
    background: var(--fp-surface-soft);
    color: var(--fp-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.fpclub-table td {
    font-size: 14px;
}

.fpclub-table strong {
    font-size: 15px;
}

.fpclub-table select {
    min-width: 130px;
}

.fpclub-table textarea {
    margin-top: 8px;
}

.fpclub-small-input {
    max-width: 90px;
}

.fpclub-inline-form {
    display: contents;
}

/* =========================================================
   13. Footer
   ========================================================= */

.fpclub-footer {
    max-width: var(--fp-width-wide);
    margin: 0 auto;
    padding: 28px 22px 46px;
    color: var(--fp-muted);
    font-size: 14px;
}

/* =========================================================
   14. Mobile
   ========================================================= */

@media (max-width: 900px) {
    .fpclub-hub-shell {
        grid-template-columns: 1fr;
    }

    .fpclub-hub-sidebar {
        position: static;
    }

    .fpclub-hub-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .fpclub-header-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .fpclub-nav {
        justify-content: flex-start;
    }

    .fpclub-main {
        padding-top: 28px;
    }

    .fpclub-hero {
        padding: 28px;
    }

    .fpclub-card {
        padding: 22px;
    }

    .fpclub-grid,
    .fpclub-photo-grid {
        grid-template-columns: 1fr;
    }

    .fpclub-page-head,
    .fpclub-board-card,
    .fpclub-thread-card,
    .fpclub-profile-head,
    .fpclub-member-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .fpclub-reply-card {
        grid-template-columns: 1fr;
    }

    .fpclub-board-meta {
        align-self: flex-start;
    }

    .fpclub-actions,
    .fpclub-inline-actions {
        align-items: stretch;
    }

    .fpclub-actions .fpclub-button,
    .fpclub-inline-actions .fpclub-small-button,
    .fpclub-inline-actions form,
    .fpclub-inline-actions button {
        width: 100%;
    }

    .fpclub-hub-nav {
        grid-template-columns: 1fr;
    }
}

/* Backup Utility */

.fpclub-button[disabled],
button.fpclub-button[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.fpclub-card code {
    background: var(--fp-primary-soft);
    color: var(--fp-primary);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.92em;
}