/* =====================================================================
   Robust HSEQ — Interior page design system
   Reusable components for service, industry, resource and content pages.
   Built on the existing brand tokens in style.css (:root variables).
   All classes are namespaced with rh- to avoid clashing with the
   homepage's bespoke animation styles.
   ===================================================================== */

:root {
    --rh-bg: #141313;
    --rh-bg-soft: #1a1b1e;
    --rh-card: #26272b;
    --rh-card-2: #2a2b2f;
    --rh-line: rgba(255, 255, 255, 0.10);
    --rh-muted: #b9bbbe;
    --rh-maxw: 1180px;
}

/* ---- Header treatment for interior pages ---------------------------- */
/* Force a dark header with white nav links from the top of the page
   (nav.js only auto-darkens contact.html; our banners are dark). */
.rh #header { background-color: var(--dark); }
.rh .primary-navigation li a { color: #fff; }
.rh header.black .primary-navigation li a { color: #fff; }
.rh .dropdown-container .dropdown-item li a { color: var(--hseqgrey); }

/* ---- Page scaffolding ------------------------------------------------ */
.rh main { display: block; }

.rh-container {
    width: min(90%, var(--rh-maxw));
    margin-inline: auto;
}

.rh-section {
    padding: clamp(3.5rem, 8vh, 7rem) 0;
    position: relative;
}
.rh-section--dark   { background: var(--rh-bg); color: var(--white); }
.rh-section--soft   { background: var(--rh-bg-soft); color: var(--white); }
.rh-section--light  { background: #f5f5f4; color: var(--hseqgrey); }
.rh-section--white  { background: var(--white); color: var(--hseqgrey); }

.rh-eyebrow {
    font-family: var(--roboto);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--hseqyellow);
    margin-bottom: 1rem;
    display: inline-block;
}

.rh-section h2,
.rh-h2 {
    font-family: var(--cocogoose);
    font-size: clamp(1.9rem, 3.6vw, 3rem);
    line-height: 1.1;
    margin-bottom: 1.2rem;
}
.rh-section h3 { font-family: var(--cocogoose); }

.rh-lead {
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    line-height: 1.7;
    max-width: 60ch;
    color: var(--rh-muted);
}
.rh-section--light .rh-lead,
.rh-section--white .rh-lead { color: var(--hseqlightgrey); }

.rh-section p { line-height: 1.75; }

.rh-center { text-align: center; }
.rh-center .rh-lead { margin-inline: auto; }
.rh-narrow { max-width: 760px; margin-inline: auto; }

/* ---- Page banner / hero --------------------------------------------- */
.rh-banner {
    position: relative;
    background:
        radial-gradient(1200px 500px at 80% -10%, rgba(255, 204, 8, 0.16), transparent 60%),
        var(--rh-bg);
    color: var(--white);
    padding: clamp(10rem, 18vh, 14rem) 0 clamp(3.5rem, 8vh, 6rem);
    overflow: hidden;
    border-bottom: 1px solid var(--rh-line);
}
.rh-banner::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: linear-gradient(90deg, var(--hseqyellow), transparent 70%);
}
.rh-banner-inner { position: relative; z-index: 2; max-width: 880px; }
.rh-banner h1 {
    font-family: var(--cocogoose);
    font-size: clamp(2.3rem, 5.2vw, 4rem);
    line-height: 1.05;
    margin: 0.4rem 0 1.4rem;
}
.rh-banner .rh-lead { color: #e7e8ea; max-width: 65ch; }
.rh-banner-gear {
    position: absolute;
    right: -120px;
    top: 50%;
    transform: translateY(-50%);
    width: 460px;
    max-width: 45vw;
    opacity: 0.12;
    pointer-events: none;
    z-index: 1;
}

/* ---- Breadcrumbs ---------------------------------------------------- */
.rh-breadcrumb {
    font-size: 0.85rem;
    color: var(--rh-muted);
    margin-bottom: 0.5rem;
}
.rh-breadcrumb a { color: var(--hseqyellow); }
.rh-breadcrumb a:hover { text-decoration: underline; }
.rh-breadcrumb span { opacity: 0.6; margin: 0 0.4rem; }

/* ---- Buttons -------------------------------------------------------- */
.rh-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border: 2px solid var(--hseqyellow);
    border-radius: 14px;
    padding: 0.9rem 1.7rem;
    font-family: var(--roboto);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.35s ease;
    text-align: center;
    line-height: 1;
}
.rh-btn--solid { background: var(--hseqyellow); color: var(--hseqgrey); box-shadow: 0 10px 24px rgba(0,0,0,0.25); }
.rh-btn--solid:hover { background: #ffd633; transform: translateY(-2px); }
.rh-btn--ghost { background: transparent; color: var(--hseqyellow); }
.rh-btn--ghost:hover { background: var(--hseqyellow); color: var(--hseqgrey); }
.rh-btn--dark { background: var(--hseqgrey); color: var(--white); border-color: var(--hseqgrey); }
.rh-btn--dark:hover { background: #000; }
.rh-btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.rh-banner .rh-btn-row { margin-bottom: 0.5rem; }

/* ---- Generic responsive grids -------------------------------------- */
.rh-grid {
    display: grid;
    gap: 1.6rem;
    margin-top: 2.6rem;
}
.rh-grid--2 { grid-template-columns: repeat(2, 1fr); }
.rh-grid--3 { grid-template-columns: repeat(3, 1fr); }
.rh-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---- Cards ---------------------------------------------------------- */
.rh-card {
    background: var(--rh-card);
    border: 1px solid var(--rh-line);
    border-radius: 16px;
    padding: clamp(1.5rem, 2.4vw, 2.1rem);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    color: var(--white);
}
a.rh-card { text-decoration: none; }
.rh-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 204, 8, 0.55);
    box-shadow: 0 16px 36px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,204,8,0.25);
}
.rh-card .rh-card-eyebrow {
    color: var(--hseqyellow);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}
