/* ==========================================================================
   sales.grayishiring.com v2 - core design system
   Tokens + shared components, per the Gray /sc/ style guide.
   Brand palette mirrors the original sales lander mapped onto tokens.
   ========================================================================== */

:root {
    /* Brand */
    --g-blue:      #1e59ae;
    --g-blue-soft: #e2eeff;
    --g-red:       #e21636;
    --g-yellow:    #fbbf16;

    /* Accent */
    --accent:       var(--g-blue);
    --accent-hover: #2b6ac5;
    --accent-soft:  var(--g-blue-soft);
    --ring:         rgba(30, 89, 174, .25);

    /* Surfaces & neutrals */
    --surface:       #ffffff;
    --bg-alt:        #f7f7f7;
    --hover:         #f4f6fa;
    --border-light:  #eef0f5;
    --border:        #e4e5e7;

    /* Shape - site-wide cap */
    --radius: 4px;

    /* Text */
    --text:        #404145;
    --text-body:   #62646a;
    --text-muted:  #74767e;
    --text-faint:  #95979d;

    --header-h: 72px;

    /* Shadows catalog */
    --shadow-card:  0 3px 7px rgba(0, 0, 0, .09), 0 .37px 4.4px rgba(0, 0, 0, .05);
    --shadow-modal: 0 20px 60px rgba(16, 24, 40, .3);
    --shadow-bar:   0 2px 15px rgba(0, 0, 0, .1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    background: var(--surface);
    color: var(--text-body);
}

body [hidden] { display: none !important; }

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--ring);
    border-radius: var(--radius);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* --------------------------------------------------------------- buttons */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font-family: inherit;
    font-size: 13px; font-weight: 500; letter-spacing: .02em;
    text-transform: uppercase; cursor: pointer; white-space: nowrap;
    padding: 10px 25px; border-radius: var(--radius);
    border: 1px solid var(--accent); background: var(--accent); color: #fff;
    text-decoration: none;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; text-decoration: none; }
.btn svg { width: 14px; height: 14px; flex: 0 0 auto; }

@media (max-width: 575px) {
    .btn { white-space: normal; text-align: center; }
}

.btn--soft { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); font-weight: 700; text-transform: none; font-size: 16px; padding: 14px 25px; }
.btn--soft:hover { background: #fff; border-color: #fff; color: var(--accent); }

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

.topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 997;
    height: var(--header-h);
    background: var(--surface);
    display: flex; align-items: center;
}
.topbar.is-scrolled { box-shadow: var(--shadow-bar); }
.topbar .container { display: flex; align-items: center; gap: 16px; }
.topbar__logo { display: inline-flex; align-items: center; margin-right: auto; }
.topbar__logo img { max-height: 45px; width: auto; display: block; }

.nav { display: flex; align-items: center; }
.nav ul { display: flex; margin: 0; padding: 0; list-style: none; gap: 4px; }
.nav a {
    position: relative;
    display: block; padding: 10px 12px;
    font-size: 14px; font-weight: 600; text-transform: uppercase;
    color: var(--text); white-space: nowrap;
}
.nav a:hover { color: var(--accent); text-decoration: none; }
.nav a span { position: relative; }
.nav a span::after {
    content: ""; position: absolute; left: 0; right: 0; top: 26px;
    margin: 0 auto; height: 3px; width: 0;
    background: var(--g-yellow);
    transition: width .3s ease;
}
.nav a:hover span::after, .nav a.is-active span::after { width: 100%; }
.nav a.is-active { color: var(--accent); }

.topbar__cta { flex: 0 0 auto; }

.nav-toggle {
    display: none;
    width: 40px; height: 40px; flex: 0 0 auto;
    align-items: center; justify-content: center;
    border: 0; background: transparent; color: var(--text);
    border-radius: var(--radius); cursor: pointer;
}
.nav-toggle:hover { background: var(--hover); }
.nav-toggle svg { width: 26px; height: 26px; }
.nav-toggle .icon-close { display: none; }

@media (min-width: 992px) and (max-width: 1199px) {
    .nav a { font-size: 12.5px; padding: 10px 8px; }
    .topbar__cta .btn { font-size: 12px; padding: 8px 14px; }
}

