:root {
    --ink: #16191a;
    --ink-soft: #23282a;
    --paper: #f1efe8;
    --paper-raised: #ffffff;
    --seal: #b3341c;
    --seal-bright: #d6491f;
    --moss: #4b5842;
    --sand: #ddd6c4;
    --muted-ink: #4d534f;

    --bg: var(--paper);
    --text: var(--ink);
    --accent: var(--seal);
    --accent-contrast: #ffffff;

    --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-display: 'Big Shoulders Display', var(--font-body);

    --text-base: 1rem;
    --text-scale: 1.22;
    --text-h6: 1rem;
    --text-h5: calc(var(--text-h6) * var(--text-scale));
    --text-h4: calc(var(--text-h5) * var(--text-scale));
    --text-h3: calc(var(--text-h4) * var(--text-scale));
    --text-h2: calc(var(--text-h3) * var(--text-scale));
    --text-h1: calc(var(--text-h2) * var(--text-scale));
    --text-display: calc(var(--text-h1) * var(--text-scale));
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--paper);
    margin: 0;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.05;
    letter-spacing: 0.01em;
    margin: 0 0 0.6em;
}

a {
    color: var(--seal);
}

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

/* Seal badge (signature element) */

.seal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--seal);
    position: relative;
    background: transparent;
}

.seal::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 1px solid var(--seal);
    opacity: 0.55;
}

.seal::after {
    content: '極';
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--seal);
    line-height: 1;
}

.seal--lg {
    width: 84px;
    height: 84px;
}

.seal--lg::before {
    inset: 10px;
}

.seal--lg::after {
    font-size: 2rem;
}

.seal--ghost {
    border-color: var(--sand);
}

.seal--ghost::before {
    border-color: var(--sand);
}

.seal--ghost::after {
    color: var(--sand);
}

/* Header / nav */

.site-header {
    background: var(--ink);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 3px solid var(--seal);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    text-decoration: none;
}

.brand-logo {
    display: block;
    height: 40px;
    width: auto;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
}

nav a {
    color: var(--sand);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

nav a:hover {
    color: #fff;
}

main {
    padding: 0;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 4px;
    background: var(--seal);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border: 2px solid var(--seal);
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
    background: transparent;
    color: var(--seal);
    transform: translateY(-2px);
}

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--ink);
}

.btn--ghost:hover {
    background: var(--ink);
    color: #fff;
}

/* Hero */

.hero {
    background: var(--ink);
    background-image: linear-gradient(160deg, var(--ink) 0%, var(--ink-soft) 100%);
    color: #fff;
    text-align: center;
    padding: 96px 24px 88px;
    position: relative;
    overflow: hidden;
}

.hero-logo {
    display: block;
    width: 100%;
    max-width: 260px;
    height: auto;
    margin: 0 auto 28px;
}

.hero-eyebrow {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--seal-bright);
    margin: 0 0 18px;
}

.hero h1 {
    color: #fff;
    text-transform: uppercase;
    font-size: var(--text-display);
    max-width: 900px;
    margin: 0 auto 0.5em;
}

.hero-subtext {
    max-width: 620px;
    margin: 0 auto 2.2rem;
    color: var(--sand);
    font-size: var(--text-h6);
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
    margin: 0 auto 2.6rem;
}

.hero-stat {
    text-align: center;
}

.hero-stat .num {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-h2);
    font-weight: 700;
    color: var(--seal-bright);
    line-height: 1;
}

.hero-stat .label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--sand);
    margin-top: 4px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-actions .btn--ghost {
    color: #fff;
    border-color: var(--sand);
}

.hero-actions .btn--ghost:hover {
    background: #fff;
    color: var(--ink);
    border-color: #fff;
}

/* Page content */

.page-content {
    padding: 48px 0;
}

article {
    padding: 56px 24px;
    max-width: 760px;
    margin: 0 auto;
}

.article-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 420px;
    margin: 0 auto 40px;
    border-radius: 6px;
    border: 1px solid var(--sand);
    box-shadow: 0 24px 48px -24px rgba(22, 25, 26, 0.35);
}

article h1 {
    font-size: var(--text-h2);
    text-transform: uppercase;
}

article h2 {
    font-size: var(--text-h4);
    color: var(--seal);
    margin-top: 1.4em;
}

article p {
    color: var(--muted-ink);
}

article img:not(.article-image) {
    display: block;
    width: 100%;
    height: auto;
    margin: 24px 0;
    border-radius: 6px;
    border: 1px solid var(--sand);
}

.location {
    color: var(--muted-ink);
    font-size: 0.95rem;
}

/* Breadcrumb */

