/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0a;
    --card-bg: rgba(255,255,255,0.03);
    --card-border: rgba(255,255,255,0.08);
    --accent-blue: #4f8fff;
    --accent-purple: #a855f7;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --text-primary: #f0f0f0;
    --text-secondary: rgba(255,255,255,0.5);
    --glow-blue: rgba(79,143,255,0.15);
    --glow-purple: rgba(168,85,247,0.15);
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', 'Space Grotesk', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== HYPERSPACE OVERLAY ===== */
.hyperspace-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    transition: opacity 0.6s ease-out;
}
.hyperspace-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}
.hyperspace-overlay.hidden {
    display: none;
}
#hyperspaceCanvas {
    width: 100%;
    height: 100%;
}
.hyperspace-flash {
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
}
.hyperspace-flash.flash {
    animation: flashBang 0.8s ease-out forwards;
}
@keyframes flashBang {
    0% { opacity: 0.9; }
    100% { opacity: 0; }
}

/* Hyperspace center text */
.hyperspace-text {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    pointer-events: none;
}
.ht-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.7);
    animation: htPulse 2s ease-in-out infinite;
}
.ht-loading {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: lowercase;
    color: rgba(255,255,255,0.35);
}
.ht-dots::after {
    content: '';
    animation: htDots 1.5s steps(4, end) infinite;
}
@keyframes htDots {
    0%  { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}
@keyframes htPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ===== NOISE OVERLAY ===== */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== GRID CANVAS ===== */
#gridCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
}

/* ===== GLOW ORBS ===== */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
    animation: orbFloat 12s ease-in-out infinite;
    transition: opacity 1.5s ease-out;
}
.glow-orb-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--glow-blue), transparent 70%);
    top: -10%; left: -5%;
    animation-delay: 0s;
}
.glow-orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--glow-purple), transparent 70%);
    bottom: -10%; right: -5%;
    animation-delay: -4s;
}
.glow-orb-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(6,182,212,0.1), transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -8s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(20px, 20px) scale(1.02); }
}
.glow-orb-3 {
    animation-name: orbFloatCenter;
}
@keyframes orbFloatCenter {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    25% { transform: translate(-45%, -55%) scale(1.1); }
    50% { transform: translate(-55%, -45%) scale(0.9); }
    75% { transform: translate(-48%, -52%) scale(1.05); }
}

/* ===== CONTAINER ===== */
.container {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== FLOW WRAPPER ===== */
.flow-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
}

/* ===== CARDS ROW ===== */
.cards-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    width: 100%;
}

/* ===== CARD WRAPPER ===== */
.card-wrapper {
    position: relative;
    opacity: 0;
    animation: cardReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.card-wrapper[data-delay="0.6"] { animation-delay: 0.6s; }
.card-wrapper[data-delay="0.8"] { animation-delay: 0.8s; }
.card-wrapper[data-delay="1.0"] { animation-delay: 1.0s; }
.card-wrapper[data-delay="1.2"] { animation-delay: 1.2s; }

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* ===== CONNECTORS ===== */
.connector {
    position: absolute;
    z-index: -1;
    pointer-events: none;
}
.connector svg {
    overflow: visible;
}
.connector-path {
    fill: none;
    stroke: rgba(255,255,255,0.06);
    stroke-width: 1.5;
    stroke-dasharray: 8 4;
    animation: dashFlow 2s linear infinite;
}
@keyframes dashFlow {
    to { stroke-dashoffset: -24; }
}

.connector-top-left {
    width: 120px; height: 60px;
    bottom: -60px; right: -10px;
}
.connector-top-right {
    width: 120px; height: 60px;
    bottom: -60px; left: -10px;
}
.connector-bottom-left {
    width: 120px; height: 60px;
    top: -60px; right: -10px;
}
.connector-bottom-right {
    width: 120px; height: 60px;
    top: -60px; left: -10px;
}

/* ===== CARDS ===== */
.card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 24px;
    width: 260px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* ===== CARD GLOW ===== */
.card-glow {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s;
    border-radius: 16px;
    pointer-events: none;
}
.card:hover .card-glow { opacity: 1; }

.card-software .card-glow {
    background: radial-gradient(circle at 30% 30%, rgba(79,143,255,0.08), transparent 60%);
}
.card-software:hover { border-color: rgba(79,143,255,0.3); }
.card-software .card-icon { color: var(--accent-blue); }

.card-agency .card-glow {
    background: radial-gradient(circle at 30% 30%, rgba(168,85,247,0.08), transparent 60%);
}
.card-agency:hover { border-color: rgba(168,85,247,0.3); }
.card-agency .card-icon { color: var(--accent-purple); }

.card-about .card-glow {
    background: radial-gradient(circle at 30% 30%, rgba(6,182,212,0.08), transparent 60%);
}
.card-about:hover { border-color: rgba(6,182,212,0.3); }
.card-about .card-icon { color: var(--accent-cyan); }

.card-contact .card-glow {
    background: radial-gradient(circle at 30% 30%, rgba(236,72,153,0.08), transparent 60%);
}
.card-contact:hover { border-color: rgba(236,72,153,0.3); }
.card-contact .card-icon { color: var(--accent-pink); }

/* ===== CARD ELEMENTS ===== */
.card-icon {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 8px;
    transition: transform 0.3s, background 0.3s;
}
.card:hover .card-icon {
    transform: scale(1.1);
    background: rgba(255,255,255,0.08);
}
.card-icon svg { width: 100%; height: 100%; }

.card-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.card-content p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 300;
    margin-top: 4px;
    line-height: 1.4;
}