@media (max-width: 991px) {
    .nav-toggle { display: inline-flex; }
    .topbar__cta { display: none; }
    .nav {
        position: fixed; inset: var(--header-h) 0 0 0; z-index: 996;
        background: rgba(30, 89, 174, .96);
        display: none; overflow-y: auto; padding: 24px 20px;
    }
    body.nav-open .nav { display: block; }
    body.nav-open .nav-toggle .icon-menu { display: none; }
    body.nav-open .nav-toggle .icon-close { display: block; }
    body.nav-open { overflow: hidden; }
    .nav ul { flex-direction: column; gap: 0; }
    .nav a { color: #fff; font-size: 16px; padding: 14px 10px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
    .nav a:hover, .nav a.is-active { color: var(--g-yellow); }
    .nav a span::after { display: none; }
}

/* ---------------------------------------------------- subheader quick bar */
/* Slides in below the header once the visitor scrolls; the header itself
   always stays visible. */

.subbar {
    position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 995;
    background: var(--g-yellow);
    padding: 9px 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
    transform: translateY(-130%);
    transition: transform .25s ease;
}
.subbar.is-visible { transform: none; }
body.modal-open .subbar { display: none; }
.subbar .container { display: flex; justify-content: center; align-items: center; gap: 40px; }
.subbar a {
    font-size: 13px; font-weight: 600; color: var(--text);
    white-space: nowrap;
}
.subbar a:hover { text-decoration: underline; color: var(--text); }
@media (max-width: 1199px) { .subbar { display: none; } }

/* ----------------------------------------------------------------- modals */

.modal-overlay {
    position: fixed; inset: 0; z-index: 5000;
    background: rgba(15, 20, 35, .62);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    opacity: 0; transition: opacity .16s ease;
}
.modal-overlay.is-visible { opacity: 1; }

.modal {
    width: 960px; max-width: calc(100vw - 32px); max-height: 92vh;
    display: flex; flex-direction: column;
    background: var(--surface); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-modal);
    transform: translateY(8px) scale(.97);
    transition: transform .18s ease;
}
.modal-overlay.is-visible .modal { transform: none; }
.modal--video { background: transparent; box-shadow: none; overflow: visible; }

.modal__head {
    display: flex; align-items: center; justify-content: flex-end;
    padding: 0 0 8px;
}
.modal--card .modal__head { padding: 15px 18px 8px; }
.modal__x {
    display: inline-flex; align-items: center; gap: 5px;
    border: 0; background: var(--g-red); color: #fff;
    font-family: inherit; font-size: 10px; font-weight: 700;
    letter-spacing: .05em; text-transform: uppercase;
    padding: 4px 10px; border-radius: var(--radius); cursor: pointer;
}
.modal__x:hover { filter: brightness(.92); }
.modal__x svg { width: 12px; height: 12px; }
.modal__body { overflow-y: auto; }
.modal--card .modal__body { padding: 18px 32px 40px; }

body.modal-open { overflow: hidden; }

.modal__video {
    width: 100%; aspect-ratio: 16 / 9; display: block;
    background: #000; border-radius: var(--radius);
}

/* -------------------------------------------------------- reveal on scroll */
/* Hiding is gated behind html.js (set inline in the header), so content can
   never be stuck invisible without JavaScript. */

html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
html.js .reveal--left { transform: translateX(18px); }
html.js .reveal--right { transform: translateX(-18px); }
html.js .reveal--zoom { transform: scale(.97); }
html.js .reveal.is-in { opacity: 1; transform: none; }

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

/* ----------------------------------------------------------- back to top */

.back-to-top {
    position: fixed; right: 15px; bottom: 15px; z-index: 996;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent); color: #fff; border-radius: var(--radius);
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease;
}
.back-to-top svg { width: 22px; height: 22px; }
.back-to-top:hover { background: var(--accent-hover); text-decoration: none; }
.back-to-top.is-visible { opacity: 1; visibility: visible; }

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

.footer { background: #04111d; color: #fff; padding: 60px 0 40px; }
.footer__grid {
    display: grid; grid-template-columns: 4fr 2fr 3fr 3fr; gap: 32px;
}
.footer__logo img { max-height: 40px; width: auto; margin-bottom: 16px; }
.footer__about p { font-size: 14px; color: rgba(255, 255, 255, .75); margin: 0 0 14px; }
.footer__copy { font-size: 13px; color: rgba(255, 255, 255, .55); }
.footer__copy strong { color: rgba(255, 255, 255, .8); }
.footer h4 {
    font-size: 16px; font-weight: 600; color: #fff;
    margin: 0 0 16px; padding-bottom: 10px;
    border-bottom: 2px solid var(--accent); display: inline-block;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { padding: 6px 0; display: flex; align-items: center; gap: 8px; }
.footer li svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--g-yellow); }
.footer a { color: rgba(255, 255, 255, .8); font-size: 14px; }
.footer a:hover { color: #fff; }

@media (max-width: 991px) {
    .footer__grid { grid-template-columns: 1fr; gap: 28px; }
}
