/* ============================================================================
   brand.css - everything that is the same on every P300 page
   ============================================================================
   Colours, dark mode, reset, grid, base typography, buttons, the header with
   the wordmark and its kicker, the light/dark toggle, section markers and the
   footer. Anything that belongs to one page only lives in that page's own
   stylesheet and is loaded after this file.
   ============================================================================ */

:root {
    /* --- P-300 brand palette ---
       --ink     deep blue-black (text / outline)
       --paper   warm off-white (page surface)
       --teal    house turquoise (brand lead)
       --yolk    egg-yolk yellow (single warm accent, owl eye) */
    --ink:          #1c2b33;
    --paper:        #f6f3ec;
    --paper-2:      #efeae0;
    --teal:         #1f9c9c;
    --teal-dk:      #157d7d;
    --yolk:         #f2c14e;
    --red:          #c0392b;   /* used sparingly, single word */
    /* The word takes its colours from the heart beside it, measured off the drawing:
       CORE is the dark left half, the J is the green right half. */
    --wortmarke:    #150b14;
    --wortmarke-j:  #65927c;
    --line:         #d9d2c4;

    --bg-base:      var(--paper);
    --bg-surface:   #fffdf8;
    --bg-elevated:  var(--paper-2);
    --bg-card:      #fffdf8;

    --border:       var(--line);
    --border-hover: var(--teal);

    --text-primary: var(--ink);
    --text-secondary: #5d6b73;
    --text-muted:   #8a9298;

    --accent:       var(--teal);
    --accent-glow:  rgba(31,156,156,0.12);
    --accent-2:     var(--teal-dk);

    /* House faces, same files as p-300.com. Fallbacks match p-300.com's too,
       so a failed download degrades the same way on both sites. */
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-body:    "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    /* "mono" slot repurposed as the brand utility face (eyebrows / labels / tags) */
    --font-mono:    "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

    --radius-sm:    8px;
    --radius-md:    14px;
    --radius-lg:    20px;

    --shadow-card:  0 1px 3px rgba(28,43,51,0.06), 0 16px 40px -20px rgba(21,125,125,0.35);
    --shadow-glow:  0 0 40px rgba(31,156,156,0.08);
}

:root.dark {
    --paper:        #10171b;
    --paper-2:      #1b252b;
    --line:         rgba(255,255,255,0.10);
    --teal:         #2bb6b6;   /* brighter for dark */
    --teal-dk:      #5fc9c9;   /* lighter for text/hover on dark */
    /* Dark mode: the left half of the heart is white there, so CORE is too. */
    --wortmarke:    #ffffff;
    --wortmarke-j:  #86cea4;

    --bg-base:      #10171b;
    --bg-surface:   #161f24;
    --bg-elevated:  #1b252b;
    --bg-card:      #18222a;

    --border:       rgba(255,255,255,0.10);
    --border-hover: #2bb6b6;

    --text-primary: #eef2f1;
    --text-secondary: #9fb0b7;
    --text-muted:   #6c7d84;

    --accent:       #2bb6b6;
    --accent-glow:  rgba(43,182,182,0.15);
    --accent-2:     #5fc9c9;

    --shadow-card:  0 1px 3px rgba(0,0,0,0.4), 0 16px 40px -20px rgba(0,0,0,0.6);
    --shadow-glow:  0 0 40px rgba(43,182,182,0.10);
}

@media (prefers-color-scheme: dark) {
:root:not(.light) {
        --paper:        #10171b;
        --paper-2:      #1b252b;
        --line:         rgba(255,255,255,0.10);
        --teal:         #2bb6b6;
        --teal-dk:      #5fc9c9;
        --wortmarke:    #ffffff;
        --wortmarke-j:  #86cea4;

        --bg-base:      #10171b;
        --bg-surface:   #161f24;
        --bg-elevated:  #1b252b;
        --bg-card:      #18222a;

        --border:       rgba(255,255,255,0.10);
        --border-hover: #2bb6b6;

        --text-primary: #eef2f1;
        --text-secondary: #9fb0b7;
        --text-muted:   #6c7d84;

        --accent:       #2bb6b6;
        --accent-glow:  rgba(43,182,182,0.15);
        --accent-2:     #5fc9c9;

        --shadow-card:  0 1px 3px rgba(0,0,0,0.4), 0 16px 40px -20px rgba(0,0,0,0.6);
        --shadow-glow:  0 0 40px rgba(43,182,182,0.10);
    }
}

:root.dark .nav { background: rgba(16, 23, 27, 0.85); }

@media (prefers-color-scheme: dark) {
:root:not(.light) .nav { background: rgba(16, 23, 27, 0.85); }
}

