/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --color-white: #ffffff;
    --color-black: #000000;
    --color-text: #000000;
    --color-bg: #fff9f1;

    --color-gray-100: #faf4ec;
    --color-gray-150: #f5f5f5;
    --color-gray-200: #f4eee6;
    --color-border: #e7e7e7;
    --color-muted: #888888;
    --color-dark-gray: #333333;
    --color-light-gray: #cccccc;

    --color-primary: #963ef6;
    --color-accent: #8d34ee;
    --color-support-01: #479ae4;
    --color-support-02: #ea4187;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Oxygen,
        Ubuntu,
        Cantarell,
        "Open Sans",
        "Helvetica Neue",
        sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-black);
    line-height: 1.6;
    overflow-x: hidden;
}

h3 {
    line-height: 1.6rem;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.main-wrapper {
    position: relative;
    z-index: 10;
    background-color: var(--color-bg);
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    overflow: hidden;
}

/* ==========================================================================
   Components
   ========================================================================== */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 12px 12px 16px;
    width: 80%;
    max-width: 480px;
    z-index: 1000;
    background: #edededb8;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 40px;
}

.logo img {
    height: 38px;
    vertical-align: middle;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--color-black);
    font-weight: 500;
}

.join-btn {
    background-color: var(--color-black);
    color: var(--color-white) !important;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
}

.hero {
    padding: 180px 0 40px;
    margin-left: 5%;
    margin-right: 5%;
    text-align: center;
}

.marquee-container {
    width: 90%;
    max-width: 1000px;
    height: 200px;
    overflow: hidden;
    margin: 0 auto 60px;
    display: flex;
    align-items: center;
    position: relative;
}

.marquee-container::before,
.marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    pointer-events: none;
    z-index: 2;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, var(--color-bg) 0%, rgba(255, 249, 241, 0.8) 30%, rgba(255, 249, 241, 0.4) 70%, transparent 100%);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, var(--color-bg) 0%, rgba(255, 249, 241, 0.8) 30%, rgba(255, 249, 241, 0.4) 70%, transparent 100%);
}

.marquee-content {
    display: flex;
    animation: marqueeScroll 90s linear infinite;
}

