/* The header, its menu and the footer every page shares. Old pages also load style.css, whose bare
   header / nav / footer rules are undone here. */

.btn {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--accent); color: #fff; font-weight: 600;
    padding: 16px 28px; border-radius: 999px;
    transition: background .2s, transform .2s cubic-bezier(.2, .7, .2, 1);
    text-decoration: none;
}
.btn:hover { background: var(--accent-hover); color: #fff; transform: translateY(-2px); }
.btn-small { padding: 10px 20px; font-size: .9rem; }
.btn-quiet { background: transparent; color: var(--ink); border: 1px solid rgba(29, 27, 24, .22); }
.btn-quiet:hover { background: rgba(29, 27, 24, .05); color: var(--ink); }

header.nav {
    position: fixed; inset: 0 0 auto; z-index: 1000; height: 64px; min-height: 0; width: auto;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 0 max(16px, 4vw);
    background: rgba(250, 248, 244, .72);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(29, 27, 24, .06);
}
.nav-logo, .foot > div { font-family: var(--font-display); font-size: 1.35rem; font-weight: 400; color: var(--ink); text-decoration: none; }
.nav-logo span, .foot > div span { color: var(--accent); font-style: italic; }
.nav nav { display: flex; gap: clamp(16px, 2vw, 28px); font-size: .9rem; white-space: nowrap; }
.nav nav a { color: var(--ink-body); transition: color .2s; padding: 0; font-size: inherit; font-weight: 400; text-decoration: none; }
.nav nav a:hover { color: var(--ink); }
.nav nav a::after, .foot nav a::after { content: none; }
.nav nav a[aria-current="page"] { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 10px; flex: none; }
@media (max-width: 1180px) { .nav:has(.nav-actions) > nav { display: none; } }

.nav-more { display: none; position: relative; }
.nav-more summary { list-style: none; cursor: pointer; width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; border: 1px solid rgba(29, 27, 24, .22); }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary span, .nav-more summary span::before, .nav-more summary span::after { display: block; width: 16px; height: 1.5px; background: var(--ink); border-radius: 1px; transition: transform .2s cubic-bezier(.2, .7, .2, 1), opacity .2s; }
.nav-more summary span { position: relative; }
.nav-more summary span::before, .nav-more summary span::after { content: ''; position: absolute; left: 0; }
.nav-more summary span::before { top: -5px; }
.nav-more summary span::after { top: 5px; }
.nav-more[open] summary span { background: transparent; }
.nav-more[open] summary span::before { transform: translateY(5px) rotate(45deg); }
.nav-more[open] summary span::after { transform: translateY(-5px) rotate(-45deg); }
.nav-more summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav .nav-more nav { display: flex; flex-direction: column; position: absolute; right: 0; top: calc(100% + 12px); min-width: 260px; padding: 8px; gap: 0; background: var(--ground); border: 1px solid var(--rule); border-radius: 18px; box-shadow: 0 18px 40px -16px rgba(29, 27, 24, .28); font-size: 1rem; white-space: normal; }
.nav .nav-more nav a { display: block; width: auto; padding: 12px 14px; border-radius: 12px; color: var(--ink); font-size: 1rem; }
/* style.css turns every bare nav into a slide-in drawer under 768px. */
.nav .nav-more nav, .foot nav { width: auto; height: auto; overflow: visible; transition: none; z-index: auto; }
.foot nav { position: static; padding: 0; background: none; border: 0; }
.foot nav a { display: inline; width: auto; }
.nav .nav-more nav a:hover, .nav .nav-more nav a[aria-current="page"] { background: var(--ground-sunk); }
.nav .nav-more nav .nav-more-demo { display: none; }
@media (max-width: 1180px) { .nav:has(.nav-actions) .nav-more { display: block; } }

footer.foot {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px;
    padding: 40px max(16px, 5vw); font-size: .9rem; border-top: 1px solid var(--rule);
    background: transparent; color: var(--ink-body);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 24px; }
.foot nav a { color: var(--ink-body); text-decoration: none; padding: 0; font-size: inherit; }
.foot nav a:hover { color: var(--ink); }

@media (max-width: 600px) {
    header.nav { gap: 10px; }
    .nav-logo { font-size: 1.15rem; }
    .nav-actions { gap: 6px; }
    .nav-actions .btn-small { padding: 8px 13px; font-size: .82rem; }
    .nav-demo { display: none; }
    .nav .nav-more nav .nav-more-demo { display: block; border-top: 1px solid var(--rule); margin-top: 6px; }
    .nav .nav-more nav { position: fixed; left: 12px; right: 12px; top: 72px; min-width: 0; }
}