.rh-card h3 {
    font-family: var(--cocogoose);
    font-size: clamp(1.2rem, 1.8vw, 1.5rem);
    line-height: 1.15;
    margin-bottom: 0.7rem;
}
.rh-card p { color: var(--rh-muted); font-size: 0.98rem; }
.rh-card .rh-card-more {
    margin-top: auto;
    padding-top: 1rem;
    color: var(--hseqyellow);
    font-weight: 700;
    font-size: 0.92rem;
}
.rh-card .rh-card-more::after { content: " \2192"; }

/* Light card variant for white sections */
.rh-section--light .rh-card,
.rh-section--white .rh-card {
    background: var(--white);
    color: var(--hseqgrey);
    border-color: #e6e6e4;
    box-shadow: 0 8px 22px rgba(0,0,0,0.06);
}
.rh-section--light .rh-card p,
.rh-section--white .rh-card p { color: var(--hseqlightgrey); }
.rh-section--light .rh-card:hover,
.rh-section--white .rh-card:hover { border-color: var(--hseqyellow); }

/* Numbered card icon chip */
.rh-card-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: rgba(255, 204, 8, 0.15);
    color: var(--hseqyellow);
    display: grid; place-items: center;
    font-family: var(--cocogoose);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* ---- Stat cards / infographic -------------------------------------- */
.rh-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.4rem;
    margin-top: 2.6rem;
}
.rh-stat {
    background: var(--rh-card);
    border: 1px solid var(--rh-line);
    border-top: 3px solid var(--hseqyellow);
    border-radius: 14px;
    padding: 1.8rem 1.4rem;
    text-align: center;
}
.rh-stat-num {
    /* Roboto (not Cocogoose) — Cocogoose lacks digit/&/$ glyphs and these are numeric. */
    font-family: var(--roboto);
    font-weight: 900;
    font-size: clamp(1.8rem, 3.2vw, 2.8rem);
    color: var(--hseqyellow);
    line-height: 1;
    margin-bottom: 0.6rem;
}
.rh-stat-label { color: var(--rh-muted); font-size: 0.95rem; line-height: 1.4; }

