/* ============================================
   TECH_DOSSIER_V1.0 — Shared Site Styles
   Liquid glass, loader, mobile nav, fx
   ============================================ */

/* ---------- Accent palette (classified amber) ---------- */
:root {
    --accent: #E85D04;
    --accent-deep: #9A3412;
    --accent-soft: #FFEDD5;
    --accent-glow: rgba(232, 93, 4, 0.18);
}

.text-accent { color: var(--accent) !important; }
.text-accent-deep { color: var(--accent-deep) !important; }
.bg-accent { background-color: var(--accent) !important; color: #fff !important; }
.bg-accent-soft { background-color: var(--accent-soft) !important; color: var(--accent-deep) !important; }
.border-accent { border-color: var(--accent) !important; }
.hover-accent { transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }
.hover-accent:hover { color: var(--accent) !important; }
.hover-bg-accent { transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.hover-bg-accent:hover { background-color: var(--accent) !important; color: #fff !important; border-color: var(--accent) !important; }

/* Classified-stamp pill */
.accent-stamp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--accent);
    color: var(--accent-deep);
    background: var(--accent-soft);
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
}

/* ---------- Liquid Glass Nav ---------- */
.glass-nav {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.45) !important;
    -webkit-backdrop-filter: blur(28px) saturate(190%) brightness(108%);
    backdrop-filter: blur(28px) saturate(190%) brightness(108%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 -1px 0 rgba(0, 0, 0, 0.06) inset,
        0 8px 32px rgba(0, 0, 0, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.04);
    transition: background 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
    isolation: isolate;
}
.glass-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(255, 255, 255, 0.55), transparent 55%),
        radial-gradient(120% 80% at 100% 100%, rgba(255, 255, 255, 0.25), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
    pointer-events: none;
    z-index: -1;
    mix-blend-mode: overlay;
}
.glass-nav::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    pointer-events: none;
}

