/* ==========================================================================
   responsive-hardening.css

   PURPOSE
   A single, self-contained layer that fills the responsive gaps the existing
   stylesheets don't cover. It is loaded LAST on every page (via
   Views/Shared/_SiteSharedStyles.cshtml) so it can gently reinforce behavior
   without editing any of the ~40 existing home/page stylesheets.

   DESIGN RULES for this file (keep it clean):
     • Additive and conservative — no sweeping rewrites, minimal !important.
     • Scoped so it never touches the full-width nav or footer (those live
       OUTSIDE <main id="main-content">), and never re-tunes the hand-built
       Home layout except where explicitly noted.
     • Does NOT repeat resets that already exist globally elsewhere:
         - * { box-sizing: border-box }        → core/site-base.css
         - img, svg, video { max-width: 100% }  → core/site-base.css
         - html/body { overflow-x: clip }       → site-shell.css
   ========================================================================== */


/* ==========================================================================
   1. HORIZONTAL-OVERFLOW SAFETY NET
   Images/SVG/video are already capped elsewhere. Extend the same protection
   to the other elements that most often cause a sideways scroll on phones:
   embeds, tables, code blocks and long unbreakable strings (URLs / IDs).
   ========================================================================== */
.enterprise-site iframe,
.enterprise-site table,
.enterprise-site pre,
.enterprise-site canvas {
    max-width: 100%;
}
/* Long code/tables scroll inside their own box, never the whole page. */
.enterprise-site pre,
.enterprise-site .table-scroll {
    overflow-x: auto;
}
/* A very long word / URL wraps instead of forcing the column wider. */
.enterprise-site p,
.enterprise-site li,
.enterprise-site dd,
.enterprise-site h1,
.enterprise-site h2,
.enterprise-site h3,
.enterprise-site h4,
.enterprise-site a {
    overflow-wrap: break-word;
}


/* ==========================================================================
   2. VERY LARGE SCREENS (large desktops, 2K / 4K monitors, TVs)
   The project has no breakpoints above 1600px, so interior pages cap their
   content at ~1240px — a narrow strip on a big display. Give the interior
   pages a little more room in modest, centered steps. Kept intentionally
   moderate (max 1440–1720px) so text line-lengths stay readable.

   Excluded on purpose:
     • Home (.home-page) — hand-tuned with its own section widths.
     • Everything below 2000px — the common 1080p / 1440p desktops are
       left exactly as they are today.
   Scope is #main-content only, so the full-width nav and footer (which sit
   outside <main>) are never affected.
   ========================================================================== */
@media (min-width: 2000px) {
    .enterprise-site:not(.home-page) #main-content .container {
        max-width: min(1440px, 82vw);
    }
}
@media (min-width: 3200px) {
    .enterprise-site:not(.home-page) #main-content .container {
        max-width: min(1720px, 78vw);
    }
}


/* ==========================================================================
   3. SHORT / LANDSCAPE VIEWPORTS (phones held sideways, very short laptops)
   Interior full-height heroes/sections use min-height tied to the viewport
   height; when the screen is very short they can crop their own content.
   Let those grow to fit instead of clipping. Scoped to interior pages so the
   Home page's full-screen scroll-snap sections keep their tuned behavior.
   ========================================================================== */
@media (max-height: 500px) {
    .enterprise-site:not(.home-page) main > section,
    .enterprise-site .page-hero,
    .enterprise-site .detail-hero,
    .enterprise-site .contact-hero,
    .enterprise-site .imm-hero {
        min-height: 0 !important;
        height: auto !important;
    }
}


/* ==========================================================================
   4. SMALL PHONES (≤360px, e.g. iPhone SE / older Androids)
   Trim the interior content gutters a touch so narrow phones keep as much
   usable width as possible. Scoped to #main-content so nav/footer gutters
   are untouched.
   ========================================================================== */
@media (max-width: 360px) {
    .enterprise-site #main-content .container {
        padding-inline: 16px;
    }
}


/* ==========================================================================
   5. HOME PAGE ON SHORT LAPTOP SCREENS (the fix for the clipped hero / Solutions)
   The Home page is built as "one full-screen section per scroll": each section
   is locked to the viewport height, its content vertically centered, and
   overflow hidden. On tall monitors that looks intentional, but on small /
   medium laptops (short viewports) some sections — notably the HERO and the
   SOLUTIONS grid — are taller than the screen, so their content is clipped at
   the top and bottom (heading cut off up top, buttons/cards cut off below).

   Below a short viewport height we stop forcing full-screen sections on Home:
   every section sizes to its own content, nothing is centered-then-clipped,
   scroll-snap is released, and the page simply scrolls so everything is
   reachable. Applies to desktop widths only (phones/tablets already flow via
   their own mobile layout). Tall monitors (> 900px tall) keep the original
   full-screen design untouched.

   High-specificity selectors (tripled .home-page) are needed to override the
   existing height locks in the home stylesheets; this file loads last so equal
   specificity also resolves in its favor.
   ========================================================================== */