.card-arrow {
    position: absolute;
    top: 20px; right: 20px;
    width: 20px; height: 20px;
    opacity: 0;
    transform: translate(-5px, 5px);
    transition: all 0.3s;
    color: var(--text-secondary);
}
.card:hover .card-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

/* ===== CARD ROW LAYOUT ===== */
.card-top-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}
.card-top-row .card-content {
    flex: 1;
    min-width: 0;
}

/* ===== CENTER HUB ===== */
.center-hub {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    opacity: 0;
    animation: hubReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}
@keyframes hubReveal {
    from { opacity: 0; transform: scale(0.5); filter: blur(20px); }
    to { opacity: 1; transform: scale(1); filter: blur(0); }
}

.hub-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.05);
}
.hub-ring-1 {
    width: 100%; height: 100%;
    animation: ringPulse 4s ease-in-out infinite;
}
.hub-ring-2 {
    width: 130%; height: 130%;
    animation: ringPulse 4s ease-in-out infinite 1.3s;
    border-color: rgba(79,143,255,0.05);
}
.hub-ring-3 {
    width: 160%; height: 160%;
    animation: ringPulse 4s ease-in-out infinite 2.6s;
    border-color: rgba(168,85,247,0.04);
}
@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 1; }
}

.hub-core {
    position: relative;
    z-index: 2;
    width: 120px; height: 120px;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: coreGlow 3s ease-in-out infinite;
}
@keyframes coreGlow {
    0%, 100% { box-shadow: 0 0 30px rgba(79,143,255,0.05), 0 0 60px rgba(168,85,247,0.03); }
    50% { box-shadow: 0 0 50px rgba(79,143,255,0.1), 0 0 100px rgba(168,85,247,0.06); }
}

.hub-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    background: linear-gradient(135deg, #fff 0%, var(--accent-blue) 50%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 4s ease-in-out infinite;
    background-size: 200% 200%;
}
@keyframes textShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hub-particles {
    position: absolute;
    inset: -20px;
    pointer-events: none;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 20px;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: rgba(18,18,18,0.95);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}
.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 16px; right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    line-height: 1;
}
.modal-close:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.modal-line {
    width: 50px; height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    margin-top: 12px;
    border-radius: 2px;
}

.modal-body {
    margin-top: 24px;
}
.modal-body p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    font-weight: 300;
}

/* ===== MODAL STATS ===== */
.modal-stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.stat {
    text-align: center;
    flex: 1;
}
.stat-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ===== CONTACT FORM ===== */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.form-group {
    position: relative;
}
.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    transition: all 0.3s;
    outline: none;
    resize: none;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(79,143,255,0.4);
    background: rgba(255,255,255,0.05);
    box-shadow: 0 0 20px rgba(79,143,255,0.05);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
}
.input-line {
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    transition: all 0.3s;
    transform: translateX(-50%);
    border-radius: 2px;
}
.form-group input:focus ~ .input-line,
.form-group textarea:focus ~ .input-line {
    width: 100%;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    opacity: 0;
    transition: opacity 0.3s;
}
.submit-btn:hover::before { opacity: 1; }
.submit-btn span, .submit-btn svg {
    position: relative; z-index: 1;
}
.submit-btn svg { width: 18px; height: 18px; }
.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(79,143,255,0.2);
}

