/*
 * File: field-notes-character.css
 * Version: 1.0.0
 * Last Modified: 2026-02-04
 * Last Deploy: 2026-02-26 17:45:48
 */

/**
 * Field Notes Character Pages - Updated v3
 * Styling for the Ranch of Questionable Choices character profiles
 * Matches the field journal aesthetic
 *
 * NOTE: Uses hardcoded values and high specificity to override theme defaults
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --field-notes-bg: #f6f1ea;
    --field-notes-card: #fdfcfa;
    --field-notes-text: #222222;
    --field-notes-muted: #5a5a5a;
    --field-notes-accent: #4a9b9b; /* peacock teal */
    --field-notes-accent-light: rgba(74, 155, 155, 0.1);
    --field-notes-border: #e0d9cf;
    --field-notes-shadow: rgba(0, 0, 0, 0.06);
    
    /* Fonts */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-script: 'Caveat', cursive;
    --font-body: 'Inter', -apple-system, sans-serif;
}

/* ============================================
   PAGE WRAPPER - POSTER MAT
   ============================================ */
.field-notes-wrapper {
    max-width: 1300px;
    margin: 20px auto;
    padding: 2rem 1.5rem 4rem;
    background: #f4efe6;
    border: 24px solid #fff;
    box-sizing: border-box;
}

/* ============================================
   CHARACTER PAGE CONTAINER
   ============================================ */
.single-character .inside-article,
.field-notes-page .inside-article {
    background-color: var(--field-notes-card);
    background-image: url('../images/paper-texture1.webp');
    background-repeat: no-repeat;
    background-size: cover;
    background-blend-mode: multiply;
    border-radius: 8px;
    padding: 3rem 3.5rem;
    margin: 2rem auto;
    max-width: 750px;
    box-shadow:
        0 1px 3px var(--field-notes-shadow),
        0 4px 12px var(--field-notes-shadow);
    position: relative;
}

/* ============================================
   CHARACTER IMAGE - POLAROID STYLE
   ============================================ */
.single-character .field-notes-image {
    text-align: center;
    margin-bottom: 2rem;
}

/* Polaroid frame container */
.single-character .field-notes-polaroid {
    display: inline-block;
    position: relative;
    background: #ffffff;
    padding: 12px 12px 50px 12px;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.1);
    transform: rotate(2deg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.single-character .field-notes-polaroid:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Tape element */
.single-character .field-notes-polaroid::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 28px;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    background: linear-gradient(
        90deg,
        rgba(255, 248, 220, 0.65) 0%,
        rgba(255, 248, 220, 0.8) 50%,
        rgba(255, 248, 220, 0.65) 100%
    );
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

/* Handwritten caption */
.single-character .field-notes-polaroid::after {
    content: attr(data-caption);
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    color: #333;
    text-align: center;
}

.single-character .field-notes-image img {
    max-width: 250px;
    height: auto;
    display: block;
}

/* ============================================
   FIELD NOTES HEADER
   ============================================ */
.single-character .field-notes-header {
    text-align: left;
    margin-bottom: 0.5rem;
}

/* "Field Notes:" prefix in Playfair Display */
.single-character .field-notes-prefix {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--field-notes-muted);
    display: block;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

/* Character name in Caveat (larger than em notes) */
.single-character .field-notes-name {
    font-family: 'Caveat', cursive;
    font-size: 2.8rem;
    font-weight: 400;
    color: var(--field-notes-text);
    margin: 0 0 0.5rem 0;
    line-height: 1.1;
}

/* Hide any duplicate "Field Notes: Name" that might appear in content */
.single-character .field-notes-body h2:first-child,
.single-character .entry-content > h2:first-child {
    display: none;
}

/* If the first element is an italic paragraph meant to be tagline */
.single-character .field-notes-body > p:first-child em:only-child,
.single-character .entry-content > p:first-child em:only-child {
    font-family: var(--font-body);
    font-size: 1rem;
    font-style: italic;
    color: var(--field-notes-muted);
    display: block;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--field-notes-border);
}

/* Tagline from ACF field */
.single-character .field-notes-tagline {
    font-family: var(--font-body);
    font-size: 1rem;
    font-style: italic;
    color: var(--field-notes-muted);
    display: block;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--field-notes-border);
}

/* ============================================
   SECTION HEADERS (General Observations, Notable Incidents, Current Status)
   ============================================ */
.single-character .field-notes-content h2,
.single-character .entry-content h2,
.single-character .field-notes-body h2,
article.field-notes-page .field-notes-content h2 {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 1.35rem !important;
    font-weight: 600 !important;
    color: #222222;
    margin: 2.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4a9b9b !important;
    display: inline-block;
    width: auto;
}

/* Current Status header - slightly different treatment */
.single-character .field-notes-content h2:last-of-type,
.single-character .entry-content h2:last-of-type,
.single-character .field-notes-body h2:last-of-type,
article.field-notes-page .field-notes-content h2:last-of-type {
    font-family: 'Caveat', cursive !important;
    font-size: 1.5rem !important;
    font-weight: 400 !important;
    border-bottom: none !important;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0d9cf;
    display: block;
    width: 100%;
}

/* ============================================
   INCIDENT TITLES (h3)
   ============================================ */
.single-character .field-notes-content h3,
.single-character .entry-content h3,
.single-character .field-notes-body h3,
article.field-notes-page .field-notes-content h3 {
    font-family: 'Inter', -apple-system, sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: #222222;
    margin: 2rem 0 0.75rem 0;
    padding: 0;
    border: none !important;
    border-bottom: none !important;
}

