/* Minimal black & white (shadcn-like) theme */
:root {
    --bg: #f7f7f8;
    /* page background */
    --surface: #ffffff;
    /* card / surface */
    --text: #0f1722;
    /* primary text (near-black) */
    --muted: #6b7280;
    /* secondary text */
    --border: #e6e9ec;
    /* subtle border */
    --accent: #000000;
    /* primary accent (black) */
    --success: #16a34a;
    --danger: #ef4444;
    --radius: 12px;
    --btn-contrast: #ffffff;
}

/* Dark theme overrides (applied to html[data-theme="dark"]) */
html[data-theme="dark"] {
    --bg: #0b0f12;
    --surface: #0f1720;
    --text: #e6eef1;
    --muted: #99a3ad;
    --border: rgba(255,255,255,0.06);
    --accent: #ffffff;
    --btn-contrast: #000000;
}

/* subtle transitions for theme changes */
body, .card, input, button, .msg {
    transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px;
}

main {
    width: 100%;
    max-width: 760px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: 0 6px 24px rgba(15, 23, 34, 0.06);
    position: relative; /* for theme toggle */
}

.logo img {
    max-width: 160px;
    height: auto;
    margin-bottom: 14px;
    display: inline-block;
}

.logo-img {
    border: 1px solid rgba(15, 23, 34, 0.06);
    border-radius: 12px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 8px 30px rgba(2, 6, 23, 0.08), 0 2px 6px rgba(2, 6, 23, 0.04);
    transition: transform 160ms ease, box-shadow 160ms ease;
    display: inline-block;
    max-width: 100%;
}

.logo-img:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 50px rgba(2, 6, 23, 0.12), 0 4px 10px rgba(2, 6, 23, 0.06);
}

h1 {
    font-size: 2rem;
    margin: 8px 0 6px;
    letter-spacing: -0.2px;
    color: var(--text);
}

p.lead {
    font-size: 1rem;
    margin: 0 0 16px;
    color: var(--muted);
}

#countdown {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 12px 0 18px;
    color: var(--text);
}

form {
    background: transparent;
    border-radius: 10px;
    padding: 14px;
    display: grid;
    gap: 10px;
}

.row {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr auto;
}

input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    outline: none;
    background: transparent;
    color: var(--text);
}

input[type="email"]:focus {
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
}

button {
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    background: var(--accent);
    color: var(--btn-contrast);
    transition: background 120ms ease;
}

/* theme toggle button */
.theme-toggle {
    position: absolute;
    top: 14px;
    right: 14px;
    height: 36px;
    min-width: 36px;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
}

.theme-toggle:hover {
    background: rgba(0,0,0,0.03);
}

.theme-toggle:focus {
    outline: 2px solid rgba(0,0,0,0.06);
    outline-offset: 2px;
}

/* when dark, adjust toggle contrast */
html[data-theme="dark"] .theme-toggle {
    background: rgba(255,255,255,0.02);
    color: var(--muted);
    border-color: rgba(255,255,255,0.06);
}

.consent {
    font-size: 0.9rem;
    text-align: left;
    color: var(--muted);
}

.consent input {
    margin-right: 8px;
}

.msg {
    font-size: .95rem;
    padding: 10px 12px;
    border-radius: 8px;
    display: none;
    text-align: left;
}

.msg.ok {
    background: rgba(22, 163, 74, 0.06);
    color: var(--text);
    border-left: 4px solid rgba(22, 163, 74, 0.14);
}

.msg.err {
    background: rgba(239, 68, 68, 0.06);
    color: var(--text);
    border-left: 4px solid rgba(239, 68, 68, 0.12);
}

footer {
    margin-top: 16px;
    font-size: .9rem;
    color: var(--muted);
}

.hp-wrap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 560px) {
    .row {
        grid-template-columns: 1fr;
    }

    .logo img {
        max-width: 120px;
    }

    h1 {
        font-size: 1.6rem;
    }
}

/* Dark-mode interactive states */
html[data-theme="dark"] input[type="email"]:focus {
    box-shadow: 0 0 0 4px rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.12);
}

html[data-theme="dark"] button:hover {
    background: var(--muted);
    /* color: #fff; */
}

html[data-theme="dark"] .logo-img {
    box-shadow: 0 8px 30px rgba(255,255,255,0.02), 0 2px 6px rgba(0,0,0,0.45);
}

html[data-theme="dark"] .logo-img:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 50px rgba(255,255,255,0.03), 0 4px 10px rgba(0,0,0,0.5);
}

html[data-theme="dark"] .theme-toggle:hover {
    background: rgba(255,255,255,0.04);
}

html[data-theme="dark"] .consent input[type="checkbox"]:focus + .checkbox-ui {
    box-shadow: 0 0 0 4px rgba(255,255,255,0.06);
}