/* ---- Checklist (yellow ticks) -------------------------------------- */
.rh-checklist { display: grid; gap: 0.8rem; margin-top: 1.5rem; }
.rh-checklist.rh-cols-2 { grid-template-columns: repeat(2, 1fr); }
.rh-checklist li {
    position: relative;
    padding-left: 2rem;
    line-height: 1.5;
}
.rh-checklist li::before {
    content: "";
    position: absolute;
    left: 0; top: 0.15em;
    width: 1.2rem; height: 1.2rem;
    background: var(--hseqyellow);
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px var(--hseqyellow);
}
.rh-checklist li::after {
    content: "";
    position: absolute;
    left: 0.4rem; top: 0.3em;
    width: 0.35rem; height: 0.65rem;
    border: solid var(--hseqgrey);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ---- Process steps -------------------------------------------------- */
.rh-steps { display: grid; gap: 1.4rem; margin-top: 2.6rem; counter-reset: step; }
.rh-steps.rh-cols { grid-template-columns: repeat(4, 1fr); }
.rh-step {
    background: var(--rh-card);
    border: 1px solid var(--rh-line);
    border-radius: 14px;
    padding: 1.8rem 1.5rem;
    position: relative;
}
.rh-step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    font-family: var(--roboto);
    font-weight: 900;
    font-size: 1.6rem;
    color: var(--hseqyellow);
    display: block;
    margin-bottom: 0.7rem;
}
.rh-step h3 { font-size: 1.15rem; margin-bottom: 0.5rem; color: var(--white); }
.rh-step p { color: var(--rh-muted); font-size: 0.95rem; }

