/* Privacy Policy Generator — Styles */

/* ==============================
   Reset & Design Tokens
   ============================== */

html { scroll-behavior: smooth; }

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --navy: #1a1a2e;
    --navy-light: #16213e;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --slate: #64748b;
    --slate-light: #94a3b8;
    --blue: #2563eb;
    --blue-hover: #1d4ed8;
    --blue-light: #dbeafe;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --serif: 'Instrument Serif', Georgia, serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 1100px;
    --radius: 8px;
    --transition: 200ms ease;
}

/* ==============================
   Typography
   ============================== */

body {
    font-family: var(--sans);
    color: var(--navy);
    line-height: 1.6;
    font-size: 16px;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
}

h3 {
    font-size: 1.25rem;
}

/* ==============================
   Layout
   ============================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==============================
   Header
   ============================== */

header {
    position: sticky;
    top: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--serif);
    font-size: 1.25rem;
    color: var(--navy);
    text-decoration: none;
}

nav a {
    font-family: var(--sans);
    font-size: 0.9rem;
    color: var(--slate);
    text-decoration: none;
    transition: color var(--transition);
}

nav a:hover {
    color: var(--navy);
}

/* ==============================
   Hero Section
   ============================== */

#hero {
    text-align: center;
    padding: 80px 0 60px;
}

#hero h1 {
    color: var(--navy);
    max-width: 700px;
    margin: 0 auto 20px;
}

.subtitle {
    color: var(--slate);
    max-width: 540px;
    margin: 0 auto 36px;
    font-size: 1.125rem;
}

.btn-primary {
    display: inline-block;
    background: var(--blue);
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--sans);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.3);
}

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

/* ==============================
   How It Works Section
   ============================== */

#how-it-works {
    background: var(--off-white);
    padding: 60px 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.step {
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--navy);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
    font-family: var(--sans);
    margin-bottom: 16px;
}

.step h3 {
    margin-bottom: 8px;
}

.step p {
    color: var(--slate);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==============================
   Generator Section
   ============================== */

#generator {
    padding: 60px 0;
}

#form-container,
#preview-container {
    max-width: 680px;
    margin: 0 auto;
}

/* ==============================
   Form Styles
   ============================== */

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 300ms ease;
}

.form-step h2 {
    margin-bottom: 8px;
}

.form-step p.step-description {
    color: var(--slate);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--navy);
}

input[type="text"],
input[type="email"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--sans);
    transition: border-color var(--transition);
    outline: none;
    background: var(--white);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-light);
}

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

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--blue);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--blue);
}

.form-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    gap: 16px;
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--slate);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--sans);
    transition: all var(--transition);
}

.btn-secondary:hover {
    border-color: var(--slate);
}

.progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-bottom: 40px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--blue);
    border-radius: 2px;
    transition: width 300ms ease;
}

.form-error {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 4px;
}

.input-error {
    border-color: #dc2626 !important;
}

/* ==============================
   Preview Section
   ============================== */

.policy-preview {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.policy-preview h1 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--navy);
}

.policy-preview h2 {
    font-size: 1.15rem;
    margin-top: 28px;
    margin-bottom: 12px;
    font-family: var(--serif);
}

.policy-preview p {
    color: #334155;
    line-height: 1.7;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.policy-preview ul {
    padding-left: 24px;
    margin-bottom: 12px;
}

.policy-preview li {
    margin-bottom: 6px;
    color: #334155;
    line-height: 1.6;
}

.preview-blur {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
}

.preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(transparent, white 70%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 40px;
    z-index: 10;
}

/* ==============================
   Success Banner
   ============================== */

.success-overlay {
    position: relative;
    background: linear-gradient(135deg, #ecfdf5, #dbeafe);
    border: 2px solid #10b981;
    border-radius: var(--radius);
    margin-top: 24px;
    padding: 0;
}

.success-banner {
    text-align: center;
    padding: 40px 24px;
}

.success-icon {
    width: 56px;
    height: 56px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.success-banner h3 {
    font-family: var(--serif);
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 8px;
}

.success-banner p {
    color: var(--slate);
    margin-bottom: 24px;
}

.success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.success-actions .btn-primary {
    background: var(--blue);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--sans);
    transition: all var(--transition);
}

.success-actions .btn-primary:hover {
    background: var(--blue-hover);
}

.success-actions .btn-secondary {
    background: white;
    color: var(--navy);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--sans);
    transition: all var(--transition);
}

.success-actions .btn-secondary:hover {
    border-color: var(--blue);
    color: var(--blue);
}

/* ==============================
   Download Bar
   ============================== */

.download-bar {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    padding: 20px;
    background: var(--off-white);
    border-radius: var(--radius);
    flex-wrap: wrap;
}

.download-bar button {
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
    font-family: var(--sans);
    border: 1px solid var(--border);
    background: white;
    color: var(--navy);
    transition: all var(--transition);
}

.download-bar button:hover {
    border-color: var(--blue);
    color: var(--blue);
}

/* ==============================
   Footer
   ============================== */

footer {
    background: var(--navy);
    color: var(--slate-light);
    padding: 40px 0;
    text-align: center;
    font-size: 0.875rem;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

footer nav {
    display: flex;
    gap: 20px;
}

footer nav a {
    color: var(--slate-light);
    text-decoration: none;
    transition: color var(--transition);
}

footer nav a:hover {
    color: white;
}

/* ==============================
   Animations
   ============================== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

#preview-container {
    animation: fadeIn 400ms ease;
}

/* ==============================
   Trust Bar
   ============================== */

.trust-bar {
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.trust-bar p {
    color: var(--slate);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ==============================
   Responsive — Mobile
   ============================== */

@media (max-width: 768px) {
    #hero {
        padding: 60px 0 40px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .form-nav {
        flex-direction: column-reverse;
    }

    .form-nav button,
    .form-nav a {
        width: 100%;
    }

    .policy-preview {
        padding: 24px;
    }

    .download-bar {
        flex-direction: column;
    }

    .download-bar button {
        width: 100%;
    }

    .success-actions {
        flex-direction: column;
    }

    .success-actions .btn-primary,
    .success-actions .btn-secondary {
        width: 100%;
    }

    .success-banner {
        padding: 28px 16px;
    }
}
