/**********************************************************************
 * Riscan Enterprises Limited: site styles
 * Layout based on the GrowMark template (HTML Codex), restyled to the
 * official Riscan palette with a minimalist finish.
 **********************************************************************/

:root {
    --primary: #D7262E;        /* Riscan red */
    --primary-soft: rgba(215, 38, 46, .08);
    --secondary: #5B6470;      /* Body text grey */
    --light: #F3F4F6;          /* Section background */
    --dark: #1B2633;           /* Riscan navy */
    --dark-deep: #141C26;
    --border: #D9DCE1;
    --white: #FFFFFF;
    --shadow: 0 0 45px rgba(27, 38, 51, .07);
    --transition: .3s ease;
}


/*** Base ***/
html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -.01em;
}

a {
    transition: color var(--transition);
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

[hidden] {
    display: none !important;
}

.fw-medium {
    font-weight: 500;
}

.fw-semibold {
    font-weight: 600;
}

.mw-640 {
    max-width: 640px;
}

.mw-760 {
    max-width: 760px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 1100;
    padding: .75rem 1.25rem;
    color: var(--white);
    background: var(--primary);
    border-radius: 0 0 4px 4px;
}

.skip-link:focus {
    top: 0;
    color: var(--white);
}

.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}


/*** Buttons ***/
.btn {
    font-weight: 600;
    transition: all var(--transition);
}

.btn-primary,
.btn-outline-primary:hover {
    color: var(--white);
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

.btn-square {
    width: 40px;
    height: 40px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}


/*** Topbar ***/
.topbar {
    font-size: .875rem;
    color: rgba(255, 255, 255, .75);
    background: var(--dark);
}

.topbar a {
    color: inherit;
}

.topbar a:hover {
    color: var(--white);
}

.topbar .bi {
    color: var(--primary);
}


/*** Navbar ***/
.site-header {
    transition: box-shadow var(--transition);
}

.navbar-brand img {
    display: block;
    height: 48px;
    width: auto;
}

.navbar .navbar-nav .nav-link {
    position: relative;
    margin-right: 32px;
    padding: 28px 0;
    color: var(--dark);
    font-weight: 500;
    outline-offset: -2px;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

@media (min-width: 992px) {
    .navbar .navbar-nav .nav-link::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 2px;
        background: var(--primary);
        transform: scaleX(0);
        transition: transform var(--transition);
    }

    .navbar .navbar-nav .nav-link.active::after {
        transform: scaleX(1);
    }
}

@media (max-width: 991.98px) {
    .navbar-brand img {
        height: 40px;
    }

    .navbar .navbar-nav {
        margin-top: 15px;
        border-top: 1px solid var(--border);
    }

    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }
}


/*** Hero & page header (brand band) ***/
.brand-band {
    position: relative;
    overflow: hidden;
    color: rgba(255, 255, 255, .8);
    background: var(--dark);
}

/* Diagonal strokes echo the Riscan "R" mark */
.brand-band::before,
.brand-band::after {
    content: "";
    position: absolute;
    top: -30%;
    height: 160%;
    transform: rotate(-35deg);
    pointer-events: none;
}

.brand-band::before {
    right: 14%;
    width: 22px;
    background: var(--primary);
}

.brand-band::after {
    right: 20%;
    width: 10px;
    background: rgba(255, 255, 255, .12);
}

.brand-band > .container {
    position: relative;
    z-index: 1;
}

.hero {
    padding: 7rem 0;
}

.hero .lead {
    max-width: 640px;
    color: rgba(255, 255, 255, .8);
}

.hero-eyebrow {
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .7);
}

.page-header {
    padding: 5rem 0;
}

.page-header .lead {
    max-width: 680px;
    margin: 0 auto;
    color: rgba(255, 255, 255, .8);
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a,
.page-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, .7);
}

.page-header .breadcrumb-item a:hover,
.page-header .breadcrumb-item.active {
    color: var(--white);
}

@media (max-width: 767.98px) {
    .hero {
        padding: 4.5rem 0;
    }

    .page-header {
        padding: 3.5rem 0;
    }

    .brand-band::before,
    .brand-band::after {
        opacity: .35;
        right: 2%;
    }
}


/*** Section titles ***/
.section {
    padding: 5rem 0;
}

.section-title {
    position: relative;
    padding-top: 1.25rem;
}

.section-title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--primary);
}

.section-title.text-center::before {
    left: 50%;
    transform: translateX(-50%);
}

.eyebrow {
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary);
}

@media (max-width: 767.98px) {
    .section {
        padding: 3.5rem 0;
    }
}


/*** Icon tile ***/
.icon-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 50%;
}


