/* ==========================================================
   MYCREW
   GLOBAL DESIGN SYSTEM

   Yellow Tower Labs
   Copyright 2026
   All Rights Reserved.

   VISUAL DIRECTION
   ----------------------------------------------------------
   Deep Burgundy
   Wine Red
   Warm Metallic Gold
   White / Ivory
   Charcoal
   Muted Teal Accent

   Private. Warm. Elegant. Modern.
   ========================================================== */


/* ==========================================================
   ROOT DESIGN TOKENS
   ========================================================== */

:root {

    /* ------------------------------------------------------
       BRAND COLORS
       ------------------------------------------------------ */

    --burgundy-dark: #3b050d;
    --burgundy: #580a15;
    --burgundy-medium: #70101f;
    --wine: #881e2d;
    --wine-light: #a83545;

    --gold-dark: #a97718;
    --gold: #d4af37;
    --gold-light: #ebcf72;
    --gold-pale: #f6e8b8;

    --white: #ffffff;
    --ivory: #fffdf8;
    --cream: #f8f4ec;
    --cream-dark: #eee7da;

    --charcoal: #1f1f1f;
    --charcoal-soft: #343434;
    --gray-dark: #555555;
    --gray: #7a7a7a;
    --gray-light: #d9d9d9;
    --gray-pale: #f1f1f1;

    --teal: #0e7c86;
    --teal-dark: #075f67;
    --teal-light: #dff3f4;

    --green: #2f7d57;
    --green-light: #e5f4eb;

    --red-error: #a92835;
    --red-error-light: #f9e5e7;


    /* ------------------------------------------------------
       SURFACES
       ------------------------------------------------------ */

    --page-background: #f8f5ef;
    --surface: #ffffff;
    --surface-soft: #fffdf9;
    --surface-muted: #f5f1e9;

    --header-background: var(--burgundy);
    --header-background-dark: var(--burgundy-dark);


    /* ------------------------------------------------------
       TEXT
       ------------------------------------------------------ */

    --text-primary: #24211f;
    --text-secondary: #625e59;
    --text-muted: #88827b;

    --text-on-dark: #ffffff;
    --text-on-gold: #2a1d04;


    /* ------------------------------------------------------
       BORDERS
       ------------------------------------------------------ */

    --border: #e5ddd1;
    --border-light: #eee8df;
    --border-gold: rgba(212, 175, 55, 0.45);


    /* ------------------------------------------------------
       SHADOWS
       ------------------------------------------------------ */

    --shadow-xs:
        0 1px 3px rgba(42, 22, 18, 0.08);

    --shadow-sm:
        0 4px 12px rgba(42, 22, 18, 0.08);

    --shadow-md:
        0 10px 30px rgba(42, 22, 18, 0.10);

    --shadow-lg:
        0 20px 50px rgba(42, 22, 18, 0.14);

    --shadow-gold:
        0 4px 18px rgba(212, 175, 55, 0.22);


    /* ------------------------------------------------------
       SHAPE
       ------------------------------------------------------ */

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-pill: 999px;


    /* ------------------------------------------------------
       SPACING
       ------------------------------------------------------ */

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 40px;
    --space-9: 48px;
    --space-10: 64px;


    /* ------------------------------------------------------
       TRANSITIONS
       ------------------------------------------------------ */

    --transition-fast: 0.16s ease;
    --transition: 0.24s ease;
    --transition-slow: 0.35s ease;


    /* ------------------------------------------------------
       LAYOUT
       ------------------------------------------------------ */

    --content-width: 1280px;
    --header-height: 72px;
}


/* ==========================================================
   RESET
   ========================================================== */

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


html {
    scroll-behavior: smooth;
}


html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}


body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at top left,
            rgba(212, 175, 55, 0.06),
            transparent 30%
        ),
        var(--page-background);

    color: var(--text-primary);

    font-family:
        Inter,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 16px;
    line-height: 1.55;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


img,
video {
    display: block;
    max-width: 100%;
}


button,
input,
textarea,
select {
    font: inherit;
}


button,
a,
input,
textarea,
select {
    -webkit-tap-highlight-color: transparent;
}


button {
    cursor: pointer;
}


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


ul,
ol {
    margin: 0;
    padding: 0;
}


p {
    margin-top: 0;
}


h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    color: var(--burgundy);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    line-height: 1.16;
}


/* ==========================================================
   TYPOGRAPHY
   ========================================================== */

h1 {
    font-size: clamp(
        2rem,
        4vw,
        3.1rem
    );

    font-weight: 700;
}


h2 {
    font-size: clamp(
        1.45rem,
        2.2vw,
        2rem
    );

    font-weight: 700;
}


h3 {
    font-size: 1.2rem;
    font-weight: 700;
}


strong {
    font-weight: 700;
}