/* ---- Split / feature rows ------------------------------------------ */
.rh-split {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.rh-split--reverse .rh-split-media { order: -1; }
.rh-split-media img { width: 100%; border-radius: 16px; display: block; }
.rh-panel {
    background: var(--rh-card);
    border: 1px solid var(--rh-line);
    border-radius: 16px;
    padding: clamp(1.6rem, 3vw, 2.6rem);
}

/* ---- CTA band ------------------------------------------------------- */
.rh-cta {
    background:
        radial-gradient(800px 300px at 15% 0%, rgba(0,0,0,0.18), transparent 60%),
        var(--hseqyellow);
    color: var(--hseqgrey);
    text-align: center;
    padding: clamp(3.5rem, 8vh, 6rem) 0;
}
.rh-cta h2 { font-family: var(--cocogoose); font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 1rem; }
.rh-cta p { max-width: 58ch; margin: 0 auto 1.5rem; font-size: 1.1rem; line-height: 1.6; }
.rh-cta .rh-btn-row { justify-content: center; }
.rh-cta .rh-btn--solid { background: var(--hseqgrey); color: var(--white); border-color: var(--hseqgrey); }
.rh-cta .rh-btn--solid:hover { background: #000; }
.rh-cta .rh-btn--ghost { color: var(--hseqgrey); border-color: var(--hseqgrey); }
.rh-cta .rh-btn--ghost:hover { background: var(--hseqgrey); color: var(--white); }

/* ---- FAQ accordion -------------------------------------------------- */
.rh-faq { margin-top: 2.4rem; display: grid; gap: 1rem; }
.rh-faq details {
    background: var(--rh-card);
    border: 1px solid var(--rh-line);
    border-radius: 12px;
    padding: 0 1.4rem;
    overflow: hidden;
}
.rh-section--light .rh-faq details,
.rh-section--white .rh-faq details { background: var(--white); border-color: #e6e6e4; }
.rh-faq summary {
    cursor: pointer;
    list-style: none;
    font-family: var(--cocogoose);
    font-size: 1.1rem;
    padding: 1.2rem 2rem 1.2rem 0;
    position: relative;
}
.rh-faq summary::-webkit-details-marker { display: none; }
.rh-faq summary::after {
    content: "+";
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--hseqyellow);
    transition: transform 0.3s ease;
}
.rh-faq details[open] summary::after { content: "\2212"; }
.rh-faq details p { padding-bottom: 1.3rem; color: var(--rh-muted); line-height: 1.7; }
.rh-section--light .rh-faq details p,
.rh-section--white .rh-faq details p { color: var(--hseqlightgrey); }

/* ---- Prose / article ------------------------------------------------ */
.rh-prose { max-width: 760px; margin-inline: auto; }
.rh-prose h2 { font-family: var(--cocogoose); font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 2.4rem 0 1rem; }
.rh-prose h3 { font-family: var(--cocogoose); font-size: 1.3rem; margin: 1.8rem 0 0.8rem; }
.rh-prose p { margin-bottom: 1.2rem; line-height: 1.8; }
.rh-prose ul { margin: 0 0 1.4rem 1.2rem; }
.rh-prose ul li { list-style: disc; margin-bottom: 0.5rem; line-height: 1.7; }
.rh-prose a { color: #b07d00; font-weight: 600; text-decoration: underline; }
.rh-section--dark .rh-prose a,
.rh-section--soft .rh-prose a { color: var(--hseqyellow); }

/* Related-links chips */
.rh-related { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1rem; }
.rh-related a {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--rh-line);
    border-radius: 999px;
    font-size: 0.9rem;
    color: var(--white);
    transition: 0.25s ease;
}
.rh-section--light .rh-related a,
.rh-section--white .rh-related a { color: var(--hseqgrey); border-color: #ddd; }
.rh-related a:hover { background: var(--hseqyellow); color: var(--hseqgrey); border-color: var(--hseqyellow); }

/* Article meta */
.rh-meta { color: var(--rh-muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.rh-article-tag {
    display: inline-block;
    background: rgba(255,204,8,0.18);
    color: var(--hseqyellow);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    margin-bottom: 0.9rem;
    width: fit-content;
}
.rh-section--light .rh-article-tag,
.rh-section--white .rh-article-tag { background: rgba(255,204,8,0.25); color: #8a6d00; }

/* ---- Reveal on scroll ---------------------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Responsive ----------------------------------------------------- */
@media (max-width: 1000px) {
    .rh-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .rh-stats { grid-template-columns: repeat(2, 1fr); }
    .rh-steps.rh-cols { grid-template-columns: repeat(2, 1fr); }
    .rh-split { grid-template-columns: 1fr; }
    .rh-split--reverse .rh-split-media { order: 0; }
    .rh-banner-gear { display: none; }
}
@media (max-width: 760px) {
    .rh-grid--2, .rh-grid--3, .rh-grid--4 { grid-template-columns: 1fr; }
    .rh-stats { grid-template-columns: repeat(2, 1fr); }
    .rh-steps.rh-cols { grid-template-columns: 1fr; }
    .rh-checklist.rh-cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .rh-stats { grid-template-columns: 1fr; }
}

/* =====================================================================
   Homepage additions (new sections layered onto the existing front page)
   ===================================================================== */
.home-section { padding: clamp(3.5rem, 8vh, 6.5rem) 0; }
.home-positioning { background: var(--rh-bg); color: var(--white); text-align: center; }
.home-positioning .rh-h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.home-positioning .rh-lead { margin-inline: auto; }

.home-advantage { background: var(--hseqyellow); color: var(--hseqgrey); }
.home-advantage .rh-h2 { color: var(--hseqgrey); }
.home-advantage p { font-size: clamp(1.1rem, 1.8vw, 1.4rem); line-height: 1.7; max-width: 60ch; }

.home-section--dark { background: var(--rh-bg-soft); color: var(--white); }
.home-section--light { background: #f5f5f4; color: var(--hseqgrey); }
