/* --- global --- */
:root {
    /* base */
    --primary: #1e3a8a;
    --color-bg: #0D1B2A;

    /* dark blue */
    --accent: #3b82f6;
    --background: #273b57;
    --input-background: #2A3847;

    /* bright blue */
    --neutral: #f5f5f5;
    --dark-bg: #030712;

    /* light gray */
    --text-light: #e2e8f0;

    /* dark mode */
    --text-dark: #1f2937;

    --color-accent: #BFA76A;
    --accent-dark: #978455;
    /* Softer gold */
    --color-text: #F5F5F5;
    --color-text-secondary: #CCCCCC;
    --color-card-bg: #1C2635;

    /* Text */
    --text-primary: #EDEDED;
    --text-secondary: #CFCFCF;
    --text-muted: #9CA3AF;

    /* button */
    --button-background: #356ac0;
    --button-hover: #145a97;
    --button-active: #003569;

    /* ----- Spacing System ----- */
    --space-xxs: 0.25rem;
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;

    /* ----- Border Radius ----- */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 999px;

    /* ----- Typography ----- */
    --font-family-base: "Inter", sans-serif;
    --font-family-title: "Merriweather", serif;

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-xxl: 2rem;

    /* ----- Font weights ----- */
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;

    /* ----- Shadows ----- */
    --shadow-soft: 0 1px 4px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 2px 8px rgba(0, 0, 0, 0.623);
    --shadow-strong: 0 4px 12px rgb(0, 0, 0);

    /* ----- Transition ----- */
    --transition-fast: 150ms ease;
    --transition-medium: 300ms ease;
}

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

body {
    margin: 0;
    padding: 0;
    background-color: var(--color-bg);
    background-size: cover;
    min-height: 100vh;
    color: var(--text-light);
    font-family: var(--font-family-base);
    font-weight: var(--weight-regular);
    line-height: 1.6;
}

@supports (min-height: 100dvh) {
    body {
        min-height: 100dvh;
    }
}

section{
    padding-block: 4rem;
}

.colours{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.color-swatch {
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin: var(--space-sm);
    min-width: 300px;
    max-width: 450px;
    text-align: center;
}

.color-swatch:last-child{
    color: var(--text-dark);
}

/* === BUTTONS === */

/* --- base ---*/
.buttons-container{
    display: flex;
    justify-content: center;
}

button{
    border: none;
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-sm);
    border-radius: var(--radius-md);
    transition: background-color var(--transition-medium), box-shadow var(--transition-medium);
}

button:active{
    box-shadow: var(--shadow-strong);
}

/* --- custom buttons --- */
.button-example{
    background-color: var(--button-background);
    color: var(--text-light);
}

.button-example:hover{
    background-color: var(--button-hover);
}

.button-example:active{
    background-color: var(--button-active);
}

.button-accent{
    background-color: var(--color-accent);
    color: var(--text-dark);
}

.button-accent:hover{
    background-color: var(--accent-dark);
}

.button-accent:active{
    box-shadow: var(--shadow-strong);
}

/* === FORM ELEMENTS === */

/* --- inputs --- */
input{
    border: none;
    padding: var(--space-md);
    margin: var(--space-sm);
    border-radius: var(--radius-lg);
    background-color: var(--input-background);
    color: var(--text-light);
}

input:focus{
    box-shadow: var(--shadow);
}

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

/* --- forms --- */
form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    padding-block: var(--space-xl);
    max-width: 100%;
}

/* === TEXT === */

.heading-primary {
    font-family: var(--font-family-title);
    font-size: var(--font-size-xxl);
    font-weight: var(--weight-bold);
    text-align: start;
    letter-spacing: 0.02em;
}

.heading-secondary {
    font-family: var(--font-family-title);
    font-size: var(--font-size-lg);
    font-weight: var(--weight-semibold);
    text-align: start;
}

.heading-tertiary {
    font-family: var(--font-family-base);
    font-size: var(--font-size-md);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    text-align: start;
}

p {
    color: var(--text-primary);
    font-size: var(--font-size-md);
    margin-bottom: var(--space-sm);
}

.small-text {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.italic {
    font-style: italic;
    color: var(--text-secondary);
}

.text-center {
    text-align: center;
}

/* --- micro typography --- */

.prose {
    max-width: 60ch;
    line-height: 1.7;
}

section>*+* {
    margin-top: var(--space-sm);
}

/* --- ACCESSIBILITY --- */

:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
}

.sr-only{
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