*, *::before, *::after {
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.15s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3 { line-height: 1.15; }

em { font-style: italic; color: var(--accent); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--teal);
    color: #fff;
    border: 1.5px solid var(--teal);
    box-shadow: 0 0 0 0 rgba(31,156,156,0);
}

.btn-primary:hover {
    background: var(--teal-dk);
    border-color: var(--teal-dk);
    box-shadow: 0 12px 24px -14px rgba(21,125,125,0.6);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--teal-dk);
    border: 1.5px solid var(--teal);
}

.btn-ghost:hover {
    background: rgba(31,156,156,0.08);
    color: var(--teal-dk);
}

.btn-full { width: 100%; justify-content: center; }

.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(246, 243, 236, 0.86);
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--border);
    transition: background 0.25s ease;
}

.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--bg-elevated);
    color: var(--teal-dk);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s, transform 0.3s;
}

.theme-toggle:hover {
    border-color: var(--teal);
    color: var(--text-primary);
    transform: rotate(25deg);
}

.nav-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
        margin-right: 48px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    user-select: none;
}

.logo-mark {
    width: 28px;
    height: 28px;
    display: block;
    flex-shrink: 0;
}

.logo-text {
    font-family: "Nunito", var(--font-body);
    font-size: 17px;
    font-weight: 700;
    color: var(--wortmarke);
    letter-spacing: 0.04em;
}

.logo-accent { color: var(--accent); }

/* The J belongs to the heart's right half, the rest to its left. */
.logo-j { color: var(--wortmarke-j); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
    margin-left: auto;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: "Inter", var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 11.5px;
    font-weight: 600;
    padding: 7px 13px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--accent-2);
    border-color: var(--accent);
    background: rgba(31,156,156,0.08);
}

.nav-cta {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: var(--radius-sm);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 11.5px;
    font-weight: 600;
    transition: all 0.2s;
    flex-shrink: 0;
}

.nav-cta:hover {
    background: var(--accent);
    color: #fff;
}

