/* ============================================================
   MagiTech-SG — Site Custom Styles
   Design tokens & component classes used across the page.
   ============================================================ */

body {
    background-color: #050811;
    color: #f3f4f6;
    overflow-x: hidden;
}

/* Subtle cyan grid background overlay */
.bg-grid-pattern {
    background-size: 36px 36px;
    background-image:
        linear-gradient(to right, rgba(0, 242, 254, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 242, 254, 0.04) 1px, transparent 1px);
}

/* Frosted glass panel used across sections */
.glass-panel {
    background: rgba(13, 24, 46, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 242, 254, 0.15);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

.glass-panel-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel-hover:hover {
    border-color: rgba(0, 242, 254, 0.45);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.25);
    transform: translateY(-2px);
}

/* Seamless Logo Blend (Removes checkerboard background) */
.logo-blend-mode {
    mix-blend-mode: screen;
    filter: contrast(135%) brightness(115%);
}

.logo-wrapper {
    background-color: #050811;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
}

/* Cyan-blue gradient headline text */
.gradient-text {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #00d2ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #050811;
}
::-webkit-scrollbar-thumb {
    background: #1c2541;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #00f2fe;
}

/* ============================================================
   Success Modal (brand-styled popup replacing alert())
   ============================================================ */
@keyframes sgFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sgPop {
    0%   { opacity: 0; transform: translateY(18px) scale(0.92); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes sgFadeOut { to { opacity: 0; } }
@keyframes sgExit {
    to { opacity: 0; transform: translateY(10px) scale(0.96); }
}
@keyframes sgRing {
    0%   { box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.35); }
    70%  { box-shadow: 0 0 0 18px rgba(0, 242, 254, 0); }
    100% { box-shadow: 0 0 22px rgba(0, 210, 255, 0.3); }
}
@keyframes sgDraw {
    from { stroke-dashoffset: 48; }
    to   { stroke-dashoffset: 0; }
}

.sg-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(3, 6, 12, 0.74);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: sgFadeIn 0.25s ease both;
}
.sg-modal-overlay.sg-hide { animation: sgFadeOut 0.22s ease both; }

.sg-modal-card {
    position: relative;
    width: min(92vw, 420px);
    padding: 1px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.75), rgba(79, 172, 254, 0.35) 45%, rgba(0, 210, 255, 0.7));
    box-shadow: 0 24px 70px rgba(0, 10, 30, 0.6), 0 0 46px rgba(0, 242, 254, 0.22);
    animation: sgPop 0.38s cubic-bezier(0.18, 0.9, 0.32, 1.15) both;
}
.sg-modal-overlay.sg-hide .sg-modal-card { animation: sgExit 0.22s ease both; }

.sg-modal-inner {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #0e1830 0%, #0a1120 100%);
    border-radius: 21px;
    padding: 40px 32px 30px;
    text-align: center;
}
.sg-modal-inner::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 242, 254, 0.85), rgba(79, 172, 254, 0.85), transparent);
}

.sg-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8fa3c8;
    font-size: 16px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.2s, color 0.2s, transform 0.2s;
}
.sg-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #00f2fe;
    transform: rotate(90deg);
}

.sg-modal-icon {
    width: 82px;
    height: 82px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 32% 28%, rgba(0, 242, 254, 0.28), rgba(10, 29, 66, 0.9) 72%);
    border: 1px solid rgba(0, 210, 255, 0.35);
    animation: sgRing 1.8s ease-out 0.5s both;
}
.sg-modal-icon svg { width: 46px; height: 46px; }
.sg-check-path {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: sgDraw 0.55s ease-out 0.18s forwards;
}

.sg-modal-title {
    margin: 0 0 10px;
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #ffffff;
}
.sg-modal-msg {
    margin: 0 0 26px;
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    line-height: 1.65;
    color: #b7c4dd;
}
.sg-modal-btn {
    border: none;
    cursor: pointer;
    padding: 11px 30px;
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #050811;
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    box-shadow: 0 10px 26px rgba(0, 182, 255, 0.35);
    transition: filter 0.2s, transform 0.12s, box-shadow 0.2s;
}
.sg-modal-btn:hover {
    filter: brightness(1.12);
    box-shadow: 0 12px 32px rgba(0, 182, 255, 0.5);
}
.sg-modal-btn:active { transform: scale(0.97); }

@media (prefers-reduced-motion: reduce) {
    .sg-modal-overlay,
    .sg-modal-card,
    .sg-modal-overlay.sg-hide .sg-modal-card,
    .sg-modal-icon,
    .sg-check-path { animation: none !important; }
    .sg-check-path { stroke-dashoffset: 0; }
}