/* ─── SITE HEADER (shared across pages) ─── */
nav.site-nav {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    padding: 1rem 1.5rem 0.75rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 1rem;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-family: 'Lexend', sans-serif;
}
nav.site-nav .logo { grid-column: 2; grid-row: 1; justify-self: center; white-space: nowrap;
    font-family: 'Funnel Display', sans-serif; font-size: 1.2rem; font-weight: 700; color: #0a0a0a; text-decoration: none; letter-spacing: -0.02em; }
nav.site-nav .logo::after { display: none; }

/* Human / Agent — low pill under the name */
.mode-toggle {
    grid-column: 2; grid-row: 2; justify-self: center; margin-top: 0.55rem;
    display: inline-flex; padding: 2px; border-radius: 999px;
    background: #f0f0f0; font-size: 0.7rem;
}
.mode-toggle button {
    border: 0; background: transparent; cursor: pointer;
    font: inherit; font-weight: 400; color: rgba(10,10,10,0.5);
    padding: 0.2rem 0.7rem; border-radius: 999px; white-space: nowrap; line-height: 1.5;
    transition: background .25s, color .25s;
}
.mode-toggle button[aria-pressed="true"] { background: #fff; color: #0a0a0a; font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* Right side — for humans */
.nav-right { grid-column: 3; grid-row: 1; justify-self: end; display: flex; gap: 1.5rem; align-items: center; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a {
    font-size: 0.85rem; font-weight: 400; color: rgba(10,10,10,0.62);
    text-decoration: none; white-space: nowrap; transition: color .25s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #0a0a0a; }
.nav-links a[aria-current="page"] { font-weight: 500; }

.nav-burger { display: none; }

/* Get in touch */
.touch { position: relative; }
.touch-btn {
    border: 0; cursor: pointer; font: inherit; font-size: 0.82rem; font-weight: 500;
    background: #e63946; color: #fff; padding: 0.55rem 1.05rem; border-radius: 999px;
    white-space: nowrap; transition: background .25s;
}
.touch-btn:hover { background: #cf2f3c; }
.touch-menu {
    position: absolute; right: 0; top: calc(100% + 10px);
    min-width: 190px; background: #fff; border-radius: 14px; padding: 0.45rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12); display: none; flex-direction: column;
}
.touch.open .touch-menu { display: flex; }
.touch-menu a {
    display: flex; gap: 0.6rem; align-items: center; padding: 0.6rem 0.75rem; border-radius: 10px;
    font-size: 0.86rem; font-weight: 500; color: #0a0a0a; text-decoration: none;
}
.touch-menu a:hover { background: #f5f5f5; color: #e63946; }
.touch-menu svg { flex-shrink: 0; }

/* Page top offset for the taller header */
.hero, .page-hero { padding-top: 8.5rem !important; }

/* ─── AGENT MODE ─── */
#agent-panel { display: none; }
body.agent-mode > *:not(nav):not(#agent-panel):not(script):not(svg) { display: none !important; }
body.agent-mode #agent-panel { display: block; }
body.agent-mode .nav-right { visibility: hidden; }
#agent-panel {
    max-width: 820px; margin: 0 auto; padding: 8.5rem 1.5rem 4rem;
    font-family: 'Lexend', sans-serif; color: #0a0a0a;
}
#agent-panel .ap-label {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: #e63946; margin-bottom: 1rem;
}
#agent-panel h1 {
    font-family: 'Funnel Display', sans-serif; font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 1rem;
}
#agent-panel p { font-weight: 300; line-height: 1.7; color: rgba(10,10,10,0.7); margin-bottom: 1.4rem; max-width: 640px; }
.ap-cmd {
    display: flex; align-items: center; gap: 1rem; justify-content: space-between;
    background: #0a0a0a; color: #f5f5f5; border-radius: 14px; padding: 1rem 1rem 1rem 1.3rem; margin-bottom: 0.8rem;
}
.ap-cmd code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86rem; line-height: 1.5; word-break: break-word; }
.ap-copy {
    flex-shrink: 0; border: 0; cursor: pointer; font: inherit; font-size: 0.78rem; font-weight: 500;
    background: #fff; color: #0a0a0a; border-radius: 999px; padding: 0.45rem 0.9rem;
}
.ap-links { display: flex; gap: 1.4rem; flex-wrap: wrap; font-size: 0.85rem; margin-bottom: 2.4rem; }
.ap-links a { color: #0a0a0a; font-weight: 500; text-decoration: none; border-bottom: 1.5px solid rgba(10,10,10,0.15); }
.ap-links a:hover { color: #e63946; border-color: #e63946; }
.ap-file {
    background: #f5f5f5; border-radius: 16px; padding: 1.6rem; max-height: 60vh; overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; line-height: 1.65;
    white-space: pre-wrap; word-break: break-word; color: rgba(10,10,10,0.82);
}

/* ─── SMALLER SCREENS: section links fold into a menu button ─── */
@media (max-width: 1120px) {
    .nav-right { gap: 0.6rem; }
    .nav-burger {
        display: inline-flex; align-items: center; gap: 0.45rem; border: 0; cursor: pointer;
        font: inherit; font-size: 0.82rem; font-weight: 500; color: #0a0a0a;
        background: #f0f0f0; padding: 0.55rem 0.95rem; border-radius: 999px;
    }
    .nav-links {
        display: none; position: absolute; right: 1.5rem; top: calc(100% - 0.3rem);
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-radius: 14px; padding: 0.45rem; min-width: 210px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    }
    nav.site-nav.menu-open .nav-links { display: flex; }
    .nav-links a { padding: 0.65rem 0.8rem; border-radius: 10px; font-size: 0.9rem; color: #0a0a0a; }
    .nav-links a:hover { background: #f5f5f5; }
}
@media (max-width: 600px) {
    nav.site-nav { padding: 0.8rem 1rem 0.65rem; grid-template-columns: auto 1fr auto; }
    nav.site-nav .logo { font-size: 1.02rem; }
    .nav-right { display: contents; }
    .nav-burger { grid-column: 1; grid-row: 1; justify-self: start; padding: 0.45rem 0.75rem; font-size: 0.76rem; }
    .touch { grid-column: 3; grid-row: 1; justify-self: end; }
    .touch-btn { font-size: 0.76rem; padding: 0.45rem 0.8rem; }
    .nav-links { left: 1rem; right: auto; top: 100%; }
}
@media (max-width: 420px) {
    nav.site-nav { padding-left: 0.75rem; padding-right: 0.75rem; column-gap: 0.5rem; }
    nav.site-nav .logo { font-size: 0.95rem; }
    .nav-burger { padding: 0.42rem 0.65rem; }
    .touch-btn { padding: 0.45rem 0.7rem; }
}
@media (max-width: 370px) {
    nav.site-nav .logo { font-size: 0.86rem; }
    .touch-btn, .nav-burger { font-size: 0.7rem; }
}
@media (max-width: 330px) {
    .touch-btn .long { display: none; }
    .touch-btn .short-btn { display: inline !important; }
}
.touch-btn .short-btn { display: none; }

/* Agent-ready footer line */
.agent-ready { font-size: inherit; color: inherit; }
.agent-ready a { color: inherit; text-decoration: underline; text-decoration-color: rgba(10,10,10,0.2); text-underline-offset: 3px; }
.agent-ready a:hover { color: #e63946; }
