/* 
  Base Styles
  ---------------------------------------------------------
  Global resets, typography details, and element defaults.
*/

:root {
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    font-weight: 400;

    color-scheme: light dark;
    color: var(--text-primary);
    background-color: var(--bg-page);

    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* Smooth scrolling for anchor links */
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    transition: color 0.3s ease, background-color 0.3s ease;
}

/* Reset headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.25;
    margin-top: 0;
    margin-bottom: var(--spacing-4);
    color: var(--text-primary);
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.875rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1rem;
}

/* Reset buttons to be styleable */
button {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
    text-transform: none;
    background-color: transparent;
    background-image: none;
    cursor: pointer;
    border: none;
}

button:focus-visible {
    outline: 2px solid var(--primary-default);
    outline-offset: 2px;
}

/* Links */
a {
    color: var(--primary-default);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

/* Preformatted text / Code */
code,
pre,
kbd {
    font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ==========================================================================
   APP-SPECIFIC: Body layout (stretch, no centering)
   ========================================================================== */

body {
    justify-content: flex-start;
    align-items: stretch;
}

main {
    width: 100%;
}

/* ==========================================================================
   APP-SPECIFIC: Logo switching (light/dark)
   ========================================================================== */

.logo-container {
    height: 28px;
    display: flex;
    align-items: center;
}

.logo-container img {
    height: 100%;
    width: auto;
}

.logo-light {
    display: block;
}

.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-light,
:root.dark .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark,
:root.dark .logo-dark {
    display: block;
}

/* ==========================================================================
   APP-SPECIFIC: Stage title dark mode accent color
   ========================================================================== */

[data-theme="dark"] .stage-title,
:root.dark .stage-title {
    color: var(--accent);
}