
/* =========================================
   HARTI TOOLS — QR CODE GENERATOR
   ========================================= */

:root {
    --primary: #1769e0;
    --primary-hover: #1255b8;
    --text: #172033;
    --muted: #667085;
    --border: #dfe4ec;
    --background: #f7f9fc;
    --surface: #ffffff;
    --error: #c62828;
    --success: #16834a;
}

/* RESET */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--surface);
    line-height: 1.6;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

/* CONTAINER */

.container {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
}

/* HEADER */

.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    color: #121c2d;
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.back-link {
    color: #121c2d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.brand:hover,
.back-link:hover {
    color: #121c2d;
    text-decoration: underline;
}

/* HERO */

.hero {
    padding: 68px 0 56px;
    background: var(--background);
    text-align: center;
}

.section-label {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin-bottom: 16px;
    font-size: clamp(32px, 5vw, 46px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.hero p {
    max-width: 720px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 17px;
}

/* GENERATOR */

.generator-section {
    padding: 56px 0 70px;
    background: var(--background);
}

.generator-card {
    max-width: 720px;
    margin: 0 auto;
    padding: 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(23, 32, 51, 0.05);
}

.generator-heading {
    margin-bottom: 30px;
    text-align: center;
}

.generator-heading h2 {
    margin-bottom: 8px;
    font-size: 27px;
    letter-spacing: -0.02em;
}

.generator-heading p {
    color: var(--muted);
    font-size: 14px;
}

/* FORM */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.form-group input:not([type="checkbox"]),
.form-group select,
.form-group textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #98a2b3;
}

.form-group select {
    cursor: pointer;
}

/* CONTENT PANELS */

.content-panel[hidden],
.qr-result[hidden],
#errorMessage[hidden] {
    display: none;
}

/* WI-FI CHECKBOX */

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.checkbox-group input {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
}

/* OPTIONS */

.options-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
}

.options-section h3 {
    margin-bottom: 22px;
    font-size: 18px;
}

/* BUTTONS */

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.primary-button {
    width: 100%;
    color: #ffffff;
    background: var(--primary);
    border: 1px solid var(--primary);
}

.primary-button:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.primary-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.secondary-button {
    color: var(--primary);
    background: #ffffff;
    border: 1px solid var(--primary);
}

.secondary-button:hover {
    color: #ffffff;
    background: var(--primary);
}

/* ERROR MESSAGE */

.error-message {
    margin-bottom: 18px;
    padding: 12px 14px;
    color: var(--error);
    background: #fff1f1;
    border: 1px solid #f1caca;
    border-radius: 8px;
    font-size: 14px;
}

/* RESULT */

.qr-result {
    margin-top: 35px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.result-heading h3 {
    margin-bottom: 7px;
    font-size: 22px;
}

.result-heading p {
    color: var(--muted);
    font-size: 14px;
}

.qr-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 25px auto;
    padding: 22px;
    width: fit-content;
    max-width: 100%;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
}

#qrCanvas {
    display: block;
    max-width: 100%;
    height: auto;
    image-rendering: pixelated;
}

.download-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.result-note {
    margin-top: 18px;
    color: var(--muted);
    font-size: 12px;
}

/* INFORMATION SECTIONS */

.info-section {
    padding: 62px 0;
    background: #ffffff;
}

.info-section h2 {
    margin-bottom: 20px;
    font-size: 27px;
    letter-spacing: -0.025em;
}

.info-section p {
    max-width: 850px;
    margin-bottom: 15px;
    color: #525f70;
    font-size: 15px;
}

.info-section ul,
.info-section ol {
    max-width: 850px;
    padding-left: 23px;
    color: #525f70;
}

.info-section li {
    margin-bottom: 12px;
    padding-left: 5px;
}

.alternate-section {
    background: var(--background);
}

/* FAQ */

.faq-item {
    max-width: 850px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.faq-item h3 {
    margin-bottom: 8px;
    font-size: 17px;
}

.faq-item p {
    margin-bottom: 0;
}

/* RELATED LINKS */

.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.related-links a {
    padding: 10px 15px;
    color: var(--primary);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.related-links a:hover {
    background: #f0f5ff;
    border-color: var(--primary);
}

/* FOOTER */

.site-footer {
    padding: 30px 0;
    color: #667085;
    background: #f1f4f8;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 13px;
}

.site-footer p + p {
    margin-top: 5px;
}

/* RESPONSIVE */

@media (max-width: 700px) {

    .container {
        width: min(100% - 30px, 1100px);
    }

    .header-inner {
        min-height: 65px;
    }

    .brand {
        font-size: 17px;
    }

    .back-link {
        font-size: 12px;
    }

    .hero {
        padding: 48px 0 40px;
    }

    .hero p {
        font-size: 15px;
    }

    .generator-section {
        padding: 35px 0 45px;
    }

    .generator-card {
        padding: 23px 18px;
        border-radius: 12px;
    }

    .generator-heading h2 {
        font-size: 23px;
    }

    .info-section {
        padding: 45px 0;
    }

    .info-section h2 {
        font-size: 23px;
    }

    .download-actions {
        flex-direction: column;
    }

    .download-actions button {
        width: 100%;
    }

    .related-links {
        flex-direction: column;
    }

    .related-links a {
        text-align: center;
    }
}

/* ACCESSIBILITY */

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(23, 105, 224, 0.35);
    outline-offset: 3px;
}


/* WI-FI PASSWORD VISIBILITY */

.password-wrapper {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.password-wrapper input {
    flex: 1;
    min-width: 0;
}

.password-toggle {
    flex-shrink: 0;
    min-width: 68px;
    padding: 0 12px;
    color: var(--primary);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

.password-toggle:hover {
    background: #f0f5ff;
    border-color: var(--primary);
}

.password-toggle:focus-visible {
    outline: 3px solid rgba(23, 105, 224, 0.35);
    outline-offset: 3px;
}