
/* static/style.css */

body {
    margin: 0;

    background:
        radial-gradient(
            circle at top,
            #efe7dc 0%,
            #e4d7c7 100%
        );

    color: #2d2d2d;

    font-family: 'Inter', sans-serif;
}

.topbar {
    position: sticky;
    top: 0;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 18px 40px;

    background: rgba(255,255,255,0.9);

    backdrop-filter: blur(10px);

    border-bottom: 1px solid #e5ddd2;
}

.topbar a {
    margin-right: 24px;

    text-decoration: none;

    color: #5d4635;
    font-weight: 600;
}

.topbar-logout {
    margin-right: 0;
    color: #9c8879;
    font-weight: 500;
}
.topbar-logout:hover {
    color: #5d4635;
}

.container {
    max-width: 1180px;
    margin: auto;
    padding:
        34px 24px 80px;
}

.profile-card {
    display: flex;
    gap: 48px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.96),
            rgba(250,245,240,0.96)
        );

    border-radius: 32px;

    padding: 44px;

    box-shadow:
        0 20px 60px rgba(0,0,0,0.08),
        0 4px 14px rgba(0,0,0,0.04);

    margin-bottom: 34px;

    border: 1px solid rgba(255,255,255,0.6);

    position: relative;

    overflow: hidden;
}
.profile-card::before {
    content: "";

    position: absolute;

    width: 320px;
    height: 320px;

    border-radius: 50%;

    background:
        radial-gradient(
            rgba(205,180,145,0.18),
            transparent 70%
        );

    top: -120px;
    right: -80px;

    pointer-events: none;
}

.photo-frame {
    width: 240px;
    height: 240px;

    overflow: hidden;

    border-radius: 20px;

    position: relative;

    background: #222;

    flex-shrink: 0;
}

.profile-photo {
    position: absolute;

    object-fit: cover;
}

.profile-photo.no-crop {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.profile-info h1 {
    margin: 0 0 10px 0;

    font-size: 68px;

    line-height: 0.95;

    font-family: 'Cormorant Garamond', serif;

    font-weight: 600;

    color: #2f2016;

    letter-spacing: -1px;
}

.metadata-pills {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: 20px;
    margin-bottom: 22px;
}

.meta-pill {
    padding: 10px 14px;

    border-radius: 999px;

    background:
        rgba(120, 82, 54, 0.08);

    border:
        1px solid rgba(120,82,54,0.08);

    color: #5c4331;

    font-size: 14px;
    font-weight: 500;
}

.muted {
    color: #777;
}

.section-card {
    background:
        rgba(255,255,255,0.72);

    backdrop-filter: blur(10px);

    border-radius: 28px;

    padding: 26px 28px 24px;

    margin-bottom: 22px;

    border:
        1px solid rgba(255,255,255,0.7);

    box-shadow:
        0 10px 30px rgba(0,0,0,0.05);

    position: relative;
}

.section-card::before {
    content: "";

    position: absolute;

    left: 0;
    top: 26px;

    width: 5px;
    height: 48px;

    border-radius: 999px;

    background:
        linear-gradient(
            to bottom,
            #a47752,
            #d8b28c
        );
}

.section-card h2 {
    margin:
        0 0 20px 0;

    font-size: 42px;

    font-family:
        'Cormorant Garamond', serif;

    color: #342419;

    letter-spacing: -0.5px;
}

.person-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}


.person-chip {
    display: flex;
    align-items: center;
    gap: 14px;

    min-width: 240px;

    padding: 12px;

    border-radius: 20px;

    background:
        linear-gradient(
            180deg,
            #f4ebe1,
            #ecdfd1
        );

    color: #3d2e24;

    text-decoration: none;

    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease;

    box-shadow:
        0 4px 12px rgba(0,0,0,0.05);

    border:
        1px solid rgba(255,255,255,0.6);
}

.person-chip:hover {
    transform:
        translateY(-4px);

    box-shadow:
        0 16px 30px rgba(0,0,0,0.12);

    background:
        linear-gradient(
            180deg,
            #f7ede2,
            #ead8c8
        );
}

@media (max-width: 800px) {

    .profile-card {
        flex-direction: column;
        align-items: center;
    }

    .profile-info h1 {
        font-size: 42px;
    }

}


.person-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.person-chip {
    display: flex;
    align-items: center;
    gap: 14px;

    min-width: 240px;

    padding: 12px;

    border-radius: 18px;

    background: #f1e7dc;

    color: #3d2e24;

    text-decoration: none;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;

    box-shadow:
        0 2px 8px rgba(0,0,0,0.04);
}

