/*
 * The public site's shared look: header, footer and the small things every page
 * shares (type, focus, buttons). Loaded by layouts/public and layouts/guest
 * before each page's own styles, so a page still has the last word.
 */

:root {
    --site-ink: #0F172A;
    --site-text: #334155;
    --site-muted: #64748B;
    --site-line: #E2E8F0;
    --site-soft: #F1F5F9;
    --site-primary: #2563EB;
    --site-primary-dark: #1D4ED8;
    --site-accent: #0EA5E9;
    --site-header-h: 68px;
    --site-radius: 12px;
    --site-ring: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

/* ---------------------------------------------------------------- base */

html {
    scroll-behavior: smooth;
    /* An anchor lands below the sticky header, not under it. */
    scroll-padding-top: calc(var(--site-header-h) + 16px);
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Bangla text gets a Bangla face; Latin letters stay in Inter. */
html[lang="bn"] body {
    font-family: 'Inter', 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
}

::selection {
    background: rgba(37, 99, 235, 0.18);
}

h1, h2, h3, .section-title {
    letter-spacing: -0.015em;
    text-wrap: balance;
}

a, .btn {
    transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

/* Keyboard focus on links and buttons; form fields keep Bootstrap's own ring. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.45);
    outline-offset: 2px;
}

.btn {
    border-radius: 10px;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--site-primary);
    border-color: var(--site-primary);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background-color: var(--site-primary-dark);
    border-color: var(--site-primary-dark);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* -------------------------------------------------------------- header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.94);
    border-bottom-color: var(--site-line);
    box-shadow: 0 6px 24px -12px rgba(15, 23, 42, 0.18);
}

.site-nav {
    min-height: var(--site-header-h);
    padding-top: 0;
    padding-bottom: 0;
}

.site-brand {
    padding: 0;
    margin-right: 1.5rem;
    display: inline-flex;
    align-items: center;
}

/* An uploaded logo can be anything from square to 8:1: capped both ways. */
.site-brand img {
    max-height: 34px;
    max-width: 230px;
}

.site-links {
    gap: 4px;
}

.site-links .nav-link {
    color: var(--site-text);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 0.9rem !important;
    border-radius: 999px;
    white-space: nowrap;
}

.site-links .nav-link:hover {
    color: var(--site-ink);
    background: var(--site-soft);
}

.site-links .nav-link.active {
    color: var(--site-primary);
    background: rgba(37, 99, 235, 0.08);
    font-weight: 600;
}

.site-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.site-pref {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--site-text);
    background: #fff;
    border: 1px solid var(--site-line);
    border-radius: 999px;
}

.site-pref:hover,
.site-pref[aria-expanded="true"] {
    border-color: rgba(37, 99, 235, 0.45);
    color: var(--site-primary);
}

.site-pref .bi-globe2 { font-size: 0.95rem; }
.site-pref-caret { font-size: 0.65rem; opacity: .7; }

.site-pref-sep {
    width: 1px;
    height: 14px;
    background: var(--site-line);
}

.site-pref-menu {
    min-width: 210px;
    padding: 6px;
    border: 1px solid var(--site-line);
    border-radius: 14px;
    box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.25);
    margin-top: 8px !important;
}

.site-pref-menu .dropdown-header {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--site-muted);
    padding: 8px 10px 4px;
}

.site-pref-menu .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.875rem;
    color: var(--site-text);
}

.site-pref-menu .dropdown-item:hover { background: var(--site-soft); }

.site-pref-menu .dropdown-item.active,
.site-pref-menu .dropdown-item:active {
    background: rgba(37, 99, 235, 0.08);
    color: var(--site-primary);
    font-weight: 600;
}

.site-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    font-size: 0.9rem;
    box-shadow: 0 8px 18px -8px rgba(37, 99, 235, 0.7);
}

.site-cta:hover { transform: translateY(-1px); }

/* The sign-in pages style every .btn-primary as their full-width form button;
   the header's button keeps its own size there. */
.site-header .site-cta {
    width: auto;
    flex: 0 0 auto;
    padding: 0 18px;
}

.site-header .site-toggler { flex: 0 0 auto; }

.site-toggler {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--site-line);
    border-radius: 10px;
    color: var(--site-ink);
    font-size: 1.35rem;
    line-height: 1;
}

.site-toggler:focus { box-shadow: none; }
.site-toggler:focus-visible { box-shadow: var(--site-ring); }

.site-mobile-prefs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0 4px;
}

.site-seg {
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    background: var(--site-soft);
    border-radius: 10px;
}

.site-seg a {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--site-muted);
    text-decoration: none;
}

.site-seg a.active {
    background: #fff;
    color: var(--site-primary);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

@media (max-width: 991.98px) {
    .site-nav .navbar-collapse {
        margin: 0 -4px;
        padding: 8px 4px 14px;
        border-top: 1px solid var(--site-soft);
    }

    .site-links .nav-link {
        font-size: 1rem;
        padding: 0.7rem 0.9rem !important;
        border-radius: 10px;
    }
}

/* Under 576 the logo shares one line with the button and the toggler. */
@media (max-width: 575.98px) {
    .site-brand { margin-right: 0.5rem; }
    .site-brand img {
        max-width: 140px;
        max-width: min(170px, calc(100vw - 190px));
    }
    .site-header .site-cta { padding: 0 14px; }
}

/* -------------------------------------------------------------- footer */

.site-footer {
    position: relative;
    background:
        radial-gradient(900px 320px at 10% 0%, rgba(37, 99, 235, 0.22), transparent 70%),
        radial-gradient(700px 280px at 95% 10%, rgba(14, 165, 233, 0.12), transparent 70%),
        #0B1220;
    color: rgba(255, 255, 255, 0.68);
    padding: 72px 0 0;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
}

.site-footer a:hover { color: #fff; }

.site-footer-brand img {
    max-height: 30px;
    max-width: min(220px, 100%);
}

.site-footer-blurb {
    margin: 18px 0 22px;
    max-width: 420px;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.62);
}

.site-footer-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    margin: 4px 0 16px;
}

.site-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
    font-size: 0.9375rem;
}

.site-footer-contact a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
}

/* An address breaks only where it must, never mid-name on a desktop. */
.site-footer-contact span {
    overflow-wrap: anywhere;
}

@media (min-width: 768px) {
    .site-footer-contact span { overflow-wrap: normal; white-space: nowrap; }
}

.site-social {
    display: flex;
    gap: 10px;
}

.site-social a {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
}

.site-social a:hover {
    background: var(--site-primary);
    border-color: var(--site-primary);
    color: #fff;
    transform: translateY(-2px);
}

.site-footer-bottom {
    margin-top: 48px;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

/* ----------------------------------------------------------- page hero */

/* The dark band a public page opens with — the look Pricing, Docs and Contact
   draw for themselves, for a page that has none of its own (Templates). */
.page-hero {
    position: relative;
    overflow: hidden;
    padding: 88px 0 72px;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(700px 300px at 85% 0%, rgba(14, 165, 233, 0.22), transparent 70%),
        linear-gradient(135deg, #0F172A 0%, #1E3A5F 50%, #2563EB 100%);
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    margin-bottom: 18px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #7DD3FC;
    background: rgba(14, 165, 233, 0.16);
    border: 1px solid rgba(14, 165, 233, 0.35);
}

.page-hero h1 {
    font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
}

.page-hero p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 767.98px) {
    .page-hero { padding: 56px 0 48px; }
    .page-hero p { font-size: 1rem; }
}