.success-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    padding: 20px;
}
.success-message svg {
    width: 48px; height: 48px;
    color: #22c55e;
}
.success-message p {
    color: var(--text-primary) !important;
    font-weight: 500 !important;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .container {
        padding: 0;
    }
    .flow-wrapper {
        gap: 0;
        padding: 2vh 16px;
        justify-content: center;
        height: 100dvh;
        height: 100vh;
        max-height: 100dvh;
    }
    .cards-row {
        flex-direction: column;
        align-items: center;
        gap: 1.2vh;
    }
    .card {
        width: 85vw;
        max-width: 320px;
        padding: 2.2vh 16px;
        gap: 0;
        border-radius: 14px;
    }
    .card-top-row {
        gap: 12px;
    }
    .card-icon {
        width: 32px; height: 32px;
        min-width: 32px;
        padding: 6px;
        border-radius: 8px;
    }
    .card-content h3 {
        font-size: 0.85rem;
    }
    .card-content p {
        font-size: 0.68rem;
        margin-top: 1px;
    }
    .center-hub {
        width: 12vh;
        height: 12vh;
        max-width: 100px;
        max-height: 100px;
        margin: 1.5vh 0;
    }
    .hub-core {
        width: 75%;
        height: 75%;
    }
    .hub-text {
        font-size: clamp(0.6rem, 1.5vh, 0.85rem);
        letter-spacing: 0.1em;
    }
    .hub-ring-3 { display: none; }
    .connector { display: none; }
    .glow-orb-1 { width: 250px; height: 250px; }
    .glow-orb-2 { width: 200px; height: 200px; }
    .glow-orb-3 { width: 150px; height: 150px; }
    .modal {
        padding: 24px;
        border-radius: 16px;
    }
    .modal-header h2 { font-size: 1.2rem; }
    .modal-body p { font-size: 0.82rem; }
    .modal-stats { gap: 12px; }
    .stat-number { font-size: 1.3rem; }
    .stat-label { font-size: 0.65rem; }
}

@media (max-width: 380px) {
    .card {
        padding: 1.8vh 14px;
    }
    .card-icon {
        width: 28px; height: 28px;
        min-width: 28px;
        padding: 5px;
    }
    .card-content h3 {
        font-size: 0.8rem;
    }
    .card-content p {
        display: none;
    }
    .hub-ring-2, .hub-ring-3 { display: none; }
}

/* Kısa ekranlar (SE, küçük Android) */
@media (max-width: 768px) and (max-height: 700px) {
    .card {
        padding: 1.5vh 14px;
    }
    .cards-row {
        gap: 0.8vh;
    }
    .center-hub {
        width: 10vh;
        height: 10vh;
        margin: 1vh 0;
    }
    .card-content p {
        display: none;
    }
    .card-icon {
        width: 26px; height: 26px;
        min-width: 26px;
        padding: 5px;
    }
    .card-content h3 {
        font-size: 0.78rem;
    }
}

/* ===== LANDSCAPE MOBILE ===== */
@media (max-height: 500px) {
    .flow-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px;
        height: 100dvh;
        height: 100vh;
        padding: 8px 16px;
    }
    .cards-row {
        flex-direction: column;
        gap: 6px;
        width: auto;
    }
    .card {
        padding: 8px 12px;
        gap: 0;
        width: 170px;
    }
    .card-content p { display: none; }
    .card-content h3 { font-size: 0.72rem; }
    .card-icon {
        width: 24px; height: 24px;
        min-width: 24px;
        padding: 4px;
    }
    .center-hub {
        width: 60px; height: 60px;
        margin: 0 8px;
    }
    .hub-core {
        width: 46px; height: 46px;
    }
    .hub-text { font-size: 0.52rem; }
    .hub-ring-2, .hub-ring-3 { display: none; }
    .connector { display: none; }
}
