/* ============================================================================
   EVIDENCE-BOARD COMPONENT - 2026-05-28 BUILD_SPEC_2
   ----------------------------------------------------------------------------
   Layered above the dossier sheet on bucket pages (smaller bucket-specific
   boards) and on the Services page (16-card wall). Each card:
     - Always-visible FRONT: pin OR tape strip (NOT both) + name + hook line
     - HOVER / TOUCH overlay: reveals bullets + button-styled [ open file ]
     - Single pin OR tape per card; subtle 1-3 deg rotation
   Mobile uses tap-then-tap: first tap reveals overlay, [ open file ] navigates.
   prefers-reduced-motion: instant overlay fade, no transform.
   ============================================================================ */

.cc-board-section {
    margin: 1.75rem 0 2.25rem;
}
.cc-board-section__label {
    font-family: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(28, 24, 20, 0.6);
    margin: 0 0 0.65rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed rgba(28, 24, 20, 0.18);
}

.cc-board {
    /* Subtle corkboard surface tone laid over the dossier paper. Kept
       quiet so it reads as a backdrop, not as competing texture. */
    background:
        radial-gradient(circle at 25% 30%, rgba(193, 156, 113, 0.08), transparent 60%),
        radial-gradient(circle at 75% 75%, rgba(120, 90, 60, 0.05), transparent 60%),
        rgba(180, 145, 105, 0.04);
    padding: 1.5rem 1.25rem 1.75rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem 1.25rem;
    border: 1px solid rgba(28, 24, 20, 0.08);
    border-radius: 2px;
    /* Faint paper-fiber speckle for the corkboard read */
    position: relative;
}
.cc-board::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='c'><feTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.4   0 0 0 0 0.28   0 0 0 0 0.18   0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23c)'/></svg>");
    background-size: 220px 220px;
    opacity: 0.35;
    mix-blend-mode: multiply;
    border-radius: inherit;
}

.cc-board--wall {
    /* Services full-wall variant: more columns, denser packing. */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.4rem 1.15rem;
}

