/* ============================================================
   tkg.social — link hub for TKG Publishing, Teagan Kai Gray,
   and Theo Kurt Galen. Warm-paper editorial system, shared
   with tkgpublishing.com (Cormorant Garamond + Libre Franklin).
   ============================================================ */

/* ==================== TOKENS ==================== */
:root {
    --ink:        #1a1a1a;
    --paper:      #faf9f6;
    --cream:      #f5f3ed;
    --warm-gray:  #8a8578;
    --light-rule: #e2ded6;

    /* section accents — drawn from each identity's own site */
    --pub:    #446b44;   /* TKG Publishing — press green   */
    --teagan: #b18a2e;   /* Teagan Kai Gray — candle gold  */
    --theo:   #b56a3c;   /* Theo Kurt Galen — ember copper */

    /* per-book signature colours (used as small accent ticks) */
    --seven:      #2f8f52;  /* Seven Minutes  — terminal green */
    --after:      #8e7bb0;  /* After This     — lavender       */
    --caco:       #b18a2e;  /* Cacotheosis    — candle gold    */
    --redknife:   #3f8ea6;  /* The Red Knife  — arcane teal    */
    --lastwords:  #a8433f;  /* Last Words     — grief crimson  */
    --sixknights: #b8862f;  /* The Six Knights— night amber    */

    --shadow: 0 1px 2px rgba(26,22,15,0.04);
    --lift:   0 8px 24px rgba(26,22,15,0.10);
}

/* ==================== RESET & BASE ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Libre Franklin', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--paper);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(68,107,68,0.05), transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(181,106,60,0.04), transparent 40%);
    background-attachment: fixed;
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
}

.wrap {
    max-width: 600px;
    margin: 0 auto;
    padding: 3.25rem 1.35rem 4rem;
}

a { color: inherit; }

/* ==================== HEADER ==================== */
.masthead { text-align: center; margin-bottom: 2.75rem; }

.mark {
    width: 74px; height: 74px;
    margin: 0 auto 1.4rem;
    border-radius: 18px;
    background: var(--pub);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--lift);
    opacity: 0; animation: fadeUp 0.7s ease 0.05s forwards;
}
.mark span {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: 0.06em;
    color: var(--cream);
}

.wordmark {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1.9rem, 7vw, 2.5rem);
    letter-spacing: 0.02em;
    line-height: 1.1;
    opacity: 0; animation: fadeUp 0.7s ease 0.15s forwards;
}
.wordmark b { font-weight: 600; }

.tagline {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--warm-gray);
    margin-top: 0.55rem;
    opacity: 0; animation: fadeUp 0.7s ease 0.28s forwards;
}

.domain {
    display: inline-block;
    margin-top: 1.1rem;
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--warm-gray);
    opacity: 0; animation: fadeUp 0.7s ease 0.4s forwards;
}

/* ==================== SECTION (collapsible) ==================== */
.section {
    --accent: var(--warm-gray);
    background: rgba(255,255,255,0.5);
    border: 1px solid var(--light-rule);
    border-radius: 14px;
    margin-bottom: 1.1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    opacity: 0; animation: fadeUp 0.7s ease forwards;
}
.section:nth-of-type(1) { animation-delay: 0.46s; }
.section:nth-of-type(2) { animation-delay: 0.54s; }
.section:nth-of-type(3) { animation-delay: 0.62s; }

/* summary / header row */
.section > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.95rem;
    padding: 1.15rem 1.25rem;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}
.section > summary::-webkit-details-marker { display: none; }
.section > summary::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--accent);
    opacity: 0.85;
}
.section > summary:hover { background: rgba(255,255,255,0.6); }
.section > summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.avatar {
    flex: 0 0 auto;
    width: 46px; height: 46px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    color: var(--accent);
    background: var(--cream);
    border: 1.5px solid var(--accent);
    overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.section-titles { flex: 1 1 auto; min-width: 0; }
.section-name {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.32rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.15;
}
.section-role {
    display: block;
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--warm-gray);
    margin-top: 0.15rem;
}

