/* ============================================
   PT. KIM Technology Solutions
   Brutalist Asymmetric — CSS
   ============================================ */

/* === View Transitions === */
.view-transition { animation: page-enter 0.4s ease-out; }
@keyframes page-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Dot Grid (warm tone on cream) === */
.dot-grid {
    background-image: radial-gradient(circle, #C4B5A3 0.6px, transparent 0.6px);
    background-size: 28px 28px;
}
.dot-grid-dark {
    background-image: radial-gradient(circle, rgba(255,255,255,0.07) 0.6px, transparent 0.6px);
    background-size: 28px 28px;
}

/* === Watermark Typography === */
.watermark {
    position: absolute;
    font-size: clamp(120px, 15vw, 280px);
    font-weight: 800;
    line-height: 0.85;
    letter-spacing: -0.03em;
    color: currentColor;
    opacity: 0.035;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}
.dark .watermark { opacity: 0.025; }
@media (max-width: 1023px) { .watermark { display: none; } }

/* === GSAP: hide before animation === */
[data-animate] { visibility: hidden; }

/* === Alpine x-cloak === */
[x-cloak] { display: none !important; }

/* === HTMX Indicator === */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { display: inline-flex; }

/* === Selection === */
::selection { background: rgba(232, 64, 11, 0.12); color: inherit; }

/* === Scrollbar === */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.06); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.12); }
.dark ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); }
.dark ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.12); }

/* === Utility === */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === Image Treatment (brutalist grayscale + ember overlay) === */
.img-brutal {
    filter: grayscale(80%) contrast(1.1);
    transition: filter 0.5s ease;
}
.img-brutal:hover,
.group:hover .img-brutal {
    filter: grayscale(20%) contrast(1.05);
}
.img-overlay {
    position: relative;
    overflow: hidden;
}
.img-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(232,64,11,0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* === SVG Illustrations === */
.svg-illustration {
    pointer-events: none;
    user-select: none;
}
.svg-float {
    animation: svgFloat 6s ease-in-out infinite;
}
@keyframes svgFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
.svg-pulse {
    animation: svgPulse 4s ease-in-out infinite;
}
@keyframes svgPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
.circuit-line {
    stroke-dasharray: 8 4;
    animation: circuitDash 20s linear infinite;
}
@keyframes circuitDash {
    to { stroke-dashoffset: -200; }
}
@media (max-width: 1023px) {
    .svg-illustration.lg-only { display: none; }
}

/* === Logo text outline for readability on dark backgrounds === */
.logo-text-outline {
    text-shadow:
        -1px -1px 0 rgba(245,241,236,0.8),
         1px -1px 0 rgba(245,241,236,0.8),
        -1px  1px 0 rgba(245,241,236,0.8),
         1px  1px 0 rgba(245,241,236,0.8),
         0    0   6px rgba(245,241,236,0.4);
}
.dark .logo-text-outline {
    text-shadow:
        -1px -1px 0 rgba(20,18,16,0.9),
         1px -1px 0 rgba(20,18,16,0.9),
        -1px  1px 0 rgba(20,18,16,0.9),
         1px  1px 0 rgba(20,18,16,0.9),
         0    0   6px rgba(20,18,16,0.5);
}

/* === Side nav link underline === */
.nav-link-brutal {
    position: relative;
    display: inline-block;
}
.nav-link-brutal::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: #E8400B;
    transition: width 0.3s ease;
}
.nav-link-brutal:hover::after,
.nav-link-brutal.active::after {
    width: 100%;
}
