﻿/* =====================================================
   History360°
===================================================== */

/* ---------------------------------------------
   Core tokens
--------------------------------------------- */
:root {
    --hx-paper: #ffffff;
    --hx-ink: #111111;
    --hx-border: rgba(0,0,0,0.12);
    --hx-link: #c04b2b;
    --hx-link-hover: #e06a4a;
    --hx-link-focus: #ffbfa7;
    --hx-nav-h: 60px;
    --hx-hero-top-pad: 24px;
}

@media (max-width: 768px) {
    :root {
        --hx-nav-h: 72px;
        --hx-hero-top-pad: 55px;
    }
}

/* ---------------------------------------------
   Base layout
--------------------------------------------- */
html {
    font-size: 16px;
}

@media (max-width: 768px) {
    html {
        font-size: 17px;
    }
}

html, body {
    height: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: #000;
    color: #f5f5f5;
    font-family: 'Roboto', system-ui, sans-serif;
    position: relative;
}

/* Allow scrolling on mobile so bottom content isn't trapped under reCAPTCHA badge */
@media (max-width: 768px) {
    body.index-page {
        overflow-y: auto !important;
    }
}

/* ---------------------------------------------
   GLOBAL BACKGROUND TEXTURE
--------------------------------------------- */
.texture-overlay {
    position: relative;
    min-height: 100vh;
    background: #000;
}

.texture-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../images/scratchedBg.jpg");
    background-repeat: repeat;
    opacity: .08;
    mix-blend-mode: multiply;
    pointer-events: none;
}

/* ---------------------------------------------
   INTERNAL PAGES — shared background image
--------------------------------------------- */
body.internal-page {
    background-image: url("../images/background.jpg");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: scroll;
    overflow-y: auto !important;
}

/* ---------------------------------------------
   Typography
--------------------------------------------- */
h1, h2, h3, .logo-main {
    font-family: 'Cinzel', Georgia, serif;
    font-weight:bold;
    letter-spacing: .5px;
}

/* ---------------------------------------------
   Skip Link
--------------------------------------------- */
.skip-link {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: fixed;
    left: 1rem;
    top: 1rem;
    padding: .5rem .75rem;
    background: #000;
    color: #fff;
    border: 2px solid #fff;
    z-index: 99999;
    border-radius: 6px;
}

/* ---------------------------------------------
   Navbar
--------------------------------------------- */
.navbar {
    background: rgba(255,255,255,0.95);
    border-bottom: 1px solid var(--hx-border);
    backdrop-filter: saturate(120%) blur(6px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 5000;
    min-height: var(--hx-nav-h);
}

/* spacer must match the fixed navbar height */
._nav-spacer {
    height: var(--hx-nav-h);
}

/* Branding */
.logo-main {
    background: linear-gradient(135deg,#000,#333);
    color: #fff;
    padding: 6px 14px;
    border: 2px solid #fff;
    border-right: none;
    font-weight: 600;
}

.logo-sub {
    background: rgba(255,255,255,.92);
    color: #000;
    padding: 6px 14px;
    border: 2px solid #fff;
    border-left: none;
    font-weight: 500;
}

/* Hamburger menu */
.navbar-toggler {
    background: #ffffff !important;
    border: 2px solid #ffffff !important;
    padding: .45rem .65rem;
    border-radius: 10px;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23000' stroke-width='3' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
    background-size: 30px 30px;
}

/* ---------------------------------------------
   INDEX HERO (Homepage only wrapper)
   NOTE: there must be ONLY ONE .hero--index wrapper.
--------------------------------------------- */
.landing-page .hero--index {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--hx-nav-h));
    min-height: calc(100vh - var(--hx-nav-h));
    padding-top: var(--hx-hero-top-pad);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    /* IMPORTANT: hero background is video now */
    background: none !important;
}

/* Newer Safari/Chromium: dynamic viewport */
@supports (height: 100dvh) {
    .landing-page .hero--index {
        height: calc(100dvh - var(--hx-nav-h));
        min-height: calc(100dvh - var(--hx-nav-h));
    }
}

/* iOS/Safari stable viewport */
@supports (height: 100svh) {
    .landing-page .hero--index {
        height: calc(100svh - var(--hx-nav-h));
        min-height: calc(100svh - var(--hx-nav-h));
    }
}

/* Smaller screens: start content below top padding */
@media (max-width: 768px) {
    .landing-page .hero--index {
        align-items: flex-start;
    }
}

/* ---------------------------------------------
   HOMEPAGE HERO VIDEO LAYER
--------------------------------------------- */
.landing-page .hero--index .hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    /* Keep text readable */
    filter: brightness(1.5) contrast(1.08);
}

/* Optional gentle drift (remove if you want perfectly static video) */
.landing-page .hero--index .hero-video {
    transform: scale(1.02);
    animation: heroVideoDrift 10s ease-in-out infinite alternate;
}

