@import url('https://fonts.googleapis.com/css2?family=Cutive+Mono&family=Space+Grotesk:wght@300;500;700&family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&family=Noto+Sans+Thai:wght@300;400;500;600;700&display=swap');

:root {
    --tspl-gold: #FF4E45;
    --tspl-blue: #0F172A;
    --font-special: 'Cutive Mono', monospace;
}

.text-heritage-gold {
    color: #D4AF37 !important;
}

.logo-gsr {
    filter: brightness(0) invert(1) opacity(0.8);
    transition: all 0.3s ease;
}

.logo-gsr:hover {
    filter: brightness(0) invert(1) opacity(1);
}

body {
    /* Thai font first — falls back to Latin for non-Thai chars */
    font-family: 'IBM Plex Sans Thai', 'Noto Sans Thai', 'Space Grotesk', sans-serif;
    -webkit-font-smoothing: antialiased;
    background-color: #fcfcfc;
    color: var(--tspl-blue);
    /* Thai needs at least 1.75 line-height to avoid sra-loy (สระลอย) clipping */
    line-height: 1.75;
    transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1), transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);

    /* Force vertical scrollbar to prevent layout shift between pages */
    overflow-y: scroll;
}

/* ── Thai text fix: สระลอย & วรรณยุกต์ ───────────────────── */
.lang-th,
:lang(th) {
    font-family: 'IBM Plex Sans Thai', 'Noto Sans Thai', sans-serif;
    line-height: 1.4;
    /* CANCEL all wide letter-spacing (kerning) for Thai - Mandatory for legibility */
    letter-spacing: normal !important;
    font-feature-settings: "kern" 0;
}

/* CRITICAL: Never let CSS override Tailwind's hidden utility */
.hidden {
    display: none !important;
}

/* Override Tailwind's font-mono for the special typewriter aesthetic */
.font-mono {
    font-family: var(--font-special) !important;
}

/* paragraph Thai text — breathing room */
p .lang-th {
    line-height: 1.45;
}

/* 🧪 SAFETY FIX: Force Desktop Nav and Solid Mobile Menu */
@media (min-width: 768px) {
    #desktop-nav {
        display: flex !important;
    }

    #mobile-menu-btn {
        display: none !important;
    }
}

@media (max-width: 767px) {
    #desktop-nav {
        display: none !important;
    }

    #mobile-menu-btn {
        display: flex !important;
    }

    /* Fixed: Ensure solid white background when open, but don't force opacity: 1 constant */
    #mobile-menu {
        background-color: #ffffff !important;
        background-image: none !important;
    }

    /* Enlarge Mobile Menu Text & Spacing */
    #mobile-menu a,
    #mobile-menu span {
        font-size: 1.15rem !important;
        /* Larger text for mobile */
        letter-spacing: 0.05em !important;
    }

    #mobile-menu i {
        font-size: 1.4rem !important;
        /* Larger icons */
    }

    #mobile-menu .flex-col.gap-6 {
        gap: 1.5rem !important;
        /* More breathing room */
    }

    nav {
        background-color: #ffffff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* Headings: extra line-height only — NO display:inline-block (breaks lang toggle) */
h1 .lang-th,
h2 .lang-th,
h3 .lang-th,
h4 .lang-th {
    line-height: 1.15;
    padding-top: 0.1em;
}

/* Thai hero titles — extra leading for stacked lines */
.thai-title {
    line-height: 1.15 !important;
    padding-top: 0.1em;
    padding-bottom: 0.1em;
}

/* Small badge / pill elements — ensure Thai vowels not clipped */
[class*="rounded-full"] .lang-th,
[class*="rounded-lg"] .lang-th,
[class*="rounded-xl"] .lang-th {
    padding-top: 0.1em;
    overflow: visible;
}

/* Custom Scrollbar - Refined for Factsheet */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #ffffff;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #f1f1f1;
    border-radius: 20px;
    border: 2px solid #ffffff;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: var(--tspl-gold);
}

body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
    /* Prevent shift if scrollbar hides */
}

html {
    scroll-behavior: smooth;
}