.breadcrumb {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.breadcrumb a {
    color: inherit;
    text-decoration: none;
    opacity: 0.7;
}

.breadcrumb a:hover {
    opacity: 1;
}

/* Dojo hero */

.dojo-hero {
    background: var(--ink);
    background-image: linear-gradient(160deg, var(--ink) 0%, var(--ink-soft) 100%);
    color: #fff;
    padding: 56px 24px 64px;
    text-align: center;
}

.dojo-hero .breadcrumb {
    color: var(--sand);
    margin-bottom: 28px;
    display: block;
}

.dojo-hero .seal {
    margin: 0 auto 20px;
}

.dojo-hero .eyebrow {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--seal-bright);
    margin: 0 0 12px;
}

.dojo-hero h1 {
    color: #fff;
    text-transform: uppercase;
    font-size: var(--text-h1);
    margin: 0 0 0.4em;
}

.dojo-hero .dojo-location {
    color: var(--sand);
    font-size: var(--text-h6);
    margin: 0;
}

/* Person hero */

.person-hero {
    background: var(--ink);
    background-image: linear-gradient(160deg, var(--ink) 0%, var(--ink-soft) 100%);
    color: #fff;
    padding: 56px 24px 64px;
    text-align: center;
}

.person-hero .breadcrumb {
    color: var(--sand);
    margin-bottom: 28px;
    display: block;
}

.portrait-frame {
    width: 160px;
    height: 160px;
    margin: 0 auto 24px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--seal);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}

.portrait-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portrait-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ink-soft);
}

.portrait-placeholder .seal {
    width: 60px;
    height: 60px;
}

.person-hero h1 {
    color: #fff;
    text-transform: uppercase;
    font-size: var(--text-h1);
    margin: 0 0 0.4em;
}

.person-subtitle {
    color: var(--sand);
    font-size: var(--text-h6);
    margin: 0;
}

/* Person card (bios directory) */

.person-card {
    text-align: center;
}

.person-card-portrait {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--sand);
}

.person-card-portrait img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

a.person-card:hover .person-card-portrait {
    border-color: var(--seal);
}

.person-card h3 {
    text-align: center;
}

.person-card .location {
    justify-content: center;
    text-align: center;
}

/* Notice / image frame */

.notice-frame {
    max-width: 720px;
    margin: -32px auto 0;
    padding: 0 24px 56px;
}

.notice-card {
    background: var(--paper-raised);
    border: 1px solid var(--sand);
    border-radius: 6px;
    box-shadow: 0 24px 48px -24px rgba(22, 25, 26, 0.35);
    padding: 12px;
}

.notice-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 3px;
}

.notice-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 24px;
    background: var(--paper-raised);
    border: 2px dashed var(--sand);
    border-radius: 6px;
    text-align: center;
}

.notice-placeholder p {
    margin: 0;
    color: var(--muted-ink);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.9rem;
}

.dojo-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px 56px;
}

.dojo-body p {
    color: var(--muted-ink);
}

/* Cards */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 0 24px 48px;
    max-width: 1100px;
    margin: 0 auto;
}

.dojo-card, .bio-card {
    background: var(--paper-raised);
    border-radius: 6px;
    padding: 24px;
    border: 1px solid var(--sand);
    text-decoration: none;
    display: block;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

a.dojo-card:hover {
    border-color: var(--seal);
    transform: translateY(-3px);
}

.dojo-card h3, .bio-card h3 {
    font-size: var(--text-h5);
    margin-bottom: 0.3em;
    color: var(--ink);
}

.dojo-card .location, .bio-card .rank {
    color: var(--muted-ink);
    font-size: 0.9rem;
}

.dojo-card .location {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dojo-card .location::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--seal);
    flex-shrink: 0;
}

.person-card .location::before {
    content: none;
}

/* Dojo directory */

.dojo-directory {
    padding: 56px 24px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.dojo-directory-intro {
    max-width: 640px;
    margin: 0 0 40px;
}

.dojo-directory-intro h1 {
    font-size: var(--text-h2);
    text-transform: uppercase;
}

.dojo-directory-intro p {
    color: var(--muted-ink);
}

.state-group {
    margin-bottom: 20px;
}

.state-group-header {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--moss);
}

.state-group-header h2 {
    font-size: var(--text-h4);
    color: var(--moss);
    text-transform: uppercase;
    margin: 0;
}

.state-group-header .count {
    color: var(--muted-ink);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.coming-soon-card {
    background: transparent;
    border: 2px dashed var(--sand);
}

.coming-soon-card .location {
    color: var(--muted-ink);
    font-style: italic;
}

/* Footer */

.site-footer {
    background: var(--ink);
    color: var(--sand);
    padding: 40px 0;
    margin-top: 48px;
    border-top: 3px solid var(--seal);
}

.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.site-footer .footer-copy {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Responsive */

@media (max-width: 720px) {
    :root {
        --text-scale: 1.15;
    }

    .site-header .container {
        justify-content: flex-start;
    }

    nav {
        gap: 6px 16px;
    }

    .hero {
        padding: 64px 20px 56px;
    }

    .hero-stats {
        gap: 20px;
    }

    article {
        padding: 40px 20px;
    }

    .dojo-hero {
        padding: 40px 20px 48px;
    }

    .notice-frame {
        margin-top: -20px;
    }
}
