/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #0f172a;
    --text-medium: #334155;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p { margin-bottom: 1rem; }

a {
    color: var(--primary);
    text-decoration: none;
}

/* Header */
header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.hero h1 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-medium);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.cta-button {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.cta-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Feature Cards */
.features-wrapper {
    margin: 3rem 0;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Form Styles */
.form-container {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

.form-section {
    margin-bottom: 2.5rem;
}

.form-section h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

input[type="text"],
input[type="email"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 500;
}

/* Output Section */
.output-container {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 2rem 0;
    display: none;
}

.output-container.active {
    display: block;
}

.policy-output {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    max-height: 600px;
    overflow-y: auto;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    line-height: 1.8;
}

.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

/* Content Sections */
.content-section {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

.content-section h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.content-section h3 {
    color: var(--text-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-section ul,
.content-section ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-section li {
    margin-bottom: 0.5rem;
}

.numbered-list {
    counter-reset: item;
    list-style: none;
    margin-left: 0;
}

.numbered-list li {
    counter-increment: item;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 2.5rem;
}

.numbered-list li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--primary);
    color: white;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    padding: 2rem 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--bg-light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        justify-content: center;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
    }

    .form-container {
        padding: 1.5rem;
    }

    .content-section {
        padding: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .features {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}