@import "./variables.css";

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
    margin: 5px;
}


html,
body {
    background-color: var(--space-dark);
    background-image: linear-gradient(to right, var(--space-dark), var(--hab-surface));
    height: 100%;
    margin: 0;
}

body {
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    font-size: 16px;
    margin: 0;

    display: flex;
    flex-direction: column;
    /* Ensure footer stays at the bottom */
}


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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--mars-rust);
    margin-bottom: var(--space-sm);
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
}

h3 {
    font-size: 1.4rem;
    color: var(--text-main);
}

p {
    margin-bottom: var(--space-sm);
    color: var(--text-muted);
}

a {
    color: var(--holo-blue);
    text-decoration: none;
    transition: text-shadow 0.2s ease-in-out;
}

a:hover {
    text-shadow: var(--shadow-glow);
}

input,
textarea,
select {
    background-color: var(--hab-surface-light);
    color: var(--text-main);
    border: var(--border-thin);
    border-radius: var(--border-radius-md);
    padding: var(--space-xs) var(--space-sm);
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--holo-blue);
    background-color: var(--hab-surface);
    box-shadow: var(--shadow-glow);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

button {
    background-color: var(--mars-rust);
    color: var(--text-main);
    border: var(--border-thin);
    border-radius: var(--border-radius-md);
    padding: var(--space-xs) var(--space-sm);
    font-family: var(--font-body);
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

button:hover {
    background-color: var(--mars-rust-hover);
}

button:focus-visible {
    outline: none;
    box-shadow: var(--shadow-glow);
}

select option {
    background-color: var(--hab-surface-light);
    color: var(--text-main);
}


main {
    flex: 1 0 auto;
}



/* ==========================================================================
   Partial Styles
   ========================================================================== */

header,
footer,
nav {
    background-color: var(--hab-surface-light);
}

header {
    display: flex;
    justify-content: center;
}

nav {
    display: flex;
    justify-content: space-around;
}

footer p {
    margin: 0;
    padding: var(--space-xs);
    text-align: center;
}

footer {
    flex-shrink: 0;
    padding: 20px;
    text-align: center;
}



/* ==========================================================================
    Mobile Styles
   ========================================================================== */

@media (max-width: 576px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }
}