/* =====================================================================
   Hibousoft design system — EXPERIMENT
   Loaded after every theme stylesheet so these rules win. Compare with
   the old look by adding ?design=off to any URL (?design=on to return).
   To drop the experiment entirely, remove this file's <link> in App.razor.
   !important is used on purpose: the theme sets the same properties with
   very specific selectors, and this layer must override all of them.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
    /* One body font; Barlow is kept only for headings. */
    --ds-font-body: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
    --ds-font-heading: "Barlow", "Roboto", system-ui, sans-serif;

    /* Colour: one primary (buttons, links), one accent (highlights), neutrals.
       #C2410C keeps the brand orange but passes WCAG AA with white text (5.2:1);
       the lighter #FF8139 is kept as the accent and for orange text on dark. */
    --ds-primary: #C2410C;
    --ds-primary-hover: #9A3412;
    --ds-accent: #FF8139;
    --ds-ink: #141D38;
    --ds-text: #4B5563;
    --ds-border: #D1D5DB;
    --ds-error: #B42318;
    --ds-success: #067647;

    /* Spacing scale: 8 / 16 / 24 / 32 / 48 / 64 / 96 */
    --ds-space-1: 8px;
    --ds-space-2: 16px;
    --ds-space-3: 24px;
    --ds-space-4: 32px;
    --ds-space-5: 48px;
    --ds-space-6: 64px;
    --ds-space-7: 96px;

    --ds-radius-control: 8px;
    --ds-radius-card: 16px;
    --ds-radius-pill: 999px;
    --ds-text-max: min(100%, 72ch); /* never wider than the container on phones */

    /* Feed the theme's own variables so its layout follows the scale. */
    --section-space: var(--ds-space-7);
    --section-space-mobile: var(--ds-space-6);
    --section-title-space: var(--ds-space-5);
}

/* ---------- Typography ---------- */
body {
    font-family: var(--ds-font-body);
    font-size: 16px;
    line-height: 1.5;
}

p, li, td, th, dd, label, input, select, textarea, button, .th-btn,
.box-text, .sec-text, .sec-text6, .hero-text, .main-menu a, .breadcumb-menu li {
    font-family: var(--ds-font-body) !important;
}

p, li, td, dd, .box-text, .sec-text, .sec-text6 {
    font-size: 16px !important;
    line-height: 1.5 !important;
}

/* Small text: 14px */
small, .small, .copyright-text, .sub-title, .policy-updated,
.blog-meta a, .blog-meta span, .validation-message {
    font-size: 14px !important;
    line-height: 1.5 !important;
}