small,
.text-small {
    font-size: 0.875rem;
}


.text-muted {
    color: var(--text-muted);
}


.text-secondary {
    color: var(--text-secondary);
}


.text-gold {
    color: var(--gold-dark);
}


.text-burgundy {
    color: var(--burgundy);
}


.text-center {
    text-align: center;
}


/* ==========================================================
   GLOBAL PAGE CONTAINER
   ========================================================== */

.container,
.dashboard-container,
.crew-container,
.messages-container {
    width: min(
        calc(100% - 40px),
        var(--content-width)
    );

    margin-inline: auto;
}


/* ==========================================================
   GLOBAL HEADER / BRAND
   ========================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    min-height: var(--header-height);

    color: var(--white);

    background:
        linear-gradient(
            100deg,
            var(--burgundy-dark),
            var(--burgundy) 45%,
            var(--burgundy-medium)
        );

    box-shadow:
        0 4px 20px rgba(30, 4, 8, 0.18);
}


.site-header-inner {
    width: min(
        calc(100% - 40px),
        var(--content-width)
    );

    min-height: var(--header-height);

    margin-inline: auto;

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

    gap: var(--space-5);
}


.brand,
.dashboard-brand,
.crew-brand,
.messages-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    color: var(--gold-light);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.55rem;
    font-weight: 700;
}


.brand:hover,
.dashboard-brand:hover,
.crew-brand:hover,
.messages-brand:hover {
    color: var(--gold);
}


.brand-logo,
.dashboard-logo,
.crew-brand-logo,
.messages-logo {
    width: 42px;
    height: 42px;

    object-fit: contain;
}


/* ==========================================================
   CARD SYSTEM
   ========================================================== */

.card {
    background:
        linear-gradient(
            180deg,
            var(--white),
            var(--surface-soft)
        );

    border: 1px solid var(--border-light);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    padding: var(--space-6);

    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
}


.card:hover {
    border-color:
        rgba(212, 175, 55, 0.28);

    box-shadow: var(--shadow-md);
}


.card-elevated {
    box-shadow: var(--shadow-lg);
}


/* ==========================================================
   BUTTON SYSTEM
   ========================================================== */

.button,
button.button {
    min-height: 42px;

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

    gap: 8px;

    padding: 10px 18px;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    font-size: 0.95rem;
    font-weight: 700;

    line-height: 1;

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}


.button:hover,
button.button:hover {
    transform: translateY(-1px);
}


.button:active,
button.button:active {
    transform: translateY(0);
}


/* Primary Burgundy */

.button-primary {
    color: var(--white);

    background:
        linear-gradient(
            135deg,
            var(--burgundy-medium),
            var(--wine)
        );

    border-color: var(--burgundy-medium);

    box-shadow:
        0 5px 15px rgba(88, 10, 21, 0.20);
}


.button-primary:hover {
    background:
        linear-gradient(
            135deg,
            var(--wine),
            var(--burgundy)
        );

    box-shadow:
        0 7px 18px rgba(88, 10, 21, 0.27);
}


/* Gold */

.button-accent {
    color: var(--text-on-gold);

    background:
        linear-gradient(
            135deg,
            var(--gold-light),
            var(--gold)
        );

    border-color: var(--gold);

    box-shadow: var(--shadow-gold);
}


.button-accent:hover {
    background:
        linear-gradient(
            135deg,
            #f0d67b,
            #c99622
        );
}


/* White / Secondary */

.button-secondary {
    color: var(--burgundy);

    background: var(--white);

    border-color: var(--border);
}


.button-secondary:hover {
    color: var(--burgundy-dark);

    border-color: var(--gold);

    background: var(--ivory);
}


/* Outline Gold */

.button-outline-gold {
    color: var(--gold-dark);

    background: transparent;

    border-color: var(--gold);
}


.button-outline-gold:hover {
    color: var(--text-on-gold);
    background: var(--gold);
}


/* Danger */

.button-danger {
    color: var(--white);

    background: var(--red-error);

    border-color: var(--red-error);
}


.button-danger:hover {
    background: #8e1e29;
}


/* Disabled */

.button:disabled,
button:disabled {
    cursor: not-allowed;

    opacity: 0.58;

    transform: none;

    box-shadow: none;
}


/* ==========================================================
   ICON BUTTONS
   ========================================================== */

.icon-button,
.dashboard-icon-button {
    width: 42px;
    height: 42px;

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

    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 50%;

    color: var(--gold-light);

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

    transition:
        background var(--transition-fast),
        transform var(--transition-fast),
        border-color var(--transition-fast);
}


.icon-button:hover,
.dashboard-icon-button:hover {
    background:
        rgba(212, 175, 55, 0.14);

    border-color: var(--gold);

    transform: translateY(-1px);
}


