/* Custom Styles for the Seam(De)Stress website */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .fade-in {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
    .fade-in.visible {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #F7F7FB;
}

.dark ::-webkit-scrollbar-track {
    background: #18181B;
}

::-webkit-scrollbar-thumb {
    background: #A1A1AA;
    border-radius: 5px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #3F3F46;
}

::-webkit-scrollbar-thumb:hover {
    background: #71717A;
}

/* Header Shadow on Scroll */
header.scrolled {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Code Block Styling */
pre {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
}

/* Animation for fade-in on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #4F46E5;
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

/* Skip Link 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-width: 0;
}

.sr-only:focus {
    position: absolute;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* FAQ / accordion styling */
details summary {
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary:focus {
    outline: 2px solid #4F46E5;
    outline-offset: -2px;
    border-radius: 0.5rem;
}

/* Print Styles */
@media print {
    header,
    footer,
    #back-to-top {
        display: none;
    }
}

/* Mobile Menu Animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.open {
    max-height: 500px;
}

/* Back to Top Button */
#back-to-top {
    transition: opacity 0.3s ease;
}

#back-to-top.show {
    opacity: 1;
    pointer-events: all;
}

/* Table Responsive */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Header logo sizing */
.header-logo {
    max-width: min(60%, 240px);
}

@media (min-width: 768px) and (max-width: 1023px) {
    .header-logo {
        max-width: 50% !important;
    }
    .header-logo img {
        height: 2rem !important;
    }
    .header-logo span {
        font-size: 0.875rem !important;
    }
}

@media (max-width: 360px) {
    .header-logo span {
        display: none !important;
    }
    .header-logo {
        max-width: 40% !important;
    }
}

/* Selection Color */
::selection {
    background-color: #4F46E5;
    color: white;
}

::-moz-selection {
    background-color: #4F46E5;
    color: white;
}

/* ==========================================================================
   Reusable components (badges, hero shot, CTAs)
   ========================================================================== */

/* Comparison / savings teaser pill on homepage */
.sds-teaser {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: rgba(13, 148, 136, 0.1);
    border: 1px solid rgba(13, 148, 136, 0.3);
    color: #0D9488;
    font-weight: 600;
    font-size: 0.85rem;
}

.dark .sds-teaser {
    background: rgba(13, 148, 136, 0.16);
    color: #2DD4BF;
}

/* Hero CTAs — make primary truly dominant */
.sds-cta-primary {
    background: linear-gradient(135deg, #4F46E5 0%, #0D9488 100%);
    color: #ffffff;
    box-shadow: 0 16px 32px -12px rgba(79, 70, 229, 0.5);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.sds-cta-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 40px -14px rgba(79, 70, 229, 0.55);
}

/* Hero screenshot frame */
.sds-hero-shot {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Closing CTA section */
.sds-closing-cta {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    padding: 3rem 1.5rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.95) 0%, rgba(13, 148, 136, 0.95) 100%);
    color: #ffffff;
    text-align: center;
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.15);
}

.sds-closing-cta h2 { color: #ffffff; }
.sds-closing-cta p { color: rgba(255, 255, 255, 0.95); }

.sds-closing-cta::before {
    content: '';
    position: absolute;
    inset: -40% -10% auto auto;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 60%);
    pointer-events: none;
}

.sds-closing-cta .btn-solid {
    background: #ffffff;
    color: #27272A;
    border: 2px solid #ffffff;
}

.sds-closing-cta .btn-solid:hover {
    background: rgba(255, 255, 255, 0.9);
}

.sds-closing-cta .btn-ghost {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.sds-closing-cta .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #ffffff;
}

/* Per-FAQ-answer micro-CTA */
.faq-micro-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4F46E5;
    text-decoration: none;
}

.dark .faq-micro-cta { color: #818CF8; }

.faq-micro-cta:hover {
    text-decoration: underline;
}

/* Getting Started step progress indicator */
.sds-step-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.sds-step-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(79, 70, 229, 0.08);
    color: #4F46E5;
    border: 1px solid rgba(79, 70, 229, 0.25);
}

.dark .sds-step-pill { color: #A5B4FC; }

.sds-step-pill.is-active {
    background: #4F46E5;
    color: #ffffff;
    border-color: #4F46E5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.sds-step-divider {
    width: 1.25rem;
    height: 2px;
    background: rgba(79, 70, 229, 0.25);
    border-radius: 2px;
}

/* Screenshot gallery frame */
.sds-shot-frame {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(228, 228, 231, 0.6);
}

.dark .sds-shot-frame {
    border-color: rgba(63, 63, 70, 0.6);
}

/* Free-and-open badge used in place of pricing tiers */
.sds-free-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    background: rgba(13, 148, 136, 0.12);
    color: #0D9488;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.dark .sds-free-badge {
    background: rgba(45, 212, 191, 0.14);
    color: #2DD4BF;
}

/* ==========================================================================
   Cookie consent banner
   ========================================================================== */

#cookie-consent-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 9999;
    max-width: 640px;
    margin: 0 auto;
    background: #FFFFFF;
    color: #27272A;
    border: 1px solid #E4E4E7;
    border-radius: 0.75rem;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#cookie-consent-banner.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.dark #cookie-consent-banner {
    background: #27272A;
    color: #F4F4F5;
    border-color: #3F3F46;
}

.cookie-consent-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
}

.cookie-consent-text {
    flex: 1 1 260px;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
    color: #71717A;
}

.dark .cookie-consent-text {
    color: #A1A1AA;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-consent-btn {
    padding: 0.5rem 1.1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cookie-consent-btn-primary {
    background: #4F46E5;
    color: #ffffff;
}

.cookie-consent-btn-primary:hover {
    background: #4338CA;
}

.cookie-consent-btn-secondary {
    background: transparent;
    border-color: #E4E4E7;
    color: #27272A;
}

.dark .cookie-consent-btn-secondary {
    border-color: #3F3F46;
    color: #F4F4F5;
}

.cookie-consent-btn-secondary:hover {
    background: rgba(113, 113, 122, 0.1);
}

@media (max-width: 480px) {
    .cookie-consent-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .cookie-consent-actions {
        justify-content: flex-end;
    }
}
