/**
 * SafetyNet Main Styles
 * Landing page styling
 */

body {
    font-family: 'Inter', sans-serif;
}

.hero-gradient {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

/* Modal Styles */
.form-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.conditional-field, .optional-section, .success-message, .form-error {
    display: none;
}

.show {
    display: block !important;
}

/* Modal Transitions */
.modal-content {
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.2s ease-in-out;
}

.modal-active .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* Mobile Menu Styles */
.mobile-menu {
    display: none;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
}

.mobile-menu.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 24px;
    height: 3px;
    background-color: #475569;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Disabled Button Styles */
button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* FAQ Styles */
.faq-item {
    border-bottom: 1px solid #e2e8f0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.faq-item.hidden-faq {
    display: none;
}

.faq-question {
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-question:hover {
    color: #2563eb;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-top: 1rem;
    padding-bottom: 1.5rem;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* Use Case Accordion Styles */
.use-case-toggle {
    cursor: pointer;
    transition: all 0.2s ease;
}

.use-case-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.use-case-item.active .use-case-details {
    max-height: 300px;
    padding-top: 0.75rem;
}

.use-case-chevron {
    transition: transform 0.3s ease;
}

.use-case-item.active .use-case-chevron {
    transform: rotate(180deg);
}

/* Feature Accordion Styles */
.feature-toggle {
    cursor: pointer;
    transition: all 0.2s ease;
}

.feature-toggle:hover h3 {
    color: #2563eb;
}

.feature-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.feature-item.active .feature-details {
    max-height: 300px;
    padding-top: 0.5rem;
}

.feature-chevron {
    transition: transform 0.3s ease;
}

.feature-item.active .feature-chevron {
    transform: rotate(180deg);
}

/* Story Accordion Styles */
.story-toggle {
    cursor: pointer;
    transition: all 0.2s ease;
}

.story-toggle:hover h4 {
    color: #2563eb;
}

.story-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.story-item.active .story-details {
    max-height: 400px;
    padding-top: 0.5rem;
}

.story-chevron {
    transition: transform 0.3s ease;
}

.story-item.active .story-chevron {
    transform: rotate(180deg);
}

/* FAQ Category Buttons */
.faq-category-btn {
    background: #f1f5f9;
    color: #64748b;
    border: 2px solid transparent;
}

.faq-category-btn:hover {
    background: #e2e8f0;
    color: #475569;
}

.faq-category-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* SafetyNet Alert Card Styles */
.alert-card {
    --alert-red: #E53935;
    --alert-red-light: #FFEBEE;
    --alert-red-dark: #C62828;
    --text-primary: #1a1a2e;
    --text-secondary: #64748b;
    --bg-card: #ffffff;
    --border-subtle: #e2e8f0;
}

.alert-header {
    background: var(--alert-red);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-icon svg {
    width: 14px;
    height: 14px;
    fill: white;
}

.alert-title {
    color: white;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.alert-content {
    padding: 28px 24px 24px;
}

.missed-label {
    color: var(--alert-red);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.intro-text {
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 24px;
}

.time-display {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 4px;
}

.time-context {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.progress-container {
    height: 6px;
    background: var(--alert-red-light);
    border-radius: 3px;
    margin-bottom: 28px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--alert-red);
    border-radius: 3px;
    width: 100%;
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.instructions-header {
    font-size: 13px;
    color: var(--alert-red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    font-weight: 700;
}

.context-item {
    padding: 8px 0;
    font-size: 15px;
    line-height: 1.5;
}

.context-label-inline {
    color: var(--text-secondary);
    font-weight: 500;
}

.context-value-inline {
    color: var(--text-primary);
}

.instruction-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.instruction-item:last-child {
    border-bottom: none;
}

.instruction-number {
    width: 24px;
    height: 24px;
    background: var(--alert-red-light);
    color: var(--alert-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.instruction-text {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Step Card Styles */
.step-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px -3px rgba(0, 0, 0, 0.05), 0 3px 4px -2px rgba(0, 0, 0, 0.02);
}

/* SafetyNet Visual Branding - Person with Shield (35% opacity) */
.safetynet-visual {
    width: 200px;
    height: 200px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    flex-shrink: 0;
}

.safetynet-visual-small {
    width: 120px;
    height: 120px;
}

.safetynet-visual-medium {
    width: 160px;
    height: 160px;
}

.safetynet-visual-large {
    width: 240px;
    height: 240px;
}

/* Mobile responsive sizes */
@media (max-width: 640px) {
    .safetynet-visual-small {
        width: 100px;
        height: 100px;
    }

    .safetynet-visual-medium {
        width: 130px;
        height: 130px;
    }

    .safetynet-visual-large {
        width: 180px;
        height: 180px;
    }
}

.safetynet-visual .background-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.06) 50%, rgba(59, 130, 246, 0) 100%);
    pointer-events: none;
}

/* Shield icon sizing - pixel based for SVG compatibility */
.safetynet-visual .shield-icon {
    position: absolute;
    top: 25%;
    left: 25%;
    color: #3b82f6;
    opacity: 0.35;
}

/* Default size (200px container) - 25% = 50px */
.safetynet-visual .shield-icon {
    width: 50px;
    height: 50px;
}

/* Small size (120px container) - 25% = 30px */
.safetynet-visual-small .shield-icon {
    width: 30px;
    height: 30px;
}

/* Medium size (160px container) - 25% = 40px */
.safetynet-visual-medium .shield-icon {
    width: 40px;
    height: 40px;
}

/* Large size (240px container) - 25% = 60px */
.safetynet-visual-large .shield-icon {
    width: 60px;
    height: 60px;
}

/* Mobile - Small (100px container) - 25% = 25px */
@media (max-width: 640px) {
    .safetynet-visual-small .shield-icon {
        width: 25px;
        height: 25px;
    }

    /* Mobile - Medium (130px container) - 25% = 32px */
    .safetynet-visual-medium .shield-icon {
        width: 32px;
        height: 32px;
    }

    /* Mobile - Large (180px container) - 25% = 45px */
    .safetynet-visual-large .shield-icon {
        width: 45px;
        height: 45px;
    }
}

/* Person icon sizing - pixel based for SVG compatibility */
.safetynet-visual .person-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-35%, -35%);
    z-index: 10;
    color: #3b82f6;
}

/* Default size (200px container) - 46% = 92px */
.safetynet-visual .person-icon {
    width: 92px;
    height: 92px;
}

/* Small size (120px container) - 46% = 55px */
.safetynet-visual-small .person-icon {
    width: 55px;
    height: 55px;
}

/* Medium size (160px container) - 46% = 74px */
.safetynet-visual-medium .person-icon {
    width: 74px;
    height: 74px;
}

/* Large size (240px container) - 46% = 110px */
.safetynet-visual-large .person-icon {
    width: 110px;
    height: 110px;
}

/* Mobile - Small (100px container) - 46% = 46px */
@media (max-width: 640px) {
    .safetynet-visual-small .person-icon {
        width: 46px;
        height: 46px;
    }

    /* Mobile - Medium (130px container) - 46% = 60px */
    .safetynet-visual-medium .person-icon {
        width: 60px;
        height: 60px;
    }

    /* Mobile - Large (180px container) - 46% = 83px */
    .safetynet-visual-large .person-icon {
        width: 83px;
        height: 83px;
    }
}

/* SafetyNet Logo Variant - Compact for header/navigation */
.safetynet-logo {
    width: 40px;
    height: 40px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.safetynet-logo .background-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.06) 50%, rgba(59, 130, 246, 0) 100%);
    pointer-events: none;
}

.safetynet-logo .shield-icon {
    position: absolute;
    top: 25%;
    left: 25%;
    color: #3b82f6;
    opacity: 0.35;
    width: 10px;
    height: 10px;
}

.safetynet-logo .person-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-35%, -35%);
    z-index: 10;
    color: #3b82f6;
    width: 18px;
    height: 18px;
}

/* Section 1 UX Improvements */

/* 1. Un-crowd the Header on Mobile */
h1.hero-title {
    font-size: 2.5rem; /* Large but readable */
    line-height: 1.2; /* Tighter line height prevents vertical sprawl */
    margin-bottom: 1.5rem; /* Breathing room before subhead */
    max-width: 90%; /* Prevents text hitting the absolute edge on phones */
    margin-left: auto;
    margin-right: auto;
}

/* 2. Increase Logo Size (The "Bubble") */
.nav-logo-icon {
    transform: scale(1.15); /* Increases size by 15% */
    transform-origin: center; /* Ensures it grows evenly */
    margin-right: 8px; /* specific spacing between icon and 'SafetyNet' text */
}

/* 3. Refine the Sub-headline for Scannability */
.hero-subtitle {
    font-size: 1.125rem;
    color: #4B5563; /* slightly softer grey to de-emphasize vs H1 */
    max-width: 600px; /* Constrains width so lines don't get too long */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}