/* Eyebrow labels above section headings */
.sub-title {
    font-weight: 600 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

h1, h2, h3, h4, h5, h6,
.hero-title, .breadcumb-title, .sec-title, .box-title, .widget_title {
    font-family: var(--ds-font-heading) !important;
}

/* Page title: 40px bold (32px on phones) — includes every hero slide headline */
h1, .hero-title, .breadcumb-title {
    font-size: 40px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
}

/* Section heading: 28px semibold (24px on phones) */
h2, .sec-title {
    font-size: 28px !important;
    line-height: 1.25 !important;
    font-weight: 600 !important;
}

/* Subheading: 20px semibold (18px on phones) */
h3, .box-title {
    font-size: 20px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
}

h4, .widget_title {
    font-size: 18px !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;
}

h5, h6 {
    font-size: 16px !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;
}

/* The hero headline is the one place that should stay larger than a page title */
.hero-style31 .hero-title {
    font-size: 48px !important;
}

strong, b {
    font-weight: 600;
}

/* Breadcrumb trail: one size for every item */
.breadcumb-menu li,
.breadcumb-menu a {
    font-size: 16px !important;
}

/* Statistic numbers are display figures, not headings: keep them large */
.counter-card_number,
.year-counter_number {
    font-size: 40px !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
}

/* Long text keeps a readable measure */
.policy-content,
.title-area .sec-text,
.title-area .sec-text6,
.blog-content p {
    max-width: var(--ds-text-max);
}

.title-area.text-center .sec-text,
.title-area.text-center .sec-text6 {
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Colour & contrast ---------- */
/* Inner pages are mostly light: orange text uses the darker primary and body text
   the darker grey, so both pass WCAG AA (4.5:1) on white. */
:root,
body.theme8 {
    --theme-color: var(--ds-primary);
    --body-color: var(--ds-text);
}

/* Dark areas (homepage, header, footer, page banners) keep the bright accent and
   use a light grey for body text. */
body.page-home,
.th-header,
.th-menu-wrapper,
.footer-wrapper,
.breadcumb-wrapper {
    --theme-color: var(--ds-accent);
    --body-color: #B4BAC5;
}

/* Light sections inside dark pages switch back. */
.bgwhite, .bg-white, .bg-smoke, .policy-content, .contact-form, .quote-form,
body.page-home .bgwhite {
    --theme-color: var(--ds-primary);
    --body-color: var(--ds-text);
}

/* Light cards inside dark sections (homepage blog cards). */
.blog-box2 {
    --theme-color: var(--ds-primary);
    --body-color: var(--ds-text);
}

/* Text colours for light sections. Header, footer and page banners are dark even
   when a page wraps them in a light container, so they are excluded. */
:is(.bgwhite, .bg-white, .bg-smoke) :is(p, li):not(:is(.th-header, .footer-wrapper, .breadcumb-wrapper, .th-menu-wrapper) *) {
    color: var(--ds-text);
}

:is(.bgwhite, .bg-smoke) :is(h1, h2, h3, h4):not(:is(.th-header, .footer-wrapper, .breadcumb-wrapper, .th-menu-wrapper) *) {
    color: var(--ds-ink);
}

:is(.bgwhite, .bg-smoke) a:not(.th-btn):not(:is(.th-header, .footer-wrapper, .breadcumb-wrapper, .th-menu-wrapper) *):hover {
    color: var(--ds-primary-hover);
}

/* Page banner text is always white on its dark image. */
.breadcumb-wrapper .breadcumb-title,
.breadcumb-wrapper .breadcumb-menu li,
.breadcumb-wrapper .breadcumb-menu a {
    color: #fff !important;
}

/* Homepage (dark): headings and supporting text that were too dim. */
body.page-home #blog-sec .sec-title,
body.page-home .bgwhite ~ * .sec-title.text-white {
    color: #fff !important;
}

body.page-home .sec-text6,
body.page-home .smart-product-wrrapp .text {
    color: #B4BAC5 !important;
}

/* ---------- Buttons ---------- */
/* One shape for every button: 52px pill, 16px semibold, sentence/title case as written. */
.th-btn,
button.th-btn,
.btn,
input[type="submit"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: var(--ds-space-1);
    min-height: 52px;
    height: auto !important;
    padding: 0 var(--ds-space-4) !important;
    border: 2px solid transparent !important;
    border-radius: var(--ds-radius-pill) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    box-shadow: none !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Primary (filled) — the default for every .th-btn */
.th-btn,
.th-btn.btn-gradient2,
.th-btn.btn-gradient4,
button.th-btn {
    background: var(--ds-primary) !important;
    background-image: none !important;
    color: #fff !important;
}

.th-btn:hover,
.th-btn:focus-visible {
    background: var(--ds-primary-hover) !important;
    color: #fff !important;
}

/* The theme's sliding hover overlays made each button animate differently. */
.th-btn::before,
.th-btn::after {
    display: none !important;
}

.th-btn i {
    margin: 0 !important;
}

/* Secondary (outline) — used next to a primary or on dark cards */
.th-btn.style2,
.th-btn.style-border,
.th-btn.style-border2,
.th-btn.style-border3 {
    background: transparent !important;
    border-color: currentColor !important;
    color: #fff !important;
}

.th-btn.style2:hover,
.th-btn.style-border:hover,
.th-btn.style-border2:hover,
.th-btn.style-border3:hover {
    background: #fff !important;
    border-color: #fff !important;
    color: var(--ds-ink) !important;
}

.bgwhite .th-btn.style-border,
.bgwhite .th-btn.style-border2,
.bgwhite .th-btn.style-border3,
.bg-smoke .th-btn.style-border3 {
    color: var(--ds-ink) !important;
}

/* ---------- Forms ---------- */
.form-control,
.form-select,
.contact-form input:not([type="hidden"]),
.quote-form input:not([type="hidden"]),
.contact-form textarea,
.quote-form textarea {
    font-size: 16px !important;
    color: var(--ds-ink) !important;
    background-color: #fff !important;
    border: 1px solid var(--ds-border) !important;
    border-radius: var(--ds-radius-control) !important;
}

.form-control::placeholder {
    color: #6B7280;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ds-primary) !important;
    box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.2) !important;
    outline: none;
}

.form-control.invalid,
.form-select.invalid {
    border-color: var(--ds-error) !important;
}

/* Visible labels sit right above their field (they are screen-reader-only without this file). */
.field-label {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 0 var(--ds-space-1) !important;
    clip: auto !important;
    overflow: visible !important;
    white-space: normal !important;
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ds-ink);
}

.contact-form .form-group > i,
.quote-form .form-group > i {
    top: auto !important;
    bottom: 20px;
}

.validation-message {
    display: block;
    margin-top: var(--ds-space-1);
    color: var(--ds-error) !important;
}

.hs-toast {
    border-radius: var(--ds-radius-control);
    font-size: 16px;
}

.hs-toast-success {
    color: var(--ds-success);
}

.hs-toast-error {
    color: var(--ds-error);
}

/* ---------- Components ---------- */
.service-card6,
.launch-card,
.security-card,
.contact-info,
.blog-card {
    border-radius: var(--ds-radius-card) !important;
}

/* ---------- Keyboard focus ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.th-btn:focus-visible {
    outline: 3px solid var(--ds-accent) !important;
    outline-offset: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    :root {
        --section-space: var(--ds-space-6);
    }

    .hero-style31 .hero-title {
        font-size: 40px !important;
    }
}

@media (max-width: 575px) {
    :root {
        --section-space: var(--ds-space-5);
        --section-title-space: var(--ds-space-4);
    }

    h1, .hero-title, .breadcumb-title,
    .hero-style31 .hero-title,
    .counter-card_number,
    .year-counter_number {
        font-size: 32px !important;
    }

    h2, .sec-title {
        font-size: 24px !important;
    }

    h3, .box-title {
        font-size: 18px !important;
    }

    .th-btn {
        padding: 0 var(--ds-space-3) !important;
    }
}