.lang-th,
.lang-en {
    /* Only animate opacity — prevents height jumps clipping Thai diacritics */
    transition: opacity 0.25s ease-in-out;
}

/* Blueprint grid — minor grid (20px) + major grid (80px) + crosshair marks at intersections */
.bg-grid-pattern {
    background-image:
        /* SVG crosshair marks at every major-grid intersection */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg stroke='%234D8EFF' stroke-width='0.7' opacity='0.60'%3E%3Cline x1='-4' y1='0' x2='4' y2='0'/%3E%3Cline x1='0' y1='-4' x2='0' y2='4'/%3E%3C/g%3E%3C/svg%3E"),
        /* Major grid lines — every 80px */
        linear-gradient(rgba(60, 130, 255, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(60, 130, 255, 0.18) 1px, transparent 1px),
        /* Minor grid lines — every 20px (exactly ¼ of 80px) */
        linear-gradient(rgba(35, 90, 210, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(35, 90, 210, 0.08) 1px, transparent 1px);
    background-size:
        80px 80px,
        80px 80px, 80px 80px,
        20px 20px, 20px 20px;
    background-position:
        0 0,
        0 0, 0 0,
        0 0, 0 0;
}

/* NOTE: gold-pulse-glow is defined in premium.css using compositor-safe
   filter: drop-shadow() — no duplicate needed here. */

/* Cinematic Laser Scan Animation */
@keyframes laser-sweep {
    0% {
        top: -10%;
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.scan-beam {
    position: absolute;
    left: 0;
    width: 100%;
    height: 15%;
    background: linear-gradient(to bottom, transparent, rgba(255, 78, 69, 0.4), var(--tspl-gold), transparent);
    z-index: 10;
    pointer-events: none;
    opacity: 0;
}

.group:hover .scan-beam {
    animation: laser-sweep 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* HUD Brackets */
.bracket {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--tspl-gold);
    border-width: 0;
    z-index: 20;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0;
}

.group:hover .bracket {
    opacity: 1;
    border-width: 2px;
}

.b-tl {
    top: 12px;
    left: 12px;
    border-top-style: solid;
    border-left-style: solid;
    transform: translate(-8px, -8px);
}

.b-tr {
    top: 12px;
    right: 12px;
    border-top-style: solid;
    border-right-style: solid;
    transform: translate(8px, -8px);
}

.b-bl {
    bottom: 12px;
    left: 12px;
    border-bottom-style: solid;
    border-left-style: solid;
    transform: translate(-8px, 8px);
}

.b-br {
    bottom: 12px;
    right: 12px;
    border-bottom-style: solid;
    border-right-style: solid;
    transform: translate(8px, 8px);
}

.group:hover .bracket {
    transform: translate(0, 0);
}

.outline-num {
    -webkit-text-stroke: 1px var(--tspl-gold);
    color: transparent;
    font-weight: 700;
}

.pattern-card {
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid #f1f1f1;
}

.pattern-card:hover {
    transform: translateY(-8px);
    border-color: var(--tspl-gold);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.06);
}

#hero-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 78, 69, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 5;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}

.zoom-container {
    overflow: hidden;
    cursor: zoom-in;
}

.zoom-container img {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.zoom-container:hover img {
    transform: scale(1.6);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Horizontal Scroll Fade Masks */
.mask-fade-right {
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

.mask-fade-left {
    mask-image: linear-gradient(to left, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 85%, transparent 100%);
}

.thai-title {
    line-height: 1.15;
}

/* --- PRELOADER & EFFECTS --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #010509 0%, #040C1A 50%, #060F20 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 1.8s cubic-bezier(0.86, 0, 0.07, 1), transform 1.8s cubic-bezier(0.86, 0, 0.07, 1), filter 1.8s cubic-bezier(0.86, 0, 0.07, 1), visibility 1.8s;
    overflow: hidden;
    will-change: transform, opacity, filter;
}

.radar-core {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 300px;
    height: 300px;
}

.radar-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 78, 69, 0.1);
}

.radar-ring.r1 {
    width: 100%;
    height: 100%;
    border-top: 1px solid var(--tspl-gold);
    animation: radar-spin 2s linear infinite;
}

.radar-ring.r2 {
    width: 80%;
    height: 80%;
    border: 1px dashed rgba(255, 78, 69, 0.4);
    animation: radar-spin 3s linear infinite reverse;
}

.radar-ring.r3 {
    width: 60%;
    height: 60%;
    border-bottom: 2px solid var(--tspl-gold);
    animation: radar-spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes radar-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-percentage {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--tspl-gold);
    font-family: var(--font-special);
    text-shadow: 0 0 20px rgba(255, 78, 69, 0.5);
    z-index: 10;
}

.scattered-log {
    position: absolute;
    color: var(--tspl-gold);
    font-family: inherit;
    font-weight: 700;
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    pointer-events: none;
    z-index: 5;
    text-transform: uppercase;
}

.scattered-log.in {
    opacity: 0.15;
    transform: scale(1.05);
}

.binary-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

/* Large anchoring character — editorial watermark */
.binary-rain::before {
    content: 'ก';
    position: absolute;
    top: -15%;
    left: -8%;
    font-size: 70vw;
    font-family: 'IBM Plex Sans Thai', 'Noto Sans Thai', sans-serif;
    color: rgba(255, 78, 69, 0.028);
    font-weight: 700;
    line-height: 1;
    user-select: none;
    pointer-events: none;
    letter-spacing: normal;
}

/* Vertical word — right side accent */
.binary-rain::after {
    content: 'ลวดลาย';
    position: absolute;
    bottom: 8%;
    right: 4%;
    font-size: 5.5vw;
    font-family: 'IBM Plex Sans Thai', 'Noto Sans Thai', sans-serif;
    color: rgba(255, 78, 69, 0.04);
    font-weight: 700;
    letter-spacing: 0.35em;
    writing-mode: vertical-rl;
    user-select: none;
    pointer-events: none;
}

.reveal {
    opacity: 0;
    /* TranslateZ keeps it on a GPU layer from the start to prevent 'pop-in' or blinking */
    transform: translateY(30px) translate3d(0, 0, 0);
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-up {
    opacity: 0;
    transform: translateY(60px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.scramble-hover {
    display: inline-block;
    min-width: 120px;
}

.parallax-horizontal,
.parallax-vertical {
    will-change: transform, opacity;
    display: inline-block;
    /* CRITICAL: Remove transitions on properties animated by JS parallax to prevent jitter */
    transition: none !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
}

.parallax-horizontal {
    display: inline-block;
}

/* Sticky card stack layouts are handled purely by Tailwind classes in HTML */

@media (pointer: fine) {
    input {
        cursor: text !important;
    }
}

/* --- PREMIUM CAPTURE FLASH (Horizontal Lens Flare) --- */
@keyframes horiz-flash {
    0% {
        opacity: 0;
        width: 0;
        transform: translate(-50%, -50%) scaleY(0.2);
    }

    15% {
        opacity: 1;
        width: 250%;
        transform: translate(-50%, -50%) scaleY(3);
        box-shadow: 0 0 30px 10px rgba(255, 255, 255, 0.9), 0 0 10px 2px rgba(15, 44, 89, 0.5);
    }

    40% {
        opacity: 1;
        width: 150%;
        transform: translate(-50%, -50%) scaleY(1);
        box-shadow: 0 0 15px 5px rgba(255, 255, 255, 0.4);
    }

    100% {
        opacity: 0;
        width: 0;
        transform: translate(-50%, -50%) scaleY(0.1);
        box-shadow: none;
    }
}

.group:hover .horizontal-flash {
    animation: horiz-flash 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- PREMIUM DECODE SCANNER LINE --- */
@keyframes scan-laser {
    0% {
        top: -10%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    80% {
        top: 110%;
        opacity: 1;
    }

    90% {
        opacity: 0;
        top: 110%;
    }

    100% {
        opacity: 0;
        top: -10%;
    }
}

.group:hover .scan-line {
    animation: scan-laser 2.5s cubic-bezier(0.65, 0, 0.35, 1) infinite alternate;
}

/* --- PREMIUM DIGITIZE SHIMMER SWEEP --- */
@keyframes shimmer-sweep {
    0% {
        transform: translateX(-200%) skewX(-20deg);
    }

    100% {
        transform: translateX(250%) skewX(-20deg);
    }
}

.group:hover .shimmer-effect {
    animation: shimmer-sweep 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Ticker Animation */
@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Bilingual Stability Container */
.lang-container {
    display: inline-grid;
    align-items: center;
    justify-items: center;
}

.lang-container>span {
    grid-area: 1 / 1;
    text-align: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lang-container>span.hidden {
    display: block !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(5px);
}

/* Blueprint Pattern - Multi-layered technical grid */
.blueprint-grid {
    background-color: #f8fafc;
    /* Slightly blue-tinted light background */
    background-image:
        linear-gradient(rgba(15, 44, 89, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 44, 89, 0.04) 1px, transparent 1px),
        linear-gradient(rgba(15, 44, 89, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 44, 89, 0.02) 1px, transparent 1px);
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
    background-position: top center;
}

.blueprint-grid-dark {
    position: relative;
    background-color: #060F22;
    background-image:
        linear-gradient(rgba(77, 142, 255, 0.08) 1.5px, transparent 1.5px),
        linear-gradient(90deg, rgba(77, 142, 255, 0.08) 1.5px, transparent 1.5px),
        linear-gradient(rgba(77, 142, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(77, 142, 255, 0.04) 1px, transparent 1px);
    background-size: 80px 80px, 80px 80px, 20px 20px, 20px 20px;
    background-position: top center;
}

.blueprint-grid-dark::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg stroke='%234D8EFF' stroke-width='0.5' opacity='0.25'%3E%3Cline x1='40' y1='36' x2='40' y2='44'/%3E%3Cline x1='36' y1='40' x2='44' y2='40'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 80px 80px;
    background-position: center center;
    pointer-events: none;
}

/* Research Capsule Premium Styles */
.ticker-wrapper {
    animation: ticker-scroll 35s linear infinite;
    width: max-content;
    will-change: transform;
}

/* Specific speed for different tickers */
.group\/capsule .ticker-wrapper {
    animation-duration: 50s;
    /* Slower for more data points */
}

.group\/capsule:hover .ticker-wrapper {
    animation-play-state: paused;
}

.group\/capsule i {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    filter: drop-shadow(0 0 2px rgba(255, 78, 69, 0.3));
}

.group\/capsule:hover i {
    transform: scale(1.2) translateY(-2px);
    filter: drop-shadow(0 0 12px rgba(255, 78, 69, 0.8));
}

.group\/capsule .w-px {
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
}

/* Glassmorphism Outer Highlight */
.group\/capsule::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05);
    pointer-events: none;
    z-index: 5;
}

.group\/capsule:hover {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 78, 69, 0.1);
}


/* --- PAGE TRANSITIONS --- */
.page-exit {
    opacity: 0 !important;
    transform: translateY(-15px) !important;
    transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1), transform 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

.page-enter {
    animation: page-enter-anim 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes page-enter-anim {
    0% {
        opacity: 0;
        transform: translateY(15px) scale(0.99);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Sila Jaruek (Ancient Script) Aesthetic */
.bg-sila-jaruek {
    background-image:
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 1)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Ctext x='10' y='30' fill='%23D4AF37' font-family='Cutive Mono, serif' font-size='12' opacity='0.08'%3Eก ข ค ง จ ฉ%3C/text%3E%3Ctext x='60' y='60' fill='%23D4AF37' font-family='Cutive Mono, serif' font-size='12' opacity='0.08'%3Eลวดลายไทย%3C/text%3E%3Ctext x='20' y='90' fill='%23D4AF37' font-family='Cutive Mono, serif' font-size='10' opacity='0.08'%3Eมรดกแห่งสยาม%3C/text%3E%3Ctext x='80' y='20' fill='%23D4AF37' font-family='Cutive Mono, serif' font-size='11' opacity='0.08'%3Eสัญวิทยา%3C/text%3E%3C/svg%3E");
    background-repeat: repeat;
}

.stone-border {
    border-color: rgba(255, 78, 69, 0.15);
    border-style: solid;
    border-width: 1px 0;
    position: relative;
}

.stone-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 78, 69, 0.3), transparent);
}

/* --- TECHNICAL INTERFACE (HUD & VIEWPORT) --- */
.technical-hud {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    opacity: 0.8;
}

.hud-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-left: 1.5px solid rgba(15, 44, 89, 0.1);
    padding-left: 0.85rem;
    transition: all 0.3s ease;
}

.hud-item:hover {
    border-left-color: #0F172A;
    transform: translateX(2px);
}

.hud-label {
    font-size: 7px;
    font-weight: 800;
    color: rgba(15, 44, 89, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    line-height: 1;
}

.hud-value {
    font-size: 9px;
    font-family: 'Space Grotesk', monospace;
    color: #0F172A;
    font-weight: 500;
}

/* Tech Viewport Widget - Integrated UX */
.tech-viewport {
    position: relative;
    border-radius: 2.5rem;
    overflow: hidden;
    border: 1px solid rgba(15, 44, 89, 0.05);
    box-shadow: 0 30px 60px -15px rgba(15, 44, 89, 0.12);
    background-color: white;
    padding: 0.5rem;
}

.tech-viewport-inner {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 2rem;
    overflow: hidden;
    background-color: #f9fafb;
}

.tech-viewport img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s ease-out;
}

.tech-viewport:hover img {
    transform: scale(1.1);
}

.tech-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at center, transparent 30%, rgba(15, 44, 89, 0.03) 100%),
        linear-gradient(rgba(15, 44, 89, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 44, 89, 0.05) 1px, transparent 1px);
    background-size: 100% 100%, 20px 20px, 20px 20px;
}

.view-corner {
    position: absolute;
    width: 1rem;
    height: 1rem;
    border-color: rgba(15, 44, 89, 0.2);
    pointer-events: none;
}

.view-corner-tl {
    top: 1rem;
    left: 1rem;
    border-top-width: 2px;
    border-left-width: 2px;
    border-style: solid;
}

.view-corner-br {
    bottom: 1rem;
    right: 1rem;
    border-bottom-width: 2px;
    border-right-width: 2px;
    border-style: solid;
}

/* Pipeline Progress Styles */
.pipeline-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    width: 6rem;
    /* Fixed width to prevent shifting */
}

.pipeline-nav-item.active .step-ring {
    border-color: #0F2C59;
    transform: scale(1.1);
    background-color: #0F2C59;
    box-shadow: 0 10px 25px rgba(15, 44, 89, 0.15);
}

.pipeline-nav-item.active .step-icon {
    color: white;
}

.pipeline-nav-item.active .step-dot {
    background-color: white;
    transform: scale(1.2);
}

.pipeline-nav-item .step-label {
    position: absolute;
    top: 3.5rem;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    transition: all 0.4s ease;
}

.pipeline-nav-item.active .step-label {
    color: #0F2C59;
    opacity: 1;
    transform: translate(-50%, -2px);
    letter-spacing: 0.15em;
}

.pipeline-nav-item:hover .step-label {
    color: #0F2C59;
    opacity: 0.7;
}

.pipeline-nav-item:hover .step-ring {
    border-color: #0F2C59;
    background-color: #f8fafc;
}

.pipeline-line {
    height: 1px;
    flex-grow: 1;
    background-color: #f1f1f1;
    position: relative;
    overflow: hidden;
    margin-top: 24px;
}

.pipeline-line::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 60px;
    background: linear-gradient(90deg, transparent, rgba(15, 44, 89, 0.15), transparent);
    animation: pipelineFlow 2.5s infinite linear;
}

@keyframes pipelineFlow {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(600%);
    }
}

/* Reference Photo Widget */
.ref-photo-widget {
    position: fixed;
    right: 32px;
    bottom: 32px;
    width: 200px;
    background: white;
    border: 1px solid #eee;
    padding: 8px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    z-index: 90;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.ref-photo-widget img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 14px;
}