/* ============================================
   THE OPEN ALBAYAN TIMES - BASE STYLES
   ============================================
   Global typography, colors, and defaults
   applied to HTML elements across the site.
   ============================================ */

/* ==========================================
   1. BODY & HTML
   ========================================== */

html {
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    font-weight: var(--fw-regular);
    line-height: var(--lh-normal);
    color: var(--color-navy);
    background-color: var(--color-cream);
    /* Subtle warm glow — imperceptible individually, warm together */
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(245, 166, 35, 0.05) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(46, 196, 182, 0.04) 0%, transparent 45%),
        radial-gradient(circle at 50% 95%, rgba(255, 209, 102, 0.04) 0%, transparent 50%);
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* ==========================================
   2. HEADINGS
   ========================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--fw-regular);
    line-height: var(--lh-tight);
    color: var(--color-navy);
    margin-bottom: var(--space-md);
    letter-spacing: var(--ls-normal);
}

h1 { font-size: var(--fs-h1); letter-spacing: var(--ls-tight); }
h2 { font-size: var(--fs-h2); letter-spacing: var(--ls-tight); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5 { font-size: var(--fs-h5); }
h6 { font-size: var(--fs-h6); }

h1.has-underline,
h2.has-underline,
h3.has-underline {
    position: relative;
    padding-bottom: var(--space-md);
}

h1.has-underline::after,
h2.has-underline::after,
h3.has-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--color-orange);
    border-radius: var(--radius-full);
}

.has-underline.centered::after {
    left: 50%;
    transform: translateX(-50%);
}

/* ==========================================
   3. PARAGRAPHS & TEXT
   ========================================== */

p {
    font-size: var(--fs-body);
    line-height: var(--lh-relaxed);
    color: var(--color-navy);
    margin-bottom: var(--space-md);
}

p:last-child {
    margin-bottom: 0;
}

.lead {
    font-size: 20px;
    line-height: var(--lh-relaxed);
    color: var(--color-gray);
    font-weight: var(--fw-semibold);
}

small,
.text-small {
    font-size: var(--fs-small);
    color: var(--color-gray);
}

.text-tiny {
    font-size: var(--fs-tiny);
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
}

.text-muted {
    color: var(--color-gray);
}

blockquote {
    font-family: var(--font-quote);
    font-style: italic;
    font-size: 20px;
    line-height: var(--lh-relaxed);
    color: var(--color-navy);
    border-left: 4px solid var(--color-orange);
    padding-left: var(--space-lg);
    margin: var(--space-xl) 0;
}

blockquote cite {
    display: block;
    margin-top: var(--space-md);
    font-family: var(--font-body);
    font-style: normal;
    font-size: var(--fs-small);
    color: var(--color-gray);
}

/* ==========================================
   4. LINKS
   ========================================== */

a {
    color: var(--color-teal);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-teal-dark);
}

.link-underline {
    position: relative;
    color: var(--color-teal);
    font-weight: var(--fw-semibold);
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-teal);
    transition: width var(--transition-base);
}

.link-underline:hover::after {
    width: 100%;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-orange);
    font-weight: var(--fw-bold);
    font-size: var(--fs-small);
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    transition: gap var(--transition-base), color var(--transition-fast);
}

.link-arrow::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 2px;
    background-color: currentColor;
    position: relative;
    transition: transform var(--transition-base);
}

.link-arrow:hover {
    color: var(--color-orange-dark);
}

.link-arrow:hover::after {
    transform: translateX(4px);
}

/* ==========================================
   5. LISTS
   ========================================== */

ul.list-styled,
ol.list-styled {
    padding-left: var(--space-lg);
    margin-bottom: var(--space-md);
}

ul.list-styled {
    list-style: none;
}

ul.list-styled li {
    position: relative;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-sm);
    line-height: var(--lh-relaxed);
}

ul.list-styled li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background-color: var(--color-orange);
    border-radius: var(--radius-full);
}

