/* ============================================================
   site.css — shared chrome for chatbot-norge.no
   Loaded on every public-facing page (landing + blog).
   Page-specific styles stay inline in each .html file.
   ============================================================ */

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

/* ---------- TOKENS ---------- */
:root {
    --indigo-50:#eef2ff;
    --indigo-100:#e0e7ff;
    --indigo-200:#c7d2fe;
    --indigo-500:#6366f1;
    --indigo-600:#4f46e5;
    --indigo-700:#4338ca;
    --violet-500:#8b5cf6;
    --slate-100:#f1f5f9;
    --slate-200:#e2e8f0;
    --slate-300:#cbd5e1;
    --slate-400:#94a3b8;
    --slate-500:#64748b;
    --slate-600:#475569;
    --slate-700:#334155;
    --slate-800:#1e293b;
    --slate-900:#0f172a;
    --green-500:#10b981;
    --amber-500:#f59e0b;

    --radius:16px;
    --radius-sm:10px;
    --radius-xs:6px;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Source Serif Pro', Georgia, Cambria, 'Times New Roman', serif;

    --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
    --shadow-md: 0 4px 12px rgba(15,23,42,.08);
    --shadow-lg: 0 8px 24px rgba(79,70,229,.10);

    --container: 1140px;
}

/* ---------- BASE ---------- */
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--slate-800);
    background: #fff;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--indigo-600); text-decoration: none; }
a:hover { color: var(--indigo-700); }
:focus-visible { outline: 2px solid var(--indigo-600); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- TOP NAV ---------- */
.site-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: .7rem 2rem;
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 8px rgba(15,23,42,.06);
}
.site-nav__brand {
    display: flex; align-items: center; gap: .55rem;
    font-weight: 800; font-size: 1.05rem;
    color: var(--slate-900); letter-spacing: -.02em;
    text-decoration: none;
}
.site-nav__brand:hover { color: var(--slate-900); }
.site-nav__brand svg { width: 28px; height: 28px; flex-shrink: 0; }