.logo-kicker {
    /* The kicker sits 1.25px lower so its baseline matches the wordmark: .nav-brand centres boxes, not baselines, and the two have different font sizes. Measured - re-measure if a font size or line-height changes here. See TODO T-162. */
    position: relative;
    top: 1.25px;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
    font-family: "Inter", var(--font-body);
        letter-spacing: 0.06em;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

/* The P300 link is styled like the nav links: same colour, tracking, size, same pill on hover. */
.logo-kicker a {
    color: var(--text-secondary);
    letter-spacing: 0.16em;
    font-size: 11.5px;
    text-decoration: none;
    padding: 3px 9px;
    /* Vertical margin only: a negative left margin would pull the pill over the "by" in front of it. */
    margin: -3px 0;
    border-radius: 999px;
    border: 1.5px solid transparent;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.logo-kicker a:hover,
.logo-kicker a:focus-visible {
    color: var(--accent-2);
    border-color: var(--accent);
    background: rgba(31,156,156,0.08);
}

@media (max-width: 1150px) {
.logo-kicker { display: none; }
}

.section-header {
    text-align: left;
    margin-bottom: 64px;
}

.section-header--center { text-align: center; }

.section-tag {
    display: inline-block;
    padding: 0;
    background: transparent;
    border: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--teal-dk);
    letter-spacing: 0.14em;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 540px;
        margin: 0;
}

.section-header--center .section-subtitle { margin: 0 auto; }

.footer {
    background: var(--ink);
    color: #cdd6da;
    border-top: 0;
    padding: 56px 0 36px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 0.8fr 1fr;
    gap: 32px;
}

.footer-grid h4 {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    font-weight: 600;
    color: #8fa3ab;
    margin: 0 0 12px;
}

.footer-grid ul { list-style: none; padding: 0; margin: 0; }

.footer-grid p,
.footer-grid li { font-size: 13px; line-height: 1.7; margin: 0; color: #9fb0b7; }

.footer-grid a { color: #cdd6da; text-decoration: none; }

.footer-grid a:hover { color: #fff; }

.footer-grid .footer-brand { margin-bottom: 14px; }

.footer-mark { height: 52px; width: auto; display: block; }

.footer-tagline { color: #9fb0b7; }

.footer-credit { color: #7e9199; font-size: 12px; margin-top: 10px; }

.footer-bottom {
    border-top: 1px solid #2c3d45;
    margin-top: 34px;
    padding-top: 20px;
}

@media (max-width: 760px) {
.footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 1px solid #2c3d45;
    margin-top: 34px;
    padding-top: 28px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand .logo-text { color: #fff; }

.footer-copy {
    font-size: 13px;
    color: #7e9199;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 13px;
    color: #cdd6da;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover { color: #fff; }

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
.nav-links { display: none; }
}

.footer-legal {
    padding: 0;
}

.footer-legal h4 {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    font-weight: 600;
    color: #8fa3ab;
    margin-bottom: 10px;
}

.footer-legal p {
    font-size: 13px;
    color: #9fb0b7;
    line-height: 1.7;
}

.footer-legal a { color: #cdd6da; }

.footer-legal a:hover { color: #fff; }

.privacy-policy {
    margin-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
}

.privacy-policy > summary {
    cursor: pointer;
    list-style: none;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    font-weight: 600;
    color: #8fa3ab;
    transition: color 0.2s;
}

.privacy-policy > summary::-webkit-details-marker { display: none; }

.privacy-policy > summary::before {
    content: "+ ";
    color: var(--teal);
}

.privacy-policy[open] > summary::before { content: "− "; }

.privacy-policy > summary:hover { color: #cdd6da; }

.privacy-body {
    margin-top: 18px;
    max-width: 820px;
}

.privacy-body h5 {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
    font-weight: 600;
    color: #b9c7cd;
    margin: 22px 0 6px;
}

.privacy-body p {
    font-size: 13px;
    color: #9fb0b7;
    line-height: 1.7;
    margin-bottom: 10px;
}

.privacy-body ul {
    margin: 0 0 10px 18px;
    padding: 0;
    font-size: 13px;
    color: #9fb0b7;
    line-height: 1.7;
}

.privacy-body a { color: #cdd6da; }

.privacy-body a:hover { color: #fff; }

.privacy-updated {
    font-style: italic;
    color: #8fa3ab !important;
}

.section-tag--plain {
    padding: 0;
    background: transparent;
    border: 0;
}

.privacy-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 28px;
    scroll-margin-top: 90px;
    font-size: 15px;
}

.privacy-link a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(31,156,156,0.35);
    align-self: flex-start;
    transition: border-color 0.2s;
}

.privacy-link a:hover,
.privacy-link a:focus-visible { border-bottom-color: var(--accent); }

.privacy-note {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 2px;
}

/* ---------- News feed ------------------------------------------------------
   The rows are written by js/main.js from p-300.com/news-data.js - one source
   for every P300 page, filtered per tool. These rules are the same on
   cumba.net and p-300.com, so they belong here and not in a page stylesheet. */
.news-section {
    padding: 100px 0;
    background: var(--paper-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.cn-feed {
    border-top: 1px solid var(--border);
    margin-top: 24px;
    /* Scrolls instead of growing: the feed must not push the page open when a
       lot of entries carry this tool's tag. */
    max-height: 340px;
    overflow-y: auto;
}
.cn-row {
    display: grid;
    grid-template-columns: 132px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 11px 4px;
    border-bottom: 1px solid var(--border);
}
.cn-row__meta { display: flex; flex-direction: column; gap: 4px; }
.cn-tag {
    align-self: start;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    color: #fff;
}
/* One colour per kind of entry, same four as on the other two sites. */
.cn-tag--talk     { background: #1f9c9c; }
.cn-tag--release  { background: #2c7a52; }
.cn-tag--webinar  { background: #6f9450; color: #1c2b33; }
.cn-tag--upcoming { background: var(--yolk); color: #4a3407; }
.cn-row__date { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
.cn-row__body { min-width: 0; }
.cn-row__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px;
    line-height: 1.25;
}
.cn-row__text { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.4; }
.cn-row__link {
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}
.cn-row__link:hover { text-decoration: underline; }
.cn-feed-empty { padding: 18px 4px; color: var(--text-muted); font-size: 15px; }

@media (max-width: 700px) {
.cn-row { grid-template-columns: 1fr; gap: 8px; align-items: start; }
.cn-row__meta { flex-direction: row; align-items: center; gap: 10px; }
}

/* ---------- Help and contact us -------------------------------------------
   Same block on every P300 page: one column, 1040px wide - the length of its
   longest line. Its paragraphs carry no ch limit on purpose; with one, the
   width would do nothing. */
.contact-section {
    padding: 120px 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
}
.contact-inner {
    display: block;
    max-width: 1040px;
}
.contact-info p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 32px;
    margin-top: 16px;
}
/* Without a rule of their own these inline links render in the browser's
   default blue/purple - the only non-brand colours on the page. */
.contact-info p a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(31,156,156,0.35);
    transition: border-color 0.2s;
}
.contact-info p a:hover,
.contact-info p a:focus-visible { border-bottom-color: var(--accent); }

@media (max-width: 900px) {
.contact-inner { gap: 48px; }
}
