/* Black Ram Labs — entry stylesheet
 * Faithful port of the published Google Sites site.
 * Rule: all colours come from values.css custom properties.
 */

/* Live theme fonts (see values.css): Roboto for body/nav, Roboto Mono
 * for headings — Google Fonts, same loading convention as
 * www_blackrammtb's stylesheet. */
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400&family=Roboto+Mono:wght@500;700&display=swap");
@import "values.css";

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font-body);
    color: var(--text-colour);
    background: var(--page-background-colour);
    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Live theme: all headings render in Roboto Mono at weight 500
 * (duRjpb / JYVBee / OmQG5e styles in the Google Sites snapshot). */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
}

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: var(--link-text-colour);
}

/* --- Header (injected from /components/header.html) --- */

.site-header {
    background: var(--header-background-colour);
    color: var(--header-text-colour);
    /* positioning context for the collapsed-nav dropdown panel */
    position: relative;
}

.site-header .header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.site-header .brand-logo {
    display: inline-flex;
    align-items: center;
}

.site-header .brand-logo img {
    height: 36px;
    width: auto;
    display: block;
}

.site-header .brand-name {
    color: var(--header-text-colour);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    white-space: nowrap;
}

.main-nav {
    margin-left: auto;
}

.main-nav .nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 20px;
}

.main-nav .nav-link {
    color: var(--header-text-colour);
    text-decoration: none;
    /* live nav items: Roboto 12pt (= 16px) */
    font-size: 1rem;
    white-space: nowrap;
}

.main-nav .nav-link:hover {
    text-decoration: underline;
}

/* Hamburger toggle — hidden while the horizontal nav fits, shown by
 * the .nav-collapsed class (JS-driven, see the responsive block). */
.main-nav .nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
}

.main-nav .nav-toggle:hover {
    border-color: var(--header-text-colour);
}

.main-nav .nav-toggle-bar {
    display: block;
    height: 2px;
    background: var(--header-text-colour);
}

/* "More ▾" overflow (BL-12): intermediate priority-nav state between
 * the full inline nav and the hamburger — live behaves this way. The
 * <li class="nav-more"> sits last in .nav-list; JS moves overflowing
 * items into .nav-more-menu (see site-init.js). */
.main-nav .nav-more {
    position: relative;
}

.main-nav .nav-more[hidden] {
    display: none;
}

.main-nav .nav-more-toggle {
    background: none;
    border: none;
    padding: 0;
    color: var(--header-text-colour);
    font: inherit;
    font-size: 1rem;
    white-space: nowrap;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.main-nav .nav-more-toggle:hover {
    text-decoration: underline;
}

/* small down-caret, mirroring Google's menu caret glyph */
.main-nav .nav-more-caret {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
}

.main-nav .nav-more-menu {
    list-style: none;
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 170px;
    padding: 8px 18px;
    background: var(--header-background-colour);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    z-index: 20;
}

.main-nav.more-open .nav-more-menu {
    display: block;
}

.main-nav .nav-more-menu .nav-link {
    display: block;
    padding: 8px 0;
}

/* --- Footer (injected from /components/footer.html) --- */

.site-footer {
    background: var(--footer-background-colour);
    color: var(--footer-text-colour);
}

.site-footer .footer-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px 48px;
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--footer-text-colour);
}

.site-footer .footer-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* --- Section themes (live site alternates grey / white / black) --- */

section {
    padding: 48px 0;
}

.section-grey {
    background: var(--brl-grey);
}

.section-white {
    background: var(--brl-white);
}

.section-black {
    background: var(--brl-true-black);
    color: var(--brl-white);
}

.section-black a {
    color: var(--brl-white);
}

.section-black h1,
.section-black h2,
.section-black h3 {
    color: var(--brl-yellow);
}

/* --- Hero (home + page-header band on legal/404 pages) --- */

.hero {
    padding: 0;
    background:
        linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
        url("/assets/bg-hero.png") center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 420px;
    color: var(--brl-white);
}

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4rem);
    /* live: line-height 0.84 + zero margins → tight title↔caption gap */
    line-height: 0.84;
    color: var(--brl-white);
}

.hero h2 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 400;
    line-height: 0.84;
    color: var(--brl-white);
}

