/*
 * brand.css — ネギさい Global Design System
 * Loaded on all pages, after wireframe.css
 *
 * Palette: white / neutral / black + negi-green accent
 * Green is used with restraint: CTAs, active state, key emphasis only.
 */

/* ── Color tokens ── */
:root {
    /* Surface */
    --n-bg:       #FAFAF9;
    --n-bg2:      #F5F5F4;
    --n-surface:  #FFFFFF;
    --n-border:   #E7E5E4;
    --n-border-s: #D6D3D1;

    /* Text */
    --n-text:     #1C1917;
    --n-text2:    #57534E;
    --n-text3:    #A8A29E;

    /* Green — negi brand */
    --n-green:    #2D6A4F;
    --n-green-h:  #1B4332;
    --n-green-l:  #D8F3DC;
    --n-green-lt: #F0FAF2;

    /* Functional */
    --n-link:     #2D6A4F;
    --n-link-h:   #1B4332;
    --n-focus:    rgba(45, 106, 79, 0.35);

    /* Radius */
    --n-r-sm:  4px;
    --n-r:     6px;
    --n-r-lg:  10px;

    /* Type scale */
    --n-font-sans: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
    --n-font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Space */
    --n-sp-xs: 8px;
    --n-sp-sm: 16px;
    --n-sp:    24px;
    --n-sp-lg: 40px;
    --n-sp-xl: 64px;
}

/* ── Base resets shared by all pages ── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background: var(--n-bg);
    color: var(--n-text);
    font-family: var(--n-font-sans);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--n-link);
    text-decoration: none;
}

a:hover {
    color: var(--n-link-h);
}

a:focus-visible {
    outline: 2px solid var(--n-green);
    outline-offset: 3px;
    border-radius: 2px;
}

img,
video {
    max-width: 100%;
    display: block;
}

/* ── Container ── */
.container {
    width: 100%;
    max-width: 1120px;
    margin-inline: auto;
    padding-inline: 24px;
}

@media (max-width: 640px) {
    .container { padding-inline: 16px; }
}

/* ── Shared Button component ── */
.n-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--n-font-sans);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    padding: 12px 24px;
    border-radius: var(--n-r);
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.14s, color 0.14s, border-color 0.14s;
    white-space: nowrap;
}

.n-btn--primary {
    background: var(--n-green);
    color: #fff;
    border-color: var(--n-green);
}
.n-btn--primary:hover,
.n-btn--primary:focus-visible {
    background: var(--n-green-h);
    border-color: var(--n-green-h);
    color: #fff;
}

.n-btn--outline {
    background: transparent;
    color: var(--n-text);
    border-color: var(--n-border-s);
}
.n-btn--outline:hover {
    border-color: var(--n-text2);
    color: var(--n-text);
}

.n-btn--ghost {
    background: transparent;
    color: var(--n-text2);
    border-color: transparent;
    padding-inline: 8px;
}
.n-btn--ghost:hover {
    color: var(--n-text);
    background: var(--n-bg2);
}

@media (prefers-reduced-motion: reduce) {
    .n-btn { transition: none; }
}

/* ── Utility: visually hidden (accessibility) ── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

/* ── Skip to main (keyboard nav) ── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 8px;
    background: var(--n-green);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 0 0 var(--n-r) var(--n-r);
    z-index: 9999;
    text-decoration: none;
}
.skip-link:focus {
    top: 0;
}

/* ── 404 ── */
.error404 {
    padding: clamp(80px, 12vw, 140px) 0;
    text-align: center;
    max-width: 520px;
    margin-inline: auto;
}

.error404__code {
    font-size: clamp(64px, 16vw, 120px);
    font-weight: 900;
    color: var(--n-bg2);
    letter-spacing: -.04em;
    line-height: 1;
    margin-bottom: 0;
}

.error404__title {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 800;
    color: var(--n-text);
    letter-spacing: -.02em;
    margin-bottom: 16px;
}

.error404__desc {
    font-size: 15px;
    color: var(--n-text2);
    margin-bottom: 32px;
    line-height: 1.8;
}

.error404__search {
    max-width: 400px;
    margin: 0 auto 32px;
}

/* ── 記事メタ (single.php) ── */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--n-text3);
    margin-bottom: 12px;
}

.article-meta__cat {
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--n-green);
    text-decoration: none;
}
.article-meta__cat:hover { text-decoration: underline; }

.article-meta__date,
.article-meta__read {
    font-variant-numeric: tabular-nums;
}

/* article-content thumbnail */
.article-content__thumbnail {
    margin: 16px 0 28px;
    border-radius: var(--n-r-lg);
    overflow: hidden;
}
.article-content__thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Sidebar utility ── */
.sidebar-ranking-date {
    font-size: 0.68rem;
    color: var(--n-text3);
    margin-top: 2px;
}

/* contact Q&A link */
.contact-qa-link {
    text-align: center;
}

/* stream SNS grid center variant */
.stream-sns__grid--center {
    justify-content: center;
}

/* CTA box description */
.cta-box__desc {
    font-size: 0.85rem;
    color: var(--n-text2);
    margin-bottom: 12px;
}

/* widget SNS links */
.widget-sns-links__list { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.widget-sns-links__item { display: inline-flex; align-items: center; gap: 6px; color: var(--n-text2); transition: color 0.15s; }
.widget-sns-links__item:hover { color: var(--n-text); }
.widget-sns-links__icon { display: block; }
.widget-sns-links__label { font-size: 0.85rem; font-weight: 500; }
.widget-before-content,
.widget-after-content,
.widget-single-before,
.widget-single-after { margin: 16px 0; }
.footer-widget__title { font-family: var(--n-font-sans); font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; }

/* growth-log Twitch button icon */
.growth-log__twitch-icon { vertical-align: middle; margin-right: 4px; }

/* profile career timeline dots */
.ns-career-dot--1 { background: #4B9B69; }
.ns-career-dot--2 { background: #7BC49A; }
.ns-career-dot--3 { background: #1D9E75; }
.ns-career-dot--4 { background: #2D6B45; }

/* post-card-large thumbnail placeholder */
.placeholder--thumb { min-height: 200px; }

/* stream gear empty state */
.stream-gear-empty {
    font-size: 15px;
    color: var(--n-text3);
    padding: 16px 0;
}

/* empty / no-results state */
.bl-empty-state {
    text-align: center;
    padding: 48px 0;
    color: var(--n-text2);
}
.bl-empty-state__search {
    max-width: 400px;
    margin: 24px auto 0;
}
