* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: auto;
    background: #ffffff;
}

.homescreen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
}

.intro-section {
    margin-bottom: 16rem;
    margin-top: -18rem;
    animation: fadeInUp 1s ease-out;
}

.name-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
}

.tagline {
    font-size: 1.4rem;
    color: #666666;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.teaser-link {
    color: #333333;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}

.teaser-link .text {
    transition: transform 0.5s ease;
    display: inline-block;
}

.teaser-link .arrow {
    display: inline-block;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

/* Effekt vid hover */
.teaser-link:hover .text {
    transform: translateX(15px);
}

.teaser-link:hover .arrow {
    transform: translateX(60px) rotate(720deg);
    opacity: 0;
}

.subtitle {
    font-size: 1.1rem;
    color: #888888;
    font-style: italic;
}

.timeline-wrapper {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    animation: slideInUp 1s ease-out 0.3s both;
}

/* Huvudlinjen */
.timeline-line {
    position: relative;
    width: 100%;
    height: 4px;
    background: #000000;
    margin: 100px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .timeline-line::after {
        content: '';
        position: absolute;
        right: -12px;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-left: 18px solid #000000;
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
    }


/* Årtal på linjen */
.year-marker {
    position: absolute;
    background: #000000;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 10;
}

    .year-marker[data-year="2007"] {
        left: 5%;
    }
    .year-marker[data-year="2011"] {
        left: 15%;
    }

    .year-marker[data-year="2014"] {
        left: 28%;
    }

    .year-marker[data-year="2015"] {
        left: 34%;
    }

    .year-marker[data-year="2019"] {
        left: 50%;
    }

    .year-marker[data-year="2021"] {
        left: 60%;
    }

    .year-marker[data-year="2024"] {
        left: 76%;
    }

    .year-marker.current {
        right: 8%;
    }

    .year-marker.current {
        background: #1e90ff;
        animation: pulse 2s infinite;
        top: -40px;
    }

/* Korta streck MELLAN årtalen */
.timeline-tick {
    position: absolute;
    width: 2px;
    height: 12px;
    background: #000000;
    top: -4px;
    z-index: 5;
    transform: translateX(-50%);
}

/* Individuella timeline ticks */
.timeline-tick[style*="left: 8%"] {
    height: 15px; /* Mellan 2007-2011 */
    width: 4px;
    margin-left: -111px; /* Flytta åt vänster */
}

.timeline-tick[style*="left: 14.5%"] {
    height: 15px; /* Mellan 2011-2012 */
    width: 4px;
    margin-left: -40px; /* Flytta åt vänster */
}

.timeline-tick[style*="left: 23%"] {
    height: 15px; /* Mellan 2012-2014 */
    width: 4px;
    margin-left: -20px; /* Flytta åt vänster */
}

.timeline-tick[style*="left: 31.5%"] {
    height: 15px; /* Mellan 2014-2015 */
    width: 4px;
    margin-left: -90px; /* Flytta åt vänster */
}

.timeline-tick[style*="left: 43.5%"] {
    height: 15px; /* Mellan 2015-2019 */
    width: 4px;
    margin-left: -190px; /* Flytta åt vänster */
}

.timeline-tick[style*="left: 58.5%"] {
    height: 15px; /* Mellan 2019-2021 */
    width: 3px;
    margin-left: -260px; /* Flytta åt vänster */
}

.timeline-tick[style*="left: 71.5%"] {
    height: 15px; /* Mellan 2021-2024 */
    width: 3px;
    margin-left: -390px; /* Flytta åt vänster */
}

.timeline-tick[style*="left: 85%"] {
    height: 15px; /* Ny tick efter 2024 */
    width: 3px;
    margin-left: -520px; /* Flytta åt vänster */
}

.timeline-tick[style*="left: 92%"] {
    height: 15px; /* Ännu en ny tick */
    width: 3px;
    margin-left: -500px; /* Flytta åt vänster */
}

.timeline-tick[style*="left: 96%"] {
    height: 15px; /* Tredje ny tick */
    width: 4px;
    margin-left: -400px; /* Flytta åt vänster */
}

.timeline-tick[style*="left: 99%"] {
    height: 15px; /* Fjärde ny tick */
    width: 3px;
    margin-left: -380px; /* Flytta åt vänster */
}

.progress-indicator {
    position: absolute;
    right: -140px;
    top: -15px;
    background: #1e90ff;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Timeline items */
.timeline-item {
    position: absolute;
    z-index: 5;
    cursor: pointer;
}

    .timeline-item.top {
        bottom: 100px;
    }

    .timeline-item.bottom {
        top: 200px;
    }

    .timeline-item.level {
        top: -20px;
    }

    .timeline-item.center {
        top: 50px; /* I mitten av tidslinjen */
    }

    /* Positioner för items - pilar ska peka exakt på årtalen */
    .timeline-item[data-year="start"] {
        left: -25%;
        width: 180px;
        z-index: 10;
    }
    .timeline-item[data-year="2007-2011"] {
        left: -5%;
        width: 180px;
        z-index: 10;
    }

    .timeline-item[data-year="2007-2012"] {
        left: 7%;
        width: 180px;
    }

    .timeline-item[data-year="2011"] {
        left: 15%;
        width: 180px;
    }

    .timeline-item[data-year="2014-2015"] {
        left: 29%;
        width: 180px;
    }

    .timeline-item[data-year="2015-2019"] {
        left: 36%;
        width: 180px;
    }

    .timeline-item[data-year="2019-2021"] {
        left: 52%;
        width: 180px;
    }

    .timeline-item[data-year="2021-2024"] {
        left: 63%;
        width: 180px;
    }

    .timeline-item[data-year="2024"] {
        left: 79%;
        width: 180px;
    }

    .timeline-item[data-year="future"] {
        right: -220px;
        width: 180px;
        top: 40px;
    }

    /* Hover-effekt */
    .timeline-item:hover .timeline-content {
        transform: translateY(-3px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.15);
        border-color: #1e90ff;
    }

/* Innehållsboxar */
.timeline-content {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 6px;
    padding: 0.8rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.year-label {
    color: #666666;
    font-size: 0.65rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-content h3 {
    color: #000000;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    line-height: 1.2;
}

.timeline-content p {
    color: #666666;
    font-size: 0.75rem;
    line-height: 1.3;
}

/* Diagonala prickar från rutorna till tidslinjen */
.connector {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8;
    display: flex;
    gap: 0px;
}

    /* Prickar för top items - diagonalt nedåt höger (↘ riktning) */
    .connector.top {
        top: 100%;
        margin-top: 70px;
        height: 20px;
        align-items: center;
        justify-content: flex-start;
        flex-direction: row;
        transform: translateX(-50%) rotate(45deg);
        transform-origin: center center;
    }

    /* Individuella justeringar per timeline-item */
.timeline-item[data-year="2007-2011"] .connector.top {
    margin-top: 80px; /* Företagsekonomi */
    margin-left: 50px;
    transform: translateX(-40%) translateY(-20px) rotate(50deg);
}

.timeline-item[data-year="2011"] .connector.top {
    margin-top: 80px; 
    margin-left: -130px;
    transform: translateX(-40%) translateY(55px) rotate(125deg);
}

.timeline-item[data-year="2015-2019"] .connector.top {
    margin-top: 80px; 
    margin-left:-20px;
    transform: translateX(-40%) translateY(-90px) rotate(-40deg);
}

.timeline-item[data-year="2021-2024"] .connector.top {
    margin-top: 80px; 
    margin-left: -20px;
    transform: translateX(-40%) translateY(-90px) rotate(-40deg);
}

    /* Bottom items individuella justeringar */
.timeline-item[data-year="2007-2012"] .connector.bottom {
    top: -220px; /* Systembolaget */
    transform: translateX(-80%) translateY(-20px) rotate(-130deg);
    margin-left: -20px;
}

    .timeline-item[data-year="2014-2015"] .connector.bottom {
        top: -220px; /* Tallink Silja */
        margin-left: -50px;
        transform: translateX(-70%) translateY(-31px) rotate(-130deg);
    }

    .timeline-item[data-year="2019-2021"] .connector.bottom {
        top: -220px; /* Pedantia */
        margin-left: -50px;
        transform: translateX(-70%) translateY(-30px) rotate(-130deg);
    }

    .timeline-item[data-year="2024"] .connector.bottom {
        top: -220px; /* NTI Programmering */
        margin-left: -70px;
        transform: translateX(-70%) translateY(-40px) rotate(-130deg);
    }

    /* Prickar för center items - horisontellt höger */
    .connector.center {
        top: -90px;
        height: 20px;
        align-items: center;
        justify-content: flex-start;
        flex-direction: row;
        transform: translateX(-50%) rotate(0deg);
    }

    .timeline-item[data-year="start"] .connector.center {
        margin-left: 80px;
        transform: translateX(-40%) translateY(0px) rotate(0deg);
        display: none;
    }

    /* Prickar för bottom items - diagonalt uppåt höger (↖ riktning) */
    .connector.bottom {
        top: -220px;
        height: 20px;
        align-items: center;
        justify-content: flex-start;
        flex-direction: row;
        transform: translateX(-50%) rotate(-45deg);
        transform-origin: center center;
    }

    /* Alla prickar med box-shadow för jämna avstånd */
    .connector {
        position: relative;
    }

    .connector:not(.level)::before {
        content: '';
        width: 6px;
        height: 6px;
        background: #000000;
        border-radius: 50%;
        border: 0.5px solid #000000;
        box-shadow: 18px 0 0 0 #000000, 36px 0 0 0 #000000, 54px 0 0 0 #000000;
    }

    .timeline-item:hover .connector:not(.level)::before {
        animation: runway-lights 1.5s infinite;
    }

    /* Omvänd animation för items som pekar uppåt/vänster */
    .timeline-item[data-year="2015-2019"]:hover .connector.top::before,
    .timeline-item[data-year="2021-2024"]:hover .connector.top::before {
        animation: runway-lights-reverse 1.5s infinite;
    }

    @keyframes runway-lights {
        0% {
            background: #ffffff;
            box-shadow: 18px 0 0 0 #000000, 36px 0 0 0 #000000, 54px 0 0 0 #000000;
        }
        25% {
            background: #000000;
            box-shadow: 18px 0 0 0 #ffffff, 36px 0 0 0 #000000, 54px 0 0 0 #000000;
        }
        50% {
            background: #000000;
            box-shadow: 18px 0 0 0 #000000, 36px 0 0 0 #ffffff, 54px 0 0 0 #000000;
        }
        75% {
            background: #000000;
            box-shadow: 18px 0 0 0 #000000, 36px 0 0 0 #000000, 54px 0 0 0 #ffffff;
        }
        100% {
            background: #ffffff;
            box-shadow: 18px 0 0 0 #000000, 36px 0 0 0 #000000, 54px 0 0 0 #000000;
        }
    }

    @keyframes runway-lights-reverse {
        0% {
            background: #000000;
            box-shadow: 18px 0 0 0 #000000, 36px 0 0 0 #000000, 54px 0 0 0 #ffffff;
        }
        25% {
            background: #000000;
            box-shadow: 18px 0 0 0 #000000, 36px 0 0 0 #ffffff, 54px 0 0 0 #000000;
        }
        50% {
            background: #000000;
            box-shadow: 18px 0 0 0 #ffffff, 36px 0 0 0 #000000, 54px 0 0 0 #000000;
        }
        75% {
            background: #ffffff;
            box-shadow: 18px 0 0 0 #000000, 36px 0 0 0 #000000, 54px 0 0 0 #000000;
        }
        100% {
            background: #000000;
            box-shadow: 18px 0 0 0 #000000, 36px 0 0 0 #000000, 54px 0 0 0 #ffffff;
        }
    }

/* Horisontella prickar för level items (← riktning) */
.connector.level {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    height: auto;
    width: 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0px;
}

    .connector.level::before {
        content: '';
        width: 6px;
        height: 6px;
        background: #000000;
        border-radius: 50%;
        border: 0.5px solid #000000;
        box-shadow: -18px 0 0 0 #000000, -36px 0 0 0 #000000, -54px 0 0 0 #000000;
    }

    .timeline-item:hover .connector.level::before {
        animation: runway-lights-left 1.5s infinite;
    }

    @keyframes runway-lights-left {
        0% {
            background: #000000;
            box-shadow: -18px 0 0 0 #000000, -36px 0 0 0 #000000, -54px 0 0 0 #ffffff;
        }
        25% {
            background: #000000;
            box-shadow: -18px 0 0 0 #000000, -36px 0 0 0 #ffffff, -54px 0 0 0 #000000;
        }
        50% {
            background: #000000;
            box-shadow: -18px 0 0 0 #ffffff, -36px 0 0 0 #000000, -54px 0 0 0 #000000;
        }
        75% {
            background: #ffffff;
            box-shadow: -18px 0 0 0 #000000, -36px 0 0 0 #000000, -54px 0 0 0 #000000;
        }
        100% {
            background: #000000;
            box-shadow: -18px 0 0 0 #000000, -36px 0 0 0 #000000, -54px 0 0 0 #ffffff;
        }
    }

/* Current item */
.timeline-item.current .timeline-content {
    border-color: #1e90ff;
}

.timeline-item.current .connector {
    color: #1e90ff;
}

.current-badge {
    display: inline-block;
    background: #1e90ff;
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@media (max-width: 1200px) {
    .timeline-wrapper {
        max-width: 1100px;
    }

    .timeline-item {
        width: 250px;
    }

    .progress-indicator {
        right: -120px;
    }
}

@media (max-width: 1800px) {
    body {
        overflow-x: auto;
    }

    .homescreen {
        overflow-x: auto;
    }

    .timeline-wrapper {
        transform: scale(0.8);
        transform-origin: left center;
        min-width: 1400px;
        margin-left: 320px;
    }
}

@media (max-width: 767px) {
    .homescreen {
        padding: 1rem;
        flex-direction: column;
        justify-content: flex-start;
        min-height: auto;
    }

    .intro-section {
        margin-bottom: 2rem;
        margin-top: 0;
    }

    .name-title {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1.1rem;
    }

    /* Göm desktop timeline */
    .timeline-wrapper {
        display: none;
    }

    /* Mobil timeline - vertikal lista */
    .mobile-timeline {
        display: flex !important;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .mobile-timeline-item {
        background: #ffffff;
        border: 2px solid #000000;
        border-radius: 6px;
        padding: 1rem;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .mobile-timeline-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        border-color: #1e90ff;
    }

    .mobile-timeline-item .year {
        color: #666666;
        font-size: 0.75rem;
        font-weight: 600;
        margin-bottom: 0.3rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-timeline-item h3 {
        margin: 0 0 0.5rem 0;
        font-size: 0.95rem;
        font-weight: 600;
        color: #000000;
    }

    .mobile-timeline-item p {
        margin: 0;
        color: #666666;
        font-size: 0.8rem;
        line-height: 1.3;
    }
}

/* Desktop - göm mobilversionen */
.mobile-timeline {
    display: none;
}