.site-nav__links {
    display: flex; gap: 1.75rem; align-items: center;
}
.site-nav__links a {
    font-size: .9rem; font-weight: 600;
    color: var(--slate-600); transition: color .2s;
}
.site-nav__links a:hover,
.site-nav__links a[aria-current="page"] {
    color: var(--indigo-600);
}
.site-nav__cta {
    padding: .5rem 1.2rem;
    border-radius: var(--radius-xs);
    font-size: .85rem; font-weight: 600;
    background: var(--indigo-600); color: #fff !important;
    border: 1px solid var(--indigo-600);
    transition: background .2s, transform .2s;
}
.site-nav__cta:hover { background: var(--indigo-700); color: #fff; transform: translateY(-1px); }

/* mobile toggle */
.site-nav__toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    padding: 8px; margin: -8px;
    color: var(--slate-900);
    position: relative; z-index: 10001;
}
.site-nav__toggle svg { display: block; width: 24px; height: 24px; }
.site-nav__toggle .icon-close { display: none; }
body.menu-open .site-nav__toggle { color: #fff !important; }
body.menu-open .site-nav__toggle .icon-open { display: none; }
body.menu-open .site-nav__toggle .icon-close { display: block; }
body.menu-open .site-nav { background: transparent !important; box-shadow: none !important; z-index: 10000; }
body.menu-open .site-nav__brand { color: #fff !important; }

/* ---------- TRANSPARENT NAV (over hero) ---------- */
/* Opt-in via <body class="transparent-nav"> on pages with a full-bleed
   coloured hero (e.g. landing index). Nav is transparent with white text
   until the user scrolls past the hero, then fades to the standard white
   bar via the .scrolled class added by JS. */
body.transparent-nav .site-nav:not(.scrolled) {
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body.transparent-nav .site-nav:not(.scrolled) .site-nav__brand,
body.transparent-nav .site-nav:not(.scrolled) .site-nav__toggle {
    color: #fff;
}
body.transparent-nav .site-nav:not(.scrolled) .site-nav__links a {
    color: rgba(255,255,255,.82);
}
body.transparent-nav .site-nav:not(.scrolled) .site-nav__links a:hover,
body.transparent-nav .site-nav:not(.scrolled) .site-nav__links a[aria-current="page"] {
    color: #fff;
}
body.transparent-nav .site-nav:not(.scrolled) .site-nav__cta {
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.28);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
body.transparent-nav .site-nav:not(.scrolled) .site-nav__cta:hover {
    background: rgba(255,255,255,.24);
}
.site-nav { transition: background .35s ease, box-shadow .35s ease, padding .35s ease; }
.site-nav__brand,
.site-nav__toggle,
.site-nav__links a,
.site-nav__cta { transition: color .25s ease, background .25s ease, border-color .25s ease, transform .2s ease; }

/* mobile overlay */
.site-mobile-menu {
    position: fixed; inset: 0;
    background: linear-gradient(135deg, var(--indigo-700) 0%, var(--indigo-500) 40%, var(--violet-500) 100%);
    display: flex; flex-direction: column; align-items: center;
    padding: 5rem 2rem 2.5rem;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .25s ease, visibility .25s;
    z-index: 9999; overflow-y: auto;
}
body.menu-open .site-mobile-menu { opacity: 1; visibility: visible; pointer-events: auto; }
.site-mobile-menu__links {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    width: 100%;
}
.site-mobile-menu__links a {
    color: #fff; text-decoration: none;
    font-size: 1.5rem; font-weight: 700;
    padding: 1rem 0;
    width: 100%; max-width: 320px; text-align: center;
}
.site-mobile-menu__cta {
    flex-shrink: 0;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(8px);
    color: rgba(255,255,255,.92) !important;
    padding: .55rem 1.25rem;
    font-size: .82rem; font-weight: 600;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(255,255,255,.2);
    display: inline-flex; align-items: center; gap: .4rem;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
}
.site-mobile-menu__cta:hover { background: rgba(255,255,255,.2); transform: translateY(-1px); }
.site-mobile-menu__cta svg { width: 14px; height: 14px; }

body.menu-locked { overflow: hidden; }
body.menu-locked #chatbot-widget,
body.menu-locked .chatbot-launcher,
body.menu-locked [class*="chat-widget"] { display: none !important; }

@media (min-width: 769px) { .site-mobile-menu { display: none; } }

/* ---------- FOOTER (wide multi-column, Linear/Stripe-style) ---------- */
.site-footer {
    margin-top: 5rem;
    padding: 4rem 1.5rem 2rem;
    background: var(--slate-900);
    color: var(--slate-400);
    font-size: .92rem;
    line-height: 1.6;
}
.site-footer__wrap {
    max-width: 1180px;
    margin: 0 auto;
}
.site-footer__cols {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(148,163,184,.14);
}
.site-footer__brand-col {
    max-width: 340px;
}
.site-footer__brand {
    display: inline-flex; align-items: center; gap: .55rem;
    color: #fff; font-weight: 800; font-size: 1.05rem;
    text-decoration: none; letter-spacing: -.02em;
    margin-bottom: 1rem;
}
.site-footer__brand svg { width: 24px; height: 24px; }
.site-footer__tagline {
    color: var(--slate-400); font-size: .88rem; line-height: 1.6;
    margin: 0 0 1.4rem;
}
.site-footer__social {
    display: flex; gap: .5rem;
}
.site-footer__social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(148,163,184,.10);
    color: var(--slate-300);
    transition: background .2s, color .2s, transform .2s;
}
.site-footer__social a:hover {
    background: var(--indigo-600); color: #fff; transform: translateY(-2px);
}
.site-footer__social svg { width: 14px; height: 14px; }

.site-footer__col-title {
    color: #fff;
    font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .12em;
    margin-bottom: 1.1rem;
}
.site-footer__col ul {
    list-style: none; padding: 0; margin: 0;
}
.site-footer__col li { margin-bottom: .65rem; }
.site-footer__col a {
    color: var(--slate-400);
    font-size: .9rem;
    text-decoration: none;
    transition: color .15s;
}
.site-footer__col a:hover { color: #fff; }

.site-footer__bottom {
    padding-top: 1.5rem;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: .35rem 1rem;
    color: var(--slate-500); font-size: .8rem;
}
.site-footer__bottom-left { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.site-footer__bottom .org { color: var(--slate-500); }
.site-footer__bottom .org strong { color: var(--slate-300); font-weight: 600; }
.site-footer__bottom .sep { color: var(--slate-700); }

/* ---------- INLINE ARTICLE FIGURE (contextual illustration) ---------- */
.article-figure {
    margin: 2.25rem 0 2.5rem;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
}
.article-figure__media {
    background: var(--slate-50);
    padding: 1.5rem;
    display: flex; justify-content: center; align-items: center;
}
.article-figure__media svg,
.article-figure__media img { display: block; max-width: 100%; height: auto; }
.article-figure figcaption,
.article-figure__caption {
    padding: .85rem 1.25rem;
    border-top: 1px solid var(--slate-200);
    background: #fff;
    color: var(--slate-500);
    font-size: .82rem;
    line-height: 1.5;
    font-style: normal;
}
.article-figure__caption strong { color: var(--slate-700); font-weight: 600; }

@media (max-width: 900px) {
    .site-footer__cols {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem 2rem;
    }
    .site-footer__brand-col { grid-column: 1 / -1; max-width: 480px; }
}
@media (max-width: 540px) {
    .site-footer { padding: 3rem 1.25rem 1.5rem; margin-top: 3rem; }
    .site-footer__cols {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-bottom: 2rem;
    }
    .site-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: .35rem;
    }
}

/* ---------- NAV RESPONSIVE ---------- */
@media (max-width: 900px) {
    .site-nav { padding: .6rem 1rem; }
    .site-nav__links { gap: 1.25rem; }
    .site-nav__links a { font-size: .85rem; }
    .site-nav__cta { padding: .45rem 1rem; }
}
@media (max-width: 768px) {
    .site-nav { padding: .75rem 1rem; }
    .site-nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
    .site-nav__links { display: none; }
}

/* ---------- iOS zoom-safe inputs (suppress 16px+ form zoom) ---------- */
@media (max-width: 768px) {
    input[type="text"], input[type="email"], input[type="password"],
    input[type="url"], input[type="number"], input[type="search"],
    input[type="tel"], select, textarea {
        font-size: 16px;
    }
}