/* Shorter image band used on legal + 404 pages */
.page-hero {
    min-height: 220px;
}

.page-hero h1 {
    color: var(--brl-white);
}

/* --- Home: intro statement (black band, yellow lead) --- */

.intro {
    text-align: center;
}

.intro h2 {
    color: var(--brl-yellow);
    font-size: clamp(1.3rem, 3vw, 1.9rem);
    /* live JYVBee style: line-height 1.5 (more spacing than the port had) */
    line-height: 1.5;
    max-width: 900px;
    margin: 0 auto 16px;
}

.intro h3 {
    color: var(--brl-white);
    font-weight: 500;
    font-size: clamp(1rem, 2vw, 1.2rem);
    /* live OmQG5e style: line-height 1.5 */
    line-height: 1.5;
    max-width: 820px;
    margin: 0 auto;
}

/* --- Home: tech-icon strip (subtle accent, not a focal band) ---
 * Live site renders these ~10 icons small and centred at the top of the
 * grey band (reference/google-site/screenshots/home.png) — badge scale,
 * not full-bleed squares. Live background is NOT white: the section is
 * the default .yaqOZd style → rgba(194,192,192,1) = --brl-grey (BL-12
 * verified against the snapshot stylesheet + a fresh live fetch).
 */

.collage-strip {
    padding: 24px;
    background: var(--brl-grey);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px clamp(16px, 3vw, 44px);
}

.collage-strip img {
    height: clamp(36px, 6vw, 56px);
    width: auto;
    object-fit: contain;
    display: block;
}

/* --- Quote blocks ("Shaping your success", "We're proud…", "The rest…") --- */

.quote-section {
    text-align: center;
}

.quote-section h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 16px;
}

.quote-section .quote {
    font-size: 1.15rem;
}

.quote-section .attribution {
    color: var(--text-secondary-colour);
}

/* --- Home: services 3-column --- */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    /* live: headings AND body text centred in each column */
    text-align: center;
}

.services-grid h2 {
    margin-bottom: 12px;
    /* live inline override: 'Roboto Mono', Arial at weight 700 */
    font-weight: 700;
}

.services-grid p + p {
    margin-top: 8px;
}

/* live: the "We provide …" tagline under each column is italic */
.services-grid div > p:last-of-type {
    font-style: italic;
}

/* --- Home: client logo grid --- */

.client-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    align-items: center;
}

.client-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-grid img {
    max-height: 80px;
    width: auto;
    object-fit: contain;
}

/* --- Home: "Currently busy with" --- */

.busy-with {
    text-align: center;
}

.busy-with p {
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.busy-with img {
    max-height: 90px;
    width: auto;
}

/* --- CTA bands (grey band, dark outline pill button — as published) ---
 * Live lays each band out as two grid cells: the text block right-
 * aligned in the left cell, the wide outlined "Contact Us" button in
 * the right cell (measured on the snapshot: text cell ≈ 60 %, button
 * ≈ 410 px of a ~1280 px content width).
 */

.cta-band .container {
    display: grid;
    grid-template-columns: 3fr 2fr;
    align-items: center;
    gap: 24px;
}

.cta-text {
    /* live overrides these paragraphs to Arial, right-aligned, lh 0.96 */
    font-family: var(--font-alt);
    text-align: right;
    line-height: 0.96;
    /* live paragraph style: margin-bottom 15pt ≈ 20px */
    margin-bottom: 20px;
}

/* live per-line sizing: line 1 = Ztu2ge subtitle (~17–19pt bold),
 * line 2 = 11.5pt ≈ 15px in #333 */
.cta-line1 {
    font-size: clamp(1.35rem, 2.2vw, 1.55rem);
}

.cta-line2 {
    font-size: 0.96rem;
    color: var(--brl-dark-text);
}

.cta-button {
    display: block;
    /* live button is a wide outlined box (~410 px ≈ its grid cell) with
     * the Roboto 12pt label centred */
    padding: 8px 28px;
    border: 2px solid var(--brl-black);
    border-radius: 999px;
    color: var(--brl-black);
    font-weight: 400;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.cta-button:hover {
    background: var(--brl-black);
    color: var(--brl-yellow);
}

/* --- Home: Rohan bio block (black) ---
 * Live lays this section out as two columns: eyebrow + display text +
 * social icons on the left, the four "I Know …" blocks on the right. */

.bio-section .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 48px;
}

.bio-eyebrow {
    letter-spacing: 0.08em;
    margin-bottom: 24px;
}

.bio-display {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 6vw, 3.6rem);
    line-height: 1.15;
    margin-bottom: 24px;
}

