/* =====================================================
   CAPTAIN'S LOG — frontend/style.css
   Landing page styles only (index.html).
   Login page styles live in frontend/login.css.
   Contacts page styles live in frontend/contacts.css.
   ===================================================== */

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

/* -- Body ------------------------------------------- */
body {
    font-family: arial;
    font-size: 16px;
    overflow: hidden;
    background: #e2f3fa;   /* sky fallback while canvas loads */
}

/* -- Canvas ----------------------------------------- */
/* Full-screen, behind all other elements.
   JS sets canvas.width/height to fill the window.
   width/height:100% keeps the element sized before JS runs. */
canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* -- Navigation bar --------------------------------- */
#main-nav {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1320px;
    background: #6B2D0F;
    border-radius: 8px;
    padding: 0 20px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    box-shadow: 0 4px 18px rgba(74, 26, 2, 0.4);
}

.nav-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    color: #FFF8DC;
    font-family: 'Crimson Text', serif;
    font-size: 1.08rem;
    font-weight: 600;
    padding: 9px 20px;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.18s, border-color 0.18s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    background: #4a1a02;
    border-color: rgba(255, 255, 255, 0.6);
}

/* Logged-in avatar — initials circle that links back to the contacts page.
   Mirrors the .crew-avatar look, sized to sit inside the nav bar. */
.nav-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #F5E6A3;
    border: 2px solid rgba(255, 255, 255, 0.35);
    color: #4a1a02;
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: border-color 0.18s, transform 0.18s;
}

.nav-avatar:hover {
    border-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.05);
}

/* -- Hero text -------------------------------------- */
#hero {
    position: fixed;
    top: 108px;
    left: 0;
    right: 0;
    text-align: center;
    pointer-events: none;
    z-index: 50;
}

#hero h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(2.6rem, 7vw, 5.2rem);
    font-weight: 600;
    color: #6B2D0F;
    text-shadow: 0 2px 12px rgba(255, 255, 255, 0.5);
    line-height: 1.1;
}

#hero p {
    margin-top: 10px;
    font-family: 'Crimson Text', serif;
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    font-style: italic;
    color: #4a1a02;
    letter-spacing: 0.03em;
    opacity: 0.85;
}

/* -- Boat images (kept for compatibility if ever re-enabled) -- */
.boat {
    position: fixed;
    top: 0;
    left: 0;
    width: 360px;
    height: auto;
    z-index: 1;
    pointer-events: none;
    transform-origin: center bottom;
    will-change: transform;
    user-select: none;
}


#crew-modal {
    background: #FFF8DC;
    border: 2px solid #6B2D0F;
    border-radius: 14px;
    width: min(620px, 92vw);
    max-height: 80vh;
    overflow-y: auto;
    font-family: 'Crimson Text', serif;
    color: #4a1a02;
}

#crew-header {
    position: sticky;
    top: 0;
    background: #FFF8DC;
    border-bottom: 2px solid #6B2D0F;
    padding: 24px 28px 16px;
    text-align: center;
}

#crew-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.9rem;
    font-weight: 600;
    color: #4a1a02;
    margin-bottom: 4px;
}

#crew-header p {
    font-style: italic;
    font-size: 1rem;
    color: #6B2D0F;
}

#crew-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #4a1a02;
    color: #FFF8DC;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 1rem;
    cursor: pointer;
    line-height: 34px;
    text-align: center;
    padding: 0;
}

#crew-close:hover { background: #6B2D0F; }

#crew-list { padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 12px; }

.crew-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #F5E6A3;
    border: 1.5px solid #6B2D0F;
    border-radius: 12px;
    padding: 16px 20px;
}

.crew-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #6B2D0F;
    color: #FFF8DC;
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crew-info { flex: 1; }

.crew-info h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a1a02;
    margin-bottom: 2px;
}

.crew-info .role {
    font-weight: 600;
    font-size: 0.95rem;
    color: #4a1a02;
    margin-bottom: 2px;
}

.crew-info .specialty {
    font-size: 0.9rem;
    color: #6B2D0F;
    font-style: italic;
}