/* ==========================================================
   FORM SYSTEM
   ========================================================== */

.form-group {
    margin-bottom: var(--space-5);
}


label {
    display: block;

    margin-bottom: 7px;

    color: var(--charcoal);

    font-size: 0.92rem;
    font-weight: 700;
}


input,
textarea,
select {
    width: 100%;

    color: var(--text-primary);

    background: var(--white);

    border: 1px solid var(--border);

    border-radius: var(--radius-sm);

    outline: none;

    padding: 12px 14px;

    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}


input {
    min-height: 46px;
}


textarea {
    resize: vertical;

    min-height: 110px;
}


select {
    min-height: 46px;

    cursor: pointer;
}


input:hover,
textarea:hover,
select:hover {
    border-color: #cdbfae;
}


input:focus,
textarea:focus,
select:focus {
    border-color: var(--gold);

    box-shadow:
        0 0 0 4px rgba(212, 175, 55, 0.12);

    background: var(--ivory);
}


input::placeholder,
textarea::placeholder {
    color: #aaa39a;
}


input[type="file"] {
    padding: 10px;

    background: var(--cream);
}


.form-help {
    margin-top: 7px;

    color: var(--text-muted);

    font-size: 0.84rem;
    line-height: 1.45;
}


.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    flex-wrap: wrap;

    gap: var(--space-3);

    margin-top: var(--space-6);
}


/* ==========================================================
   ALERTS
   ========================================================== */

.alert {
    margin-bottom: var(--space-5);

    padding: 13px 16px;

    border-radius: var(--radius-sm);

    border: 1px solid transparent;

    font-size: 0.92rem;
}


.alert-success {
    color: #235f41;

    background: var(--green-light);

    border-color: #b9ddc8;
}


.alert-error {
    color: #7e1d27;

    background: var(--red-error-light);

    border-color: #efc4c9;
}


.alert-info {
    color: var(--teal-dark);

    background: var(--teal-light);

    border-color: #b6dfe2;
}


/* ==========================================================
   PRIVACY COMPONENT
   ========================================================== */

.privacy-note {
    display: flex;
    flex-direction: column;

    gap: 5px;

    padding: 15px 17px;

    border-left: 4px solid var(--gold);

    border-radius:
        var(--radius-sm);

    color: var(--text-secondary);

    background:
        linear-gradient(
            90deg,
            rgba(212, 175, 55, 0.10),
            rgba(212, 175, 55, 0.03)
        );
}


.privacy-note strong {
    color: var(--burgundy);

    font-family:
        Georgia,
        "Times New Roman",
        serif;
}


.privacy-rule {
    margin-bottom: 0;

    color: var(--burgundy);

    font-weight: 800;
}


/* ==========================================================
   BADGES
   ========================================================== */

.badge {
    display: inline-flex;
    align-items: center;

    gap: 5px;

    padding: 5px 10px;

    border-radius: var(--radius-pill);

    font-size: 0.78rem;
    font-weight: 700;
}


.badge-gold {
    color: #5c4207;

    background: var(--gold-pale);
}


.badge-burgundy {
    color: var(--white);

    background: var(--burgundy);
}


.badge-teal {
    color: var(--teal-dark);

    background: var(--teal-light);
}


/* ==========================================================
   DIVIDERS
   ========================================================== */

.divider {
    width: 100%;
    height: 1px;

    margin: var(--space-6) 0;

    background: var(--border-light);
}


.gold-divider {
    width: 72px;
    height: 3px;

    margin:
        var(--space-4)
        0;

    border-radius: var(--radius-pill);

    background:
        linear-gradient(
            90deg,
            var(--gold-dark),
            var(--gold-light),
            var(--gold-dark)
        );
}


/* ==========================================================
   EMPTY STATES
   ========================================================== */

.empty-state {
    text-align: center;

    padding:
        var(--space-9)
        var(--space-6);
}


.empty-state h2 {
    margin-bottom: 10px;
}


.empty-state p {
    max-width: 560px;

    margin:
        0 auto
        var(--space-5);

    color: var(--text-secondary);
}


/* ==========================================================
   LOADING
   ========================================================== */

.loading-indicator,
.crew-feed-loading,
.messages-loading {
    min-height: 140px;

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

    gap: 12px;

    color: var(--text-muted);
}


.loading-spinner {
    width: 30px;
    height: 30px;

    border: 3px solid
        rgba(212, 175, 55, 0.22);

    border-top-color: var(--gold);

    border-radius: 50%;

    animation:
        mycrew-spin
        0.8s
        linear
        infinite;
}


@keyframes mycrew-spin {

    to {
        transform: rotate(360deg);
    }
}


/* ==========================================================
   AVATAR SYSTEM
   ========================================================== */