.chevron {
    flex: 0 0 auto;
    width: 20px; height: 20px;
    color: var(--warm-gray);
    transition: transform 0.32s ease, color 0.32s ease;
}
.section[open] > summary .chevron { transform: rotate(180deg); color: var(--accent); }

/* body */
.section-body { padding: 0.35rem 1.25rem 1.4rem; }

/* group label inside a section */
.group-label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--warm-gray);
    margin: 1.15rem 0 0.6rem;
}
.group-label:first-child { margin-top: 0.4rem; }

/* ==================== PRIMARY LINK BUTTONS ==================== */
.link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: var(--cream);
    border: 1px solid var(--light-rule);
    border-radius: 11px;
    text-decoration: none;
    color: var(--ink);
    margin-bottom: 0.6rem;
    min-height: 52px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.link:hover {
    transform: translateY(-2px);
    box-shadow: var(--lift);
    border-color: var(--accent);
}
.link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.link .tick {
    flex: 0 0 auto;
    width: 8px; height: 8px; border-radius: 2px;
    background: var(--dot, var(--accent));
}
.link .l-text { flex: 1 1 auto; min-width: 0; }
.link .l-title {
    display: block;
    font-size: 0.94rem;
    font-weight: 500;
    line-height: 1.25;
}
.link .l-sub {
    display: block;
    font-size: 0.74rem;
    color: var(--warm-gray);
    letter-spacing: 0.01em;
    line-height: 1.3;
}
.link .l-arrow {
    flex: 0 0 auto;
    width: 16px; height: 16px;
    color: var(--warm-gray);
    transition: transform 0.22s ease, color 0.22s ease;
}
.link:hover .l-arrow { transform: translate(2px,-2px); color: var(--accent); }

/* a small "community" chip trailing a book link */
.book-row { display: flex; align-items: stretch; gap: 0.5rem; margin-bottom: 0.6rem; }
.book-row .link { flex: 1 1 auto; margin-bottom: 0; }
.community {
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    padding: 0 0.85rem;
    background: transparent;
    border: 1px solid var(--light-rule);
    border-radius: 11px;
    text-decoration: none;
    color: var(--warm-gray);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}
.community:hover { color: var(--accent); border-color: var(--accent); background: var(--cream); }
.community:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ==================== SOCIAL PILLS ==================== */
.socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.8rem;
    background: transparent;
    border: 1px solid var(--light-rule);
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.pill::before {
    content: '';
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
    opacity: 0.55;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.pill:hover {
    border-color: var(--accent);
    background: var(--cream);
    transform: translateY(-1px);
}
.pill:hover::before { opacity: 1; transform: scale(1.25); }
.pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ==================== FOOTER ==================== */
.foot {
    text-align: center;
    margin-top: 2.5rem;
    opacity: 0; animation: fadeUp 0.7s ease 0.7s forwards;
}
.foot .sep {
    width: 40px; height: 1px;
    background: var(--light-rule);
    margin: 0 auto 1.25rem;
}
.foot .conceit {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--warm-gray);
    margin-bottom: 0.8rem;
}
.foot .conceit b { font-weight: 600; font-style: normal; color: var(--ink); }
.foot .copy {
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--warm-gray);
}
.foot .copy a { color: var(--warm-gray); text-decoration: none; border-bottom: 1px solid var(--light-rule); }
.foot .copy a:hover { color: var(--ink); }

/* ==================== ANIMATION ==================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
    [style*="animation"], .mark, .wordmark, .tagline, .domain,
    .section, .foot { opacity: 1 !important; }
}

/* ==================== SMALL SCREENS ==================== */
@media (max-width: 380px) {
    .wrap { padding: 2.5rem 1rem 3rem; }
    .section > summary { padding: 1rem 1rem; gap: 0.75rem; }
    .avatar { width: 42px; height: 42px; }
    .section-body { padding: 0.35rem 1rem 1.2rem; }
}
