/* ============================================================
   VOA AUTOTOOL — Tufte-Inspired Presentation Stylesheet
   State of the Art Edition
   ============================================================ */

@charset "UTF-8";

/* ---- CSS Custom Properties ---- */
:root {
    --bg: #fffff8;
    --text: #111111;
    --text-muted: #555555;
    --accent: #a00000;
    --border: #cccccc;
    --border-light: #e0e0e0;
    --font-serif: 'Playfair Display', Palatino, 'Palatino Linotype',
        'Palatino LT STD', 'Book Antiqua', Georgia, serif;
    --font-sans: 'Source Sans 3', 'Gill Sans', 'Gill Sans MT', Calibri, sans-serif;
    --content-width: 55%;
    --body-width: 87.5%;
    --body-padding-left: 12.5%;
}

/* ---- Dark Mode ---- */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #151515;
        --text: #dddddd;
        --text-muted: #999999;
        --accent: #e05555;
        --border: #333333;
        --border-light: #2a2a2a;
    }

    .login-logo,
    .hero-logo {
        filter: invert(1);
    }

    figure.fullwidth img {
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    }
}

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

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    width: var(--body-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--body-padding-left);
    font-family: var(--font-serif);
    background-color: var(--bg);
    color: var(--text);
    max-width: 1400px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   LOGIN GATE
   ============================================================ */

.login-gate {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-gate.fade-out {
    opacity: 0;
    visibility: hidden;
}

.login-card {
    text-align: center;
    max-width: 340px;
    width: 90%;
}

.login-logo {
    display: block;
    width: 100px;
    height: auto;
    margin: 0 auto 2.5rem auto;
}

.login-title {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 0.6rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

.login-subtitle {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.login-input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0;
    outline: none;
    text-align: center;
    letter-spacing: 0.15em;
    transition: border-color 0.3s ease;
}

.login-input:focus {
    border-color: var(--text);
}

.login-input::placeholder {
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.login-btn {
    width: 100%;
    padding: 0.8rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--bg);
    background-color: var(--text);
    border: 1px solid var(--text);
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.login-btn:hover {
    background-color: transparent;
    color: var(--text);
}

.login-error {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--accent);
    min-height: 1.2em;
    transition: opacity 0.3s ease;
}

/* ============================================================
   MAIN CONTENT — REVEAL ANIMATION
   ============================================================ */

.main-content {
    opacity: 1;
}

.main-content.hidden {
    display: none;
}

.main-content.reveal {
    display: block;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   TUFTE TYPOGRAPHY
   ============================================================ */

article {
    padding: 5rem 0;
}

/* ---- Hero Logo ---- */
.hero-logo {
    display: block;
    width: 80px;
    height: auto;
    margin-bottom: 1.5rem;
}

h1 {
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 3.2rem;
    line-height: 1;
}

h2 {
    font-style: italic;
    font-weight: 400;
    margin-top: 2.1rem;
    margin-bottom: 1.4rem;
    font-size: 2.2rem;
    line-height: 1;
}

p {
    font-size: 1.4rem;
    line-height: 2rem;
    margin-top: 1.4rem;
    margin-bottom: 1.4rem;
    padding-right: 0;
    vertical-align: baseline;
}

section>p {
    width: var(--content-width);
}

hr {
    display: block;
    height: 1px;
    width: var(--content-width);
    border: 0;
    border-top: 1px solid var(--border);
    margin: 3em 0;
    padding: 0;
}

/* ---- New Thought (Small Caps) ---- */
span.newthought {
    font-variant: small-caps;
    font-size: 1.2em;
}

/* ---- Links ---- */
a:link,
a:visited {
    color: inherit;
    text-underline-offset: 0.15em;
    text-decoration-thickness: 0.05em;
}

a:hover {
    color: var(--text-muted);
}

/* ============================================================
   FIGURES
   ============================================================ */

figure {
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    max-width: var(--content-width);
    -webkit-margin-start: 0;
    -webkit-margin-end: 0;
    margin: 0 0 3em 0;
}

figure.fullwidth {
    max-width: 90%;
    clear: both;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

figure.fullwidth img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.4s ease;
}

figure.fullwidth img:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

img {
    max-width: 100%;
}

/* ============================================================
   SECTIONS
   ============================================================ */

section {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
    line-height: 1.6;
}

.footer-text a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    text-decoration-thickness: 0.05em;
}

.footer-text a:hover {
    color: var(--text-muted);
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */

.fade-in-section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 760px) {
    body {
        width: 84%;
        padding-left: 8%;
        padding-right: 8%;
    }

    h1 {
        font-size: 2.4rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    hr,
    section>p {
        width: 100%;
    }

    figure {
        max-width: 100%;
    }

    figure.fullwidth {
        max-width: 100%;
    }

    .hero-logo {
        width: 60px;
    }

    .login-logo {
        width: 80px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .login-title {
        font-size: 2.4rem;
    }

    body {
        width: 90%;
        padding-left: 5%;
        padding-right: 5%;
    }
}