ol.list-styled {
    list-style: decimal;
}

ol.list-styled li {
    margin-bottom: var(--space-sm);
    line-height: var(--lh-relaxed);
    padding-left: var(--space-sm);
}

ol.list-styled li::marker {
    color: var(--color-orange);
    font-weight: var(--fw-bold);
}

/* ==========================================
   6. IMAGES
   ========================================== */

img {
    border-radius: var(--radius-md);
}

.img-avatar {
    border-radius: var(--radius-full);
    object-fit: cover;
}

.img-blob {
    border-radius: var(--radius-blob);
}

.img-card-top {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* ==========================================
   7. CONTAINERS
   ========================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.container-narrow {
    max-width: 900px;
}

.container-wide {
    max-width: 1600px;
}

.section {
    padding: var(--section-spacing) 0;
}

.section-sm {
    padding: var(--space-2xl) 0;
}

.section-lg {
    padding: var(--space-4xl) 0;
}

/* ==========================================
   8. PAGE HEADERS (inner pages)
   ========================================== */

.page-header {
    background-color: var(--color-cream);
    padding: 48px 0 32px;
    text-align: center;
    border-bottom: 1px solid var(--color-gray-light);
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 52px;
    color: var(--color-navy);
    margin-bottom: 12px;
    line-height: 1.1;
}

.page-header .page-subtitle {
    font-size: 16px;
    color: var(--color-gray);
    font-weight: 600;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================
   9. SECTION HEADERS
   ========================================== */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.section-header h2 {
    margin-bottom: 0;
    font-size: var(--fs-h3);
}

.section-header .section-link {
    font-size: var(--fs-small);
    font-weight: var(--fw-bold);
    color: var(--color-teal);
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    transition: color var(--transition-fast);
}

.section-header .section-link:hover {
    color: var(--color-teal-dark);
}

/* ==========================================
   10. TEXT UTILITIES
   ========================================== */

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

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
}

.text-bold { font-weight: var(--fw-bold); }
.text-semibold { font-weight: var(--fw-semibold); }

.text-navy { color: var(--color-navy); }
.text-orange { color: var(--color-orange); }
.text-teal { color: var(--color-teal); }
.text-coral { color: var(--color-coral); }
.text-mint { color: var(--color-mint); }
.text-gray { color: var(--color-gray); }

/* ==========================================
   11. DECORATIVE ELEMENTS
   ========================================== */

.divider-doodle {
    display: block;
    width: 100%;
    height: 12px;
    margin: var(--space-2xl) 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12'%3E%3Cpath d='M0 6 Q 25 1, 50 6 T 100 6 T 150 6 T 200 6' stroke='%23F5A623' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 200px 12px;
}

.doodle-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--color-yellow);
    border-radius: var(--radius-full);
    transform: rotate(-10deg);
}

.tape-effect {
    position: relative;
}

.tape-effect::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 80px;
    height: 24px;
    background-color: rgba(255, 209, 102, 0.7);
    border-radius: 2px;
    z-index: 2;
}

/* ==========================================
   12. SCROLLBAR
   ========================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-lighter);
}

::-webkit-scrollbar-thumb {
    background: var(--color-orange);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-gray-lighter);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-orange-dark);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-orange) var(--color-gray-lighter);
}

/* ==========================================
   13. SELECTION
   ========================================== */

::selection {
    background-color: var(--color-yellow);
    color: var(--color-navy);
}

/* ==========================================
   14. SPACING UTILITIES
   ========================================== */

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-xl { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }

/* ==========================================
   15. COMMENTS PLACEHOLDER
   ========================================== */

#site-comments {
    margin-top: var(--space-2xl);
}

/* ==========================================
   16. RESPONSIVE
   ========================================== */

@media (max-width: 640px) {
    .page-header {
        padding: 32px 0 24px;
    }

    .page-header h1 {
        font-size: 34px;
    }

    .page-header .page-subtitle {
        font-size: 14px;
        padding: 0 16px;
    }
}