.avatar {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    object-fit: cover;

    border-radius: 50%;

    border:
        2px solid
        rgba(212, 175, 55, 0.65);

    background: var(--cream);
}


.avatar-small {
    width: 32px;
    height: 32px;
}


.avatar-large {
    width: 88px;
    height: 88px;

    border-width: 3px;
}


/* ==========================================================
   MODAL FOUNDATION
   ========================================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;

    z-index: 2000;

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

    padding: var(--space-5);

    background:
        rgba(30, 8, 12, 0.72);

    backdrop-filter: blur(5px);
}


.modal {
    width: min(
        100%,
        560px
    );

    max-height: calc(100vh - 40px);

    overflow-y: auto;

    background: var(--white);

    border:
        1px solid
        var(--border-gold);

    border-radius: var(--radius-xl);

    box-shadow: var(--shadow-lg);

    padding: var(--space-7);
}


/* ==========================================================
   TOOLTIP-LIKE TITLE ELEMENTS
   ========================================================== */

.section-eyebrow {
    display: inline-block;

    margin-bottom: 8px;

    color: var(--gold-dark);

    font-size: 0.78rem;
    font-weight: 800;

    letter-spacing: 0.08em;

    text-transform: uppercase;
}


/* ==========================================================
   LINK STYLES
   ========================================================== */

.link {
    color: var(--burgundy);

    font-weight: 700;

    transition:
        color var(--transition-fast);
}


.link:hover {
    color: var(--gold-dark);
}


.auth-link {
    color: var(--burgundy);

    font-weight: 700;
}


.auth-link:hover {
    color: var(--gold-dark);

    text-decoration: underline;
}


/* ==========================================================
   SCROLLBAR
   ========================================================== */

* {
    scrollbar-width: thin;

    scrollbar-color:
        var(--burgundy-medium)
        var(--cream);
}


*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}


*::-webkit-scrollbar-track {
    background: var(--cream);
}


*::-webkit-scrollbar-thumb {
    background:
        linear-gradient(
            var(--burgundy-medium),
            var(--wine)
        );

    border-radius: var(--radius-pill);

    border:
        2px solid
        var(--cream);
}


*::-webkit-scrollbar-thumb:hover {
    background: var(--burgundy);
}


/* ==========================================================
   SELECTION
   ========================================================== */

::selection {
    color: var(--burgundy-dark);

    background: var(--gold-light);
}


/* ==========================================================
   UTILITY CLASSES
   ========================================================== */

.hidden {
    display: none !important;
}


.invisible {
    visibility: hidden !important;
}


.flex {
    display: flex;
}


.flex-column {
    flex-direction: column;
}


.align-center {
    align-items: center;
}


.justify-between {
    justify-content: space-between;
}


.justify-center {
    justify-content: center;
}


.gap-1 {
    gap: var(--space-1);
}


.gap-2 {
    gap: var(--space-2);
}


.gap-3 {
    gap: var(--space-3);
}


.gap-4 {
    gap: var(--space-4);
}


.gap-5 {
    gap: var(--space-5);
}


.mt-0 {
    margin-top: 0;
}


.mb-0 {
    margin-bottom: 0;
}


.w-full {
    width: 100%;
}


/* ==========================================================
   SCREEN READER ONLY
   ========================================================== */

.sr-only {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    padding: 0 !important;
    margin: -1px !important;

    overflow: hidden !important;

    clip: rect(
        0,
        0,
        0,
        0
    ) !important;

    white-space: nowrap !important;

    border: 0 !important;
}


/* ==========================================================
   FOCUS ACCESSIBILITY
   ========================================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline:
        3px solid
        rgba(212, 175, 55, 0.55);

    outline-offset: 3px;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 900px) {

    :root {
        --header-height: 64px;
    }


    .container,
    .dashboard-container,
    .crew-container,
    .messages-container,
    .site-header-inner {
        width: min(
            calc(100% - 28px),
            var(--content-width)
        );
    }


    .form-actions {
        align-items: stretch;

        flex-direction: column;
    }


    .form-actions .button {
        width: 100%;
    }
}


@media (max-width: 600px) {

    body {
        font-size: 15px;
    }


    .card {
        padding: var(--space-5);

        border-radius: var(--radius-md);
    }


    .container,
    .dashboard-container,
    .crew-container,
    .messages-container,
    .site-header-inner {
        width: calc(100% - 22px);
    }


    .brand,
    .dashboard-brand,
    .crew-brand,
    .messages-brand {
        font-size: 1.25rem;
    }


    .brand-logo,
    .dashboard-logo,
    .crew-brand-logo,
    .messages-logo {
        width: 36px;
        height: 36px;
    }
}


/* ==========================================================
   REDUCED MOTION
   ========================================================== */

@media (
    prefers-reduced-motion: reduce
) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            0.01ms !important;
    }
}