/* Accessibility and Focus Styles */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 1000;
    font-weight: bold;
}

.skip-link:focus {
    top: 6px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Base Styles */
*:focus {
    outline: 3px solid #4a154b;
    outline-offset: 2px;
}

button:focus,
a:focus {
    outline: 3px solid #4a154b;
    outline-offset: 2px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    margin: 0;
    padding: 40px;
    line-height: 1.6;
    color: #1a1a1a;
    font-size: 16px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    color: #1a1a1a;
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.subtitle {
    color: #666;
    font-size: 18px;
    font-weight: 400;
}

.highlight {
    color: #4a154b;
    font-weight: 600;
}

.storyboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.mockup-card {
    background: white;
    border: 2px solid #e1e4e8;
    border-radius: 16px;
    padding: 18px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.mockup-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.step-badge {
    position: absolute;
    top: -12px;
    left: 18px;
    background: linear-gradient(135deg, #4a154b, #7c3aed);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(74, 21, 75, 0.3);
}

.mockup-screen {
    border: 2px solid #ddd;
    border-radius: 12px;
    background: #fafafa;
    height: 280px;
    overflow: hidden;
    margin-bottom: 12px;
    font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif;
    position: relative;
}

.screen-header {
    background: #e8e8e8;
    height: 30px;
    border-bottom: 2px solid #ccc;
    position: relative;
}

/* Simplified dots using CSS pseudo-elements */
.screen-header::before,
.screen-header::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #999;
}

.screen-header::before {
    left: 10px;
    background: #ff5f57;
    box-shadow: 15px 0 0 #ffbd2e, 30px 0 0 #28ca42;
}

/* Content positioning - restore padding structure - .mockup-screen consolidated above */

.app-listing {
    padding: 20px;
    text-align: center;
}

.slack-layout {
    padding: 20px 20px 20px 0;
    height: calc(100% - 30px);
    display: flex;
}

.whatsapp-header {
    background: #075e54;
    color: white;
    padding: 15px;
    font-weight: bold;
    font-size: 14px;
    margin: 0 0 15px 0;
}

.split-view {
    height: calc(100% - 30px);
    margin: 0;
    display: flex;
    gap: 2px;
}

.wa-system-message {
    padding: 0 20px;
    text-align: center;
    color: #666;
    margin: 20px 0;
    font-size: 14px;
}

.wa-message {
    margin: 8px 20px;
    border-radius: 8px;
    padding: 10px;
    max-width: 80%;
    font-size: 14px;
}

/* Slack Styles - consolidated above */

.slack-sidebar {
    width: 50px;
    background: #4a154b;
    height: 100%;
}

.slack-main {
    flex: 1;
    padding: 15px;
}

.channel-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.slack-message {
    background: #f0f0f0;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.slack-message.bot {
    background: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.otp-display {
    background: #fff3cd;
    border: 2px dashed #ffc107;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin: 10px 0;
    letter-spacing: 3px;
}

/* Styles consolidated above - removed duplicates */

.wa-message.sent {
    background: #dcf8c6;
    margin-left: auto;
}

.wa-message.received {
    background: white;
    border: 1px solid #ddd;
}

.success-message {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

.whatsapp-side {
    flex: 1;
    background: #e5ddd5;
    padding: 20px;
}

.slack-side {
    flex: 1;
    background: #f8f8f8;
    padding: 20px;
}

.platform-header {
    background: #075e54;
    color: white;
    margin: 0 0 10px 0;
    padding: 10px;
    font-size: 12px;
    font-weight: bold;
}

.slack-side .platform-header {
    background: #4a154b;
}

/* Size variations */
.small { font-size: 12px; }
.medium { font-size: 13px; }
.reply { margin-left: 20px; }
.mockup-screen.tall { height: 320px; }

/* Lead Capture Form Styles */
.lead-form-section {
    background: linear-gradient(135deg, #4a154b, #7c3aed);
    color: white;
    padding: 60px 40px;
    margin: 40px -40px 0 -40px;
    text-align: center;
}

.lead-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.lead-form-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
}

.lead-form-subtitle {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

.lead-form {
    background: white;
    border-radius: 16px;
    padding: 40px;
    text-align: left;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-label {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input,
.form-select,
.form-textarea {
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #4a154b;
    box-shadow: 0 0 0 3px rgba(74, 21, 75, 0.1);
}

.form-input:invalid:not(:focus),
.form-select:invalid:not(:focus),
.form-textarea:invalid:not(:focus) {
    border-color: #dc3545;
}

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

.form-submit-btn {
    background: linear-gradient(135deg, #4a154b, #7c3aed);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    margin-top: 20px;
    position: relative;
}

.form-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 21, 75, 0.3);
}

.form-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 4px;
    min-height: 20px;
}

.form-message {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Form Styles */
@media (max-width: 768px) {
    .lead-form-section {
        padding: 40px 20px;
        margin: 40px -20px 0 -20px;
    }
    
    .lead-form {
        padding: 30px 20px;
    }
    
    .lead-form-title {
        font-size: 28px;
    }
    
    .lead-form-subtitle {
        font-size: 16px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Marketplace Styles - using the positioned version above */

.app-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.app-icon-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 12px;
}

.app-name {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.install-btn {
    background: #4a154b;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: bold;
    margin-top: 15px;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.install-btn:hover,
.install-btn:focus {
    background: #5a1e5b;
    transform: translateY(-1px);
}

.install-btn:active {
    transform: translateY(0);
}

.step-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.step-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e1e4e8;
}

.footer-text {
    color: #666;
    font-size: 14px;
}

.tag {
    display: inline-block;
    background: #4a154b;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin: 0 4px;
    font-weight: 500;
}

/* New Semantic Element Styles */
.app-description {
    font-size: 13px;
    color: #666;
    margin: 8px 0;
}

.app-rating {
    margin: 8px 0;
}

/* .step-7-featured removed - Step 7 displays normally in grid flow next to Step 6 */

.tags-container {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.tags-container .tag {
    display: inline-block;
}

/* SEO-enhanced section and footer styles */
.section-heading {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 40px;
    padding: 0 20px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-heading {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.footer-benefits {
    margin: 30px 0;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.benefits-heading {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
    text-align: center;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #444;
    line-height: 1.5;
}

.benefits-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4a154b;
    font-weight: bold;
    font-size: 16px;
}

/* Enhanced Contrast for Better Accessibility */
.mockup-card:focus-within {
    outline: 2px solid #4a154b;
    outline-offset: 2px;
}

/* Improved Motion for Users with Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    .mockup-card {
        transition: none;
    }
    
    .install-btn:hover,
    .install-btn:focus {
        transform: none;
    }
    
    .install-btn:active {
        transform: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .mockup-card {
        border: 3px solid #000;
    }
    
    .step-badge {
        border: 2px solid #fff;
    }
    
    .highlight {
        background: #000;
        color: #fff;
        padding: 0 4px;
    }
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .storyboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .storyboard-grid {
        grid-template-columns: 1fr;
    }
    
    body {
        padding: 20px;
    }
    
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 28px;
        flex-direction: column;
        gap: 8px;
    }
    
    .logo {
        width: 40px;
        height: 40px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .section-heading {
        font-size: 22px;
        padding: 0 10px;
    }
    
    .footer-heading {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .logo {
        width: 36px;
        height: 36px;
    }
    
    .app-icon-img {
        width: 48px;
        height: 48px;
    }
    
    .storyboard-grid {
        gap: 15px;
    }
    
    .mockup-screen {
        height: 240px;
    }
    
    .section-heading {
        font-size: 20px;
        padding: 0 5px;
    }
    
    .footer-heading {
        font-size: 18px;
    }
    
    .benefits-heading {
        font-size: 16px;
    }
}

/* SVG optimisation */
.logo, .app-icon-img {
    object-fit: contain;
    /* Ensure SVG renders crisply */
    shape-rendering: geometricPrecision;
    text-rendering: geometricPrecision;
}

/* Ensure SVG scales properly on high-DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo, .app-icon-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimize-contrast;
    }
}