/* ================================
   BLOOM - PUBLIC SITE STYLES
   ================================

   Styles for the public landing page only.
   Loaded alongside main.css by public/base.html.

   TABLE OF CONTENTS
   1. Hero Section
   2. Ticker
   3. Process Components
   4. Support & Methods
   5. Team
   6. Modals & Forms
   7. Case Pages
   8. Mobile Responsive Styles (public)
   ================================ */


/* ================================
   1. HERO SECTION
   ================================ */

.hero {
    padding: 180px 5% 100px;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.pre-title {
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 30px;
    max-width: 900px;
}

.hero h1 span {
    color: var(--accent-color);
}

.hero p {
    font-size: 1.4rem;
    max-width: 700px;
    color: var(--text-muted);
    margin-bottom: 50px;
    font-weight: 300;
}

.cta-btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: #003333;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
    width: fit-content;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}


/* ================================
   2. TICKER
   ================================ */

.ticker-wrapper {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: 80px;
    overflow: hidden;
}

.ticker-track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.ticker-card {
    background: rgba(0, 80, 80, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 20px 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 320px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, border-color 0.3s;
}

.ticker-card:hover {
    border-color: var(--accent-color);
    background: rgba(0, 90, 90, 0.8);
}

.ticker-icon {
    background: rgba(252, 183, 96, 0.1);
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.ticker-content h5 {
    font-size: 0.95rem;
    color: var(--accent-color);
    margin-bottom: 2px;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
}

.ticker-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.3;
}

.mini-chart {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 15px;
    width: 20px;
    margin-left: auto;
    opacity: 0.5;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 15px));
    }
}


/* ================================
   3. PROCESS COMPONENTS
   ================================ */

.process-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    max-width: 900px;
    margin: 0;
    padding-top: 20px;
}

