/* Muskegon Roof Repair Guide - Styles */

/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --text-color: #1e293b;
    --text-light: #64748b;
    --bg-color: #ffffff;
    --bg-gray: #f8fafc;
    --bg-light: #f1f5f9;
    --border-color: #e2e8f0;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0891b2;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--text-color);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

strong {
    font-weight: 600;
}

/* Skip Link (UX-MR-06) */
@media screen {
    .skip-link {
        position: fixed;
        top: 0.75rem;
        left: 0.75rem;
        z-index: 1000;
        transform: translateY(calc(-100% - 2rem));
        padding: 0.75rem 1rem;
        background: #fff;
        color: #1e40af;
        font-weight: 700;
        border: 2px solid #1e40af;
        border-radius: 0.25rem;
        text-decoration: none;
    }
    
    .skip-link:focus {
        transform: translateY(0);
        outline: 3px solid #b45309;
        outline-offset: 3px;
    }
    
    main#main {
        scroll-margin-top: 8rem;
    }
}

@media print {
    .skip-link {
        display: none;
    }
}

/* Header */
.site-header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo .brand-link {
    font-size: 1.5rem;
    margin: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.logo .brand-link a {
    color: var(--primary-color);
    text-decoration: none;
}

.logo .brand-link a:hover {
    color: var(--primary-dark);
}

.tagline {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
}

/* Navigation */
.main-nav {
    position: relative;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
    transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    text-decoration: none;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        background-color: var(--bg-color);
        border: 1px solid var(--border-color);
        border-radius: 0.5rem;
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        gap: 0;
        min-width: 200px;
        display: none;
        margin-top: 0.5rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        padding: 1rem;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    text-decoration: none;
    color: white;
}

.btn-secondary {
    background-color: var(--bg-gray);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    text-decoration: none;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    padding: 4rem 0;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Hero CTA visual hierarchy (UX-MR-01) */
.hero-cta .btn-primary {
    background: #fff;
    color: #1e40af;
    border: 2px solid #fff;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-cta .btn-primary:hover {
    background: #f1f5f9;
    color: #1e3a8a;
}

.hero-cta .btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-cta .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hero-cta a:focus-visible {
    outline: 3px solid #facc15;
    outline-offset: 3px;
}

.disclosure-notice {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    margin-top: 2rem;
}

.disclosure-notice p {
    margin: 0;
    font-size: 0.9375rem;
}

/* Sections */
section {
    padding: 4rem 0;
}

section:nth-child(even) {
    background-color: var(--bg-gray);
}

section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-link {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.feature-link:hover {
    color: var(--primary-dark);
}

/* Info Boxes */
.info-box {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--info-color);
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.info-box h3, .info-box h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.info-box ul {
    margin-bottom: 0.5rem;
}

.source-note {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.source-note a {
    color: var(--text-light);
    text-decoration: underline;
}

.jurisdiction-note {
    background-color: var(--bg-light);
    padding: 1rem;
    border-radius: 0.375rem;
    margin-top: 1rem;
    font-size: 0.9375rem;
}

/* Steps */
.steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.step-content h3 {
    margin-bottom: 0.5rem;
}

.step-item {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

/* Note Cards */
.note-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.note-card {
    padding: 2rem;
    border-radius: 0.5rem;
    border: 2px solid;
}

.note-card.warning {
    background-color: #fef3c7;
    border-color: var(--warning-color);
}

.note-card.info {
    background-color: #dbeafe;
    border-color: var(--info-color);
}

.note-card.safety {
    background-color: #fee2e2;
    border-color: var(--danger-color);
}

.note-card h3 {
    margin-bottom: 0.75rem;
}

.note-card p {
    margin-bottom: 0;
}

/* Worksheet Styles */
.worksheet-intro {
    background-color: var(--bg-gray);
    padding: 3rem 0;
}

.intro-text {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 800px;
}

.privacy-box {
    background-color: white;
    border: 2px solid var(--info-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
    max-width: 800px;
}

.privacy-box h3 {
    color: var(--info-color);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.privacy-box p {
    margin-bottom: 0.75rem;
}

.privacy-box p:last-child {
    margin-bottom: 0;
}

.worksheet-controls {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.help-text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.worksheet-content {
    padding: 3rem 0;
}

#worksheetForm {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.quote-column {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.quote-column h3 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.worksheet-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.worksheet-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

textarea.worksheet-input {
    resize: vertical;
    min-height: 80px;
}

select.worksheet-input {
    cursor: pointer;
}

.worksheet-tips {
    background-color: var(--bg-light);
    border-radius: 0.5rem;
    padding: 2rem;
    margin-top: 3rem;
}

.worksheet-tips h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.worksheet-tips ul li {
    margin-bottom: 1rem;
}

.worksheet-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.privacy-note {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 1rem;
}

/* Guide Content */
.guide-content {
    padding: 3rem 0;
}

.guide-content .container {
    max-width: 900px;
}

.guide-section {
    margin-bottom: 3rem;
}

.guide-section h3 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.guide-section h4 {
    color: var(--text-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.disclaimer {
    background-color: #fef3c7;
    border-left: 4px solid var(--warning-color);
    padding: 1rem 1.5rem;
    border-radius: 0.375rem;
    margin: 1.5rem 0;
}

.warning-box {
    background-color: #fee2e2;
    border: 2px solid var(--danger-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.warning-box h4 {
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.emergency-box {
    background-color: #fee2e2;
    border: 3px solid var(--danger-color);
    border-radius: 0.5rem;
    padding: 2rem;
    margin: 1.5rem 0;
}

.emergency-section {
    background-color: #fef2f2;
    padding: 2rem;
    border-radius: 0.5rem;
}

.safety-note, .tip {
    background-color: var(--bg-light);
    border-left: 4px solid var(--info-color);
    padding: 1rem 1.5rem;
    border-radius: 0.375rem;
    margin: 1.5rem 0;
}

.table-note {
    font-size: 0.875rem;
    font-style: italic;
    color: var(--text-light);
    margin-top: 1rem;
}

.factor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.factor-card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.factor-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: var(--bg-color);
}

.info-table th,
.info-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid var(--border-color);
}

.info-table th {
    background-color: var(--bg-gray);
    font-weight: 600;
    color: var(--text-color);
}

.info-table tr:hover {
    background-color: var(--bg-gray);
}

.next-steps {
    background-color: var(--bg-light);
    border-radius: 0.5rem;
    padding: 2rem;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.resource-card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.resource-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.resource-card p {
    font-size: 0.9375rem;
    margin-bottom: 0;
}

.guide-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-light);
}

/* About Page */
.about-section {
    margin-bottom: 3rem;
}

.about-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.policy-section {
    margin-bottom: 3rem;
}

.policy-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Footer */
.site-footer {
    background-color: var(--text-color);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section p,
.footer-section ul {
    font-size: 0.9375rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-section a:hover {
    color: white;
    text-decoration: underline;
}

.footer-disclaimer {
    font-size: 0.875rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.7;
}

.footer-bottom p {
    margin: 0;
}

/* Print Styles */
@media print {
    @page {
        size: landscape;
        margin: 0.5in;
    }
    
    * {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    .no-print {
        display: none !important;
    }

    body {
        font-size: 9pt !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .site-header,
    .site-footer {
        display: none !important;
    }
    
    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    section {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .worksheet-intro {
        margin-bottom: 0.5rem !important;
        page-break-after: avoid;
    }
    
    .worksheet-intro h1 {
        font-size: 14pt !important;
        margin: 0 0 0.25rem 0 !important;
    }
    
    .worksheet-intro p,
    .worksheet-intro ul {
        font-size: 8pt !important;
        margin: 0.25rem 0 !important;
    }

    #worksheetForm {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.4rem !important;
        width: 100% !important;
        max-width: 100% !important;
        page-break-after: auto !important;
    }

    .quote-column {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        padding: 0.2rem !important;
        border: 1px solid #000 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        float: none !important;
        display: block !important;
    }
    
    .quote-column h3 {
        font-size: 10pt !important;
        margin: 0 0 0.2rem 0 !important;
        padding-bottom: 0.2rem !important;
        border-bottom: 1.5px solid #000 !important;
    }
    
    .form-group {
        margin-bottom: 0.25rem !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    
    .form-group label {
        font-size: 7pt !important;
        font-weight: bold !important;
        display: block !important;
        margin-bottom: 0.05rem !important;
        line-height: 1.1 !important;
    }
    
    .help-text {
        font-size: 5.5pt !important;
        margin-top: 0.05rem !important;
        color: #333 !important;
        line-height: 1.1 !important;
    }

    .worksheet-input {
        border: 1px solid #666 !important;
        padding: 0.1rem 0.2rem !important;
        font-size: 7.5pt !important;
        width: 100% !important;
        box-sizing: border-box !important;
        background: white !important;
        min-height: 1em !important;
        line-height: 1.2 !important;
    }
    
    textarea.worksheet-input {
        display: none !important;
    }
    
    .textarea-print-mirror {
        display: block !important;
        border: 1px solid #666 !important;
        padding: 0.1rem 0.2rem !important;
        font-size: 7.5pt !important;
        width: 100% !important;
        box-sizing: border-box !important;
        background: white !important;
        line-height: 1.2 !important;
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
        font-family: inherit !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    
    select.worksheet-input {
        padding: 0.05rem 0.1rem !important;
        height: auto !important;
    }

    a {
        color: #000 !important;
        text-decoration: none !important;
    }
    
    .worksheet-actions {
        page-break-before: always !important;
    }
    
    .worksheet-content {
        padding: 0 !important;
        margin: 0 !important;
    }
}

/* Screen-only Netlify badge scroll clearance (UX-MR-02) */
@media screen and (max-width: 768px) {
    body {
        padding-bottom: 80px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1.125rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
    }

    section {
        padding: 2.5rem 0;
    }

    section h2 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .feature-grid,
    .note-grid,
    .factor-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }

    #worksheetForm {
        grid-template-columns: 1fr;
    }

    .step {
        flex-direction: column;
        gap: 1rem;
    }

    .info-table {
        font-size: 0.875rem;
    }

    .info-table th,
    .info-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .logo .brand-link {
        font-size: 1.25rem;
    }

    .hero {
        padding: 2.5rem 0;
    }

    .quote-column,
    .feature-card,
    .info-box {
        padding: 1.5rem;
    }
}