@keyframes heroVideoDrift {
    from {
        transform: scale(1.03) translate3d(0, 0, 0);
    }

    to {
        transform: scale(1.07) translate3d(0, -1.5%, 0);
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .landing-page .hero--index .hero-video {
        animation: none !important;
        transform: none !important;
    }
}

/* ---------------------------------------------
   HERO OVERLAY (above video) + DUST
--------------------------------------------- */
.landing-page .hero--index .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.45), rgba(0,0,0,.65));
    z-index: 2;
    pointer-events: none;
}

/* Dust layer (grain + subtle drift) */
.landing-page .hero--index .hero-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    /* Use your existing scratchedBg as dust/grain texture */
    background-image: url("../images/scratchedBg.jpg");
    background-repeat: repeat;
    background-size: 420px 420px;

    opacity: 0.10;
    mix-blend-mode: screen; /* try: screen, overlay, soft-light */
    filter: contrast(1.2) brightness(1.15);
    transform: translate3d(0,0,0);

    animation: dustDrift 22s linear infinite;
}

/* Second speckle pass for more depth */
.landing-page .hero--index .hero-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background-image: url("../images/scratchedBg.jpg");
    background-repeat: repeat;
    background-size: 260px 260px;

    opacity: 0.05;
    mix-blend-mode: soft-light;
    filter: blur(0.2px) contrast(1.15);

    animation: dustDrift2 35s linear infinite;
}

@keyframes dustDrift {
    from { background-position: 0 0; }
    to   { background-position: -600px 300px; }
}

@keyframes dustDrift2 {
    from { background-position: 0 0; }
    to   { background-position: 450px -300px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .landing-page .hero--index .hero-overlay::before,
    .landing-page .hero--index .hero-overlay::after {
        animation: none !important;
    }
}

/* Content always top */
.landing-page .hero--index .container {
    position: relative;
    z-index: 5;
    margin-top: 0;
}

/* Title shadow */
.hero-title {
    text-shadow: 0 3px 8px rgba(0,0,0,.8);
}

    .hero-title .city-name {
        font-size: .62em;
        font-weight: 500;
        letter-spacing: 3px;
        margin-left: .12em;
    }

/* Text measure constraint */
.landing-page .hero--index .hero-copy,
.landing-page .hero--index .lead {
    max-width: 32ch;
    margin-left: auto;
    margin-right: auto;
}

.landing-page .hero--index .lead.mx-auto.col-lg-8 {
    max-width: 32ch;
}

/* ---------------------------------------------
   STEAM — HOME PAGE ONLY
--------------------------------------------- */
.steam {
    display: none;
}

.landing-page .hero--index .steam {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: radial-gradient(circle at 50% 70%, rgba(255,255,255,.15), transparent 55%);
    animation: steam 8s infinite ease-in-out;
}

@keyframes steam {
    0% {
        opacity: 0;
        transform: translateY(24px) scale(1);
    }

    50% {
        opacity: .25;
        transform: translateY(-8px) scale(1.08);
    }

    100% {
        opacity: 0;
        transform: translateY(-28px) scale(1.14);
    }
}

/* ---------------------------------------------
   FOG — HOME PAGE ONLY (contained inside hero)
--------------------------------------------- */
.fog {
    display: none;
}

.landing-page .hero--index .fog {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: radial-gradient(ellipse at bottom, rgba(255,255,255,0.015), transparent 75%);
    mix-blend-mode: screen;
    filter: blur(18px);
    opacity: 0.6;
    animation: fogDrift 90s linear infinite;
}

@keyframes fogDrift {
    from { transform: translate3d(0,0,0); }
    to   { transform: translate3d(-2%,1%,0); }
}

/* Remove fog & steam from ALL non-home pages */
body:not(.landing-page) .fog,
body:not(.landing-page) .steam {
    display: none !important;
}

/* ---------------------------------------------
   FIX: prevent <form> extra height on index
--------------------------------------------- */
.landing-page {
    display: block;
    padding: 0;
    margin: 0;
}

/* ---------------------------------------------
   Buttons
--------------------------------------------- */
.btn-iron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    letter-spacing: .4px;
    color: #fff;
    background-color: #c04b2b;
    border: 2px solid #c04b2b;
    border-radius: 999px;
    padding: .9rem 2.5rem;
    transition: all .25s ease;
    box-shadow: 0 3px 12px rgba(0,0,0,0.35);
}

.btn-iron:hover,
.btn-iron:focus {
    background-color: #e06a4a;
    border-color: #e06a4a;
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(0,0,0,0.45);
}

.btn-iron:active {
    background-color: #a63f23;
    border-color: #a63f23;
    transform: translateY(0);
}

.btn-iron:focus-visible {
    outline: 3px solid #ffbfa7;
    outline-offset: 3px;
}

/* ---------------------------------------------
   Links
--------------------------------------------- */
a {
    color: var(--hx-link);
    text-decoration: none;
    border-bottom: 1px dotted rgba(192,75,43,0.4);
    text-underline-offset: 3px;
    transition: color .2s ease, border-color .2s ease;
}

a:hover,
a:focus {
    color: var(--hx-link-hover);
    border-color: var(--hx-link-hover);
}

a:focus-visible {
    outline: 2px solid var(--hx-link-focus);
    outline-offset: 2px;
}