.person-chip:hover {
    transform: translateY(-3px);

    background: #ead8c8;

    box-shadow:
        0 10px 20px rgba(0,0,0,0.08);
}

.chip-photo {
    width: 56px;
    height: 56px;

    border-radius: 14px;

    object-fit: cover;

    flex-shrink: 0;

    background: #d5c5b7;
}

.chip-photo.placeholder {
    background: #d5c5b7;
}

.chip-text {
    min-width: 0;
}

.chip-name {
    font-weight: 600;

    line-height: 1.2;

    font-size: 17px;
}

.chip-meta {
    margin-top: 5px;

    font-size: 13px;

    color: #7b6657;
}


#hover-card {
    position: fixed;

    z-index: 9999;

    width: 300px;

    background:
        rgba(255,255,255,0.92);

    backdrop-filter: blur(14px);

    border-radius: 22px;

    overflow: hidden;

    box-shadow:
        0 24px 60px rgba(0,0,0,0.22);

    pointer-events: none;

    opacity: 0;

    transform:
        translateY(10px) scale(0.98);

    transition:
        opacity 0.12s ease,
        transform 0.12s ease;

    border:
        1px solid rgba(255,255,255,0.7);
}

#hover-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.hover-photo-frame {
    width: 100%;
    height: 180px;

    overflow: hidden;

    position: relative;

    background: #222;
}

.hover-photo {
    position: absolute;
}

.hover-content {
    padding: 16px;
}

.hover-name {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 6px;
}

.hover-meta {
    color: #6d5b4e;
    font-size: 14px;
    margin-top: 6px;
}

/* Full-page background for the login page.
   Drop your ancestral home photo into static/ and uncomment
   the background-image line below. */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;

    /* background-image: url('/static/ancestral_home.jpg'); */
    background-size: cover;
    background-position: center;

    /* Sepia + heavy fade so the card stays legible */
    filter: sepia(40%) brightness(1.1);
    opacity: 0.18;

    pointer-events: none;
}

/* Prevent the body's radial gradient from competing on the login page */
body.login-body {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at top,
            #ede4d8 0%,
            #ddd0bf 100%
        );
}

/* Centered layout */
.login-center {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
    z-index: 1;

    padding: 24px;
}

/* The card */
.login-card {
    width: 100%;
    max-width: 400px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.96),
            rgba(250,245,240,0.96)
        );

    border-radius: 32px;

    padding: 48px 44px 44px;

    box-shadow:
        0 20px 60px rgba(0,0,0,0.10),
        0 4px 14px rgba(0,0,0,0.05);

    border: 1px solid rgba(255,255,255,0.7);

    /* Subtle entrance animation */
    animation: login-card-in 0.4s ease both;
}

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

.login-title {
    margin: 0 0 6px 0;

    font-family: 'Cormorant Garamond', serif;
    font-size: 52px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -1px;

    color: #2f2016;

    text-align: center;
}

.login-subtitle {
    margin: 0 0 32px 0;

    text-align: center;

    font-size: 14px;
    color: #9c8879;
}

.login-error {
    margin: 0 0 18px 0;

    padding: 10px 14px;

    border-radius: 12px;

    background: rgba(180, 60, 40, 0.08);
    border: 1px solid rgba(180, 60, 40, 0.15);

    color: #8b2e1e;

    font-size: 14px;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-field label {
    font-size: 13px;
    font-weight: 600;
    color: #6b5344;
    letter-spacing: 0.02em;
}

.login-field input {
    padding: 12px 16px;

    border-radius: 14px;

    border: 1.5px solid rgba(120, 82, 54, 0.18);

    background: rgba(255,255,255,0.85);

    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #2d2d2d;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.login-field input:focus {
    border-color: rgba(120, 82, 54, 0.5);
    box-shadow: 0 0 0 3px rgba(120, 82, 54, 0.08);
}

.login-btn {
    margin-top: 8px;

    padding: 13px;

    border-radius: 14px;
    border: none;

    background:
        linear-gradient(
            135deg,
            #7a4f35,
            #5c3620
        );

    color: #fff;

    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.14s ease,
        box-shadow 0.14s ease,
        opacity 0.14s ease;

    box-shadow:
        0 4px 14px rgba(90, 50, 25, 0.28);
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(90, 50, 25, 0.32);
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: default;
}
