/* ── CSS custom properties: light mode (default) ─────────────────────────── */
:root {
    --bg-page:        #f0f0f0;
    --bg-card:        #ffffff;
    --text-primary:   #1a1a1a;
    --text-secondary: #555555;
    --text-muted:     #777777;
    --border:         #d0d0d0;
    --border-focus:   #0066cc;
    --input-bg:       #ffffff;
    --input-bg-hover: #f7f9ff;
    --btn-bg:         #0066cc;
    --btn-bg-hover:   #0052a3;
    --btn-text:       #ffffff;
    --accent:         #8B0000;
    --success:        #1a7a3c;
    --error:          #cc0000;
    --shadow:         rgba(0, 0, 0, 0.08);
    --credits-color:  #1a7a3c;
    --required-color: #cc0000;
}

/* ── Dark mode overrides ─────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-page:        #121212;
        --bg-card:        #1e1e1e;
        --text-primary:   #e8e8e8;
        --text-secondary: #aaaaaa;
        --text-muted:     #888888;
        --border:         #3a3a3a;
        --border-focus:   #4d9fff;
        --input-bg:       #2a2a2a;
        --input-bg-hover: #323232;
        --btn-bg:         #1a78e8;
        --btn-bg-hover:   #1560c0;
        --btn-text:       #ffffff;
        --accent:         #e06060;
        --success:        #4caf7d;
        --error:          #ff6b6b;
        --shadow:         rgba(0, 0, 0, 0.4);
        --credits-color:  #4caf7d;
        --required-color: #ff6b6b;
    }
}

/* ── Reset & base ────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    padding: 1.5rem 1rem 3rem;
}

/* ── Page info bar (date / IP) ───────────────────────────────────────────── */
.path {
    color: var(--accent);
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

/* ── Form card ───────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    padding: 2rem 2rem 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
box-shadow: 0 2px 16px var(--shadow);
}

/* ── Heading ─────────────────────────────────────────────────────────────── */
h1 {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

h2 {
	text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    letter-spacing: -0.005em;
}

h3 {
	text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    letter-spacing: 0em;
}

h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: 0.005em;
}

/* ── Labels ──────────────────────────────────────────────────────────────── */
label {
    display: block;
    margin: 1rem 0 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

/* Required asterisk */
.required {
    color: var(--required-color);
    margin-left: 2px;
}

/* Helper text (e.g. allowed file types) */
small {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

/* ── Text inputs & textarea ──────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
textarea:hover {
    background: var(--input-bg-hover);
    border-color: var(--border-focus);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
    background: var(--input-bg-hover);
}

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

/* ── File input ──────────────────────────────────────────────────────────── */
input[type="file"] {
    width: 100%;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* ── Submit button ───────────────────────────────────────────────────────── */
button[type="submit"] {
    display: block;
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.8rem 1.25rem;
    background: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background-color 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
}

button[type="submit"]:hover {
    background: var(--btn-bg-hover);
}

button[type="submit"]:active {
    transform: scale(0.98);
}

button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ── Response message ────────────────────────────────────────────────────── */
#response {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.95rem;
    min-height: 1.4em;
    padding: 0.5rem 0;
    border-radius: 6px;
}

.response-success {
    color: var(--success);
    font-weight: 600;
}

.response-error {
    color: var(--error);
    font-weight: 600;
}

/* ── Credits footer ──────────────────────────────────────────────────────── */
.credits {
    text-align: center;
    color: var(--credits-color);
    margin-top: 1.5rem;
    font-size: 0.85rem;
    line-height: 1.8;
}

.credits a {
    text-decoration: none;
    color: var(--credits-color);
    transition: opacity 0.2s ease;
}

.credits a:hover {
    opacity: 0.7;
}

/* ── Responsive: small screens ───────────────────────────────────────────── */
@media (max-width: 480px) {
    body {
        font-size: 15px;
        padding: 1rem 0.5rem 2rem;
    }

    .container {
        padding: 1.25rem 1rem 1rem;
        border-radius: 8px;
    }

    h1 {
        font-size: 1.35rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    h4 {
        font-size: 0.95rem;
    }

    button[type="submit"] {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }
}

.home-link:link,
.home-link:visited {
    color: var(--success);
}

.home-link:hover,
.home-link:active {
    color: var(--btn-bg-hover);
}