/* --- Individual card ----------------------------------------------------- */
.cc-card {
    position: relative;
    display: block;
    /* Each card wears its product's theme palette (surface bg, ink text,
       accent title). The theme classes (.theme-edgar, .theme-cgap, etc.)
       on the card itself set --pt-surface / --pt-ink / --pt-accent, which
       these properties pick up. The fallbacks (cream/oil-black) apply only
       to cards with no theme class. */
    background: var(--pt-surface, #f4f1ea);
    color: var(--pt-ink, #08070a);
    text-decoration: none;
    padding: 1.85rem 1.2rem 1.35rem;
    min-height: 200px;
    box-shadow:
        2px 3px 0 rgba(0, 0, 0, 0.22),
        1px 2px 4px rgba(0, 0, 0, 0.18);
    transition: transform 160ms ease, box-shadow 160ms ease;
    cursor: pointer;
    overflow: hidden;
    z-index: 1;
    /* Subtle hand-pinned rotation; alternate via :nth-child below */
    transform: rotate(-1deg);
}
.cc-card:nth-child(even) { transform: rotate(1.5deg); }
.cc-card:nth-child(3n) { transform: rotate(-0.5deg); }
.cc-card:nth-child(5n) { transform: rotate(2deg); }

.cc-card:hover,
.cc-card:focus-within {
    transform: rotate(0deg) translateY(-3px);
    box-shadow:
        4px 5px 0 rgba(0, 0, 0, 0.32),
        2px 3px 8px rgba(0, 0, 0, 0.25);
    z-index: 3;
}

/* --- Pin OR tape strip (one only) --------------------------------------- */
.cc-card__pin {
    position: absolute;
    top: 0.55rem;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffffff, var(--tape, #cccccc) 45%, color-mix(in srgb, var(--tape, #cccccc) 70%, #000) 100%);
    box-shadow:
        0 2px 3px rgba(0, 0, 0, 0.35),
        inset 0 -1px 1px rgba(0, 0, 0, 0.25);
    z-index: 2;
}
.cc-card__tape {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 64px;
    height: 22px;
    background: var(--tape, #cccccc);
    opacity: 0.85;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.25);
    z-index: 2;
}
.cc-card:nth-child(even) .cc-card__tape {
    transform: translateX(-50%) rotate(2deg);
}

/* Cards that use a pin should NOT have a tape strip, and vice versa. The
   markup picks one; this is just belt-and-suspenders for the visual rule. */
.cc-card__pin + .cc-card__tape,
.cc-card__tape + .cc-card__pin { display: none; }

/* --- Front face (always visible) --------------------------------------- */
.cc-card__title {
    font-family: 'Big Shoulders Stencil Display', sans-serif !important;
    font-weight: 800 !important;
    font-size: 1.6rem !important;
    /* Title uses the theme's accent on its themed surface - high-contrast
       per theme (EDGAR amber on dark navy, CGAP legal-pad on dark navy,
       SourceIQ phosphor on near-black, etc.). Fallback to oil-black for
       unthemed cards. !important needed to outrank .theme-X h3 cascade in
       themes-products.css. */
    color: var(--pt-accent, #08070a) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    line-height: 1.05 !important;
    margin: 0.5rem 0 0.7rem !important;
    font-style: normal !important;
}
.cc-card__title--redacted {
    /* Censor bar reads as a redaction regardless of card surface (works on
       both dark themes like EDD-i navy and the unthemed cream fallback). */
    background: #1a1a1a !important;
    color: #1a1a1a !important;
    padding: 0 0.5em;
    user-select: none;
    letter-spacing: 0.5em;
}

/* Whiskey card theme — dark blood-red bg, bone-cream ink, gold accent.
   The bottle aesthetic. The tape color stays the inline-set red. */
.theme-whiskey {
    --pt-bg: #1a050a;
    --pt-surface: #2a0810;
    --pt-ink: #f0e0c0;
    --pt-ink-dim: #c8a578;
    --pt-accent: #d4af37;
    --pt-accent-2: #c8302e;
}
.cc-card__hook {
    font-family: 'Newsreader', 'Iowan Old Style', Georgia, serif !important;
    font-size: 1.05rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    /* Hook reads in the theme's ink-dim (or ink) on the themed surface bg.
       Fallback to dark oil-ink for unthemed cards. */
    color: var(--pt-ink-dim, var(--pt-ink, #1a1612)) !important;
    font-style: normal !important;
    margin: 0 !important;
}

/* --- Overlay (reveal on hover/tap) ------------------------------------- */
.cc-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 7, 10, 0.94);
    color: #f0e8d8;
    padding: 1rem 1rem 1.05rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 220ms ease;
    transform: translateY(8px);
    display: flex;
    flex-direction: column;
    z-index: 4;
    overflow-y: auto;
}
.cc-card:hover .cc-card__overlay,
.cc-card:focus-within .cc-card__overlay,
.cc-card.is-revealed .cc-card__overlay {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.cc-card__bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1 1 auto;
}
.cc-card__bullets li {
    font-family: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.5;
    color: #e0d8c8;
    padding-left: 0.8rem;
    position: relative;
}
.cc-card__bullets li::before {
    content: "·";
    position: absolute;
    left: 0;
    color: var(--tape, #fac638);
    font-weight: 800;
}
.cc-card__action {
    display: inline-block;
    margin-top: auto;
    padding: 0.5rem 0.85rem;
    background: var(--tape, var(--tt-caution, #fac638));
    color: #08070a;
    font-family: 'Anton', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    border: 2px solid #08070a;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
    align-self: flex-start;
}
.cc-card__action:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}
.cc-card__action--external::after {
    content: " \2197";
    font-size: 0.8em;
}
.cc-card__action--locked {
    background: transparent;
    color: #c0c8d6;
    border-color: rgba(192, 200, 214, 0.4);
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- prefers-reduced-motion: instant fade, no transform ----------------- */
@media (prefers-reduced-motion: reduce) {
    .cc-card,
    .cc-card:nth-child(n) { transform: none !important; transition: none !important; }
    .cc-card:hover,
    .cc-card:focus-within { transform: none !important; }
    .cc-card__overlay {
        transition: opacity 80ms linear !important;
        transform: none !important;
    }
    .cc-card__action:hover { transform: none !important; }
}

/* --- Responsive: collapse to single column on phones ------------------- */
@media (max-width: 640px) {
    .cc-board,
    .cc-board--wall {
        grid-template-columns: 1fr;
        gap: 1.1rem;
        padding: 1rem 0.85rem 1.25rem;
    }
    .cc-card,
    .cc-card:nth-child(n) { transform: rotate(0deg); }
}