.glass-nav.scrolled {
    background: rgba(255, 255, 255, 0.62) !important;
    -webkit-backdrop-filter: blur(34px) saturate(200%) brightness(110%);
    backdrop-filter: blur(34px) saturate(200%) brightness(110%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 -1px 0 rgba(0, 0, 0, 0.08) inset,
        0 14px 44px rgba(0, 0, 0, 0.10),
        0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Push page content below the now-fixed nav */
body { padding-top: 64px; }

.glass-card {
    background: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* nav link hover wash */
.glass-nav a {
    position: relative;
    transition: color 0.2s ease;
}
.glass-nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}
.glass-nav a:hover { color: var(--accent); }
.glass-nav a:hover::after { transform: scaleX(1); background: var(--accent); }
.glass-nav a.is-active { color: var(--accent-deep); }
.glass-nav a.is-active::after { transform: scaleX(1); background: var(--accent); }

/* ---------- Loading Screen ---------- */
#tech-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 24px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    overflow: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#tech-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
#tech-loader::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}
#tech-loader::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
    animation: loader-scan 2.4s linear infinite;
    pointer-events: none;
}
@keyframes loader-scan {
    0%   { top: 0%; opacity: 1; }
    50%  { opacity: 1; }
    100% { top: 100%; opacity: 0.4; }
}

.loader-frame {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 32px 48px;
    min-width: 320px;
    max-width: 92vw;
    background: rgba(0,0,0,0.4);
}
.loader-frame .corner {
    position: absolute;
    width: 12px; height: 12px;
    border-color: #fff;
    border-style: solid;
}
.loader-frame .corner.tl { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.loader-frame .corner.tr { top: -1px; right: -1px; border-width: 1px 1px 0 0; }
.loader-frame .corner.bl { bottom: -1px; left: -1px; border-width: 0 0 1px 1px; }
.loader-frame .corner.br { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.loader-title {
    font-size: 11px;
    letter-spacing: 0.3em;
    opacity: 0.55;
    margin-bottom: 16px;
    text-transform: uppercase;
}
.loader-id {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    text-transform: uppercase;
}
.loader-id .blink {
    display: inline-block;
    width: 0.5em;
    background: #fff;
    color: #fff;
    margin-left: 4px;
    animation: caret 1s steps(2) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.loader-log {
    font-size: 12px;
    line-height: 1.7;
    list-style: none;
    padding: 0;
    margin: 0;
    min-height: 110px;
}
.loader-log li {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.loader-log li.show { opacity: 1; transform: translateY(0); }
.loader-log li.ok { color: #fff; }
.loader-log li .tag { opacity: 0.5; margin-right: 8px; }

.loader-bar {
    margin-top: 20px;
    height: 2px;
    background: rgba(255,255,255,0.15);
    position: relative;
    overflow: hidden;
}
.loader-bar::after {
    content: "";
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 30%;
    background: linear-gradient(90deg, #fff, var(--accent));
    box-shadow: 0 0 12px var(--accent-glow);
    animation: loader-bar 1.4s cubic-bezier(0.65,0,0.35,1) infinite;
}
@keyframes loader-bar {
    0%   { left: -30%; }
    100% { left: 100%; }
}

/* ---------- Mobile Drawer ---------- */
#mobile-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.15);
    width: 40px; height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    color: #000;
}
#mobile-toggle:hover { background: rgba(0,0,0,0.05); }
#mobile-toggle .material-symbols-outlined { font-size: 22px; }

#mobile-drawer {
    position: fixed;
    inset: 64px 0 0 0;
    background: rgba(255, 255, 255, 0.55);
    -webkit-backdrop-filter: blur(32px) saturate(200%) brightness(110%);
    backdrop-filter: blur(32px) saturate(200%) brightness(110%);
    z-index: 40;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 24px 60px rgba(0, 0, 0, 0.10);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    isolation: isolate;
}
#mobile-drawer::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(80% 50% at 0% 0%, rgba(255, 255, 255, 0.5), transparent 60%),
        radial-gradient(80% 60% at 100% 100%, rgba(255, 255, 255, 0.25), transparent 65%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 40%);
    pointer-events: none;
    z-index: -1;
    mix-blend-mode: overlay;
}
#mobile-drawer.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
#mobile-drawer a {
    font-family: "JetBrains Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 18px;
    padding: 18px 8px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    color: #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding-left 0.2s ease, background 0.2s ease;
}
#mobile-drawer a:hover { padding-left: 16px; background: rgba(0,0,0,0.03); color: var(--accent-deep); }
#mobile-drawer a.is-active { font-weight: 700; color: var(--accent-deep); border-left: 3px solid var(--accent); padding-left: 12px; }
#mobile-drawer a .material-symbols-outlined { font-size: 16px; opacity: 0.4; }
#mobile-drawer .drawer-meta {
    margin-top: auto;
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    opacity: 0.5;
    text-transform: uppercase;
    padding-top: 24px;
}

@media (max-width: 767px) {
    #mobile-toggle { display: inline-flex; }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Card hover lift ---------- */
.lift {
    transition: transform 0.4s cubic-bezier(0.2,0.7,0.2,1), box-shadow 0.4s ease;
}
.lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.10);
}

/* ---------- Page enter animation ---------- */
@keyframes page-enter {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
main { animation: page-enter 0.6s ease both; }

/* ---------- Mobile responsive tweaks ---------- */
@media (max-width: 767px) {
    /* Reduce massive page-margins to something usable on phones */
    [class*="px-margin-page"] { padding-left: 16px !important; padding-right: 16px !important; }

    /* Hero displays */
    h1 { word-break: break-word; }

    /* Generic spacing reductions */
    main { padding-top: 32px !important; padding-bottom: 32px !important; }

    /* Make hero image columns stack reasonably */
    section.grid > .h-\[500px\] { height: 280px !important; }

    /* Tighter section gaps */
    main.space-y-32 > * + * { margin-top: 64px !important; }
    main.gap-32 { gap: 48px !important; }

    /* Smaller display headlines so they don't overflow */
    .text-hero-display { font-size: 2.75rem !important; }
    h1.text-5xl, h1.md\:text-7xl { font-size: 2.5rem !important; line-height: 1.05 !important; }
    h1.text-4xl, h1.md\:text-6xl { font-size: 2rem !important; }

    /* Slightly more opaque on mobile for legibility over busy backdrops */
    .glass-nav { background: rgba(255, 255, 255, 0.55) !important; }
    .glass-nav.scrolled { background: rgba(255, 255, 255, 0.7) !important; }
}

/* Prevent horizontal scroll without breaking position: fixed/sticky */
html, body { overflow-x: clip; }
