/* AGATHE.CSS - Scholarly Typography Prototype
   Inspired by PackHum, using self-hosted Adobe Jenson Pro
   ======================================================== */

/* === FONT FACES === */
@font-face {
    font-family: 'Adobe Jenson Pro';
    src: url('/Fonts/AJensonPro-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Adobe Jenson Pro';
    src: url('/Fonts/AJensonPro-It.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Adobe Jenson Pro';
    src: url('/Fonts/AJensonPro-Semibold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Adobe Jenson Pro';
    src: url('/Fonts/AJensonPro-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Adobe Jenson Pro';
    src: url('/Fonts/AJensonPro-BoldIt.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* === COLOR PALETTE === */
:root {
    /* Primary colors - classical/scholarly */
    --color-red: #d80f2f;           /* Headings, accents */
    --color-maroon: #8b0000;        /* H2, secondary headings */
    --color-blue: #00008b;          /* H3, tertiary */

    /* Links - both shades of red */
    --color-link: #d80f2f;          /* Unvisited - bright red */
    --color-visited: #8b0000;       /* Visited - maroon */

    /* Backgrounds */
    --color-bg: #f5f5dc;            /* Beige/cream - main content */
    --color-bg-alt: #eee8d5;        /* Slightly darker beige */
    --color-header-bg: #f0f0f0;     /* Light gray header */

    /* Text */
    --color-text: #111;             /* Body text */
    --color-text-muted: #555;       /* Labels, secondary */
    --color-border: #ccc;           /* Borders */
}

/* === BASE TYPOGRAPHY === */
html {
    font-size: 18px;  /* Boosted from 16px */
}

body {
    font-family: 'Adobe Jenson Pro', Georgia, 'Times New Roman', serif;
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

/* === HEADINGS === */
h1 {
    font-family: 'Adobe Jenson Pro', Georgia, serif;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 600;
    color: var(--color-red);
    line-height: 1.2;
    margin: 0 0 0.8em;
}

h2 {
    font-family: 'Adobe Jenson Pro', Georgia, serif;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 600;
    color: var(--color-maroon);
    line-height: 1.3;
    margin: 1.5em 0 0.6em;
}

h3 {
    font-family: 'Adobe Jenson Pro', Georgia, serif;
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    font-weight: 600;
    color: var(--color-maroon);
    line-height: 1.4;
    margin: 1em 0 0.5em;
}

/* === LINKS === */
a {
    color: var(--color-link);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:visited {
    color: var(--color-visited);
}

a:hover,
a:focus {
    color: var(--color-red);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* === LAYOUT REFINEMENTS === */
#page {
    background: var(--color-bg);
}

#header {
    background: var(--color-bg);  /* Same beige as content */
    border-bottom: 1px solid var(--color-border);
}

#main {
    border-color: var(--color-border);
}

#footer {
    color: var(--color-text-muted);
}

/* === SEARCH BUTTON === */
.lsb {
    background: #ddd8c8;
    color: #333;
    border: none;
    font-family: 'Adobe Jenson Pro', Georgia, serif;
}

.lsbb {
    background: #ddd8c8;
    border: 1px solid #ccc8b8;
}

.lsb:active {
    background: #ccc8b8;
}

/* Native search clear button styling */
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    height: 1.2em;
    width: 1.2em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z' fill='%238b0000'/%3E%3C/svg%3E") center center no-repeat;
    background-size: contain;
    cursor: pointer;
}

/* === SIDEBAR === */
#index .linkGroup {
    margin: 0.3em 1em 0.3em 1em;
    padding: 0.3em 0;
}

#index .linkHeader {
    color: var(--color-maroon);
    font-weight: 600;
    padding: 0.2em 0;
    font-size: 1.1em;
}

#index .link,
#index .linkSelected,
#index .linkFlush {
    padding: 0.15em 0;
    min-height: 0;
    line-height: 1.4;
}

#index .count {
    color: var(--color-text-muted);
}

/* Type brackets in list results - override inline blue */
.type,
span.type {
    color: var(--color-maroon) !important;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    background: #ddd8c8;
    color: #333;
}

/* === CONTENT === */
.text {
    max-width: 42em;  /* Optimal reading width */
    padding-left: 0.5em;
    padding-right: 0.5em;
}

#content {
    padding-left: 0.5em;
    padding-right: 0.5em;
}

p {
    margin-bottom: 0.75em;
}

/* Field labels in display view */
td[align="right"][style*="color:#555"] {
    font-style: italic;
}

/* === RESPONSIVE TYPOGRAPHY === */
@media screen and (max-width: 767px) {
    html {
        font-size: 16px;  /* Boosted from 14px */
    }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    html {
        font-size: 17px;  /* Boosted from 15px */
    }
}

@media screen and (min-width: 1024px) {
    html {
        font-size: 18px;  /* Boosted from 16px */
    }
}
