/* Custodia UK Corporate Theme */
/* Based on custodiauk.com design system */

:root {
    --custodia-navy: #1a354f;
    --custodia-blue: #1a65d3;
    --custodia-gold: #fbd068;
    --custodia-olive: #8c8c64;
    --custodia-charcoal: #292828;
    --custodia-light-gray: #f4f4f4;
    --custodia-white: #ffffff;
    --custodia-medium-gray: #7f8c8d;
    --custodia-dark-slate: #2d3e50;
    --custodia-light-blue: #e6effc;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(26, 53, 79, 0.12);
    --shadow-lg: 0 8px 24px rgba(26, 53, 79, 0.16);

    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

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

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.3rem;
    line-height: 1.7;
    color: var(--custodia-charcoal);
    background: var(--custodia-light-gray);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header */
.header {
    background: var(--custodia-navy);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    color: var(--custodia-white);
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.logo-tagline {
    color: var(--custodia-gold);
    font-size: 1.1rem;
    font-weight: 400;
    margin-top: 0.2rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.view-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.toggle-btn {
    background: transparent;
    border: none;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--custodia-white);
}

.toggle-btn.active {
    background: var(--custodia-blue);
    color: var(--custodia-white);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--custodia-navy) 0%, var(--custodia-dark-slate) 100%);
    color: var(--custodia-white);
    padding: 4rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 3.6rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.6rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

.hero-accent {
    color: var(--custodia-gold);
}

/* Main Container */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Section Heading */
.section-heading {
    margin-bottom: 3rem;
}

.section-heading h2 {
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--custodia-navy);
    margin-bottom: 0.5rem;
}

.section-heading p {
    color: var(--custodia-medium-gray);
    font-size: 1.4rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--custodia-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(26, 53, 79, 0.08);
    cursor: move;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--custodia-blue);
}

.project-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg) scale(1.02);
}

.project-card.drag-over {
    border-color: var(--custodia-gold);
    background: var(--custodia-light-blue);
}

.project-header {
    padding: 1.5rem;
    background: var(--custodia-navy);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.project-icon {
    width: 36px;
    height: 36px;
    background: var(--custodia-gold);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--custodia-navy);
}

.project-name {
    color: var(--custodia-white);
    font-weight: 600;
    font-size: 1.5rem;
}

.edit-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--custodia-white);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.edit-btn:hover {
    background: var(--custodia-gold);
    color: var(--custodia-navy);
    border-color: var(--custodia-gold);
}

.screenshot-container {
    height: 200px;
    background: var(--custodia-light-gray);
    overflow: hidden;
    position: relative;
}

.screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .screenshot {
    transform: scale(1.05);
}

.screenshot-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, var(--custodia-light-blue) 0%, var(--custodia-light-gray) 100%);
}

.generate-screenshot-btn {
    background: var(--custodia-blue);
    color: var(--custodia-white);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-size: 1.3rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.generate-screenshot-btn:hover {
    background: var(--custodia-navy);
}

.generate-screenshot-btn:disabled {
    background: var(--custodia-medium-gray);
    cursor: not-allowed;
}

.project-info {
    padding: 2rem;
}

.project-description {
    color: var(--custodia-charcoal);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--custodia-light-gray);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--custodia-blue);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.project-link:hover {
    color: var(--custodia-navy);
}

.project-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.project-link:hover svg {
    transform: translateX(3px);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    color: var(--custodia-olive);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--custodia-olive);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Compact View */
.compact-layout {
    display: flex;
    gap: 3rem;
}

.projects-compact {
    width: 420px;
    flex-shrink: 0;
}

.compact-project {
    display: flex;
    align-items: center;
    background: var(--custodia-white);
    border: 1px solid rgba(26, 53, 79, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.compact-project:hover {
    border-color: var(--custodia-blue);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.compact-screenshot {
    width: 100px;
    height: 70px;
    background: var(--custodia-light-gray);
    overflow: hidden;
    flex-shrink: 0;
}

.compact-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compact-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--custodia-light-blue) 0%, var(--custodia-light-gray) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.compact-placeholder svg {
    width: 24px;
    height: 24px;
    fill: var(--custodia-medium-gray);
}

.compact-info {
    flex: 1;
    padding: 1.2rem 1.5rem;
}

.compact-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--custodia-navy);
    margin-bottom: 0.3rem;
}

.compact-description {
    font-size: 1.2rem;
    color: var(--custodia-medium-gray);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-status {
    padding: 1.2rem;
}

.content-area {
    flex: 1;
    background: var(--custodia-white);
    border: 1px solid rgba(26, 53, 79, 0.1);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-sm);
}

.content-area h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--custodia-navy);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--custodia-gold);
}

.content-area p {
    color: var(--custodia-charcoal);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 53, 79, 0.7);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--custodia-white);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    margin: 3rem auto;
    padding: 2.5rem;
    position: relative;
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
}

.modal-header {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--custodia-navy);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--custodia-gold);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--custodia-navy);
    margin-bottom: 0.6rem;
    font-size: 1.3rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--custodia-white);
    border: 2px solid var(--custodia-light-gray);
    color: var(--custodia-charcoal);
    padding: 1rem 1.2rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1.3rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--custodia-blue);
    box-shadow: 0 0 0 3px var(--custodia-light-blue);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--custodia-charcoal);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--custodia-light-gray);
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.3rem;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--custodia-blue);
    color: var(--custodia-white);
}

.btn-primary:hover {
    background: var(--custodia-navy);
}

.btn-secondary {
    background: var(--custodia-light-gray);
    color: var(--custodia-charcoal);
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--custodia-medium-gray);
    font-size: 2.4rem;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.close:hover {
    color: var(--custodia-navy);
}

.file-upload {
    border: 2px dashed var(--custodia-medium-gray);
    padding: 2rem;
    text-align: center;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    background: var(--custodia-light-gray);
    cursor: pointer;
}

.file-upload:hover {
    border-color: var(--custodia-blue);
    background: var(--custodia-light-blue);
}

.file-upload input {
    display: none;
}

.file-upload-text {
    color: var(--custodia-blue);
    font-weight: 500;
}

.form-divider {
    border: none;
    border-top: 1px solid var(--custodia-light-gray);
    margin: 2rem 0;
}

/* Footer */
.footer {
    background: var(--custodia-navy);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 2rem;
    text-align: center;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1180px;
    margin: 0 auto;
}

.footer-logo {
    color: var(--custodia-white);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.footer p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.footer-accent {
    color: var(--custodia-gold);
}

/* Responsive */
@media (max-width: 768px) {
    html {
        font-size: 58%;
    }

    .header-top {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .hero {
        padding: 3rem 1.5rem;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .container {
        padding: 2.5rem 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .projects-compact {
        width: 100%;
    }

    .content-area {
        padding: 2rem;
    }

    .modal-content {
        margin: 1.5rem auto;
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.4rem;
    }

    .hero p {
        font-size: 1.4rem;
    }

    .section-heading h2 {
        font-size: 2rem;
    }

    .project-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .compact-screenshot {
        width: 80px;
        height: 56px;
    }
}