.social-links {
    list-style: none;
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.social-links img {
    width: 28px;
    height: 28px;
    display: block;
}

.bio-section h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    margin-top: 28px;
}

.bio-section p {
    max-width: 720px;
}

/* --- Grey divider band before "The rest of the team" ---
 * Live separates the photo area from the team section with a grey
 * spacer section (146 px spacer + 1.5 rem section padding ≈ 194 px). */

.team-divider {
    background: var(--brl-grey);
    height: 194px;
}

/* --- Home: full-width photo band (6 background photos) --- */

.photo-band {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.photo-band img {
    flex: 1 1 16.66%;
    min-width: 0;
    width: 16.66%;
    height: 280px;
    object-fit: cover;
    display: block;
}

/* --- Home: team columns --- */

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.team-member img {
    display: block;
    margin-bottom: 16px;
}

/* live overrides the team columns' paragraphs to Arial */
.team-member p {
    font-family: var(--font-alt);
}

.team-member .team-tag {
    font-weight: 700;
    /* live tag lines: Arial 9.0pt bold */
    font-size: 0.75rem;
    margin-bottom: 8px;
}

.team-member h2 {
    margin-top: 16px;
}

.team-member h3 {
    font-weight: 400;
    color: var(--text-secondary-colour);
}

/* --- Home: map embed --- */

.map-section iframe {
    display: block;
    width: 100%;
    height: 450px;
    border: 0;
}

/* --- Legal document body (privacy policy / terms of service) --- */

.legal-doc {
    color: var(--brl-true-black);
}

.legal-doc .container {
    max-width: 860px;
}

.legal-doc h2 {
    margin: 32px 0 12px;
}

.legal-doc h2:first-child {
    margin-top: 0;
}

.legal-doc h3 {
    margin: 20px 0 8px;
}

.legal-doc p {
    margin-bottom: 12px;
}

.legal-doc ul {
    margin: 0 0 16px 32px;
}

.legal-doc li {
    margin-bottom: 6px;
}

/* --- 404 page --- */

.error-content {
    text-align: center;
}

.error-content h1 {
    font-size: clamp(3rem, 10vw, 5rem);
    color: var(--brl-white);
    margin-bottom: 8px;
}

.error-content p {
    color: var(--brl-white);
    margin-bottom: 12px;
}

.error-content a {
    color: var(--brl-white);
}

/* --- Responsive --- */

/* Nav collapse — three responsive states matching live (BL-12):
 *   wide   → all 9 items inline;
 *   medium → overflowing items move into the "More ▾" dropdown;
 *   narrow → .nav-collapsed (JS toggles it when ≤4 items would fit or
 *            the viewport is ≤ 800px): hamburger toggle + dropdown
 *            panel under the header with all links.
 * The collapse decision is made by site-init.js measuring overflow —
 * it owns the .nav-collapsed class; there is no fixed CSS breakpoint. */
.main-nav.nav-collapsed .nav-toggle {
    display: inline-flex;
}

.main-nav.nav-collapsed .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 24px 16px;
    background: var(--header-background-colour);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    z-index: 20;
}

.main-nav.nav-collapsed.nav-open .nav-list {
    display: flex;
}

.main-nav.nav-collapsed .nav-list .nav-link {
    display: block;
    padding: 10px 0;
}

@media (max-width: 860px) {
    .services-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }

    .client-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .photo-band img {
        flex: 1 1 33.33%;
        width: 33.33%;
        height: 200px;
    }

    /* stacked: bio two-column collapses, CTA text goes full-width with
     * the button stretched under it (still right-aligned, as live) */
    .bio-section .container {
        grid-template-columns: 1fr;
    }

    .cta-band .container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .client-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .photo-band img {
        flex: 1 1 50%;
        width: 50%;
        height: 160px;
    }
}