.marquee-content img {
    width: 130px;
    height: 130px;
    border-radius: 0;
    object-fit: contain;
    margin-right: 40px;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.logo-icon span {
    font-weight: bold;
    font-size: 1.8rem;
}

.hero h1 {
    font-size: 4rem;
    line-height: 3.8rem;
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero p {
    font-size: 1.1rem;
    color: #555;
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 50px;
}

.hero-btns a:last-child {
    color: var(--color-black);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.app-showcase-section {
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 20px;
    margin-top: 40px;
}

.app-showcase {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 40px;
}

.app-tabs {
    background-color: var(--color-gray-100);
    border-radius: 25px;
    min-width: 420px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.app-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.app-tab:hover {
    background-color: var(--color-gray-200);
}

.app-tab.active {
    background-color: var(--color-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.app-tab:not(.active) .app-info > *:not(h2):not(.app-badge) {
    display: none;
}

.app-tab .app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.app-tab .app-header-left {
    display: flex;
    align-items: center;
    gap: 0;
}

.app-tab .app-header-left h2 {
    font-size: 1.1rem;
    line-height: 1.1rem;
    height: auto;
    font-weight: 600;
}

.app-icon img {
    width: 60px;
    margin-right: 20px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
}

.app-info {
    flex: 1;
    width: 100%;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.app-tab.active .app-info {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.app-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-top: 24px;
    margin-bottom: 20px;
}

.app-store-btn img {
    width: 120px;
    height: auto;
}

.app-award {
    width: 60px;
    position: absolute;
    top: 24px;
    right: 60px;
}

.screens-carousel {
    position: relative;
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0 10px 10px;
}

.screens-carousel::-webkit-scrollbar {
    height: 6px;
}

.screens-carousel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.screens-carousel::-webkit-scrollbar-thumb {
    background: var(--color-muted);
    border-radius: 3px;
}

.screens-carousel::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.screen-carousel-content {
    display: none;
    gap: 20px;
    width: max-content;
    padding: 0 20px;
}

.screen-carousel-content.active {
    display: flex;
}

.screen-card {
    overflow: hidden;
    flex-shrink: 0;
}

.screen-card img {
    border-radius: 12px;
    width: 300px;
    height: 640px;
}

.testimonial-section {
    max-width: 1200px;
    margin: 200px auto;
    padding: 0 20px;
    text-align: center;
}

.testimonial-heading {
    font-size: 3rem;
    line-height: 3rem;
    width: 72%;
    font-weight: 700;
    margin: 0 auto 80px;
}

.testimonial-grid {
    column-count: 3;
    column-gap: 30px;
}

.testimonial-card {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    margin-bottom: 30px;
    background: var(--color-white);
    border-radius: 20px;
    padding: 25px;
    text-align: left;
}

.testimonial-user {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.testimonial-user img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.testimonial-role {
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-top: -2px;
}

.testimonial-card p {
    font-size: 0.95rem;
    color: var(--color-dark-gray);
    line-height: 1.5;
}

.testimonial-card.image-only {
    background-color: var(--color-accent);
    text-align: center;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px;
}

.testimonial-card.image-only img {
    width: 100%;
    margin-bottom: 20px;
}

.image-only-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.image-only-content img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.image-only-content p {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-dark-gray);
}

.more-button {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-muted);
    z-index: 10;
}

.mission-section {
    max-width: 1200px;
    margin: 200px auto;
    padding: 0 20px;
    text-align: center;
}

.mission-section p {
    font-size: 2rem;
    font-weight: 700;
    width: 90%;
    margin: 0 auto;
    padding-bottom: 32px;
}

.mission-section span {
    color: var(--color-support-02);
    font-size: 1rem;
    font-weight: 600;
    display: block;
    letter-spacing: 2px;
    text-transform: uppercase;
    height: 20px;
    margin-bottom: 24px;
}

.flyout-menu {
    display: none;
    position: absolute;
    top: 50px;
    right: 20px;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    min-width: 160px;
    z-index: 20;
}

.flyout-menu a {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--color-dark-gray);
    font-size: 0.95rem;
    white-space: nowrap;
}

.flyout-menu a:hover {
    background-color: var(--color-gray-150);
}

.site-footer {
    background: var(--color-accent);
    color: var(--color-black);
    padding: 80px 30px 30px;
    position: relative;
    z-index: 1;
    margin-top: -80px;
    padding-top: 160px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-left {
    flex: 1;
    min-width: 250px;
}

.footer-logo {
    width: 40px;
    height: 40px;
    margin-bottom: 15px;
}

.footer-left p {
    font-size: 0.95rem;
    color: var(--color-black);
    margin-bottom: 20px;
    max-width: 300px;
}

.footer-badges img {
    margin-right: 12px;
    border-radius: 8px;
}

.footer-links {
    display: flex;
    gap: 80px;
    flex: 2;
    justify-content: flex-end;
    min-width: 300px;
    margin-right: 60px;
}

.footer-links div {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: var(--color-black);
    text-decoration: none;
    font-size: 0.95rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-bottom {
    border-top: 4px solid var(--color-black);
    margin-top: 120px;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--color-black);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-bottom a {
    color: var(--color-black);
    text-decoration: none;
    margin-left: 20px;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

.footer-bottom a[href*="madsen.today"]::first-letter {
    color: #ff0000;
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.inline-beta {
    color: var(--color-support-01);
    font-size: 0.6rem;
    font-weight: 600;
    display: block;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    height: 20px;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 1000px) {
    .testimonial-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 160px 20px 20px 20px;
    }
    .hero h1 {
        font-size: 2.7rem;
        line-height: 2.8rem;
    }
    .testimonial-grid {
        column-count: 1;
    }
}

@media (max-width: 768px) {
    .hero {
        padding-left: 0;
        padding-right: 0;
    }

    .marquee-container {
        width: 100vw;
        max-width: none;
        margin-left: calc(-50vw + 50%);
        margin-right: 0;
    }

    .marquee-container::before,
    .marquee-container::after {
        display: none;
    }

    .app-showcase {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .app-tabs {
        width: 100%;
        max-width: none;
        min-width: auto;
        padding: 0;
        background-color: transparent;
        box-shadow: none;
    }

    .app-tab {
        background-color: var(--color-gray-100);
        position: relative;
        transition:
            max-height 0.3s ease,
            padding 0.3s ease,
            all 0.2s ease;
        min-height: 84px;
        max-height: 500px;
        padding: 20px;
    }

    .app-tab:not(.active) {
        max-height: 70px;
        padding: 12px 20px;
    }

    .app-tab .app-info > *:not(h2):not(.app-badge) {
        display: block;
    }

    .app-icon {
        margin-right: 0px;
    }

    .app-info {
        flex-grow: 1;
        width: calc(100% - 84px);
    }

    .screens-carousel {
        padding: 0;
    }

    .screen-carousel-content {
        padding: 0;
    }

    .screen-card img {
        width: 300px;
        height: 640px;
    }

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
        margin-right: 0;
        flex: 1;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .footer-bottom div {
        margin-top: 10px;
    }
    .footer-bottom div:first-child {
        margin-top: 0;
    }
    .footer-bottom a {
        margin-left: 0;
    }
}
