/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
}

body {
    font-family: 'Instrument Sans', sans-serif;
    background-color: #F0F8FF;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.8s ease;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
}

/* Text wrapping for paragraphs and headers */
p, h1, h2, h3, h4, h5, h6 {
    text-wrap: pretty;
}

/* Welcome Section - Full Screen */
.welcome-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 40px 0;
}

.welcome-content {
    max-width: 800px;
    padding: 0 20px;
}

.main-title {
    font-family: 'Instrument Serif', serif;
    font-size: 3rem; /* Default fallback */
    font-weight: 400;
    color: #000;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.main-description {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 1rem; /* Default fallback */
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.welcome-image {
    transform: scale(1.2);
    margin: 0 auto 32px auto;
    display: block;
}

/* Social Media Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
}

.social-link {
    display: flex;
    text-decoration: none;
    transition: opacity 0.2s ease;
    padding: 12px;
    min-width: 48px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    opacity: 0.7;
}

.social-link:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px #000 !important;
    border-radius: 8px !important;
}

.social-icon {
    width: 32px;
    height: 32px;
    display: block;
}

/* Apps Container - Carousel Layout */
.apps-container {
    display: flex;
    flex-direction: column;
}

/* App Sections - Natural Height */
.app-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px 0;
}

/* Remove individual section backgrounds - handled by JavaScript */

.app-content {
    text-align: center;
    max-width: 600px;
    padding: 0 20px;
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.app-icon-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.app-title {
    font-family: 'Instrument Serif', serif;
    font-size: 2.5rem; /* 40pt equivalent */
    font-weight: 400;
    color: #000;
}

.app-description {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 1rem; /* Default fallback */
    color: #666;
    max-width: 500px;
    margin: 0 auto 32px;
}

.app-status {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 1rem;
    color: #999;
    margin-top: 16px;
}

/* Links */
.author-link {
    color: #2400ff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.author-link:hover {
    color: #1a00cc; /* Slightly darker blue on hover */
}

.author-link:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px #000 !important;
    border-radius: 8px !important;
}

/* Author name styling to look like a link */
.author-name {
    color: #2400ff;
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
    position: relative;
}

.author-name:hover {
    color: #1a00cc; /* Slightly darker blue on hover */
}

.author-name:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px #000 !important;
    border-radius: 8px !important;
}

/* Screen reader only class for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.download-link {
    display: inline-block;
    text-decoration: none;
}

.download-link:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px #000 !important;
    border-radius: 8px !important;
}

/* Download Button */
.download-button {
    cursor: pointer;
    transition: opacity 0.2s ease;
    display: block;
}

.download-button:hover {
    opacity: 0.8;
}

/* Fretta Link - wraps icon and title */
.fretta-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
    transition: opacity 0.2s ease;
    margin-bottom: 16px;
    border: none !important;
    border-bottom: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.fretta-link:hover {
    opacity: 0.8;
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.fretta-link:focus {
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
    outline: none !important;
    box-shadow: 0 0 0 2px #000 !important;
    border-radius: 8px !important;
}

.fretta-link:visited {
    text-decoration: none !important;
    color: inherit;
    border-bottom: none !important;
}

.fretta-link:active {
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
    outline: none !important;
    color: inherit !important;
}

.fretta-link * {
    text-decoration: none !important;
}

.fretta-link .app-title {
    border-bottom: none !important;
    text-decoration: none !important;
    color: inherit;
}

.fretta-link .app-icon {
    transition: transform 0.2s ease;
}

.fretta-link:hover .app-icon {
    transform: scale(1.05);
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 1000;
}

.indicator-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease, opacity 0.2s ease;
    margin: 0 auto;
}

.indicator-dot.active {
    background-color: rgba(0, 0, 0, 0.6);;
    transform: scale(1.2);
}

.indicator-dot:hover {
    background-color: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

/* Scroll Chevron */
.scroll-chevron {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease, opacity 0.2s ease;
    animation: breathe 4s ease-in-out infinite;
    margin-top: 8px;
}

/* Back icon alignment */
.scroll-chevron image {
    display: block;
    margin: 0 auto;
    position: relative;
    left: 1px;
    opacity: 0.8;
}

@keyframes breathe {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1) translateY(0);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05) translateY(-8px);
    }
}

/* Responsive Design */

/* Desktop - 112pt font size */
@media (min-width: 1200px) {
    .main-title {
        font-size: 7rem;
    }
    
    .main-description {
        font-size: 1.125rem;
    }
    
    .app-description {
        font-size: 1.125rem;
    }
    
    .app-title {
        font-size: 3.125rem; /* 50pt equivalent for desktop */
    }
    
    .social-icon {
        width: 36px;
        height: 36px;
    }
}

/* Tablet - 72pt font size */
@media (min-width: 768px) and (max-width: 1199px) {
    .main-title {
        font-size: 4.5rem;
    }
    
    .main-description {
        font-size: 1.125rem;
    }
    
    .app-description {
        font-size: 1.125rem;
    }
    
    .welcome-content {
        padding: 0 56px;
    }
    
    .app-content {
        padding: 0 56px;
    }
    
    .app-title {
        font-size: 2.75rem; /* 44pt equivalent for tablet */
    }
    
    .social-icon {
        width: 34px;
        height: 34px;
    }
}

/* Mobile - 56pt font size */
@media (max-width: 767px) {
    .welcome-content {
        padding: 0 24px;
    }
    
    .main-title {
        font-size: 4rem; 
    }
    
    .main-description {
        font-size: 1rem; 
    }
    
    .app-description {
        font-size: 1rem;
    }
    
    .app-title {
        font-size: 2.25rem; /* 36pt equivalent for mobile */
    }
    
    .app-icon {
        width: 70px;
        height: 70px;
    }
    
    .app-content {
        padding: 0 24px;
    }
    
    .social-icon {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 3rem;
    }
    
    .app-title {
        font-size: 1.875rem; /* 30pt equivalent for small mobile */
    }
}