/* ---------------------------------------------
   reCAPTCHA badge
--------------------------------------------- */
.grecaptcha-badge {
    bottom: 24px !important;
    right: 24px !important;
    z-index: 9999 !important;
}

/* ---------------------------------------------
   INTERNAL PAGES — clean background, no overlays
--------------------------------------------- */
body.internal-page {
    background-image: url("../images/background.jpg");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    overflow-y: auto !important;
}

body.internal-page .texture-overlay {
    background: transparent !important;
}

body.internal-page .texture-overlay::before,
body.internal-page .hero-overlay,
body.internal-page .fog,
body.internal-page .steam {
    display: none !important;
}

/* ---------------------------------------------
   Shared white card for internal pages
--------------------------------------------- */
.page-card {
    background-color: #ffffff !important;
    color: #111111 !important;
    border-radius: 0rem;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

    /* ---------------------------------------------
   Section dividers inside content cards
--------------------------------------------- */

    .page-card section {
        margin-top: 2rem;
        padding-top: 2rem;
        border-top: 1px solid rgba(0,0,0,0.3);
    }

        .page-card section:first-of-type {
            border-top: none;
            margin-top: 0;
            padding-top: 0;
        }

article,
article.page-card,
.contact-card {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

body.landing-page {
    position: relative !important;
}

body.landing-page .grecaptcha-badge {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    transform: scale(0.8);
    opacity: 0.8;
}

.recaptcha-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

@media (max-width: 480px) {
    .recaptcha-wrapper .g-recaptcha {
        transform: scale(0.88);
        transform-origin: center;
    }
}

@media (max-width: 768px) {
    .hero--index .container {
        padding-bottom: 80px !important;
    }
}

.grecaptcha-badge {
    display: none !important;
}

.custom-recaptcha-badge {
    position: fixed;
    bottom: 10px;
    right: 24px;
    width: 50px;
    height: auto;
    z-index: 99999;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.custom-recaptcha-badge:hover {
    opacity: 1;
}

/* ===========================
   Error Page Styling
=========================== */

.error-page {
    background-image: url("../images/background.jpg");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

    .error-page .page-card {
        max-width: 760px;
        margin: 0 auto;
        border-radius: 0 !important;
        padding: 2.5rem;
        box-shadow: 0 10px 28px rgba(0,0,0,0.25);
    }

    .error-page h1 {
        font-family: 'Cinzel', serif;
        letter-spacing: .5px;
        color: #111;
    }

    .error-page p {
        color: #222;
        font-size: 1.05rem;
    }

    /* copy button styling */
    .error-page .btn-copy {
        border-radius: 0 0.5rem 0.5rem 0;
        border-left: 1px solid rgba(0,0,0,0.12);
    }

.btn-iron--index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    letter-spacing: .4px;
    color: #fff;
    background-color: #c04b2b;
    border: 2px solid #c04b2b;
    border-radius: 999px;
    padding: .9rem 2.5rem;
    transition: all .25s ease;
    box-shadow: 0 3px 12px rgba(0,0,0,0.35);
}

    .btn-iron--index:hover,
    .btn-iron--index:focus {
        background-color: #e06a4a;
        border-color: #e06a4a;
        transform: translateY(-2px);
        box-shadow: 0 5px 18px rgba(0,0,0,0.45);
    }

    .btn-iron--index:active {
        background-color: #a63f23;
        border-color: #a63f23;
        transform: translateY(0);
    }

    .btn-iron--index:focus-visible {
        outline: 3px solid #ffbfa7;
        outline-offset: 3px;
    }

a:focus-visible,
button:focus-visible {
    outline: 3px solid #ffbfa7;
    outline-offset: 3px;
}

.history360-powered {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin: 1.25rem auto 0;
    padding: .5rem .9rem;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    background: rgba(0,0,0,.28);
    box-shadow: 0 3px 12px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.08);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: rgba(255,255,255,.65);
    font-family: 'Cinzel', Georgia, serif;
    font-size: .68rem;
    line-height: 1;
    letter-spacing: .6px;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 0 2px 5px rgba(0,0,0,.7);
}

.history360-powered-label {
    color: rgba(255,255,255,.52);
    font-size: .56rem;
    letter-spacing: 1px;
}

.history360-powered-brand {
    color: #fff;
    font-size: .86rem;
    font-weight: 600;
    letter-spacing: .7px;
}

.history360-powered-type {
    color: rgba(255,255,255,.55);
    font-size: .56rem;
    letter-spacing: .65px;
}

.history360-powered-brand::after {
    content: "";
    display: inline-block;
    width: 1px;
    height: .7rem;
    margin-left: .5rem;
    vertical-align: middle;
    background: rgba(255,255,255,.25);
}

@media (max-width: 576px) {

    .history360-powered {
        gap: .35rem;
        padding: .48rem .7rem;
        font-size: .58rem;
    }

    .history360-powered-label,
    .history360-powered-type {
        font-size: .48rem;
    }

    .history360-powered-brand {
        font-size: .72rem;
    }

        .history360-powered-brand::after {
            margin-left: .35rem;
            height: .6rem;
        }
}