/*** Service blocks & cards ***/
.service-block {
    height: 100%;
    padding: 2.5rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
}

.service-item {
    height: 100%;
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: transform var(--transition), box-shadow var(--transition);
}

.service-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.service-item h3 {
    transition: color var(--transition);
}

.service-item:hover h3 {
    color: var(--primary);
}


/*** Process steps ***/
.step {
    height: 100%;
    padding-top: 1.25rem;
    border-top: 2px solid var(--border);
    transition: border-color var(--transition);
}

.step:hover {
    border-color: var(--primary);
}

.step-number {
    display: block;
    margin-bottom: .5rem;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    color: var(--primary);
}


/*** Features (Why Riscan / Values) ***/
.feature-row {
    background: var(--white);
    box-shadow: var(--shadow);
}

.feature-item {
    height: 100%;
    padding: 2.5rem;
    border: 1px solid rgba(27, 38, 51, .06);
}


/*** Lists ***/
.check-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    margin-bottom: .875rem;
    padding-left: 1.5rem;
}

.check-list li::before {
    content: "";
    position: absolute;
    top: .6em;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--primary);
}

.check-list li:last-child {
    margin-bottom: 0;
}

.info-list {
    margin: 0;
    border-top: 1px solid var(--border);
}

.info-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
}

.info-row dt {
    font-weight: 600;
    color: var(--dark);
}

.info-row dd {
    margin: 0;
}

@media (max-width: 575.98px) {
    .info-row {
        grid-template-columns: 1fr;
        gap: .25rem;
    }
}


/*** Key facts card ***/
.facts-card {
    height: 100%;
    padding: 2.5rem;
    color: rgba(255, 255, 255, .8);
    background: var(--dark);
    border-top: 3px solid var(--primary);
}

.facts-card dt {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .6);
}

.facts-card dd {
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: var(--white);
}

.facts-card dd:last-child {
    margin-bottom: 0;
}


/*** Clients ***/
.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

.client-grid li {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    padding: 1.5rem;
    font-weight: 600;
    text-align: center;
    color: var(--dark);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}


/*** Call to action ***/
.cta {
    padding: 3rem;
    background: var(--light);
    border-left: 4px solid var(--primary);
}

@media (max-width: 575.98px) {
    .cta {
        padding: 2rem 1.5rem;
    }
}


/*** Projects ***/
.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.btn-filter {
    padding: .5rem 1.25rem;
    font-weight: 500;
    color: var(--dark);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 50rem;
}

.btn-filter:hover,
.btn-filter[aria-pressed="true"] {
    color: var(--white);
    background: var(--primary);
    border-color: var(--primary);
}

.project-item {
    height: 100%;
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: box-shadow var(--transition), border-color var(--transition);
}

.project-item:hover {
    border-color: transparent;
    box-shadow: var(--shadow);
}

.tag {
    display: inline-block;
    padding: .25rem .625rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 2px;
}

.project-meta {
    font-size: .875rem;
}

.solution-item {
    height: 100%;
    padding: 2rem;
    background: var(--light);
    border-left: 4px solid var(--primary);
}

.solution-item .audience {
    font-size: .9375rem;
    font-style: italic;
}


/*** Contact ***/
.contact-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-list li {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.contact-list li:last-child {
    margin-bottom: 0;
    border-bottom: 0;
}

.contact-list h3 {
    margin-bottom: .25rem;
    font-size: 1rem;
}

.contact-list a {
    color: var(--secondary);
}

.contact-list a:hover {
    color: var(--primary);
}

.map-frame {
    display: block;
    width: 100%;
    min-height: 320px;
    border: 0;
    border-radius: 4px;
}

.req {
    color: var(--primary);
}

.form-message {
    height: 160px !important;
}

/* Honeypot field: hidden from people, visible to bots */
.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}


/*** Footer ***/
.footer {
    color: rgba(255, 255, 255, .7);
    background: var(--dark);
}

.footer-logo {
    height: 56px;
    width: auto;
}

.footer-title {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    color: var(--white);
}

.footer-links,
.footer-contact {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li,
.footer-contact li {
    margin-bottom: .625rem;
}

.footer-contact li {
    display: flex;
    gap: .75rem;
}

.footer-contact .bi {
    color: var(--primary);
}

.footer a {
    color: rgba(255, 255, 255, .7);
}

.footer a:hover {
    color: var(--white);
}

.copyright {
    font-size: .875rem;
    color: rgba(255, 255, 255, .6);
    background: var(--dark-deep);
}

.copyright a {
    color: rgba(255, 255, 255, .8);
}

.copyright a:hover {
    color: var(--white);
}


/*** Motion preferences ***/
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