/* Context in parentheses after incident title */
.single-character .field-notes-content h3 em,
.single-character .entry-content h3 em,
.single-character .field-notes-body h3 em {
    font-weight: 400;
    color: #5a5a5a;
}

/* ============================================
   BODY TEXT
   ============================================ */
.single-character .field-notes-content p,
.single-character .entry-content p,
.single-character .field-notes-body p {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #222222;
    margin-bottom: 1rem;
}

/* Short punchy paragraphs - tighten spacing */
.single-character .field-notes-content p + p,
.single-character .entry-content p + p,
.single-character .field-notes-body p + p {
    margin-top: -0.25rem;
}

/* ============================================
   ITALICIZED THOUGHTS / OBSERVATIONS (hand-scribbled note style)
   ============================================ */
/* Standalone italic paragraph = handwritten note in block indent */
.single-character .field-notes-content p > em:only-child,
.single-character .entry-content p > em:only-child,
.single-character .field-notes-body p > em:only-child,
article.field-notes-page .field-notes-content p > em:only-child {
    display: block;
    font-family: 'Caveat', cursive;
    font-style: normal;
    font-size: 1.4rem;
    font-weight: 400;
    color: #36454f; /* charcoal */
    margin: 1.25rem 0 1.25rem 2rem;
    padding-left: 0;
    border: none;
    transform-origin: left center;
}

/* Vary the tilt: all left-leaning, then repeat */
.single-character .field-notes-content p:nth-of-type(3n+1) > em:only-child {
    transform: rotate(-0.5deg);
}
.single-character .field-notes-content p:nth-of-type(3n+2) > em:only-child {
    transform: rotate(-1.5deg);
}
.single-character .field-notes-content p:nth-of-type(3n) > em:only-child {
    transform: rotate(-1deg);
}

/* Don't apply the block style to tagline */
.single-character .field-notes-content > p:first-child > em:only-child,
.single-character .entry-content > p:first-child > em:only-child,
.single-character .field-notes-body > p:first-child > em:only-child {
    margin: 0;
    padding-left: 0;
    border-left: none;
}

/* ============================================
   LISTS (Findings, observations)
   ============================================ */
.single-character .field-notes-content ul,
.single-character .entry-content ul,
.single-character .field-notes-body ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0 1.5rem 0;
}

.single-character .field-notes-content ul li,
.single-character .entry-content ul li,
.single-character .field-notes-body ul li {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #222222;
    padding-left: 1.5rem;
    margin-bottom: 0.4rem;
    position: relative;
}

.single-character .field-notes-content ul li::before,
.single-character .entry-content ul li::before,
.single-character .field-notes-body ul li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: #5a5a5a;
}

/* ============================================
   HORIZONTAL RULES / DIVIDERS
   ============================================ */
.single-character .field-notes-content hr,
.single-character .entry-content hr,
.single-character .field-notes-body hr {
    border: none;
    border-top: 1px solid #e0d9cf;
    margin: 2rem 0;
}

/* Decorated divider */
.single-character .field-notes-divider.decorated {
    border: none;
    text-align: center;
    margin: 2.5rem 0;
}

.single-character .field-notes-divider.decorated::before {
    content: '◇  ◇  ◇';
    font-size: 0.75rem;
    color: #e0d9cf;
    letter-spacing: 0.5rem;
}

/* ============================================
   BACK LINK
   ============================================ */
.single-character .field-notes-back-link {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
}

.single-character .field-notes-back-link a {
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    color: #5a5a5a;
    text-decoration: underline;
    text-decoration-color: #e0d9cf;
    text-underline-offset: 4px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.single-character .field-notes-back-link a:hover {
    color: #4a9b9b;
    text-decoration-color: #4a9b9b;
}

/* ============================================
   CHARACTER GROUP ACCENT COLORS
   ============================================ */

/* Peafowl - teal accent (default) */
.single-character.group-peafowl .field-notes-content h2,
article.group-peafowl .field-notes-content h2 {
    border-bottom-color: #4a9b9b !important;
}

/* Humans - warm brown */
.single-character.group-humans .field-notes-content h2,
article.group-humans .field-notes-content h2 {
    border-bottom-color: #8b7355 !important;
}

/* Cats - cool gray */
.single-character.group-cats .field-notes-content h2,
article.group-cats .field-notes-content h2 {
    border-bottom-color: #6b6b6b !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .field-notes-wrapper {
        margin: 10px;
        border-width: 12px;
        padding: 1.5rem 1rem 3rem;
    }

    .single-character .inside-article,
    .field-notes-page .inside-article {
        padding: 2rem 1.5rem;
        margin: 1rem;
        border-radius: 6px;
    }
    
    .single-character .field-notes-name {
        font-size: 2.2rem;
    }
    
    .single-character .entry-content h2,
    .single-character .field-notes-body h2 {
        font-size: 1.2rem !important;
    }
    
    .single-character .field-notes-image img {
        max-width: 180px;
    }

    .single-character .field-notes-polaroid {
        padding: 8px 8px 40px 8px;
        transform: rotate(1deg);
    }

    .single-character .field-notes-polaroid::before {
        width: 60px;
        height: 22px;
    }

    .single-character .field-notes-polaroid::after {
        font-size: 1.1rem;
        bottom: 10px;
    }
}