.process-line-bg {
    position: absolute;
    top: 40px;
    left: 11%;
    right: 11%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.process-line-fill {
    position: absolute;
    top: 40px;
    left: 11%;
    right: 100%;
    height: 4px;
    background: var(--accent-color);
    z-index: 2;
    transition: right 4s linear;
}

.process-step {
    position: relative;
    z-index: 3;
    width: 22%;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.process-step.active {
    opacity: 1;
    transform: translateY(0);
}

.step-icon-wrapper {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
    position: relative;
}

.process-step.active .step-icon-wrapper {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(252, 183, 96, 0.3);
    transform: scale(1.1);
}

.step-icon {
    font-size: 2rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.process-step.active .step-icon {
    color: var(--accent-color);
}

.step-number {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-content h4 {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 10px;
    min-height: 2.4em;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}


/* ================================
   4. SUPPORT & METHODS
   ================================ */

.support-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.method-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.method-item {
    display: flex;
    gap: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

.method-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.method-icon {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-top: 5px;
}

.method-content h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: white;
}

.method-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Tech Panel */
.tech-panel {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 50, 50, 0.6));
    border: 1px solid var(--secondary-color);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.tech-panel h3 {
    margin-bottom: 30px;
    font-size: 1.8rem;
}


/* ================================
   5. TEAM
   ================================ */

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


.team-member--future {
    opacity: 0.6;
}

.team-member--future .avatar-placeholder {
    background-color: var(--text-muted);
}

.team-name-link {
    color: inherit;
    text-decoration: none;
}

.team-name-link:hover {
    color: var(--accent-color);
}

.team-member .avatar-photo {
    transition: opacity 0.2s ease;
}

.team-member a:hover .avatar-photo {
    opacity: 0.85;
}

.avatar-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    display: block;
}

.avatar-placeholder {
    width: 150px;
    height: 150px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
    border: 3px solid var(--accent-color);
}

.team-role {
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 5px;
}


/* ================================
   6. MODALS & FORMS
   ================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-active {
    display: flex;
}

.modal-content {
    background: var(--primary-color);
    border: 1px solid var(--secondary-color);
    padding: 50px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--secondary-color);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-family: 'Barlow', sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.login-submit {
    width: 100%;
    padding: 12px;
    background: var(--accent-color);
    border: none;
    border-radius: 8px;
    color: #003333;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
}

.login-error {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
    text-align: center;
}

/* Content Modal overlay — lighter than login modal, no blur */
.content-modal-overlay {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: none;
    align-items: flex-start;
    padding-top: 80px;
    padding-bottom: 40px;
}

/* Content Modals (Om BLOOM & Case pages) */
.content-modal {
    background: linear-gradient(135deg, #007474, #005c5c);
    border: 1px solid var(--secondary-color);
    border-radius: 20px;
    width: 92%;
    max-width: 900px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    overscroll-behavior: contain;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    padding: 50px;
}

.content-modal-body h1 {
    color: var(--text-color);
    font-size: 2rem;
    margin-bottom: 20px;
}

.content-modal-body h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
}

.content-modal-body h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.content-modal-body p+h3 {
    margin-top: 25px;
}

.content-modal-body p {
    max-width: 800px;
    margin-bottom: 10px;
}

.content-modal-body ul {
    margin-top: 10px;
    padding-left: 20px;
    list-style: disc;
}

.content-modal-body li {
    margin-bottom: 8px;
}

.content-modal .factor-box,
.content-modal .result-item {
    border-left: none;
}

.cv-modal-overlay {
    padding-top: 140px;
}

.cv-modal {
    max-width: 620px;
}

/* Modal flip transition */
.content-modal-overlay {
    perspective: 1200px;
}

@keyframes modal-flip-out-left {
    from {
        transform: rotateY(0deg);
        opacity: 1;
    }

    to {
        transform: rotateY(-90deg);
        opacity: 0;
    }
}

@keyframes modal-flip-in-from-right {
    from {
        transform: rotateY(90deg);
        opacity: 0;
    }

    to {
        transform: rotateY(0deg);
        opacity: 1;
    }
}

@keyframes modal-flip-out-right {
    from {
        transform: rotateY(0deg);
        opacity: 1;
    }

    to {
        transform: rotateY(90deg);
        opacity: 0;
    }
}

@keyframes modal-flip-in-from-left {
    from {
        transform: rotateY(-90deg);
        opacity: 0;
    }

    to {
        transform: rotateY(0deg);
        opacity: 1;
    }
}

.modal-flipping-out-left .content-modal {
    animation: modal-flip-out-left 0.25s ease-in forwards;
}

.modal-flipping-in-right .content-modal {
    animation: modal-flip-in-from-right 0.25s ease-out forwards;
}

.modal-flipping-out-right .content-modal {
    animation: modal-flip-out-right 0.25s ease-in forwards;
}

.modal-flipping-in-left .content-modal {
    animation: modal-flip-in-from-left 0.25s ease-out forwards;
}


/* ================================
   7. CASE PAGES
   ================================ */

/* Case Container & Layout */
.case-container {
    max-width: 1100px;
    margin: 120px auto 40px;
    padding: 0 5%;
}

.case-container .card {
    background: rgba(0, 0, 0, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Case Typography */
.case-container .card h1 {
    color: var(--accent-color);
    font-size: 2rem;
    margin-bottom: 10px;
}

.case-container .card h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
    border-bottom: none;
}

.case-container .card h2::after {
    display: none;
}

.case-container .card h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.case-container .card p {
    margin-bottom: 0;
    max-width: 800px;
}

.case-container .card ul {
    margin-top: 10px;
    padding-left: 20px;
    list-style: disc;
}

.case-container .card li {
    margin-bottom: 8px;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.back-link:hover {
    text-decoration: underline;
}

/* Graph Components */
.graph-container {
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.graph-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.graph-title {
    font-family: "Poppins", sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
}

.graph-legend {
    font-size: 0.9rem;
    color: var(--text-muted);
}

canvas {
    max-width: 100%;
    max-height: 400px;
}

/* Data Grids */
.factors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.factor-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.factor-box h4 {
    margin: 0 0 10px 0;
    color: #fff;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Chart & Bar Components */
.chart-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 200px;
    position: relative;
    margin-bottom: 15px;
}


.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 35%;
    height: 100%;
    justify-content: flex-end;
}

.bar-label {
    margin-top: 10px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
    color: var(--text-muted);
}

.bar-value {
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    z-index: 2;
    text-shadow: none;
}

/* Legend */
.legend {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    margin-bottom: 15px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.base {
    background: rgba(255, 255, 255, 0.2);
}

.dot.target {
    background: var(--accent-color);
}

.btn-container {
    margin-top: 40px;
    text-align: center;
}

/* Custom bar charts (socialt utfallskontrakt) */
.bar {
    width: 100%;
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8px;
}

.bar.base {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.bar.target {
    background: var(--accent-color);
    color: #003333;
}

/* Results list */
.results-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-item {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
}

.result-item h4 {
    margin-bottom: 8px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}


/* ================================
   8. MOBILE RESPONSIVE (PUBLIC)
   ================================ */

@media (max-width: 768px) {

    /* Hero */
    .hero {
        padding: 120px 5% 60px;
        min-height: auto;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .hero h1 br {
        display: none;
    }

    .hero p {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }

    .pre-title {
        font-size: 0.75rem;
        letter-spacing: 2px;
    }

    .cta-btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    /* Ticker */
    .ticker-wrapper {
        margin-top: 40px;
    }

    .ticker-card {
        min-width: 280px;
        padding: 15px 18px;
    }

    .ticker-content h5 {
        font-size: 0.85rem;
    }

    .ticker-content p {
        font-size: 0.75rem;
    }

    /* Process section - vertical on mobile */
    .process-container {
        flex-direction: column;
        gap: 30px;
        padding-top: 0;
    }

    .process-line-bg,
    .process-line-fill {
        display: none;
    }

    .process-step {
        width: 100%;
        opacity: 1;
        transform: none;
        display: flex;
        align-items: flex-start;
        gap: 20px;
        text-align: left;
    }

    .step-icon-wrapper {
        margin: 0;
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }

    .step-icon {
        font-size: 1.5rem;
    }

    .step-number {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }

    .step-content {
        flex: 1;
    }

    .step-content h4 {
        min-height: auto;
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .step-content p {
        font-size: 0.85rem;
    }

    /* Support grid */
    .support-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .method-item {
        padding: 15px;
        gap: 15px;
    }

    .method-content h4 {
        font-size: 1.05rem;
    }

    .method-content p {
        font-size: 0.9rem;
    }

    /* Tech panel */
    .tech-panel {
        padding: 25px;
    }

    .tech-panel h3 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }

    /* Case cards */
    .case-tag {
        font-size: 0.7rem;
    }

    /* Team */
    .team-member {
        margin-bottom: 20px;
    }

    .avatar-photo {
        width: 120px;
        height: 120px;
    }


    .avatar-placeholder {
        width: 120px;
        height: 120px;
        font-size: 2.5rem;
    }

    .team-role {
        font-size: 0.8rem;
    }

    /* Case Pages */
    .factors-grid {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 180px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .case-container {
        margin-top: 80px;
        padding: 0 4%;
    }

    .case-container .card {
        padding: 20px;
    }

    .case-container .card h1 {
        font-size: 1.5rem;
    }

    .case-container .card h2 {
        font-size: 1.2rem;
        margin-top: 30px;
    }

    /* Modal */
    .modal-content {
        padding: 30px 20px;
        width: 95%;
    }

    /* Content Modal */
    .content-modal-overlay {
        padding-top: 60px;
    }

    .content-modal {
        padding: 30px 20px;
        max-height: calc(100vh - 100px);
        width: 96%;
    }

    .content-modal-body h1 {
        font-size: 1.5rem;
    }

    .content-modal-body h2 {
        font-size: 1.2rem;
        margin-top: 30px;
    }
}