@media (min-width: 901px) and (max-height: 900px) {
    /* Let the user scroll freely instead of snapping section-to-section. */
    html:has(body.home-page) { scroll-snap-type: none !important; }

    html body.home-page.home-page.home-page .home-hero,
    html body.home-page.home-page.home-page .home-film,
    html body.home-page.home-page.home-page .network-band,
    html body.home-page.home-page.home-page .solutions-band,
    html body.home-page.home-page.home-page .how-section,
    html body.home-page.home-page.home-page .standard-section,
    html body.home-page.home-page.home-page .faq-section {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        scroll-snap-align: none !important;
    }

    /* Give each section a little vertical breathing room now that it is
       content-sized, and keep the hero clear of the fixed nav + ticker. */
    html body.home-page.home-page.home-page .home-hero,
    html body.home-page.home-page.home-page .home-film,
    html body.home-page.home-page.home-page .network-band,
    html body.home-page.home-page.home-page .solutions-band,
    html body.home-page.home-page.home-page .how-section,
    html body.home-page.home-page.home-page .standard-section,
    html body.home-page.home-page.home-page .faq-section {
        padding-top: 40px !important;
        padding-bottom: 44px !important;
    }
    html body.home-page.home-page.home-page .home-hero {
        padding-top: calc(var(--nav-h, 76px) + var(--bar-h, 44px) + 36px) !important;
    }
}

/* ==========================================================================
   Network-band decorative rings: keep them clipped INSIDE the band and behind
   its content. The short-viewport block above sets overflow:visible on every
   home section (for free scroll), which otherwise lets the 1250px ring circle
   spill up into the slider/ticker above and down into the next section. This
   re-clips only .network-band (its metric cards are in normal flow, so nothing
   real gets cut — only the background rings). Last !important of equal
   specificity, so it wins at every viewport. */
html body.home-page.home-page.home-page .network-band {
    overflow: hidden !important;
    isolation: isolate;
}

/* ==========================================================================
   THE COREAL STANDARD — dark theme to match the Solutions section:
   dark background + white text + dark cards. Layout, content, cards and the
   C/O/R/E/A/L badges are unchanged; only colours flip. Placed last with high
   specificity so it overrides the earlier light-theme (photo background + white
   cards) rules. Nothing else on the page is affected.
   ========================================================================== */
html body.home-page.home-page .standard-section {
    background: #050608 !important;   /* solid dark; shorthand also drops the tower photo */
    color: #fff !important;
    border-top: 0 !important;
}
/* "THE COREAL STANDARD" pill → dark-friendly */
html body.home-page.home-page .standard-section .standard-eyebrow {
    background: rgba(31, 60, 255, .14) !important;
    border: 1px solid rgba(124, 147, 255, .45) !important;
    box-shadow: none !important;
    color: #9db2ff !important;
}
/* headings: white, no light-bg glow */
html body.home-page.home-page .standard-section h2 {
    color: #fff !important;
    text-shadow: none !important;
}
html body.home-page.home-page .standard-section .section-center > p {
    color: #a4a7b0 !important;
    text-shadow: none !important;
}
/* principle cards → dark, like the Solutions cards */
html body.home-page.home-page .standard-section .standard-layout .principle {
    background: linear-gradient(150deg, #0a0b0f, #030405) !important;
    border: 1px solid #303238 !important;
    color: #fff !important;
    box-shadow: 0 18px 35px rgba(0, 0, 0, .55) !important;
}
html body.home-page.home-page .standard-section .standard-layout .principle:hover {
    border-color: #536bff !important;
}
/* C/O/R/E/A/L badge → brand blue circle (visible on dark, matches Solutions icons) */
html body.home-page.home-page .standard-section .standard-layout .principle > b {
    background: var(--home-blue, #2947ff) !important;
    color: #fff !important;
}
/* card text white / muted — extra specificity to beat the per-card !important colour rules */
html body.home-page.home-page.home-page .standard-section .standard-layout .principle h3 {
    color: #fff !important;
}
html body.home-page.home-page.home-page .standard-section .standard-layout .principle p {
    color: #a2a4ab !important;
}
